]> granicus.if.org Git - flex/commitdiff
Remove remaining use of PROTO
authorMichael Reed <m.reed@mykolab.com>
Fri, 25 Dec 2015 19:01:24 +0000 (14:01 -0500)
committerMichael Reed <m.reed@mykolab.com>
Fri, 25 Dec 2015 19:01:24 +0000 (14:01 -0500)
src/flexdef.h
src/main.c
src/scanopt.c
src/scanopt.h
src/sym.c

index 9c0f11ddaeea15d47b4f8322a987e4a01d6f6d27..544958132dbad29a4bff099ddb050cf40d113e87 100644 (file)
 #define DEFAULT_CSIZE 128
 #endif
 
-#ifndef PROTO
-#if defined(__STDC__)
-#define PROTO(proto) proto
-#else
-#define PROTO(proto) ()
-#endif
-#endif
-
 /* Maximum line length we'll have to deal with. */
 #define MAXLINE 2048
 
index ad48743fc81d5b3db1a845d517b12e4155a94ed4..24e61fc8729ac5cd881c52bc51d0bf30e7b8f4a1 100644 (file)
@@ -134,7 +134,7 @@ const char *escaped_qend   = "[[]]M4_YY_NOOP]M4_YY_NOOP]M4_YY_NOOP[[]]";
 /* For debugging. The max number of filters to apply to skeleton. */
 static int preproc_level = 1000;
 
-int flex_main PROTO ((int argc, char *argv[]));
+int flex_main (int argc, char *argv[]);
 
 int flex_main (int argc, char *argv[])
 {
index 6df62f6eb340abca415581e5379281821cbb9301..deed61da230540723d1ceea4dd6cd8f90a026ccf 100644 (file)
@@ -40,7 +40,7 @@
 #ifdef HAVE_STRCASECMP
 #define STRCASECMP(a,b) strcasecmp(a,b)
 #else
-static int STRCASECMP PROTO ((const char *, const char *));
+static int STRCASECMP (const char *, const char *);
 
 static int STRCASECMP (const char *a, const char *b)
 {
index 359a18a8b467f4ebc8bea15523bcad9411e429c2..c6e7dec3619eaee7b38dec38e05eaa3659276462 100644 (file)
@@ -47,9 +47,6 @@
 #ifdef __cplusplus
 extern  "C" {
 #endif
-#ifndef PROTO
-#define PROTO(args) args
-#endif
 /* Error codes. */ enum scanopt_err_t {
                SCANOPT_ERR_OPT_UNRECOGNIZED = -1,      /* Unrecognized option. */
                SCANOPT_ERR_OPT_AMBIGUOUS = -2, /* It matched more than one option name. */
@@ -85,12 +82,12 @@ extern  "C" {
  *   flags   - Control behavior.
  * Return:  A malloc'd pointer .
  */
-       scanopt_t *scanopt_init PROTO ((const optspec_t * options,
-                                       int argc, char **argv, int flags));
+       scanopt_t *scanopt_init (const optspec_t * options, int argc,
+                                char **argv, int flags);
 
 /* Frees memory used by scanner.
  * Always returns 0. */
-       int scanopt_destroy PROTO ((scanopt_t * scanner));
+       int scanopt_destroy (scanopt_t * scanner);
 
 #ifndef NO_SCANOPT_USAGE
 /* Prints a usage message based on contents of optlist.
@@ -100,10 +97,7 @@ extern  "C" {
  *   usage    - Text to be prepended to option list. May be NULL.
  * Return:  Always returns 0 (zero).
  */
-       int scanopt_usage
-               PROTO (
-                      (scanopt_t * scanner, FILE * fp,
-                       const char *usage));
+       int scanopt_usage (scanopt_t * scanner, FILE * fp, const char *usage);
 #endif
 
 /* Scans command-line options in argv[].
@@ -120,10 +114,7 @@ extern  "C" {
  *          < 0 on error (return value is an error code).
  *
  */
-       int scanopt
-               PROTO (
-                      (scanopt_t * scanner, char **optarg,
-                       int *optindex));
+       int scanopt (scanopt_t * scanner, char **optarg, int *optindex);
 
 #ifdef __cplusplus
 }
index 1f6f7e2e81ee1d0cbe66c1103b4df681c4c783a5..241256ef10479cf8655f2edce227127574858659 100644 (file)
--- a/src/sym.c
+++ b/src/sym.c
@@ -60,10 +60,8 @@ static struct hash_entry *ccltab[CCL_HASH_SIZE];
 /* declare functions that have forward references */
 
 static int addsym(char[], char *, int, hash_table, int);
-static struct hash_entry *findsym PROTO ((const char *sym,
-                                         hash_table table,
-
-                                         int table_size));
+static struct hash_entry *findsym (const char *sym, hash_table table,
+                                  int table_size);
 static int hashfunct(const char *, int);