]> granicus.if.org Git - flex/commitdiff
Converted K&R style function definitions to ANSI C style
authorTobias Klauser <tklauser@distanz.ch>
Tue, 16 Feb 2016 13:35:34 +0000 (14:35 +0100)
committerTobias Klauser <tklauser@distanz.ch>
Tue, 16 Feb 2016 13:52:16 +0000 (14:52 +0100)
Consistently make use of the ANSI C function definition style instead of
the K&R style.

lib/lib.c
src/gen.c
src/misc.c
src/scan.l

index a8ff70f675b03b923fa0b662636099fce37050cb..e540e8d170971ec1e7742e37edc5353194037930 100644 (file)
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -3,5 +3,5 @@
  * moving something that flex treats as a library function into this
  * directory. */
 
-void do_nothing(){ return;}
+void do_nothing(void){ return;}
 
index 546e340ac267a3f24dc2adb03165ec828934ee10..b2e2b53cf5b154e7e76d767e22a36f795a821d4c 100644 (file)
--- a/src/gen.c
+++ b/src/gen.c
@@ -725,8 +725,7 @@ void genftbl (void)
 
 /* Generate the code to find the next compressed-table state. */
 
-void gen_next_compressed_state (char_map)
-     char   *char_map;
+void gen_next_compressed_state (char *char_map)
 {
        indent_put2s ("YY_CHAR yy_c = %s;", char_map);
 
@@ -876,8 +875,7 @@ void gen_next_match (void)
 
 /* Generate the code to find the next state. */
 
-void gen_next_state (worry_about_NULs)
-     int worry_about_NULs;
+void gen_next_state (int worry_about_NULs)
 {                              /* NOTE - changes in here should be reflected in gen_next_match() */
        char    char_map[256];
 
index a74fdd34d04b04856f8770b3bafe551feadd1cb8..37a52bbcc043218969551e269e18be37c8cc9832 100644 (file)
@@ -852,8 +852,7 @@ void skelout (void)
  * element_n.  Formats the output with spaces and carriage returns.
  */
 
-void transition_struct_out (element_v, element_n)
-     int element_v, element_n;
+void transition_struct_out (int element_v, int element_n)
 {
 
        /* short circuit any output */
index 1347d456b723bdbace1d9a9f2c5ba2d900761967..9952af7b761d602abf11c91b09ca2464a1418886 100644 (file)
@@ -59,7 +59,7 @@ extern const char *escaped_qstart, *escaped_qend;
 #define MARK_END_OF_PROLOG mark_prolog();
 
 #define YY_DECL \
-       int flexscan()
+       int flexscan(void)
 
 #define RETURNCHAR \
        yylval = (unsigned char) yytext[0]; \