pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:5049:    *! @member int "picky_cpp"    *! Generate more warnings.    *! @member int "keep_comments"    *! This option keeps @[cpp()] from removing comments.    *! Useful in combination with the prefix feature below.    *! @member string "prefix"    *! If a prefix is given, only prefixed directives will be    *! processed. For example, if the prefix is @expr{"foo"@}, then    *! @expr{#foo_ifdef COND@} and @expr{foo___LINE__@} would be    *! processed, @expr{#ifdef COND@} and @expr{__LINE__@} would not. +  *! @member mapping(string:mixed) "predefines" +  *! Mapping of predefined macros in addition to those +  *! returned by @[CPP()->get_predefines()].    *! @endmapping    *!    *! @param current_file    *! If the @[current_file] argument has not been specified,    *! it will default to @expr{"-"@}.    *!    *! @param charset    *! Turn on automatic character set detection if @expr{1@}, otherwise    *! specifies the character set used by the input.    *! Defaults to @expr{"ISO-10646"@}.
pike.git/src/cpp.cmod:5121:    Pike_error("Expected type string|int, got type %s for charset.",    get_name_of_type(TYPEOF(*tmp)));    }    }    if (GET_TYPE(OBJECT, "handler")) handler = tmp->u.object;    if (GET_TYPE(INT, "compat_major")) compat_major = tmp->u.integer;    if (GET_TYPE(INT, "compat_minor")) compat_minor = tmp->u.integer;    if (GET_TYPE(INT, "picky")) picky_cpp = tmp->u.integer;    if (GET_TYPE(STRING, "prefix")) prefix = tmp->u.string;    if (GET_TYPE(INT, "keep_comments")) this->keep_comments = tmp->u.integer; +  if (GET_TYPE(MAPPING, "predefines")) { +  ref_push_mapping(tmp->u.mapping); +  apply_current(f_CPP_define_multiple_macros_fun_num, 1); +  pop_stack(); +  }   #undef GET_TYPE    } else if (TYPEOF(*opts_or_file) == PIKE_T_STRING) {    current_file = opts_or_file->u.string;    }    }       if(current_file) {    add_ref(current_file);    if (!this->current_file && (current_file->len == 1) &&    !current_file->size_shift && current_file->str[0] == '-') {
pike.git/src/cpp.cmod:5464:    *! @member int "picky_cpp"    *! Generate more warnings.    *! @member int "keep_comments"    *! This option keeps @[cpp()] from removing comments.    *! Useful in combination with the prefix feature below.    *! @member string "prefix"    *! If a prefix is given, only prefixed directives will be    *! processed. For example, if the prefix is @expr{"foo"@}, then    *! @expr{#foo_ifdef COND@} and @expr{foo___LINE__@} would be    *! processed, @expr{#ifdef COND@} and @expr{__LINE__@} would not. +  *! @member mapping(string:mixed) "predefines" +  *! Mapping of predefined macros in addition to those +  *! returned by @[CPP()->get_predefines()].    *! @endmapping    *!    *! @seealso    *! @[compile()]    */      PIKEFUN string cpp(string data,    mapping|string|void opts_or_file,    int|string|void charset_sv,    object|void handler,