aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-05-28 05:56:38 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-05-28 05:56:38 +0000
commitf8f769ea4e694c516b9631ae8f2215cc6d5fb96f (patch)
tree2f5db92bd0f352a3b3a9f86ac6b719d86650e290 /gcc/cpplib.c
parente79f71f73dd44748c28d7f94b29d293722345e26 (diff)
downloadgcc-f8f769ea4e694c516b9631ae8f2215cc6d5fb96f.zip
gcc-f8f769ea4e694c516b9631ae8f2215cc6d5fb96f.tar.gz
gcc-f8f769ea4e694c516b9631ae8f2215cc6d5fb96f.tar.bz2
cppfiles.c: Read files in, using mmap if possible, then prescan them separately.
* cppfiles.c: Read files in, using mmap if possible, then prescan them separately. (read_file, read_with_read): New functions. * cpplex.c: Don't define UCHAR_MAX. (_cpp_read_and_prescan): Rename to _cpp_prescan. Don't read the file here. * cppinit.c (handle_option): Automatically define __cplusplus, __OBJC__, __ASEEMBLER__, _LANGUAGE_FORTRAN here when we see the respective -lang switch. * cpphash.h (enum node_type, struct hashnode, _cpp_lookup prototype): Move to... * cpplib.h: ... here. Rename struct hashnode to struct cpp_hashnode and give it a typedef. Rename _cpp_lookup to cpp_lookup. Add 'fe_value' slot, a union tree_node *. From-SVN: r34228
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 4a09939..6cc99ec 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -339,7 +339,7 @@ static int
do_define (pfile)
cpp_reader *pfile;
{
- HASHNODE *node;
+ cpp_hashnode *node;
int len;
const U_CHAR *sym;
cpp_toklist *list = &pfile->directbuf;
@@ -371,7 +371,7 @@ do_define (pfile)
goto out;
}
- node = _cpp_lookup (pfile, sym, len);
+ node = cpp_lookup (pfile, sym, len);
/* Check for poisoned identifiers now. All other checks
are done in cpphash.c. */
if (node->type == T_POISON)
@@ -681,7 +681,7 @@ do_undef (pfile)
cpp_reader *pfile;
{
int len;
- HASHNODE *hp;
+ cpp_hashnode *hp;
U_CHAR *name;
long here = CPP_WRITTEN (pfile);
enum cpp_ttype token;
@@ -708,7 +708,7 @@ do_undef (pfile)
name = pfile->token_buffer + here;
CPP_SET_WRITTEN (pfile, here);
- hp = _cpp_lookup (pfile, name, len);
+ hp = cpp_lookup (pfile, name, len);
if (hp->type == T_VOID)
; /* Not defined in the first place - do nothing. */
else if (hp->type == T_POISON)
@@ -941,7 +941,7 @@ do_pragma_poison (pfile)
/* Poison these symbols so that all subsequent usage produces an
error message. */
U_CHAR *p;
- HASHNODE *hp;
+ cpp_hashnode *hp;
long written;
size_t len;
enum cpp_ttype token;
@@ -968,7 +968,7 @@ do_pragma_poison (pfile)
p = pfile->token_buffer + written;
len = CPP_PWRITTEN (pfile) - p;
- hp = _cpp_lookup (pfile, p, len);
+ hp = cpp_lookup (pfile, p, len);
if (hp->type == T_POISON)
; /* It is allowed to poison the same identifier twice. */
else
@@ -1528,7 +1528,7 @@ do_assert (pfile)
long old_written;
U_CHAR *sym;
size_t len;
- HASHNODE *hp;
+ cpp_hashnode *hp;
struct predicate *pred = 0;
enum cpp_ttype type;
@@ -1544,7 +1544,7 @@ do_assert (pfile)
sym = pfile->token_buffer + old_written;
len = CPP_WRITTEN (pfile) - old_written;
- hp = _cpp_lookup (pfile, sym, len);
+ hp = cpp_lookup (pfile, sym, len);
if (_cpp_get_directive_token (pfile) != CPP_OPEN_PAREN)
ERROR ("missing token-sequence in #assert");
@@ -1606,7 +1606,7 @@ do_unassert (pfile)
long old_written;
U_CHAR *sym;
size_t len;
- HASHNODE *hp;
+ cpp_hashnode *hp;
cpp_toklist ans;
enum cpp_ttype type;
int specific = 0;
@@ -1620,7 +1620,7 @@ do_unassert (pfile)
sym = pfile->token_buffer + old_written;
len = CPP_WRITTEN (pfile) - old_written;
- hp = _cpp_lookup (pfile, sym, len);
+ hp = cpp_lookup (pfile, sym, len);
type = _cpp_get_directive_token (pfile);
if (type == CPP_OPEN_PAREN)
@@ -1784,7 +1784,7 @@ cpp_defined (pfile, id, len)
const U_CHAR *id;
int len;
{
- HASHNODE *hp = _cpp_lookup (pfile, id, len);
+ cpp_hashnode *hp = cpp_lookup (pfile, id, len);
if (hp->type == T_POISON)
{
cpp_error (pfile, "attempt to use poisoned `%s'", hp->name);