fix external declarations; ANSI C compatibility
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 3 Jan 1988 15:32:53 +0000 (07:32 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 3 Jan 1988 15:32:53 +0000 (07:32 -0800)
SCCS-vsn: usr.bin/ftp/main.c 5.8
SCCS-vsn: usr.bin/ftp/ftp.c 5.16

usr/src/usr.bin/ftp/ftp.c
usr/src/usr.bin/ftp/main.c

index dcf1be4..a039957 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)ftp.c      5.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftp.c      5.16 (Berkeley) %G%";
 #endif not lint
 
 #include "ftp_var.h"
 #endif not lint
 
 #include "ftp_var.h"
@@ -882,7 +882,7 @@ abort:
  * before we send the command, otherwise the
  * server's connect may fail.
  */
  * before we send the command, otherwise the
  * server's connect may fail.
  */
-static int sendport = -1;
+int sendport = -1;
 
 initconn()
 {
 
 initconn()
 {
@@ -905,7 +905,7 @@ noport:
        }
        if (!sendport)
                if (setsockopt(data, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof (on)) < 0) {
        }
        if (!sendport)
                if (setsockopt(data, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof (on)) < 0) {
-                       perror("ftp: setsockopt (resuse address)");
+                       perror("ftp: setsockopt (reuse address)");
                        goto bad;
                }
        if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) {
                        goto bad;
                }
        if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) {
index 42874b5..3128800 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.8 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -198,7 +198,6 @@ cmdscanner(top)
 {
        register struct cmd *c;
        struct cmd *getcmd();
 {
        register struct cmd *c;
        struct cmd *getcmd();
-       extern struct cmd cmdtab[];
        extern int help();
 
        if (!top)
        extern int help();
 
        if (!top)
@@ -246,6 +245,7 @@ struct cmd *
 getcmd(name)
        register char *name;
 {
 getcmd(name)
        register char *name;
 {
+       extern struct cmd cmdtab[];
        register char *p, *q;
        register struct cmd *c, *found;
        register int nmatches, longest;
        register char *p, *q;
        register struct cmd *c, *found;
        register int nmatches, longest;
@@ -424,6 +424,7 @@ help(argc, argv)
        int argc;
        char *argv[];
 {
        int argc;
        char *argv[];
 {
+       extern struct cmd cmdtab[];
        register struct cmd *c;
 
        if (argc == 1) {
        register struct cmd *c;
 
        if (argc == 1) {