$NetBSD: patch-af,v 1.3 2005/12/27 13:48:56 joerg Exp $ --- rftp/ftp.c.orig 1995-09-07 02:24:03.000000000 +0000 +++ rftp/ftp.c @@ -74,7 +74,7 @@ static char sccsid[] = "@(#)ftp.c 5.38 ( #include #include #include -#include +#include #ifdef FASCIST #include @@ -107,12 +107,12 @@ unsigned long socks_bind_remoteAddr; /* int pasvmode = 0; extern char *strerror(); -extern int connected, errno; +extern int connected; FILE *cin, *cout; FILE *dataconn(); -#if !defined(SVR3) && !defined(BIND_RESOLVER) && !defined(LINUX) +#if !defined(SVR3) && !defined(BIND_RESOLVER) && !defined(LINUX) && !defined(SOLARIS) /* >>> YDL */ #if !defined(BSD) || (BSD - 43 <= 0) @@ -158,6 +158,8 @@ herror(s) #endif /* !defined(SVR3) && !defined(BIND_RESOLVER) && !defined(LINUX) */ +int command(char *fmt, ...); + char * hookup(host, port) @@ -358,11 +360,10 @@ cmdabort() } /*VARARGS*/ -command(va_alist) -va_dcl +int +command(char *fmt, ...) { va_list ap; - char *fmt; int r; sig_t oldintr; void cmdabort(); @@ -370,8 +371,7 @@ va_dcl abrtflag = 0; if (debug) { printf("---> "); - va_start(ap); - fmt = va_arg(ap, char *); + va_start(ap, fmt); if (strncmp("PASS ", fmt, 5) == 0) printf("PASS XXXX"); else @@ -386,8 +386,7 @@ va_dcl return (0); } oldintr = signal(SIGINT, cmdabort); - va_start(ap); - fmt = va_arg(ap, char *); + va_start(ap, fmt); vfprintf(cout, fmt, ap); va_end(ap); fprintf(cout, "\r\n");