diff --git a/usr.bin/ncftp/.cvsimport.sh b/usr.bin/ncftp/.cvsimport.sh index 85dd20fc5a73..8d42df28e237 100644 --- a/usr.bin/ncftp/.cvsimport.sh +++ b/usr.bin/ncftp/.cvsimport.sh @@ -1,5 +1,5 @@ #!/bin/sh -tar zxvf ncftp186.tgz -cd ncftp186 +tar zxvf ncftp187.tgz +cd ncftp187 rm Makefile -cvs import src/usr.bin/ncftp mgleason ncftp_1_8_6 +cvs import src/usr.bin/ncftp mgleason ncftp_1_8_7 diff --git a/usr.bin/ncftp/Makefile b/usr.bin/ncftp/Makefile index a93ff773566d..5d13f0403aac 100644 --- a/usr.bin/ncftp/Makefile +++ b/usr.bin/ncftp/Makefile @@ -7,7 +7,7 @@ DPADD= $(LIBREADLINE) $(LIBTERMCAP) LDADD= -lreadline -ltermcap CFLAGS+= -DGZCAT=\"/usr/bin/gzcat\" -DREADLINE -DCURSES -DNO_CURSES_H \ - -DSYSLOG -DTRY_ABOR -DGATEWAY -DPASSIVEMODE + -DSYSLOG -DTRY_ABOR -DGATEWAY MK= $(CC) $(CFLAGS) $(LDADD) diff --git a/usr.bin/ncftp/cmds.c b/usr.bin/ncftp/cmds.c index d968467e7039..d576803ea19f 100644 --- a/usr.bin/ncftp/cmds.c +++ b/usr.bin/ncftp/cmds.c @@ -623,7 +623,7 @@ int mget(int argc, char **argv) (void) Signal(SIGINT,oldintr); activemcmd = 0; if (!errs) - return NOERR; + return NOERR; else return CMDERR; } /* mget */ @@ -908,10 +908,9 @@ int mdelete(int argc, char **argv) } (void) Signal(SIGINT, oldintr); activemcmd = 0; - if (!errs) - return NOERR; - else + if (errs > 0) return CMDERR; + return NOERR; } /* mdelete */ @@ -1349,7 +1348,7 @@ close_up_shop(void) int rcode = 0; if (only_once++ > 0) - return; + return (0); if (connected) (void) disconnect(0, NULL); rcode = WriteRecentSitesFile(); diff --git a/usr.bin/ncftp/defaults.h b/usr.bin/ncftp/defaults.h index 0cbd8c77cd61..f3fbb0814cda 100644 --- a/usr.bin/ncftp/defaults.h +++ b/usr.bin/ncftp/defaults.h @@ -44,6 +44,14 @@ #define dMPROMPT 0 #endif +#ifndef PASSIVEMODE +#define PASSIVEMODE 1 +#endif + +/* If passive FTP can be used, this specifies whether it is turned on + * by default. If not, we have passive mode available, but are using + * Port ftp by default. + */ #ifndef dPASSIVE #define dPASSIVE 1 /* Works for most folks... */ #endif diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c index c2ab9332d2a1..9fdfc06ec0a5 100644 --- a/usr.bin/ncftp/main.c +++ b/usr.bin/ncftp/main.c @@ -1,13 +1,8 @@ -/* main.c - * - * $RCSfile: main.c,v $ - * $Revision: 14020.15 $ - * $Date: 93/07/09 11:50:12 $ - */ +/* main.c */ #define _main_c_ -#define FTP_VERSION "1.8.6 (October 30, 1994)" +#define FTP_VERSION "1.8.7 (December 11, 1994)" /* #define BETA 1 */ /* If defined, it prints a little warning message. */ diff --git a/usr.bin/ncftp/sys.h b/usr.bin/ncftp/sys.h index 83f3516ca718..e4b6d55f8f0d 100644 --- a/usr.bin/ncftp/sys.h +++ b/usr.bin/ncftp/sys.h @@ -399,15 +399,12 @@ extern int errno; #endif /* BSDi */ #ifdef __FreeBSD__ -# define System "FreeBSD" -# define GZCAT "/usr/bin/gzcat" -# define HAS_DOMAINNAME 1 +# define System "FreeBSD" +# define GZCAT "/usr/bin/gzcat" +# define HAS_DOMAINNAME 1 # include # include /* this two for BSD definition */ /* to avoid redefinition of it to 1 */ -#if __FreeBSD__ > 1 -# define SYSSELECTH 1 -#endif # define HERROR 1 # define TERMIOS 1 # define HAS_GETCWD 1