pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1524:
unsigned shift = s->size_shift, replspace; const void *ws; void *wstemp = 0; struct string_builder sb; unsigned foundspace = 0; wlen = replspace = 0; /* useless, but suppresses silly compiler warning */ { unsigned bshift = shift, wshift;
-
if(whitespace)
-
if(!(wlen = whitespace->len))
+
if(whitespace)
{
+
if(!(wlen = whitespace->len))
{
REF_RETURN s;
-
else {
+
}
else {
ws = whitespace->str; wshift = whitespace->size_shift; replspace = index_shared_string(whitespace, 0); if(replspace > 0xffff) bshift = 2; else if(replspace > 0xff && !bshift) bshift = 1; if(wshift!=shift) { /* convert whitespace to shift of input */ PCHARP pcnws; wstemp = xalloc(wlen<<shift); pcnws = MKPCHARP(wstemp, shift);
pike.git/src/builtin.cmod:1552:
do { unsigned chr = INDEX_PCHARP(pcows, i++); if (chr<=0xff || (chr<=0xffff && shift)) /* shift is 0 or 1 */ SET_INDEX_PCHARP(pcnws, wlen++, chr); } while(--clen); } else pike_string_cpy(pcnws, whitespace); ws = wstemp; } }
-
else
+
}
else
ws = 0; init_string_builder_alloc (&sb, len, bshift); if(bshift == shift) sb.known_shift = bshift; } switch (shift) { #define NORMALISE_TIGHT_LOOP(TYPE,CASE) \ { \