ANSI fixes
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Feb 1991 23:39:10 +0000 (15:39 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Feb 1991 23:39:10 +0000 (15:39 -0800)
SCCS-vsn: bin/date/date.c 5.2
SCCS-vsn: bin/date/netdate.c 5.2
SCCS-vsn: bin/dd/dd.c 5.2
SCCS-vsn: bin/df/df.c 5.23
SCCS-vsn: bin/ed/ed.c 4.14
SCCS-vsn: bin/kill/kill.c 4.7

usr/src/bin/date/date.c
usr/src/bin/date/netdate.c
usr/src/bin/dd/dd.c
usr/src/bin/df/df.c
usr/src/bin/ed/ed.c
usr/src/bin/kill/kill.c

index ede1974..37e18f8 100644 (file)
@@ -12,17 +12,18 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)date.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)date.c     5.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/file.h>
 #include <syslog.h>
 #endif /* not lint */
 
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/file.h>
 #include <syslog.h>
+#include <unistd.h>
 #include <stdio.h>
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
 #include <stdlib.h>
 #include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
 
 time_t tval;
 int retval, nflag;
 
 time_t tval;
 int retval, nflag;
index c652204..6bc77e1 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)netdate.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)netdate.c  5.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -17,7 +17,9 @@ static char sccsid[] = "@(#)netdate.c 5.1 (Berkeley) %G%";
 #include <netdb.h>
 #define TSPTYPES
 #include <protocols/timed.h>
 #include <netdb.h>
 #define TSPTYPES
 #include <protocols/timed.h>
+#include <unistd.h>
 #include <stdio.h>
 #include <stdio.h>
+#include <string.h>
 
 #define        WAITACK         2       /* seconds */
 #define        WAITDATEACK     5       /* seconds */
 
 #define        WAITACK         2       /* seconds */
 #define        WAITDATEACK     5       /* seconds */
@@ -85,7 +87,7 @@ netsettime(tval)
        msg.tsp_time.tv_sec = htonl((u_long)tval);
        msg.tsp_time.tv_usec = htonl((u_long)0);
        length = sizeof(struct sockaddr_in);
        msg.tsp_time.tv_sec = htonl((u_long)tval);
        msg.tsp_time.tv_usec = htonl((u_long)0);
        length = sizeof(struct sockaddr_in);
-       if (connect(s, &dest, length) < 0) {
+       if (connect(s, (struct sockaddr *)&dest, length) < 0) {
                perror("date: connect");
                goto bad;
        }
                perror("date: connect");
                goto bad;
        }
@@ -115,8 +117,8 @@ loop:
 
        if (found > 0 && FD_ISSET(s, &ready)) {
                length = sizeof(struct sockaddr_in);
 
        if (found > 0 && FD_ISSET(s, &ready)) {
                length = sizeof(struct sockaddr_in);
-               if (recvfrom(s, (char *)&msg, sizeof(struct tsp), 0, &from,
-                   &length) < 0) {
+               if (recvfrom(s, &msg, sizeof(struct tsp), 0,
+                   (struct sockaddr *)&from, &length) < 0) {
                        if (errno != ECONNREFUSED)
                                perror("date: recvfrom");
                        goto bad;
                        if (errno != ECONNREFUSED)
                                perror("date: recvfrom");
                        goto bad;
index 9376576..822e707 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)dd.c        5.1 (Berkeley) %G%";
+static char *sccsid = "@(#)dd.c        5.2 (Berkeley) %G%";
 #endif
 
 #include <sys/types.h>
 #endif
 
 #include <sys/types.h>
@@ -10,6 +10,8 @@ static char *sccsid = "@(#)dd.c       5.1 (Berkeley) %G%";
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #define        BIG     2147483647
 #define        LCASE   01
 
 #define        BIG     2147483647
 #define        LCASE   01
@@ -152,6 +154,8 @@ char        atoibm[] =
 enum ftype { unknown, reg, chr, tape, ispipe } iftype;
 enum ftype checktype();
 
 enum ftype { unknown, reg, chr, tape, ispipe } iftype;
 enum ftype checktype();
 
+void stats(), term();
+
 main(argc, argv)
 int    argc;
 char   **argv;
 main(argc, argv)
 int    argc;
 char   **argv;
@@ -159,8 +163,7 @@ char        **argv;
        int (*conv)();
        register char *ip;
        register c;
        int (*conv)();
        register char *ip;
        register c;
-       int ebcdic(), ibm(), ascii(), null(), cnull(), term(), block(), unblock();
-       int stats();
+       int ebcdic(), ibm(), ascii(), null(), cnull(), block(), unblock();
        int a;
 
        conv = null;
        int a;
 
        conv = null;
@@ -628,6 +631,7 @@ block(cc)
                null(c);
 }
 
                null(c);
 }
 
+void
 term()
 {
 
 term()
 {
 
@@ -635,6 +639,7 @@ term()
        exit(0);
 }
 
        exit(0);
 }
 
+void
 stats()
 {
 
 stats()
 {
 
index 2bc47f3..9a717e3 100644 (file)
@@ -12,7 +12,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)df.c       5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)df.c       5.23 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -21,7 +21,7 @@ static char sccsid[] = "@(#)df.c      5.22 (Berkeley) %G%";
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
-#include <sys/file.h>
+#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -39,7 +39,7 @@ main(argc, argv)
 {
        extern int errno, optind;
        int err, ch, i;
 {
        extern int errno, optind;
        int err, ch, i;
-       long width, maxwidth, mntsize, getmntinfo();
+       long width, maxwidth, mntsize;
        char *mntpt, *mktemp();
        struct stat stbuf;
        struct statfs statfsbuf, *mntbuf;
        char *mntpt, *mktemp();
        struct stat stbuf;
        struct statfs statfsbuf, *mntbuf;
index 09ee257..3c554ae 100644 (file)
@@ -1,15 +1,21 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)ed.c       4.13.1.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)ed.c       4.14 (Berkeley) %G%";
 #endif
 
 /*
  * Editor
  */
 #include <sys/param.h>
 #endif
 
 /*
  * Editor
  */
 #include <sys/param.h>
-#include <sys/signal.h>
+#include <sys/wait.h>
+#include <signal.h>
 #include <sgtty.h>
 #undef CEOF
 #include <sgtty.h>
 #undef CEOF
+#include <fcntl.h>
+#include <time.h>
 #include <setjmp.h>
 #include <setjmp.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "pathnames.h"
 
 #define        NULL    0
 #include "pathnames.h"
 
 #define        NULL    0
@@ -56,7 +62,6 @@ char  *linebp;
 int    ninbuf;
 int    io;
 int    pflag;
 int    ninbuf;
 int    io;
 int    pflag;
-long   lseek();
 sig_t  oldhup;
 sig_t  oldquit;
 int    vflag   = 1;
 sig_t  oldhup;
 sig_t  oldquit;
 int    vflag   = 1;
@@ -93,16 +98,15 @@ int *address();
 char   *getline();
 char   *getblock();
 char   *place();
 char   *getline();
 char   *getblock();
 char   *place();
-char   *mktemp();
-char   *malloc();
-char   *realloc();
 jmp_buf        savej;
 
 jmp_buf        savej;
 
+void onintr(), quit(), onhup();
+
 main(argc, argv)
 main(argc, argv)
-char **argv;
+       int argc;
+       char **argv;
 {
        register char *p1, *p2;
 {
        register char *p1, *p2;
-       extern void onintr(), quit(), onhup();
        sig_t oldintr;
 
        oldquit = signal(SIGQUIT, SIG_IGN);
        sig_t oldintr;
 
        oldquit = signal(SIGQUIT, SIG_IGN);
index cf68124..9cab563 100644 (file)
@@ -12,11 +12,13 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)kill.c     4.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)kill.c     4.7 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <signal.h>
 #include <stdio.h>
 #endif /* not lint */
 
 #include <signal.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <ctype.h>
 
 static char *signals[] = {
 #include <ctype.h>
 
 static char *signals[] = {
@@ -86,7 +88,6 @@ error:                        printf("kill: unknown signal %s; valid signals:\n", *argv);
        exit(errors);
 }
 
        exit(errors);
 }
 
-static
 printsig()
 {
        register char **p;
 printsig()
 {
        register char **p;
@@ -99,7 +100,6 @@ printsig()
        printf("\n");
 }
 
        printf("\n");
 }
 
-static
 usage()
 {
        printf("usage: kill [-l] [-sig] pid ...\n");
 usage()
 {
        printf("usage: kill [-l] [-sig] pid ...\n");