aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-09-18 18:43:05 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-09-18 18:43:05 +0000
commit0d9f234d9317f291eb49dab50277efeee85e5b91 (patch)
tree46f9c8a95640d0cd590d2e287982ab8e1099e35e /gcc/cpphash.c
parent9f8e169eb7a21b2f374df31dd32beef667676a13 (diff)
downloadgcc-0d9f234d9317f291eb49dab50277efeee85e5b91.zip
gcc-0d9f234d9317f291eb49dab50277efeee85e5b91.tar.gz
gcc-0d9f234d9317f291eb49dab50277efeee85e5b91.tar.bz2
cpphash.h (HASHSTEP): Take character rather than pointer to character.
* cpphash.h (HASHSTEP): Take character rather than pointer to character. (_cpp_check_directive, _cpp_check_linemarker): Update prototypes. * cpphash.c (cpp_loookup): Update for new HASHSTEP. * cpplex.c (auto_expand_name_space, trigraph_replace, backslash_start, handle_newline, parse_name, INIT_TOKEN_STR, IMMED_TOKEN, PREV_TOKEN_TYPE, PUSH_TOKEN, REVISE_TOKEN, BACKUP_TOKEN, BACKUP_TRIGRAPH, MIGHT_BE_DIRECTIVE, KNOWN_DIRECTIVE): Delete. (handle_newline, check_long_token, skip_escaped_newlines, unterminated): New functions. (ACCEPT_CHAR, SAVE_STATE, RESTORE_STATE): New macros. (parse_identifier): Was parse_name, new implementation. (skip_line_comment, skip_block_comment, skip_whitespace, parse_number, parse_string, trigraph_ok, save_comment, adjust_column, _cpp_get_line): New implementations. (lex_token): New function. Lexes a token at a time, looking forwards. Contains most of the guts of the old lex_line. (lex_line): New implementation, using lex_token to obtain individual tokens. (cpp_scan_buffer): Use the token's line, not the list's line. * cpplib.c (_cpp_check_directive, _cpp_check_linemarker): New implementations. (do_assert): Don't bother setting the answer's list's line. (cpp_push_buffer): Initialise new pfile and read_ahead members of struct cpp_buffer. * cpplib.h (cppchar_t): New typedef. (struct cpp_buffer): read_ahead, pfile and col_adjust are new members. (struct lexer_state): New structure that determines the state and behaviour of the lexer. (IN_DIRECTIVE, KNOWN_DIRECTIVE): New macros. (struct cpp_reader): New member "state". Rename multiline_string_line and multiline_string_column. Delete col_adjust, in_lex_line members. (CPP_BUF_COLUMN): Update. * gcc.dg/cpp/cmdlne-C.c: Remove bogus warning test. From-SVN: r36509
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index c26f7b5..dee77a9 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -104,7 +104,7 @@ cpp_lookup (pfile, name, len)
do
{
- r = HASHSTEP (r, str);
+ r = HASHSTEP (r, *str);
str++;
}
while (--n);