summaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-24 22:07:36 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-24 22:07:36 +0000
commitc7148c3cc66d9764a192860082125c95c86f67f9 (patch)
tree78d00b64242d62d8f1d39589de74e11555f571d6 /gcc/cpphash.c
parentc9b4be0aebe2bbf945171a2232ddcf85009b94b2 (diff)
downloadgcc-c7148c3cc66d9764a192860082125c95c86f67f9.tar.gz
* cpphash.c: replace HSPACE_BEFORE with PREV_WHITESPACE.
* cpphash.h (_cpp_check_directive): new. * cpplex.c (handle_newline, cpp_free_token_list, init_trigraph_map, trigraph_ok, trigraph_replace, backslash_start, skip_block_comment, skip_line_comment, skip_whitespace, parse_name, parse_number, parse_string, copy_comment, _cpp_lex_line, spell_char, spell_string, spell_comment, spell_name, spell_other, _cpp_lex_file, _cpp_output_list): new. (expand_name_space): take length argument. (init_token_list): add comment list initialisation. (cpp_scan_line): use auto_expand_name_space. PREV_WHITESPACE instead of HSPACE_BEFORE. * cpplib.c (_cpp_check_directive): new * cpplib.h (cpp_name, PREV_WHITESPACE, PREV_COMMENT, DIGRAPH, UNSIGNED_INT, TOK_NAME): new. (HSPACE_BEFORE): delete. (TTYPE_TABLE): rearrange. (struct cpp_toklist): update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33390 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index 5817e964426..ac8294d9690 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -459,7 +459,8 @@ collect_objlike_expansion (pfile, list)
default:;
}
- if (i > 1 && !last_was_paste && (list->tokens[i].flags & HSPACE_BEFORE))
+ if (i > 1 && !last_was_paste
+ && (list->tokens[i].flags & PREV_WHITESPACE))
CPP_PUTC (pfile, ' ');
CPP_PUTS (pfile,
@@ -571,10 +572,10 @@ collect_funlike_expansion (pfile, list, arglist, replacement)
}
if (last_token != PASTE && last_token != START
- && (list->tokens[i].flags & HSPACE_BEFORE))
+ && (list->tokens[i].flags & PREV_WHITESPACE))
CPP_PUTC (pfile, ' ');
if (last_token == ARG && CPP_TRADITIONAL (pfile)
- && !(list->tokens[i].flags & HSPACE_BEFORE))
+ && !(list->tokens[i].flags & PREV_WHITESPACE))
endpat->raw_after = 1;
switch (token)
@@ -616,7 +617,7 @@ collect_funlike_expansion (pfile, list, arglist, replacement)
{
int raw_before = (last_token == PASTE
|| (CPP_TRADITIONAL (pfile)
- && !(list->tokens[i].flags & HSPACE_BEFORE)));
+ && !(list->tokens[i].flags & PREV_WHITESPACE)));
add_pat (&pat, &endpat,
CPP_WRITTEN (pfile) - last /* nchars */, j /* argno */,
@@ -865,7 +866,7 @@ _cpp_create_definition (pfile, list, hp)
/* The macro is function-like only if the next character,
with no intervening whitespace, is '('. */
else if (list->tokens[1].type == CPP_OPEN_PAREN
- && ! (list->tokens[1].flags & HSPACE_BEFORE))
+ && ! (list->tokens[1].flags & PREV_WHITESPACE))
{
struct arglist args;
int replacement;