diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-02-08 21:27:02 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-02-08 21:27:02 +0000 |
commit | 5fa7f88c064df849718157fb4e90fa865e35fb5b (patch) | |
tree | dc89fdbfec79835dff420526e91afe6ae04f9ca8 /gcc/scan.c | |
parent | 4be2e5d967e76bdec83d5b6d08d7b9c5ccacad75 (diff) | |
download | gcc-5fa7f88c064df849718157fb4e90fa865e35fb5b.tar.gz |
Makefile.in (GEN_PROTOS_OBJS): Remove libcpp.a.
* Makefile.in (GEN_PROTOS_OBJS): Remove libcpp.a.
(gen_protos.o): Don't depend on cpplib.h or cpphash.h.
(fix-header.o): Don't depend on cpphash.h.
* scan.c (hashstr): New function.
* scan.h: Prototype it.
* fix-header.c: Don't include cpphash.h. Use hashstr.
* gen-protos.c: Don't include cpphash.h or cpplib.h. Use
hashstr. Report hash table statistics. Add private
definition of xrealloc.
From-SVN: r31854
Diffstat (limited to 'gcc/scan.c')
-rw-r--r-- | gcc/scan.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/scan.c b/gcc/scan.c index 24dd6632f35..4af6a43a702 100644 --- a/gcc/scan.c +++ b/gcc/scan.c @@ -236,3 +236,18 @@ get_token (fp, s) *s->ptr = 0; return c; } + +unsigned int +hashstr (str, len) + const char *str; + unsigned int len; +{ + unsigned int n = len; + unsigned int r = 0; + const unsigned char *s = (const unsigned char *)str; + + do + r = r * 67 + (*s++ - 113); + while (--n); + return r + len; +} |