diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-06-17 06:17:44 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-06-17 06:17:44 +0000 |
commit | 6cf87ca4e574edb0bf2bcb2cf396adb6e040311d (patch) | |
tree | aba39e5edc2926935bd59dd4f66f9b3d59447d19 /gcc/cppinit.c | |
parent | 82620aaf0b59eead65b65bbaa3db5606df4027f9 (diff) | |
download | gcc-6cf87ca4e574edb0bf2bcb2cf396adb6e040311d.zip gcc-6cf87ca4e574edb0bf2bcb2cf396adb6e040311d.tar.gz gcc-6cf87ca4e574edb0bf2bcb2cf396adb6e040311d.tar.bz2 |
* cpplib.h, cpphash.h, cppcharset.c, cpperror.c, cppexp.c
* cppfiles.c, cpphash.c, cppinit.c, cpplex.c, cpplib.c
* cppmacro.c, cpppch.c, cpptrad.c, cppspec.c: Convert to
ISO C: new-style function declarations, no need for PARAMS,
no special punctuation on indirect function calls, use string
constant concatenation where convenient.
From-SVN: r68070
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 60 |
1 files changed, 22 insertions, 38 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index e1d125e..1792ddd 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -27,10 +27,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "cpphash.h" #include "mkdeps.h" -static void init_library PARAMS ((void)); -static void mark_named_operators PARAMS ((cpp_reader *)); -static void read_original_filename PARAMS ((cpp_reader *)); -static void post_options PARAMS ((cpp_reader *)); +static void init_library (void); +static void mark_named_operators (cpp_reader *); +static void read_original_filename (cpp_reader *); +static void post_options (cpp_reader *); /* If we have designated initializers (GCC >2.7) these tables can be initialized, constant data. Otherwise, they have to be filled in at @@ -47,7 +47,7 @@ __extension__ const uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { #else #define TRIGRAPH_MAP uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ - static void init_trigraph_map PARAMS ((void)) { \ + static void init_trigraph_map (void) { \ unsigned char *x = _cpp_trigraph_map; #define END } @@ -91,9 +91,7 @@ static const struct lang_flags lang_defaults[] = /* Sets internal flags correctly for a given language. */ void -cpp_set_lang (pfile, lang) - cpp_reader *pfile; - enum c_lang lang; +cpp_set_lang (cpp_reader *pfile, enum c_lang lang) { const struct lang_flags *l = &lang_defaults[(int) lang]; @@ -110,7 +108,7 @@ cpp_set_lang (pfile, lang) /* Initialize library global state. */ static void -init_library () +init_library (void) { static int initialized = 0; @@ -127,9 +125,7 @@ init_library () /* Initialize a cpp_reader structure. */ cpp_reader * -cpp_create_reader (lang, table) - enum c_lang lang; - hash_table *table; +cpp_create_reader (enum c_lang lang, hash_table *table) { cpp_reader *pfile; @@ -205,8 +201,7 @@ cpp_create_reader (lang, table) /* Free resources used by PFILE. Accessing PFILE after this function returns leads to undefined behavior. Returns the error count. */ void -cpp_destroy (pfile) - cpp_reader *pfile; +cpp_destroy (cpp_reader *pfile) { cpp_context *context, *contextn; tokenrun *run, *runn; @@ -309,8 +304,7 @@ static const struct builtin operator_array[] = /* Mark the C++ named operators in the hash table. */ static void -mark_named_operators (pfile) - cpp_reader *pfile; +mark_named_operators (cpp_reader *pfile) { const struct builtin *b; @@ -329,9 +323,7 @@ mark_named_operators (pfile) macros, into the hash table. HOSTED is true if this is a hosted environment. */ void -cpp_init_builtins (pfile, hosted) - cpp_reader *pfile; - int hosted; +cpp_init_builtins (cpp_reader *pfile, int hosted) { const struct builtin *b; size_t n = ARRAY_SIZE (builtin_array); @@ -368,9 +360,8 @@ cpp_init_builtins (pfile, hosted) /* Sanity-checks are dependent on command-line options, so it is called as a subroutine of cpp_read_main_file (). */ #if ENABLE_CHECKING -static void sanity_checks PARAMS ((cpp_reader *)); -static void sanity_checks (pfile) - cpp_reader *pfile; +static void sanity_checks (cpp_reader *); +static void sanity_checks (cpp_reader *pfile) { cppchar_t test = 0; size_t max_precision = 2 * CHAR_BIT * sizeof (cpp_num_part); @@ -383,7 +374,8 @@ static void sanity_checks (pfile) if (CPP_OPTION (pfile, precision) > max_precision) cpp_error (pfile, DL_ICE, - "preprocessor arithmetic has maximum precision of %lu bits; target requires %lu bits", + "preprocessor arithmetic has maximum precision of %lu bits;" + " target requires %lu bits", (unsigned long) max_precision, (unsigned long) CPP_OPTION (pfile, precision)); @@ -408,7 +400,8 @@ static void sanity_checks (pfile) if (CPP_OPTION (pfile, wchar_precision) > BITS_PER_CPPCHAR_T) cpp_error (pfile, DL_ICE, - "CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits", + "CPP on this host cannot handle wide character constants over" + " %lu bits, but the target requires %lu bits", (unsigned long) BITS_PER_CPPCHAR_T, (unsigned long) CPP_OPTION (pfile, wchar_precision)); } @@ -420,10 +413,7 @@ static void sanity_checks (pfile) cpp_read_main_file(). If no targets have been added before cpp_read_main_file(), then the default target is used. */ void -cpp_add_dependency_target (pfile, target, quote) - cpp_reader *pfile; - const char *target; - int quote; +cpp_add_dependency_target (cpp_reader *pfile, const char *target, int quote) { if (!pfile->deps) pfile->deps = deps_init (); @@ -436,9 +426,7 @@ cpp_add_dependency_target (pfile, target, quote) or stdin if it is the empty string. Return the original filename on success (e.g. foo.i->foo.c), or NULL on failure. */ const char * -cpp_read_main_file (pfile, fname) - cpp_reader *pfile; - const char *fname; +cpp_read_main_file (cpp_reader *pfile, const char *fname) { sanity_checks (pfile); @@ -480,8 +468,7 @@ cpp_read_main_file (pfile, fname) generate file_change callbacks, which the front ends must handle appropriately given their state of initialization. */ static void -read_original_filename (pfile) - cpp_reader *pfile; +read_original_filename (cpp_reader *pfile) { const cpp_token *token, *token1; @@ -512,9 +499,7 @@ read_original_filename (pfile) Maybe it should also reset state, such that you could call cpp_start_read with a new filename to restart processing. */ int -cpp_finish (pfile, deps_stream) - cpp_reader *pfile; - FILE *deps_stream; +cpp_finish (cpp_reader *pfile, FILE *deps_stream) { /* Warn about unused macros before popping the final buffer. */ if (CPP_OPTION (pfile, warn_unused_macros)) @@ -546,8 +531,7 @@ cpp_finish (pfile, deps_stream) } static void -post_options (pfile) - cpp_reader *pfile; +post_options (cpp_reader *pfile) { /* -Wtraditional is not useful in C++ mode. */ if (CPP_OPTION (pfile, cplusplus)) |