summaryrefslogtreecommitdiffstats
path: root/bin/sh/mksyntax.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
commit5ef5088ac4e038d0a147a08377ef087fd6edf527 (patch)
tree01a827446e9ba4f34cf1e754fcac691f6c9eb1cf /bin/sh/mksyntax.c
parent50014e35418ca00d25ea852fc4f94acf80be4df3 (diff)
downloadFreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.zip
FreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.tar.gz
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
Diffstat (limited to 'bin/sh/mksyntax.c')
-rw-r--r--bin/sh/mksyntax.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c
index 437c435..778ab3c 100644
--- a/bin/sh/mksyntax.c
+++ b/bin/sh/mksyntax.c
@@ -111,17 +111,15 @@ static int size; /* number of values which a char variable can have */
static int nbits; /* number of bits in a character */
static int digit_contig;/* true if digits are contiguous */
-static void filltable __P((char *));
-static void init __P((void));
-static void add __P((char *, char *));
-static void print __P((char *));
-static void output_type_macros __P((void));
-static void digit_convert __P((void));
+static void filltable(char *);
+static void init(void);
+static void add(char *, char *);
+static void print(char *);
+static void output_type_macros(void);
+static void digit_convert(void);
int
-main(argc, argv)
- int argc __unused;
- char **argv __unused;
+main(int argc __unused, char **argv __unused)
{
char c;
char d;
@@ -268,8 +266,7 @@ main(argc, argv)
*/
static void
-filltable(dftval)
- char *dftval;
+filltable(char *dftval)
{
int i;
@@ -283,7 +280,7 @@ filltable(dftval)
*/
static void
-init()
+init(void)
{
filltable("CWORD");
syntax[0] = "CEOF";
@@ -303,8 +300,7 @@ init()
*/
static void
-add(p, type)
- char *p, *type;
+add(char *p, char *type)
{
while (*p)
syntax[*p++ + base] = type;
@@ -317,8 +313,7 @@ add(p, type)
*/
static void
-print(name)
- char *name;
+print(char *name)
{
int i;
int col;
@@ -360,7 +355,7 @@ static char *macro[] = {
};
static void
-output_type_macros()
+output_type_macros(void)
{
char **pp;
@@ -381,7 +376,7 @@ output_type_macros()
*/
static void
-digit_convert()
+digit_convert(void)
{
int maxdigit;
static char digit[] = "0123456789";
OpenPOWER on IntegriCloud