/* 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
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 */
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;
/* 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)
{
{
i = (i+1) % HASH_SIZE;
if (i == i0)
- abort();
+ abort ();
if (hash_tab[i] == 0)
break;
}
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++;