diff options
author | Neil Booth <neilb@earthling.net> | 2000-03-11 00:49:44 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-03-11 00:49:44 +0000 |
commit | 7ceb3598d8bd3cb6c00f1ebe08d468f5e8bbdbf1 (patch) | |
tree | e46c121978cf65e83ae4affddf04e3996e26128a /gcc/cppinit.c | |
parent | fca9f642280728a9a473e755571b76219a368aea (diff) | |
download | gcc-7ceb3598d8bd3cb6c00f1ebe08d468f5e8bbdbf1.zip gcc-7ceb3598d8bd3cb6c00f1ebe08d468f5e8bbdbf1.tar.gz gcc-7ceb3598d8bd3cb6c00f1ebe08d468f5e8bbdbf1.tar.bz2 |
cppfiles.c (file_cleanup, [...]): Replace bcopy(), index() etc calls.
* cppfiles.c (file_cleanup, _cpp_find_include_file,
remap_filename, _cpp_read_include_file, actual_directory,
hack_vms_include_specification): Replace bcopy(), index() etc
calls. Add casts to some allocations. Make some variables
pointers to const [unsigned] char.
* cpphash.c (_cpp_install, macro_cleanup, collect_expansion,
collect_formal_parameters): Similarly.
* cppinit.c (struct pending_option, append_include_chain,
cpp_options_init, cpp_reader_init, initialize_standard_includes,
cpp_start_read, new_pending_define, handle_option): Similarly.
* cpplib.c (cpp_define, copy_comment, do_define, do_include,
do_undef, do_error, do_warning, do_pragma, do_pragma_once,
do_pragma_implementation, detect_if_not_defined,
do_ifdef, skip_if_group, cpp_get_token, parse_string,
do_assert, do_unassert): Similarly.
* cpplib.h (cpp_buffer, cpp_options): Update types. Update
function prototypes.
* mkdeps.c (deps_add_target, deps_add_dep): cast allocations.
From-SVN: r32477
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index c66f045..be57eaa 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -167,7 +167,7 @@ static const struct default_include include_defaults_array[] struct pending_option { struct pending_option *next; - char *arg; + const char *arg; int undef; }; @@ -354,7 +354,7 @@ append_include_chain (pfile, pend, dir, path, cxx_aware) if (len > pfile->max_include_len) pfile->max_include_len = len; - new = (struct file_name_list *)xmalloc (sizeof (struct file_name_list)); + new = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); new->name = dir; new->nlen = len; new->ino = st.st_ino; @@ -530,7 +530,7 @@ void cpp_options_init (opts) cpp_options *opts; { - bzero ((char *) opts, sizeof (struct cpp_options)); + memset ((char *) opts, 0, sizeof (struct cpp_options)); opts->dollars_in_ident = 1; opts->cplusplus_comments = 1; @@ -546,7 +546,7 @@ void cpp_reader_init (pfile) cpp_reader *pfile; { - bzero ((char *) pfile, sizeof (cpp_reader)); + memset ((char *) pfile, 0, sizeof (cpp_reader)); pfile->token_buffer_size = 200; pfile->token_buffer = (U_CHAR *) xmalloc (pfile->token_buffer_size); @@ -747,7 +747,7 @@ initialize_standard_includes (pfile) cpp_options *opts = CPP_OPTIONS (pfile); char *path; const struct default_include *p; - char *specd_prefix = opts->include_prefix; + const char *specd_prefix = opts->include_prefix; /* Several environment variables may add to the include search path. CPATH specifies an additional list of directories to be searched @@ -841,7 +841,7 @@ initialize_standard_includes (pfile) int cpp_start_read (pfile, fname) cpp_reader *pfile; - char *fname; + const char *fname; { struct cpp_options *opts = CPP_OPTIONS (pfile); struct pending_option *p, *q; @@ -1054,7 +1054,7 @@ new_pending_define (opts, text) struct pending_option *o = (struct pending_option *) xmalloc (sizeof (struct pending_option)); - o->arg = (char *) text; + o->arg = text; o->next = NULL; o->undef = 0; APPEND (opts->pending, define, o); @@ -1268,7 +1268,7 @@ handle_option (pfile, argc, argv) { enum opt_code opt_code; int opt_index; - char *arg = 0; + const char *arg = 0; /* Skip over '-' */ opt_index = parse_option (&argv[i][1]); |