OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / gen-protos.c
index 995659a..094ce2a 100644 (file)
@@ -1,5 +1,5 @@
 /* gen-protos.c - massages a list of prototypes, for use by fixproto.
-   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -16,6 +16,8 @@ along with this program; if not, write to the Free Software
 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <stdio.h>
+#include <ctype.h>
+#include "hconfig.h"
 #include "scan.h"
 
 #define HASH_SIZE 2503 /* a prime */
@@ -25,6 +27,16 @@ int verbose = 0;
 
 sstring linebuf;
 
+/* Avoid error if config defines abort as fancy_abort.
+   It's not worth "really" implementing this because ordinary
+   compiler users never run fix-header.  */
+
+void
+fancy_abort ()
+{
+  abort ();
+}
+
 int
 main (argc, argv)
      int argc;
@@ -106,8 +118,8 @@ main (argc, argv)
 
 
       /* NOTE:  If you edit this,
-        also edit lookup_std_proto in patch-header.c !! */
-      i = hash(name_start) % HASH_SIZE;
+        also edit lookup_std_proto in fix-header.c !! */
+      i = hash (name_start) % HASH_SIZE;
       i0 = i;
       if (hash_tab[i] != 0)
        {
@@ -115,7 +127,7 @@ main (argc, argv)
            {
              i = (i+1) % HASH_SIZE;
              if (i == i0)
-               abort();
+               abort ();
              if (hash_tab[i] == 0)
                break;
            }
@@ -123,7 +135,7 @@ main (argc, argv)
       hash_tab[i] = next_index;
 
       fprintf (outf, "  {\"%s\", \"%s\", \"%s\" },\n",
-              name_start, decl_start, param_start, i, i0);
+              name_start, decl_start, param_start);
 
       next_index++;