diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-06-04 13:07:06 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-04 13:07:06 +0000 |
commit | 82eda77ed5c4548bd5cbb3f5bbe6f3453a3d1eea (patch) | |
tree | 3c0127db39d15911aba3137af7f41daa9c7866bf /gcc/cppmacro.c | |
parent | 589005ff217dde6c3c22842e27315d597a8fe710 (diff) | |
download | gcc-82eda77ed5c4548bd5cbb3f5bbe6f3453a3d1eea.zip gcc-82eda77ed5c4548bd5cbb3f5bbe6f3453a3d1eea.tar.gz gcc-82eda77ed5c4548bd5cbb3f5bbe6f3453a3d1eea.tar.bz2 |
cpphash.h (FIRST, [...]): New.
* cpphash.h (FIRST, LAST, CUR, RLIMIT): New.
(struct cpp_context): Add traditional fields.
* cppmacro.c (paste_all_tokens, push_ptoken_context,
push_token_context, cpp_get_token, _cpp_backup_tokens): Update.
* cpptrad.c (skip_comment, lex_identifier,
_cpp_read_logical_line_trad, scan_out_logical_line): Update.
From-SVN: r54242
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 28095f2..ae5dfa9 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -425,9 +425,9 @@ paste_all_tokens (pfile, lhs) inserted. In either case, the constraints to #define guarantee we have at least one more token. */ if (context->direct_p) - rhs = context->first.token++; + rhs = FIRST (context).token++; else - rhs = *context->first.ptoken++; + rhs = *FIRST (context).ptoken++; if (rhs->type == CPP_PADDING) abort (); @@ -896,8 +896,8 @@ push_ptoken_context (pfile, macro, buff, first, count) context->direct_p = false; context->macro = macro; context->buff = buff; - context->first.ptoken = first; - context->last.ptoken = first + count; + FIRST (context).ptoken = first; + LAST (context).ptoken = first + count; } /* Push a list of tokens. */ @@ -913,8 +913,8 @@ push_token_context (pfile, macro, first, count) context->direct_p = true; context->macro = macro; context->buff = NULL; - context->first.token = first; - context->last.token = first + count; + FIRST (context).token = first; + LAST (context).token = first + count; } /* Expand an argument ARG before replacing parameters in a @@ -1004,12 +1004,12 @@ cpp_get_token (pfile) /* Context->prev == 0 <=> base context. */ if (!context->prev) result = _cpp_lex_token (pfile); - else if (context->first.token != context->last.token) + else if (FIRST (context).token != LAST (context).token) { if (context->direct_p) - result = context->first.token++; + result = FIRST (context).token++; else - result = *context->first.ptoken++; + result = *FIRST (context).ptoken++; if (result->flags & PASTE_LEFT) { @@ -1118,9 +1118,9 @@ _cpp_backup_tokens (pfile, count) if (count != 1) abort (); if (pfile->context->direct_p) - pfile->context->first.token--; + FIRST (pfile->context).token--; else - pfile->context->first.ptoken--; + FIRST (pfile->context).ptoken--; } } |