aboutsummaryrefslogtreecommitdiff
path: root/gcc/gen-protos.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1996-06-07 11:59:34 -0700
committerPer Bothner <bothner@gcc.gnu.org>1996-06-07 11:59:34 -0700
commit03cad97d1eeb7acb2d5be6d8e3cba7b27ae7bef4 (patch)
tree6b5bdff2b82419ce7cd33e2cde249e5ca6d9dade /gcc/gen-protos.c
parentb3ea4fcad1264468fc151b27e149589bade96eaf (diff)
downloadgcc-03cad97d1eeb7acb2d5be6d8e3cba7b27ae7bef4.zip
gcc-03cad97d1eeb7acb2d5be6d8e3cba7b27ae7bef4.tar.gz
gcc-03cad97d1eeb7acb2d5be6d8e3cba7b27ae7bef4.tar.bz2
gen-protos.c (progname): New variable (needed by cppalloc.c).
* gen-protos.c (progname): New variable (needed by cppalloc.c). (main): Set progname. From-SVN: r12212
Diffstat (limited to 'gcc/gen-protos.c')
-rw-r--r--gcc/gen-protos.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
index 44c900a..ede40e3 100644
--- a/gcc/gen-protos.c
+++ b/gcc/gen-protos.c
@@ -40,6 +40,7 @@ hashf (name, len, hashsize)
int hash_tab[HASH_SIZE];
int verbose = 0;
+char *progname;
sstring linebuf;
@@ -63,6 +64,10 @@ main (argc, argv)
int next_index = 0;
int i, i0;
+ i = strlen (argv[0]);
+ while (i > 0 && argv[i-1] != '/') --i;
+ progname = &argv[i];
+
fprintf (outf, "struct fn_decl std_protos[] = {\n");
for (;;)