pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin.cmod,v 1.248 2010/01/08 22:08:42 srb Exp $ + || $Id: builtin.cmod,v 1.249 2010/01/09 01:00:31 srb Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:814:    }    else    ws = 0;       init_string_builder_alloc (&sb, len, bshift);    if(bshift == shift)    sb.known_shift = bshift;    }   #define SPACECASE8 \    case ' ':case '\t':case '\r':case '\n':case '\v':case '\f': \ -  case 0x85:case 0xa0 - #define SPACECASE16 \ -  SPACECASE8:case 0x1680:case 0x180e: \ -  case 0x2000:case 0x2001:case 0x2002:case 0x2003:case 0x2004: \ -  case 0x2005:case 0x2006:case 0x2007:case 0x2008:case 0x2009: \ -  case 0x200a:case 0x2028:case 0x2029:case 0x202f:case 0x205f: \ -  case 0x3000 /* FIXME generate list from UnicodeData.txt */ +  case 0x85:case 0xa0: + #include "whitespace.h" +     switch (shift) {   #define NORMALISE_TIGHT_LOOP(TYPE,CASE) \    { \    const TYPE *start = src, *end = start+len; \    if (!ws) { \    TYPE *dst = (void*)sb.s->str; \    for (; start < end; start++) { \    switch(*start) { \ -  CASE: \ +  CASE \    continue; \    } \    break; \    } \    for (; start < end; start++) { \    if(*start<=' ' || *start>=0x85) /* optimise common case */ \    switch(*start) { \ -  CASE: \ +  CASE \    if (foundspace) \    continue; \    foundspace=1; *dst++ = ' '; \    continue; \    default:goto found##TYPE; \    } \    else \   found##TYPE: \    foundspace=0; \    *dst++ = *start; \