pike.git
/
src
/
combine_path.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/combine_path.h:1:
/*
-
* $Id: combine_path.h,v 1.
6
2001/06/
10
17
:
07
:
33
grubba Exp $
+
* $Id: combine_path.h,v 1.
7
2001/06/
11
11
:
49
:
47
grubba Exp $
* * Combine path template. * */ #undef IS_SEP #undef IS_ABS #undef IS_ROOT #undef F_COMBINE_PATH #undef APPEND_PATH
pike.git/src/combine_path.h:86:
} #endif #define LAST_PUSHED() (s->s->len ? index_shared_string(s->s,s->s->len-1) : 0) #define PUSH(X) string_builder_putchar(s,(X)) /* Ensure s ends with a separator. */ if(s->s->len && !IS_SEP(LAST_PUSHED())) PUSH('/');
+
if (!len) return;
+
/* Remove initial "./" if any. */ if(s->s->len==2) { PCHARP to=MKPCHARP_STR(s->s); if(INDEX_PCHARP(to, 0) == '.') { s->s->len=0; s->known_shift=0; } }