Hello,
Attached patch removes the K&R style function & main() prototype.


Sevan
Index: usr.bin/fgen/fgen.l
===================================================================
RCS file: /cvs/src/usr.bin/fgen/fgen.l,v
retrieving revision 1.12
diff -u -p -r1.12 fgen.l
--- usr.bin/fgen/fgen.l 9 Oct 2015 01:37:07 -0000       1.12
+++ usr.bin/fgen/fgen.l 5 Sep 2016 02:40:17 -0000
@@ -297,7 +297,6 @@ int emit(char *);
 int spit(long);
 void sspit(char *);
 int apply_macros(YY_BUFFER_STATE, char *);
-int main(int argc, char *argv[]);
 
 /*
  * Standard FCode names and numbers.  Includes standard
@@ -722,8 +721,7 @@ struct macro macros[] = {
  */
 
 void
-push(val)
-Cell val;
+push(Cell val)
 {
        parse_stack[parse_stack_ptr++] = val;
        if (parse_stack_ptr >= PSTKSIZ) {
@@ -749,8 +747,7 @@ depth()
  * Insert fcode into dictionary.
  */
 int
-fadd(dict, new)
-struct fcode *dict, *new;
+fadd(struct fcode *dict, struct fcode *new)
 {
        int res = strcmp(dict->name, new->name);
 
@@ -792,9 +789,7 @@ struct fcode *dict, *new;
  * Look for a code in the dictionary.
  */
 struct fcode *
-flookup(dict, str)
-struct fcode *dict;
-char *str;
+flookup(struct fcode *dict, char *str)
 {
        int res;
        if (!dict) return (dict);
@@ -818,8 +813,7 @@ char *str;
  * Insert alias into macros.
  */
 int
-aadd(dict, new)
-       struct macro *dict, *new;
+aadd(struct macro *dict, struct macro *new)
 {
        int res = strcmp(dict->name, new->name);
 
@@ -861,9 +855,7 @@ aadd(dict, new)
  * Look for a macro in the aliases.
  */
 struct macro *
-alookup(dict, str)
-struct macro *dict;
-char *str;
+alookup(struct macro *dict, char *str)
 {
        int res;
        if (!dict) return (dict);
@@ -922,9 +914,7 @@ initdic()
 }
 
 int
-apply_macros(input, str) 
-       YY_BUFFER_STATE input;
-       char *str;
+apply_macros(YY_BUFFER_STATE input, char *str) 
 {
        struct macro *xform = alookup(aliases, str);
        
@@ -941,17 +931,14 @@ apply_macros(input, str) 
 }
 
 void
-usage(me)
-       char *me;
+usage(char *me)
 {
        (void)fprintf(stderr, "usage: %s [-d level] [-o outfile] infile\n", me);
        exit(1);
 }
 
 int
-main(argc, argv)
-       int argc;
-       char *argv[];
+main(int argc, char *argv[])
 {
        int bflag, ch;
        FILE *inf;
@@ -1041,8 +1028,7 @@ main(argc, argv)
  */
 
 void
-tokenize(input) 
-       YY_BUFFER_STATE input;
+tokenize(YY_BUFFER_STATE input) 
 {
        FILE *inf;
        YY_BUFFER_STATE inbuf;
@@ -1992,8 +1978,7 @@ token_err(int lineno, char *infile, char
  * Fcode must be in dictionary.  No alias conversion done.
  */
 int
-emit(str)
-       char *str;
+emit(char *str)
 {
        struct fcode *code;
        if ((code = flookup( dictionary, str)))
@@ -2016,8 +2001,7 @@ emit(str)
  * non-zero.
  */
 int
-spit(n)
-       long n;
+spit(long n)
 {
        int count = 1;
 
@@ -2039,8 +2023,7 @@ spit(n)
  * Spit out an FCode string.
  */
 void
-sspit(s)
-       char *s;
+sspit(char *s)
 {
        int len = strlen(s);
 

Reply via email to