Branch: Tag:

2018-06-03

2018-06-03 21:05:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Cpp]: Documented some of the functions.

5160:      /*! @endnamespace */    +  /*! @decl void create(string|void current_file, @ +  *! int|string|void charset, object|void handler, @ +  *! void|int compat_major, void|int compat_minor, @ +  *! void|int picky_cpp) +  *! @decl void create(mapping(string:mixed) options) +  *! +  *! Initialize the preprocessor. +  *! +  *! @param options +  *! If the first argument is a mapping, no other arguments may follow. +  *! Instead, they have to be given as members of the mapping (if wanted). +  *! The following members are then recognized: +  *! +  *! @mapping +  *! @member string "current_file" +  *! Name of the current file. It is used for generating +  *! #line directives and for locating include files. +  *! @member int|string "charset" +  *! Charset to use when processing @expr{data@}. +  *! @member object "handler" +  *! Compilation handler. +  *! @member int "compat_major" +  *! Sets the major pike version used for compat handling. +  *! @member int "compat_minor" +  *! Sets the minor pike version used for compat handling. +  *! @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. +  *! @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"@}. +  *! +  *! @seealso +  *! @[compile()] +  */    PIKEFUN void create(mapping|string|void opts_or_file,    int|string|void charset_sv,    object|void handler,
5258:    pop_n_elems(args);    }    +  /*! @decl void define_ansi_macros() +  *! +  *! Adds some cpp macros defined by the ANSI-C standards, +  *! such as @[__FILE__], @[__LINE__], etc. +  *! +  *! @seealso +  *! @[define_pike_macros()] +  */    PIKEFUN void define_ansi_macros()    {    struct CPP_struct *this = THIS;
5273:    simple_add_define(this, "static_assert", "_Static_assert");    }    +  /*! @decl void define_pike_macros() +  *! +  *! Adds some pike-specific cpp macros, +  *! such as @[__DIR__], @[__VERSION__], [__PIKE__], etc. +  *! +  *! @seealso +  *! @[define_ansi_macros()] +  */    PIKEFUN void define_pike_macros()    {    struct CPP_struct *this = THIS;