aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-03-07 20:58:47 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-03-07 20:58:47 +0000
commitb0699daddf1eead3861e67808ac915f21f82dcf3 (patch)
tree1a0ac2a2bf6f6751175dddcf0bf7464c1266fe1a /gcc/cppinit.c
parent79e69af0254238d0b5fa1940c5f7ecfce9e11bcd (diff)
downloadgcc-b0699daddf1eead3861e67808ac915f21f82dcf3.zip
gcc-b0699daddf1eead3861e67808ac915f21f82dcf3.tar.gz
gcc-b0699daddf1eead3861e67808ac915f21f82dcf3.tar.bz2
cppfiles.c (_cpp_find_include_file): Make sure ih->name is initialized.
* cppfiles.c (_cpp_find_include_file): Make sure ih->name is initialized. * cppinit.c (cpp_cleanup): Free imp->nshort also. * cpperror.c (cpp_print_containing_files, cpp_print_file_and_line, v_cpp_message): Rename to print_containing_files, print_file_and_line, and v_message. * cppexp.c (cpp_parse_expr, cpp_parse_escape, cpp_lex): Rename to _cpp_parse_expr, parse_escape, and lex. (parse_charconst): Remove broken multibyte support. * cppfiles.c (include_hash): Make static. (cpp_included): New function. (merge_include_chains, find_include_file, finclude, simplify_pathname): Rename to _cpp_merge_include_chains, _cpp_find_include_file, _cpp_read_include_file, and _cpp_simplify_pathname. * cpphash.c (cpp_lookup, free_definition, delete_macro, cpp_install, create_definition, macroexpand, compare_defs, dump_definition): Rename to _cpp_lookup, _cpp_free_definition, _cpp_delete_macro, _cpp_install, _cpp_create_definition, _cpp_macroexpand, _cpp_compare_defs, and _cpp_dump_definition. * cppinit.c (cpp_handle_option): Rename to handle_option, make static. * cpplib.c: Remove extern prototype of cpp_parse_expr. * cpphash.h: Update prototypes. * cpplib.h: Likewise. Prototype _cpp_parse_expr here. From-SVN: r32390
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 4286ecb..0991a95 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -183,6 +183,7 @@ static void initialize_dependency_output PARAMS ((cpp_reader *));
static void initialize_standard_includes PARAMS ((cpp_reader *));
static void new_pending_define PARAMS ((struct cpp_options *,
const char *));
+static int handle_option PARAMS ((cpp_reader *, int, char **));
/* Fourth argument to append_include_chain: chain to use */
enum { QUOTE = 0, BRACKET, SYSTEM, AFTER };
@@ -293,7 +294,7 @@ append_include_chain (pfile, pend, dir, path, cxx_aware)
struct stat st;
unsigned int len;
- simplify_pathname (dir);
+ _cpp_simplify_pathname (dir);
if (stat (dir, &st))
{
/* Dirs that don't exist are silently ignored. */
@@ -428,6 +429,7 @@ cpp_cleanup (pfile)
struct include_hash *next = imp->next;
free ((PTR) imp->name);
+ free ((PTR) imp->nshort);
free (imp);
imp = next;
}
@@ -437,7 +439,7 @@ cpp_cleanup (pfile)
for (i = HASHSIZE; --i >= 0;)
{
while (pfile->hashtab[i])
- delete_macro (pfile->hashtab[i]);
+ _cpp_delete_macro (pfile->hashtab[i]);
}
free (pfile->hashtab);
}
@@ -507,7 +509,7 @@ initialize_builtins (pfile)
val = (b->flags & ULP) ? user_label_prefix : b->value;
len = strlen (b->name);
- cpp_install (pfile, b->name, len, b->type, val);
+ _cpp_install (pfile, b->name, len, b->type, val);
if ((b->flags & DUMP) && CPP_OPTIONS (pfile)->debug_output)
dump_special_to_buffer (pfile, b->name);
}
@@ -719,7 +721,7 @@ cpp_start_read (pfile, fname)
if (! opts->no_standard_includes)
initialize_standard_includes (pfile);
- merge_include_chains (opts);
+ _cpp_merge_include_chains (opts);
/* With -v, print the list of dirs to search. */
if (opts->verbose)
@@ -876,7 +878,8 @@ cpp_finish (pfile)
for (h = pfile->hashtab[i]; h; h = h->next)
if (h->type == T_MACRO)
{
- dump_definition (pfile, h->name, h->length, h->value.defn);
+ _cpp_dump_definition (pfile, h->name, h->length,
+ h->value.defn);
CPP_PUTC (pfile, '\n');
}
}
@@ -901,8 +904,8 @@ new_pending_define (opts, text)
Can be called multiple times, to handle multiple sets of options.
Returns number of strings consumed. */
-int
-cpp_handle_option (pfile, argc, argv)
+static int
+handle_option (pfile, argc, argv)
cpp_reader *pfile;
int argc;
char **argv;
@@ -1493,7 +1496,7 @@ cpp_handle_options (pfile, argc, argv)
int strings_processed;
for (i = 0; i < argc; i += strings_processed)
{
- strings_processed = cpp_handle_option (pfile, argc - i, argv + i);
+ strings_processed = handle_option (pfile, argc - i, argv + i);
if (strings_processed == 0)
break;
}