diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:50:57 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:50:57 +0000 |
commit | 5ef5088ac4e038d0a147a08377ef087fd6edf527 (patch) | |
tree | 01a827446e9ba4f34cf1e754fcac691f6c9eb1cf /bin/sh/nodes.c.pat | |
parent | 50014e35418ca00d25ea852fc4f94acf80be4df3 (diff) | |
download | FreeBSD-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/nodes.c.pat')
-rw-r--r-- | bin/sh/nodes.c.pat | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/bin/sh/nodes.c.pat b/bin/sh/nodes.c.pat index 526cd88..2fc79f0 100644 --- a/bin/sh/nodes.c.pat +++ b/bin/sh/nodes.c.pat @@ -57,11 +57,11 @@ char *funcstring; /* block to allocate strings from */ %SIZES -STATIC void calcsize __P((union node *)); -STATIC void sizenodelist __P((struct nodelist *)); -STATIC union node *copynode __P((union node *)); -STATIC struct nodelist *copynodelist __P((struct nodelist *)); -STATIC char *nodesavestr __P((char *)); +STATIC void calcsize(union node *); +STATIC void sizenodelist(struct nodelist *); +STATIC union node *copynode(union node *); +STATIC struct nodelist *copynodelist(struct nodelist *); +STATIC char *nodesavestr(char *); @@ -70,8 +70,7 @@ STATIC char *nodesavestr __P((char *)); */ union node * -copyfunc(n) - union node *n; +copyfunc(union node *n) { if (n == NULL) return NULL; @@ -86,8 +85,7 @@ copyfunc(n) STATIC void -calcsize(n) - union node *n; +calcsize(union node *n) { %CALCSIZE } @@ -95,8 +93,7 @@ calcsize(n) STATIC void -sizenodelist(lp) - struct nodelist *lp; +sizenodelist(struct nodelist *lp) { while (lp) { funcblocksize += ALIGN(sizeof(struct nodelist)); @@ -108,8 +105,7 @@ sizenodelist(lp) STATIC union node * -copynode(n) - union node *n; +copynode(union node *n) { union node *new; @@ -119,8 +115,7 @@ copynode(n) STATIC struct nodelist * -copynodelist(lp) - struct nodelist *lp; +copynodelist(struct nodelist *lp) { struct nodelist *start; struct nodelist **lpp; @@ -140,8 +135,7 @@ copynodelist(lp) STATIC char * -nodesavestr(s) - char *s; +nodesavestr(char *s) { char *p = s; char *q = funcstring; @@ -160,8 +154,7 @@ nodesavestr(s) */ void -freefunc(n) - union node *n; +freefunc(union node *n) { if (n) ckfree(n); |