pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:1915:    } else {    /* String didn't contain 0xfeff */    free_string_builder(&buf);    }    }    return(data);   }      #define PUSH_STRING0(X,Y,Z) add_quoted_string( X,Y,0,Z)   #define PUSH_STRING_SHIFT(X,Y,Z,A) add_quoted_string(X,Y,Z,A) - #define WC_ISSPACE wide_isspace +    #define WC_ISIDCHAR wide_isidchar   /*    * Generic macros    */      #define CHECK_WORD(X,LEN) (begins_with(X,ADD_PCHARP(data,pos),(LEN),len-pos,1))   #define GOBBLE_WORD(X) (CHECK_WORD(X,NELEM(X)) ? (pos+=NELEM(X)),1 : 0)   #define FIND_END_OF_STRING(FLAGS) (pos=find_end_quote(this,data,len,pos,'\"',FLAGS))   #define FIND_END_OF_CHAR() (pos=find_end_quote(this,data,len,pos,'\'',CPP_END_AT_NEWLINE))   #define FIND_EOL_PRETEND() (pos=find_end_of_line(this,data,len,pos,0))
pike.git/src/cpp.cmod:2270:    INT_TYPE old_line = this->current_line;    this->current_line = start_line;    cpp_error_sprintf(this, "Missing ) in the meta function %S().",    func_name);    this->current_line = old_line;    free_string (func_name);    return pos-1;    }    /* FALL_THROUGH */    default: -  if (WC_ISSPACE(DATA(pos-1))) { +  if (wide_isspace(DATA(pos-1))) {    SKIPWHITE();    continue;    }    break;    }    end = pos;    }       if (start != end) {    push_string(make_shared_binary_pcharp(ADD_PCHARP(data,start), end-start));
pike.git/src/cpp.cmod:2749:       return pos;   }      static void string_builder_append_cpp_quoted_pcharp(struct string_builder *s,    PCHARP a,    size_t l)   {    size_t e;    for(e=0; e<l;) { -  if (WC_ISSPACE(INDEX_PCHARP(a, e)) || +  if (wide_isspace(INDEX_PCHARP(a, e)) ||    INDEX_PCHARP(a, e)=='"' || INDEX_PCHARP(a, e)=='\\') {    if (e) {    string_builder_append(s, a, e);    }    if (INDEX_PCHARP(a, e) == '"' || INDEX_PCHARP(a, e)=='\\') {    /* String or quote. */    string_builder_putchar(s, '\\');    string_builder_putchar(s, INDEX_PCHARP(a, e));    if (INDEX_PCHARP(a, e) == '"') {    for (e++; e < l; e++) {
pike.git/src/cpp.cmod:2780:    string_builder_putchar(s, '\\');    }    string_builder_putchar(s, INDEX_PCHARP(a, e));    }    }    string_builder_putchar(s, '\\');    string_builder_putchar(s, '"');    }    } else {    /* White space. */ -  while ((e < l) && WC_ISSPACE(INDEX_PCHARP(a, e))) { +  while ((e < l) && wide_isspace(INDEX_PCHARP(a, e))) {    e++;    }    if (e != l) {    string_builder_putchar(s, ' ');    }    }    INC_PCHARP(a, e);    l -= e;    e = 0;    } else {
pike.git/src/cpp.cmod:2859:    string_builder_putchar(&tmp, ' ');       if(argument & DEF_ARG_STRINGIFY)    {    /* NOTE: At entry a[0] is non white-space. */    string_builder_putchar(&tmp, '"');    string_builder_append_cpp_quoted_pcharp(&tmp, a, l);    string_builder_putchar(&tmp, '"');    }else{    /* Strip leading and trailing white-space. */ -  while(l && WC_ISSPACE(EXTRACT_PCHARP(a))) +  while(l && wide_isspace(EXTRACT_PCHARP(a)))    INC_PCHARP(a,1),l--;    -  while(l && WC_ISSPACE(INDEX_PCHARP(a,l-1))) +  while(l && wide_isspace(INDEX_PCHARP(a,l-1)))    l--;       if(argument & (DEF_ARG_NOPRESPACE | DEF_ARG_NOPOSTSPACE))    {    string_builder_append( &tmp, a, l );    }else{    struct string_builder save;    INT_TYPE line = this->current_line;    /* FIXME: Shouldn't we save current_file too? */    save=this->buf;