aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-04-18 20:42:00 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-04-18 16:42:00 -0400
commite38992e8d312b679eb3f4b9973567805a96511cb (patch)
tree83c55501d7538240d73d1cd61690beae93dbce4b /gcc/cppfiles.c
parent0d9eb3ba2922a07d68c27170de0195f5b96b4b0c (diff)
downloadgcc-e38992e8d312b679eb3f4b9973567805a96511cb.zip
gcc-e38992e8d312b679eb3f4b9973567805a96511cb.tar.gz
gcc-e38992e8d312b679eb3f4b9973567805a96511cb.tar.bz2
conflict.c (conflict_graph_add): Pass enum type to htab_find_slot.
* gcc/conflict.c (conflict_graph_add): Pass enum type to htab_find_slot. * gcc/cpperror.c (hashtab.h): Now include. * gcc/cppexp.c (hashtab.h): Likewise. * gcc/cpplex.c (hashtab.h): Likewise. * gcc/cppfiles.c (hashtab.h): Likewise. (find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type to htab_find_slot_with_hash. * gcc/cpphash.c (hashtab.h): Now include. (_cpp_lookup_slot): INSERT is now enum insert_option. * gcc/cpphash.h (_cpp_lookup_slot): Likewise. * gcc/cppinit.c (hashtab.h): Include earlier. (initialize_builtins): Pass enum to htab_find_slot. * gcc/cpplib.c (hashtab.h): Now include. (do_define, do_undef): Pass enum type to _cpp_lookup_slot. (do_pragma_poison, do_assert): Likewise. * gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to htab_find_slot_with_hash. * gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise. * gcc/tree.c (type_hash_add): Likewise. (build1): Minor cleanup. * include/hashtab.h (enum insert_option): New type. (htab_find_slot, htab_find_slot_with_hash): Use it. * libiberty/hashtab.c: Various minor cleanups. (htab_find_slot_with_hash): INSERT is now enum insert_option. (htab_find_slot): Likewise. From-SVN: r33236
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index cc891d4..f7cdd31 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -18,17 +18,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- In other words, you are welcome to use, share and improve this program.
- You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding! */
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
+#include "hashtab.h"
#include "cpplib.h"
#include "cpphash.h"
-#include "hashtab.h"
#include "intl.h"
#include "mkdeps.h"
@@ -263,8 +259,8 @@ find_include_file (pfile, fname, search_start, ihash, before)
dummy.hash = _cpp_calc_hash (fname, strlen (fname));
path = (fname[0] == '/') ? ABSOLUTE_PATH : search_start;
slot = (IHASH **) htab_find_slot_with_hash (pfile->all_include_files,
- (const void *)&dummy,
- dummy.hash, 1);
+ (const void *) &dummy,
+ dummy.hash, INSERT);
if (*slot && (ih = redundant_include_p (pfile, *slot, path)))
{
@@ -333,8 +329,8 @@ _cpp_fake_ihash (pfile, fname)
dummy.nshort = fname;
dummy.hash = _cpp_calc_hash (fname, strlen (fname));
slot = (IHASH **) htab_find_slot_with_hash (pfile->all_include_files,
- (const void *)&dummy,
- dummy.hash, 1);
+ (const void *) &dummy,
+ dummy.hash, INSERT);
if (*slot)
return (*slot)->name;
ih = make_IHASH (fname, 0, ABSOLUTE_PATH, dummy.hash, slot);
@@ -670,10 +666,10 @@ cpp_read_file (pfile, fname)
dummy.hash = _cpp_calc_hash (fname, strlen (fname));
slot = (IHASH **) htab_find_slot_with_hash (pfile->all_include_files,
(const void *) &dummy,
- dummy.hash, 1);
+ dummy.hash, INSERT);
if (*slot && (ih = redundant_include_p (pfile, *slot, ABSOLUTE_PATH)))
{
- if (ih == (IHASH *)-1)
+ if (ih == (IHASH *) -1)
return 1; /* Already included. */
}
else