summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-12-25 14:01:24 -0500
committerMichael Reed <m.reed@mykolab.com>2015-12-25 14:01:24 -0500
commit64874cd4640c1cd95f5cb51481f85c63803afe6c (patch)
treeba928d0f60af883198c0af97398e12bb682e67d6
parent5f6b7645e6a7b126fa2e628b3bce0104116d2fbc (diff)
Remove remaining use of PROTO
-rw-r--r--src/flexdef.h8
-rw-r--r--src/main.c2
-rw-r--r--src/scanopt.c2
-rw-r--r--src/scanopt.h19
-rw-r--r--src/sym.c6
5 files changed, 9 insertions, 28 deletions
diff --git a/src/flexdef.h b/src/flexdef.h
index 9c0f11d..5449581 100644
--- a/src/flexdef.h
+++ b/src/flexdef.h
@@ -103,14 +103,6 @@
#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
diff --git a/src/main.c b/src/main.c
index ad48743..24e61fc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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[])
{
diff --git a/src/scanopt.c b/src/scanopt.c
index 6df62f6..deed61d 100644
--- a/src/scanopt.c
+++ b/src/scanopt.c
@@ -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)
{
diff --git a/src/scanopt.h b/src/scanopt.h
index 359a18a..c6e7dec 100644
--- a/src/scanopt.h
+++ b/src/scanopt.h
@@ -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
}
diff --git a/src/sym.c b/src/sym.c
index 1f6f7e2..241256e 100644
--- 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);