Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin de-__P, ANSIfy prototypes



details:   https://anonhg.NetBSD.org/src/rev/148eeaecc671
branches:  trunk
changeset: 586849:148eeaecc671
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Jan 04 01:44:06 2006 +0000

description:
de-__P, ANSIfy prototypes

diffstat:

 usr.bin/join/join.c |  62 ++++++++++++++++++++--------------------------------
 usr.bin/jot/jot.c   |  33 +++++++++++-----------------
 2 files changed, 37 insertions(+), 58 deletions(-)

diffs (237 lines):

diff -r 7631f606338d -r 148eeaecc671 usr.bin/join/join.c
--- a/usr.bin/join/join.c       Wed Jan 04 01:30:21 2006 +0000
+++ b/usr.bin/join/join.c       Wed Jan 04 01:44:06 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: join.c,v 1.25 2004/07/13 11:53:57 wiz Exp $    */
+/*     $NetBSD: join.c,v 1.26 2006/01/04 01:44:06 perry Exp $  */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "from: @(#)join.c       5.1 (Berkeley) 11/18/91";
 #else
-__RCSID("$NetBSD: join.c,v 1.25 2004/07/13 11:53:57 wiz Exp $");
+__RCSID("$NetBSD: join.c,v 1.26 2006/01/04 01:44:06 perry Exp $");
 #endif
 #endif /* not lint */
 
@@ -101,22 +101,20 @@
 char *empty;                   /* empty field replacement string (-e) */
 char *tabchar = " \t";         /* delimiter characters (-t) */
 
-int  cmp __P((LINE *, u_long, LINE *, u_long));
-void enomem __P((void));
-void fieldarg __P((char *));
-void joinlines __P((INPUT *, INPUT *));
-int  main __P((int, char **));
-void obsolete __P((char **));
-void outfield __P((LINE *, u_long));
-void outoneline __P((INPUT *, LINE *));
-void outtwoline __P((INPUT *, LINE *, INPUT *, LINE *));
-void slurp __P((INPUT *));
-void usage __P((void));
+int  cmp(LINE *, u_long, LINE *, u_long);
+void enomem(void);
+void fieldarg(char *);
+void joinlines(INPUT *, INPUT *);
+int  main(int, char **);
+void obsolete(char **);
+void outfield(LINE *, u_long);
+void outoneline(INPUT *, LINE *);
+void outtwoline(INPUT *, LINE *, INPUT *, LINE *);
+void slurp(INPUT *);
+void usage(void);
 
 int
-main(argc, argv)
-       int argc;
-       char *argv[];
+main(int argc, char *argv[])
 {
        INPUT *F1, *F2;
        int aflag, ch, cval, vflag;
@@ -288,8 +286,7 @@
 }
 
 void
-slurp(F)
-       INPUT *F;
+slurp(INPUT *F)
 {
        LINE *lp;
        LINE tmp;
@@ -395,9 +392,7 @@
 }
 
 int
-cmp(lp1, fieldno1, lp2, fieldno2)
-       LINE *lp1, *lp2;
-       u_long fieldno1, fieldno2;
+cmp(LINE *lp1, u_long fieldno1, LINE *lp2, u_long fieldno2)
 {
 
        if (lp1->fieldcnt <= fieldno1)
@@ -408,8 +403,7 @@
 }
 
 void
-joinlines(F1, F2)
-       INPUT *F1, *F2;
+joinlines(INPUT *F1, INPUT *F2)
 {
        int cnt1, cnt2;
 
@@ -429,9 +423,7 @@
 }
 
 void
-outoneline(F, lp)
-       INPUT *F;
-       LINE *lp;
+outoneline(INPUT *F, LINE *lp)
 {
        int cnt;
 
@@ -457,9 +449,7 @@
 }
 
 void
-outtwoline(F1, lp1, F2, lp2)
-       INPUT *F1, *F2;
-       LINE *lp1, *lp2;
+outtwoline(INPUT *F1, LINE *lp1, INPUT *F2, LINE *lp2)
 {
        int cnt;
 
@@ -490,9 +480,7 @@
 }
 
 void
-outfield(lp, fieldno)
-       LINE *lp;
-       u_long fieldno;
+outfield(LINE *lp, u_long fieldno)
 {
        if (needsep++)
                (void)printf("%c", *tabchar);
@@ -515,8 +503,7 @@
  * fields.
  */
 void
-fieldarg(option)
-       char *option;
+fieldarg(char *option)
 {
        u_long fieldno;
        char *end, *token;
@@ -546,8 +533,7 @@
 }
 
 void
-obsolete(argv)
-       char **argv;
+obsolete(char **argv)
 {
        int len;
        char **p, *ap, *t;
@@ -624,13 +610,13 @@
 }
 
 void
-enomem()
+enomem(void)
 {
        errx(1, "no memory");
 }
 
 void
-usage()
+usage(void)
 {
        (void)fprintf(stderr,
            "usage: %s [-a fileno | -v fileno] [-e string] [-j fileno field]\n"
diff -r 7631f606338d -r 148eeaecc671 usr.bin/jot/jot.c
--- a/usr.bin/jot/jot.c Wed Jan 04 01:30:21 2006 +0000
+++ b/usr.bin/jot/jot.c Wed Jan 04 01:44:06 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $   */
+/*     $NetBSD: jot.c,v 1.13 2006/01/04 01:52:17 perry Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)jot.c      8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $");
+__RCSID("$NetBSD: jot.c,v 1.13 2006/01/04 01:52:17 perry Exp $");
 #endif /* not lint */
 
 /*
@@ -78,17 +78,15 @@
 char   sepstring[BUFSIZ] = "\n";
 char   format[BUFSIZ];
 
-void   getargs __P((int, char *[]));
-void   getformat __P((void));
-int    getprec __P((char *));
-int    main __P((int, char **));
-void   putdata __P((double, long));
-static void    usage __P((void));
+void   getargs(int, char *[]);
+void   getformat(void);
+int    getprec(char *);
+int    main(int, char **);
+void   putdata(double, long);
+static void    usage(void);
 
 int
-main(argc, argv)
-       int argc;
-       char *argv[];
+main(int argc, char *argv[])
 {
        double  xd, yd;
        long    id;
@@ -114,9 +112,7 @@
 }
 
 void
-getargs(argc, argv)
-       int argc;
-       char *argv[];
+getargs(int argc, char *argv[])
 {
        unsigned int    mask = 0;
        int             n = 0;
@@ -306,9 +302,7 @@
 }
 
 void
-putdata(x, notlast)
-       double x;
-       long notlast;
+putdata(double x, long notlast)
 {
        long    d = x;
        long    *dp = &d;
@@ -332,8 +326,7 @@
 }
 
 int
-getprec(s)
-       char *s;
+getprec(char *s)
 {
        char    *p;
        char    *q;
@@ -350,7 +343,7 @@
 }
 
 void
-getformat()
+getformat(void)
 {
        char    *p;
        size_t  sz;



Home | Main Index | Thread Index | Old Index