Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/lex remove duplicate decls/nested externs.



details:   https://anonhg.NetBSD.org/src/rev/7edb0225c021
branches:  trunk
changeset: 501719:7edb0225c021
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 06 02:09:48 2001 +0000

description:
remove duplicate decls/nested externs.

diffstat:

 usr.bin/lex/flexdef.h |  4 +++-
 usr.bin/lex/gen.c     |  5 +----
 usr.bin/lex/sym.c     |  5 +----
 usr.bin/lex/yylex.c   |  4 ++--
 4 files changed, 7 insertions(+), 11 deletions(-)

diffs (91 lines):

diff -r f8f40f0d88dc -r 7edb0225c021 usr.bin/lex/flexdef.h
--- a/usr.bin/lex/flexdef.h     Sat Jan 06 02:09:31 2001 +0000
+++ b/usr.bin/lex/flexdef.h     Sat Jan 06 02:09:48 2001 +0000
@@ -26,7 +26,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-/* $NetBSD: flexdef.h,v 1.12 1998/02/22 12:08:34 christos Exp $ */
+/* $NetBSD: flexdef.h,v 1.13 2001/01/06 02:09:48 christos Exp $ */
 
 #include <stdio.h>
 #include <ctype.h>
@@ -982,7 +982,9 @@
 extern void format_warn PROTO((char [], char[]));
 extern void warn PROTO((char []));     /* report a warning */
 extern void yyerror PROTO((char []));  /* report a parse error */
+#ifndef YYRECOVERING
 extern int yyparse PROTO((void));      /* the YACC parser */
+#endif
 
 
 /* from file scan.l */
diff -r f8f40f0d88dc -r 7edb0225c021 usr.bin/lex/gen.c
--- a/usr.bin/lex/gen.c Sat Jan 06 02:09:31 2001 +0000
+++ b/usr.bin/lex/gen.c Sat Jan 06 02:09:48 2001 +0000
@@ -26,17 +26,14 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-/* $NetBSD: gen.c,v 1.14 1999/01/18 22:18:17 christos Exp $ */
+/* $NetBSD: gen.c,v 1.15 2001/01/06 02:09:49 christos Exp $ */
 
 #include "flexdef.h"
 
 
 /* declare functions that have forward references */
 
-void gen_next_state PROTO((int));
 void genecs PROTO((void));
-void indent_put2s PROTO((char [], char []));
-void indent_puts PROTO((char []));
 
 
 static int indent_level = 0; /* each level is 8 spaces */
diff -r f8f40f0d88dc -r 7edb0225c021 usr.bin/lex/sym.c
--- a/usr.bin/lex/sym.c Sat Jan 06 02:09:31 2001 +0000
+++ b/usr.bin/lex/sym.c Sat Jan 06 02:09:48 2001 +0000
@@ -26,7 +26,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-/* $NetBSD: sym.c,v 1.10 1998/02/22 12:08:35 christos Exp $ */
+/* $NetBSD: sym.c,v 1.11 2001/01/06 02:09:49 christos Exp $ */
 
 #include "flexdef.h"
 
@@ -40,9 +40,6 @@
 struct hash_entry *sctbl[START_COND_HASH_SIZE];
 struct hash_entry *ccltab[CCL_HASH_SIZE];
 
-struct hash_entry *findsym PROTO((char [], hash_table, int));
-
-
 /* addsym - add symbol and definitions to symbol table
  *
  * -1 is returned if the symbol already exists, and the change not made.
diff -r f8f40f0d88dc -r 7edb0225c021 usr.bin/lex/yylex.c
--- a/usr.bin/lex/yylex.c       Sat Jan 06 02:09:31 2001 +0000
+++ b/usr.bin/lex/yylex.c       Sat Jan 06 02:09:48 2001 +0000
@@ -26,7 +26,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-/* $NetBSD: yylex.c,v 1.8 1998/01/05 05:16:00 perry Exp $ */
+/* $NetBSD: yylex.c,v 1.9 2001/01/06 02:09:49 christos Exp $ */
 
 #include <ctype.h>
 #include "flexdef.h"
@@ -35,11 +35,11 @@
 
 /* yylex - scan for a regular expression token */
 
+extern char *yytext;
 int yylex()
        {
        int toktype;
        static int beglin = false;
-       extern char *yytext;
 
        if ( eofseen )
                toktype = EOF;



Home | Main Index | Thread Index | Old Index