diff options
author | Neil Booth <neilb@earthling.net> | 2000-09-25 22:34:53 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-09-25 22:34:53 +0000 |
commit | 7de4d00450a017b0edbbbf620dcfc5d9326f163c (patch) | |
tree | e04909d8f7efef588ecf5b034183af04dbc5316d /gcc/cppmacro.c | |
parent | dcbd43e030914368ca0b5c089dc32cf8a208113d (diff) | |
download | gcc-7de4d00450a017b0edbbbf620dcfc5d9326f163c.zip gcc-7de4d00450a017b0edbbbf620dcfc5d9326f163c.tar.gz gcc-7de4d00450a017b0edbbbf620dcfc5d9326f163c.tar.bz2 |
cpphash.h (_cpp_digraph_spellings, [...]): New library-internal prototypes.
* cpphash.h (_cpp_digraph_spellings, _cpp_process_directive,
_cpp_can_paste): New library-internal prototypes.
* cpplex.c (dump_param_spelling, output_line_command,
output_token, cpp_scan_buffer, cpp_scan_buffer_nooutput,
cpp_printf, cpp_output_list): Move to cppoutput.c.
(process_directive, can_paste, digraph_spellings): Add _cpp_ prefix.
* cppmacro.c (dump_macro_args, cpp_dump_definition) Move to
cppoutput.c.
* cppoutput.c (dump_macro_args, cpp_dump_definition, output_token,
dump_param_spelling, output_line_command, cpp_scan_buffer,
cpp_scan_buffer_nooutput, cpp_printf, cpp_output_list): Moved
from elsewhere.
* Makefile.in: Add cppoutput.c.
* po/POTFILES.in: Add cppoutput.c.
From-SVN: r36634
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 82dfd7f..321b318 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -40,7 +40,6 @@ struct macro_info unsigned char flags; }; -static void dump_macro_args PARAMS ((FILE *, const cpp_toklist *)); static void count_params PARAMS ((cpp_reader *, struct macro_info *)); static int is__va_args__ PARAMS ((cpp_reader *, const cpp_token *)); @@ -577,57 +576,6 @@ _cpp_create_definition (pfile, hp) return 1; } -/* Dump the definition of macro MACRO on FP. The format is suitable - to be read back in again. Caller is expected to generate the - "#define NAME" bit. */ - -void -cpp_dump_definition (pfile, fp, hp) - cpp_reader *pfile; - FILE *fp; - const cpp_hashnode *hp; -{ - const cpp_toklist *list = hp->value.expansion; - - if (hp->type != T_MACRO) - { - cpp_ice (pfile, "invalid hash type %d in dump_definition", hp->type); - return; - } - - if (list->paramc >= 0) - dump_macro_args (fp, list); - - putc (' ', fp); - cpp_output_list (pfile, fp, list, list->tokens); -} - -static void -dump_macro_args (fp, list) - FILE *fp; - const cpp_toklist *list; -{ - int i; - const U_CHAR *param = list->namebuf; - - putc ('(', fp); - for (i = 0; i++ < list->paramc;) - { - unsigned int len; - - len = ustrlen (param); - if (!(list->flags & VAR_ARGS) || ustrcmp (param, U"__VA_ARGS__")) - ufputs (param, fp); - if (i < list->paramc) - fputs (", ", fp); - else if (list->flags & VAR_ARGS) - fputs ("...", fp); - - param += len + 1; - } - putc (')', fp); -} - /* Warn if a token in `string' matches one of the function macro arguments in `info'. This function assumes that the macro is a function macro and not an object macro. */ |