2000-08-10 Jimmy Guo <guo@cup.hp.com>
[deliverable/binutils-gdb.git] / gdb / buildsym.c
index dff92936cfdefab8530b4eabe2070c3d2eeeefe5..271a5e4ce6837d0ed1e535cf27d080f7ff94752b 100644 (file)
@@ -36,7 +36,7 @@
 #include "gdb_string.h"
 #include "expression.h"                /* For "enum exp_opcode" used by... */
 #include "language.h"          /* For "longest_local_hex_string_custom" */
-
+#include "bcache.h"
 /* Ask buildsym.h to define the vars it normally declares `extern'.  */
 #define        EXTERN
 /**/
@@ -1055,33 +1055,13 @@ push_context (int desc, CORE_ADDR valu)
   return new;
 }
 \f
+
 /* Compute a small integer hash code for the given name. */
 
 int
 hashname (char *name)
 {
-  register char *p = name;
-  register int total = p[0];
-  register int c;
-
-  c = p[1];
-  total += c << 2;
-  if (c)
-    {
-      c = p[2];
-      total += c << 4;
-      if (c)
-       {
-         total += p[3] << 6;
-       }
-    }
-
-  /* Ensure result is positive.  */
-  if (total < 0)
-    {
-      total += (1000 << 6);
-    }
-  return (total % HASHSIZE);
+    return (hash(name,strlen(name)) % HASHSIZE);
 }
 \f
 
@@ -1124,7 +1104,7 @@ merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
    corresponding to a psymtab.  */
 
 void
-buildsym_init ()
+buildsym_init (void)
 {
   free_pendings = NULL;
   file_symbols = NULL;
@@ -1137,7 +1117,7 @@ buildsym_init ()
    file, e.g. a shared library).  */
 
 void
-buildsym_new_init ()
+buildsym_new_init (void)
 {
   buildsym_init ();
 }
This page took 0.023617 seconds and 4 git commands to generate.