[ros-diffs] [rmessiant] 51028: [FTP] - FTP has been a really, really naughty app.. Fix up function prototypes and definitions after () -> (void) change. Fixes build.. if I'm lucky.

rmessiant at svn.reactos.org rmessiant at svn.reactos.org
Sat Mar 12 23:39:20 UTC 2011


Author: rmessiant
Date: Sat Mar 12 23:39:18 2011
New Revision: 51028

URL: http://svn.reactos.org/svn/reactos?rev=51028&view=rev
Log:
[FTP]
- FTP has been a really, really naughty app.. Fix up function prototypes and definitions after () -> (void) change.
  Fixes build.. if I'm lucky.

Modified:
    trunk/reactos/base/applications/network/ftp/cmds.c
    trunk/reactos/base/applications/network/ftp/domacro.c
    trunk/reactos/base/applications/network/ftp/fake.c
    trunk/reactos/base/applications/network/ftp/ftp.c
    trunk/reactos/base/applications/network/ftp/ftp_var.h
    trunk/reactos/base/applications/network/ftp/main.c
    trunk/reactos/base/applications/network/ftp/prototypes.h

Modified: trunk/reactos/base/applications/network/ftp/cmds.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/cmds.c?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/cmds.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/cmds.c [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -47,14 +47,15 @@
 
 extern	char *globerr;
 extern	char home[];
-extern	char *remglob();
+static	const char *remglob(const char *argv[], int doswitch);
 extern	int allbinary;
 extern off_t restart_point;
 extern char reply_string[];
 
 const char *mname;
 jmp_buf jabort;
-const char *dotrans(), *domap();
+const char *dotrans(const char *name);
+const char *domap(const char *name);
 
 extern short portnum;
 extern char *hostname;
@@ -169,8 +170,7 @@
 /*
  * Set transfer type.
  */
-void settype(argc, argv)
-	const char *argv[];
+void settype(int argc, const char *argv[])
 {
 	register struct types *p;
 	int comret;
@@ -225,7 +225,7 @@
  * Set binary transfer type.
  */
 /*VARARGS*/
-void setbinary()
+void setbinary(int argc, const char *argv[])
 {
 	stype[1] = "binary";
 	settype(2, stype);
@@ -235,7 +235,7 @@
  * Set ascii transfer type.
  */
 /*VARARGS*/
-void setascii()
+void setascii(int argc, const char *argv[])
 {
 	stype[1] = "ascii";
 	settype(2, stype);
@@ -245,7 +245,7 @@
  * Set tenex transfer type.
  */
 /*VARARGS*/
-void settenex()
+void settenex(int argc, const char *argv[])
 {
 	stype[1] = "tenex";
 	settype(2, stype);
@@ -266,8 +266,7 @@
  */
 
 /*ARGSUSED*/
-void fsetmode(argc, argv)
-	char *argv[];
+void fsetmode(int argc, const char *argv[])
 {
 
 	printf("We only support %s mode, sorry.\n", modename);
@@ -280,8 +279,7 @@
  * Set file transfer format.
  */
 /*ARGSUSED*/
-void setform(argc, argv)
-	char *argv[];
+void setform(int argc, const char *argv[])
 {
 
 	printf("We only support %s format, sorry.\n", formname);
@@ -293,8 +291,7 @@
  * Set file transfer structure.
  */
 /*ARGSUSED*/
-void setstruct(argc, argv)
-	char *argv[];
+void setstruct(int argc, const char *argv[])
 {
 
 	printf("We only support %s structure, sorry.\n", structname);
@@ -305,9 +302,7 @@
 /*
  * Send a single file.
  */
-void put(argc, argv)
-	int argc;
-	const char *argv[];
+void put(int argc, const char *argv[])
 {
 	const char *cmd;
 	int loc = 0;
@@ -372,8 +367,7 @@
 /*
  * Send multiple files.
  */
-void mput(argc, argv)
-	const char *argv[];
+void mput(int argc, const char *argv[])
 {
 	register int i;
 	int ointer;
@@ -400,7 +394,8 @@
 //	oldintr = signal(SIGINT, mabort);
 	(void) setjmp(jabort);
 	if (proxy) {
-		char *cp, *tp2, tmpbuf[MAXPATHLEN];
+		const char *cp;
+		char *tp2, tmpbuf[MAXPATHLEN];
 
 		while ((cp = remglob(argv,0)) != NULL) {
 			if (*cp == 0) {
@@ -503,14 +498,12 @@
 	mflag = 0;
 }
 
-void reget(argc, argv)
-	const char *argv[];
+void reget(int argc, const char *argv[])
 {
 	(void) getit(argc, argv, 1, "r+w");
 }
 
-void get(argc, argv)
-	const char *argv[];
+void get(int argc, const char *argv[])
 {
 	(void) getit(argc, argv, 0, restart_point ? "r+w" : "w" );
 }
@@ -518,9 +511,7 @@
 /*
  * Receive one file.
  */
-int getit(argc, argv, restartit, mode)
-	const char *argv[];
-	const char *mode;
+int getit(int argc, const char *argv[], int restartit, const char *mode)
 {
 	int loc = 0;
 	const char *oldargv1, *oldargv2;
@@ -674,8 +665,7 @@
 /*
  * Get multiple files.
  */
-void mget(argc, argv)
-	const char *argv[];
+void mget(int argc, const char *argv[])
 {
 	const char *cp, *tp;
     char *tp2, tmpbuf[MAXPATHLEN];
@@ -747,18 +737,17 @@
 	mflag = 0;
 }
 
-char *
-remglob(argv,doswitch)
-	char *argv[];
-	int doswitch;
+const char *
+remglob(const char *argv[], int doswitch)
 {
 	char temp[16];
 	static char buf[MAXPATHLEN];
 	static FILE *ftemp = NULL;
-	static char **args;
+	static const char **args;
 	int oldverbose, oldhash;
-	char *cp;
+	const char *cp;
     const char *mode;
+    char *terminator;
 
 	if (!mflag) {
 		if (!doglob) {
@@ -805,16 +794,14 @@
 		(void) fclose(ftemp), ftemp = NULL;
 		return (NULL);
 	}
-	if ((cp = index(buf, '\n')) != NULL)
-		*cp = '\0';
+	if ((terminator = index(buf, '\n')) != NULL)
+		*terminator = '\0';
 	return (buf);
 }
 
 static const char *
-onoff(bool)
-	int bool;
-{
-
+onoff(int bool)
+{
 	return (bool ? "on" : "off");
 }
 
@@ -822,8 +809,7 @@
  * Show status.
  */
 /*ARGSUSED*/
-void status(argc, argv)
-	char *argv[];
+void status(int argc, const char *argv[])
 {
 	int i;
 
@@ -877,7 +863,7 @@
  * Set beep on cmd completed mode.
  */
 /*VARARGS*/
-void setbell()
+void setbell(int argc, const char *argv[])
 {
 
 	bell = !bell;
@@ -890,7 +876,7 @@
  * Turn on packet tracing.
  */
 /*VARARGS*/
-void settrace()
+void settrace(int argc, const char *argv[])
 {
 
 	trace = !trace;
@@ -903,7 +889,7 @@
  * Toggle hash mark printing during transfers.
  */
 /*VARARGS*/
-void sethash()
+void sethash(int argc, const char *argv[])
 {
 
 	hash = !hash;
@@ -919,7 +905,7 @@
  * Turn on printing of server echo's.
  */
 /*VARARGS*/
-void setverbose()
+void setverbose(int argc, const char *argv[])
 {
 
 	verbose = !verbose;
@@ -932,7 +918,7 @@
  * Toggle PORT cmd use before each data connection.
  */
 /*VARARGS*/
-void setport()
+void setport(int argc, const char *argv[])
 {
 
 	sendport = !sendport;
@@ -946,7 +932,7 @@
  * during mget, mput, and mdelete.
  */
 /*VARARGS*/
-void setprompt()
+void setprompt(int argc, const char *argv[])
 {
 
 	interactive = !interactive;
@@ -960,7 +946,7 @@
  * on local file names.
  */
 /*VARARGS*/
-void setglob()
+void setglob(int argc, const char *argv[])
 {
 
 	doglob = !doglob;
@@ -974,8 +960,7 @@
  * set level of debugging.
  */
 /*VARARGS*/
-void setdebug(argc, argv)
-	char *argv[];
+void setdebug(int argc, const char *argv[])
 {
 	int val;
 
@@ -1003,8 +988,7 @@
  * Set current working directory
  * on remote machine.
  */
-void cd(argc, argv)
-	const char *argv[];
+void cd(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -1035,8 +1019,7 @@
  * Set current working directory
  * on local machine.
  */
-void lcd(argc, argv)
-	const char *argv[];
+void lcd(int argc, const char *argv[])
 {
 	char buf[MAXPATHLEN];
 
@@ -1065,8 +1048,7 @@
 /*
  * Delete a single file.
  */
-void delete(argc, argv)
-	const char *argv[];
+void delete(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -1090,10 +1072,9 @@
 /*
  * Delete multiple files.
  */
-void mdelete(argc, argv)
-	const char *argv[];
-{
-	char *cp;
+void mdelete(int argc, const char *argv[])
+{
+	const char *cp;
 	int ointer;
 	extern jmp_buf jabort;
 
@@ -1140,8 +1121,7 @@
 /*
  * Rename a remote file.
  */
-void renamefile(argc, argv)
-	const char *argv[];
+void renamefile(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -1179,8 +1159,7 @@
  * Get a directory listing
  * of remote files.
  */
-void ls(argc, argv)
-	const char *argv[];
+void ls(int argc, const char *argv[])
 {
 	const char *cmd;
 
@@ -1212,8 +1191,7 @@
  * Get a directory listing
  * of multiple remote files.
  */
-void mls(argc, argv)
-	const char *argv[];
+void mls(int argc, const char *argv[])
 {
 	const char *cmd, *dest;
 	char mode[1];
@@ -1276,8 +1254,7 @@
  * Do a shell escape
  */
 /*ARGSUSED*/
-void shell(argc, argv)
-	char *argv[];
+void shell(int argc, const char *argv[])
 {
 #if 0
 	int pid;
@@ -1396,9 +1373,7 @@
 /*
  * Send new user information (re-login)
  */
-void user(argc, argv)
-	int argc;
-	const char **argv;
+void user(int argc, const char *argv[])
 {
 	char acct[80], *getpass();
 	int n, aflag = 0;
@@ -1449,7 +1424,7 @@
  * Print working directory.
  */
 /*VARARGS*/
-void pwd()
+void pwd(int argc, const char *argv[])
 {
 	int oldverbose = verbose;
 
@@ -1468,8 +1443,7 @@
 /*
  * Make a directory.
  */
-void makedir(argc, argv)
-	const char *argv[];
+void makedir(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -1499,8 +1473,7 @@
 /*
  * Remove a directory.
  */
-void removedir(argc, argv)
-	const char *argv[];
+void removedir(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -1530,8 +1503,7 @@
 /*
  * Send a line, verbatim, to the remote machine.
  */
-void quote(argc, argv)
-	const char *argv[];
+void quote(int argc, const char *argv[])
 {
 	int i;
 	char buf[BUFSIZ];
@@ -1566,9 +1538,7 @@
  * is sent almost verbatim to the remote machine, the
  * first argument is changed to SITE.
  */
-
-void site(argc, argv)
-	const char *argv[];
+void site(int argc, const char *argv[])
 {
 	int i;
 	char buf[BUFSIZ];
@@ -1599,8 +1569,7 @@
 	}
 }
 
-void do_chmod(argc, argv)
-	const char *argv[];
+void do_chmod(int argc, const char *argv[])
 {
 	if (argc == 2) {
 		printf("usage: %s mode file-name\n", argv[0]);
@@ -1626,8 +1595,7 @@
 	(void)command("SITE CHMOD %s %s", argv[1], argv[2]);
 }
 
-void do_umask(argc, argv)
-	char *argv[];
+void do_umask(int argc, const char *argv[])
 {
 	int oldverbose = verbose;
 
@@ -1636,8 +1604,7 @@
 	verbose = oldverbose;
 }
 
-void idle(argc, argv)
-	char *argv[];
+void idle(int argc, const char *argv[])
 {
 	int oldverbose = verbose;
 
@@ -1649,8 +1616,7 @@
 /*
  * Ask the other side for help.
  */
-void rmthelp(argc, argv)
-	char *argv[];
+void rmthelp(int argc, const char *argv[])
 {
 	int oldverbose = verbose;
 
@@ -1663,14 +1629,13 @@
  * Terminate session and exit.
  */
 /*VARARGS*/
-void quit()
-{
-
+void quit(int argc, const char *argv[])
+{
 	if (connected)
-		disconnect();
+		disconnect(0, NULL);
 	pswitch(1);
 	if (connected) {
-		disconnect();
+		disconnect(0, NULL);
 	}
 	exit(0);
 }
@@ -1678,7 +1643,7 @@
 /*
  * Terminate session, but don't exit.
  */
-void disconnect()
+void disconnect(int argc, const char *argv[])
 {
 	extern int cout;
 	extern int data;
@@ -1694,8 +1659,7 @@
 	}
 }
 
-int confirm(cmd, file)
-	const char *cmd, *file;
+int confirm(const char *cmd, const char *file)
 {
 	char line[BUFSIZ];
 
@@ -1708,8 +1672,7 @@
 }
 
 #if 0
-static void fatal(msg)
-	char *msg;
+static void fatal(const char *msg)
 {
 
 	fprintf(stderr, "ftp: %s\n", msg);
@@ -1723,8 +1686,7 @@
  * Can't control multiple values being expanded
  * from the expression, we return only the first.
  */
-int globulize(cpp)
-	const char **cpp;
+int globulize(const char **cpp)
 {
 	char **globbed;
 
@@ -1751,9 +1713,7 @@
 	return (1);
 }
 
-void account(argc,argv)
-	int argc;
-	char **argv;
+void account(int argc, const char *argv[])
 {
 	char acct[50], *getpass(), *ap;
 
@@ -1797,9 +1757,7 @@
 }
 #endif
 
-void doproxy(argc,argv)
-	int argc;
-	const char *argv[];
+void doproxy(int argc, const char *argv[])
 {
 	register struct cmd *c;
 	struct cmd *getcmd();
@@ -1865,7 +1823,7 @@
 //	(void) signal(SIGINT, oldintr);
 }
 
-void setcase()
+void setcase(int argc, const char *argv[])
 {
 	mcase = !mcase;
 	printf("Case mapping %s.\n", onoff(mcase));
@@ -1873,7 +1831,7 @@
 	code = mcase;
 }
 
-void setcr()
+void setcr(int argc, const char *argv[])
 {
 	crflag = !crflag;
 	printf("Carriage Return stripping %s.\n", onoff(crflag));
@@ -1881,9 +1839,7 @@
 	code = crflag;
 }
 
-void setntrans(argc,argv)
-	int argc;
-	char *argv[];
+void setntrans(int argc, const char *argv[])
 {
 	if (argc == 1) {
 		ntflag = 0;
@@ -1905,8 +1861,7 @@
 }
 
 const char *
-dotrans(name)
-	const char *name;
+dotrans(const char *name)
 {
 	static char new[MAXPATHLEN];
 	const char *cp1;
@@ -1933,11 +1888,7 @@
 	return(new);
 }
 
-
-void
-setpassive(argc, argv)
-  int argc;
-  char *argv[];
+void setpassive(int argc, const char *argv[])
 {
 	passivemode = !passivemode;
 	printf("Passive mode %s.\n", onoff(passivemode));
@@ -1945,9 +1896,7 @@
 	code = passivemode;
 }
 
-void setnmap(argc, argv)
-	int argc;
-	const char *argv[];
+void setnmap(int argc, const char *argv[])
 {
 	char *cp;
 
@@ -1988,8 +1937,7 @@
 }
 
 const char *
-domap(name)
-	const char *name;
+domap(const char *name)
 {
 	static char new[MAXPATHLEN];
 	const char *cp1 = name;
@@ -2161,7 +2109,7 @@
 	return(new);
 }
 
-void setsunique()
+void setsunique(int argc, const char *argv[])
 {
 	sunique = !sunique;
 	printf("Store unique %s.\n", onoff(sunique));
@@ -2169,7 +2117,7 @@
 	code = sunique;
 }
 
-void setrunique()
+void setrunique(int argc, const char *argv[])
 {
 	runique = !runique;
 	printf("Receive unique %s.\n", onoff(runique));
@@ -2178,7 +2126,7 @@
 }
 
 /* change directory to perent directory */
-void cdup()
+void cdup(int argc, const char *argv[])
 {
 	if (command("CDUP") == ERROR && code == 500) {
 		if (verbose) {
@@ -2190,9 +2138,7 @@
 }
 
 /* restart transfer at specific point */
-void restart(argc, argv)
-	int argc;
-	char *argv[];
+void restart(int argc, const char *argv[])
 {
 	if (argc != 2)
 		printf("restart: offset not specified\n");
@@ -2205,14 +2151,12 @@
 }
 
 /* show remote system type */
-void syst()
+void syst(int argc, const char *argv[])
 {
 	(void) command("SYST");
 }
 
-void macdef(argc, argv)
-	int argc;
-	const char *argv[];
+void macdef(int argc, const char *argv[])
 {
 	char *tmp;
 	int c;
@@ -2287,8 +2231,7 @@
 /*
  * get size of file on remote machine
  */
-void sizecmd(argc, argv)
-	const char *argv[];
+void sizecmd(int argc, const char *argv[])
 {
 
 	if (argc < 2) {
@@ -2312,8 +2255,7 @@
 /*
  * get last modification time of file on remote machine
  */
-void modtime(argc, argv)
-	const char *argv[];
+void modtime(int argc, const char *argv[])
 {
 	int overbose;
 
@@ -2351,8 +2293,7 @@
 /*
  * show status on reomte machine
  */
-void rmtstatus(argc, argv)
-	const char *argv[];
+void rmtstatus(int argc, const char *argv[])
 {
 	(void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]);
 }
@@ -2360,8 +2301,7 @@
 /*
  * get file if modtime is more recent than current file
  */
-void newer(argc, argv)
-	const char *argv[];
+void newer(int argc, const char *argv[])
 {
 	if (getit(argc, argv, -1, "w")) {
 		printf("Local file \"%s\" is newer than remote file \"%s\"\n",

Modified: trunk/reactos/base/applications/network/ftp/domacro.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/domacro.c?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/domacro.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/domacro.c [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -28,9 +28,7 @@
 #include <ctype.h>
 //#include <sys/ttychars.h>
 
-void domacro(argc, argv)
-	int argc;
-	const char *argv[];
+void domacro(int argc, const char *argv[])
 {
 	int i, j;
 	const char *cp1;

Modified: trunk/reactos/base/applications/network/ftp/fake.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/fake.c?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/fake.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/fake.c [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -35,7 +35,7 @@
         free(*av++);
 }
 
-char **glob(register char *v)
+char **glob(const char *v)
 {
    return NULL;
 }

Modified: trunk/reactos/base/applications/network/ftp/ftp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/ftp.c?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -110,7 +110,7 @@
 
 void psabort(int sig);
 
-char *hookup(char *host, int port)
+char *hookup(const char *host, int port)
 {
 	register struct hostent *hp = 0;
 	int len;
@@ -837,7 +837,7 @@
 			oldverbose = verbose;
 			if (!debug)
 				verbose = 0;
-			setascii();
+			setascii(0, NULL);
 			verbose = oldverbose;
 		}
 	} else if (restart_point) {
@@ -852,13 +852,13 @@
 					verbose = 0;
 				switch (oldtype) {
 					case TYPE_I:
-						setbinary();
+						setbinary(0, NULL);
 						break;
 					case TYPE_E:
 						setebcdic();
 						break;
 					case TYPE_L:
-						settenex();
+						settenex(0, NULL);
 						break;
 				}
 				verbose = oldverbose;
@@ -873,13 +873,13 @@
 					verbose = 0;
 				switch (oldtype) {
 					case TYPE_I:
-						setbinary();
+						setbinary(0, NULL);
 						break;
 					case TYPE_E:
 						setebcdic();
 						break;
 					case TYPE_L:
-						settenex();
+						settenex(0, NULL);
 						break;
 				}
 				verbose = oldverbose;
@@ -1044,13 +1044,13 @@
 			verbose = 0;
 		switch (oldtype) {
 			case TYPE_I:
-				setbinary();
+				setbinary(0, NULL);
 				break;
 			case TYPE_E:
 				setebcdic();
 				break;
 			case TYPE_L:
-				settenex();
+				settenex(0, NULL);
 				break;
 		}
 		verbose = oldverbose;
@@ -1069,13 +1069,13 @@
 			verbose = 0;
 		switch (oldtype) {
 			case TYPE_I:
-				setbinary();
+				setbinary(0, NULL);
 				break;
 			case TYPE_E:
 				setebcdic();
 				break;
 			case TYPE_L:
-				settenex();
+				settenex(0, NULL);
 				break;
 		}
 		verbose = oldverbose;
@@ -1463,16 +1463,16 @@
 		oldtype = type;
 		switch (tmptype) {
 			case TYPE_A:
-				setascii();
+				setascii(0, NULL);
 				break;
 			case TYPE_I:
-				setbinary();
+				setbinary(0, NULL);
 				break;
 			case TYPE_E:
 				setebcdic();
 				break;
 			case TYPE_L:
-				settenex();
+				settenex(0, NULL);
 				break;
 		}
 	}
@@ -1481,16 +1481,16 @@
 			case 0:
 				break;
 			case TYPE_A:
-				setascii();
+				setascii(0, NULL);
 				break;
 			case TYPE_I:
-				setbinary();
+				setbinary(0, NULL);
 				break;
 			case TYPE_E:
 				setebcdic();
 				break;
 			case TYPE_L:
-				settenex();
+				settenex(0, NULL);
 				break;
 		}
 		pswitch(1);
@@ -1505,16 +1505,16 @@
 			case 0:
 				break;
 			case TYPE_A:
-				setascii();
+				setascii(0, NULL);
 				break;
 			case TYPE_I:
-				setbinary();
+				setbinary(0, NULL);
 				break;
 			case TYPE_E:
 				setebcdic();
 				break;
 			case TYPE_L:
-				settenex();
+				settenex(0, NULL);
 				break;
 		}
 		pswitch(1);
@@ -1534,16 +1534,16 @@
 		case 0:
 			break;
 		case TYPE_A:
-			setascii();
+			setascii(0, NULL);
 			break;
 		case TYPE_I:
-			setbinary();
+			setbinary(0, NULL);
 			break;
 		case TYPE_E:
 			setebcdic();
 			break;
 		case TYPE_L:
-			settenex();
+			settenex(0, NULL);
 			break;
 	}
 	pswitch(1);
@@ -1565,16 +1565,16 @@
 				case 0:
 					break;
 				case TYPE_A:
-					setascii();
+					setascii(0, NULL);
 					break;
 				case TYPE_I:
-					setbinary();
+					setbinary(0, NULL);
 					break;
 				case TYPE_E:
 					setebcdic();
 					break;
 				case TYPE_L:
-					settenex();
+					settenex(0, NULL);
 					break;
 			}
 			if (cpend) {
@@ -1636,16 +1636,16 @@
 				case 0:
 					break;
 				case TYPE_A:
-					setascii();
+					setascii(0, NULL);
 					break;
 				case TYPE_I:
-					setbinary();
+					setbinary(0, NULL);
 					break;
 				case TYPE_E:
 					setebcdic();
 					break;
 				case TYPE_L:
-					settenex();
+					settenex(0, NULL);
 					break;
 			}
 			if (cpend) {
@@ -1720,16 +1720,16 @@
 		case 0:
 			break;
 		case TYPE_A:
-			setascii();
+			setascii(0, NULL);
 			break;
 		case TYPE_I:
-			setbinary();
+			setbinary(0, NULL);
 			break;
 		case TYPE_E:
 			setebcdic();
 			break;
 		case TYPE_L:
-			settenex();
+			settenex(0, NULL);
 			break;
 	}
 	pswitch(1);
@@ -1738,7 +1738,7 @@
 null();//	(void) signal(SIGINT, oldintr);
 }
 
-void reset()
+void reset(int argc, const char *argv[])
 {
 //	struct
 	fd_set mask;

Modified: trunk/reactos/base/applications/network/ftp/ftp_var.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/ftp_var.h?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/ftp_var.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/ftp_var.h [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -141,7 +141,7 @@
 	char	c_bell;			/* give bell when command completes */
 	char	c_conn;			/* must be connected to use command */
 	char	c_proxy;		/* proxy server may execute */
-	void	(*c_handler)(void);	/* function to call */
+	void	(*c_handler)(int argc, const char *argv[]);	/* function to call */
 };
 
 struct macel {

Modified: trunk/reactos/base/applications/network/ftp/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/main.c?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/main.c [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -53,10 +53,10 @@
 typedef int uid_t;
 #endif
 
-uid_t	getuid();
-void	intr();
-void	lostpeer();
-char	*getlogin();
+uid_t	getuid(void);
+void	intr(void);
+void	lostpeer(void);
+char	*getlogin(void);
 
 short	portnum;
 
@@ -262,10 +262,8 @@
 	}
 }
 
-void
-intr()
-{
-
+void intr(void)
+{
 	longjmp(toplevel, 1);
 }
 
@@ -299,8 +297,7 @@
 }
 
 /*char *
-tail(filename)
-	char *filename;
+tail(char *filename)
 {
 	register char *s;
 
@@ -318,8 +315,7 @@
 /*
  * Command parser.
  */
-void cmdscanner(top)
-	int top;
+void cmdscanner(int top)
 {
 	register struct cmd *c;
 
@@ -333,7 +329,7 @@
 		}
 		if (gets(line) == 0) {
 			if (feof(stdin) || ferror(stdin))
-				quit();
+				quit(0, NULL);
 			break;
 		}
 		if (line[0] == 0)
@@ -367,8 +363,7 @@
 }
 
 struct cmd *
-getcmd(name)
-	const char *name;
+getcmd(const char *name)
 {
 	extern struct cmd cmdtab[];
 	const char *p, *q;
@@ -402,7 +397,7 @@
 
 int slrflag;
 
-void makeargv()
+void makeargv(void)
 {
 	const char **argp;
 
@@ -421,7 +416,7 @@
  * handle quoting and strings
  */
 static const char *
-slurpstring()
+slurpstring(void)
 {
 	int got_one = 0;
 	register char *sb = stringbase;
@@ -544,9 +539,7 @@
  * Help command.
  * Call each command handler with argc == 0 and argv[0] == name.
  */
-void help(argc, argv)
-	int argc;
-	char *argv[];
+void help(int argc, const char *argv[])
 {
 	extern struct cmd cmdtab[];
 	struct cmd *c;
@@ -594,7 +587,7 @@
 		return;
 	}
 	while (--argc > 0) {
-		register char *arg;
+		const char *arg;
 		arg = *++argv;
 		c = getcmd(arg);
 		if (c == (struct cmd *)-1)

Modified: trunk/reactos/base/applications/network/ftp/prototypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/ftp/prototypes.h?rev=51028&r1=51027&r2=51028&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/ftp/prototypes.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/prototypes.h [iso-8859-1] Sat Mar 12 23:39:18 2011
@@ -8,8 +8,8 @@
 int fputSocket(int s, char *putChar, int len);
 char *fgetsSocket(int s, char *string);
 
-char *hookup(void);
-char **glob(void);
+char *hookup(const char *host, int port);
+char **glob(const char *s);
 int herror(char *s);
 
 int getreply(int expecteof);
@@ -20,18 +20,18 @@
 void proxtrans(const char *cmd, const char *local, const char *remote);
 int null(void);
 int initconn(void);
-void disconnect(void);
+void disconnect(int argc, const char *argv[]);
 void ptransfer(const char *direction, long bytes, struct timeval *t0, struct timeval *t1);
-void setascii(void);
-void setbinary(void);
+void setascii(int argc, const char *argv[]);
+void setbinary(int argc, const char *argv[]);
 void setebcdic(void);
-void settenex(void);
+void settenex(int argc, const char *argv[]);
 void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0);
-void setpassive(int argc, char *argv[]);
+void setpassive(int argc, const char *argv[]);
 void setpeer(int argc, const char *argv[]);
 void cmdscanner(int top);
 void pswitch(int flag);
-void quit(void);
+void quit(int argc, const char *argv[]);
 int login(const char *host);
 int command(const char *fmt, ...);
 int globulize(const char **cpp);
@@ -44,21 +44,58 @@
 int sleep(int time);
 
 char *tail(void);
-void	setbell(void), setdebug(void);
-void	setglob(void), sethash(void), setport(void);
-void	setprompt(void);
-void	settrace(void), setverbose(void);
-void	settype(void), setform(void), setstruct(void);
-void	restart(void), syst(void);
-void	cd(void), lcd(void), delete(void), mdelete(void);
-void	ls(void), mls(void), get(void), mget(void), help(void), append(void), put(void), mput(void), reget(void);
-void	status(void);
-void	renamefile(void);
-void	quote(void), rmthelp(void), site(void);
-void	pwd(void), makedir(void), removedir(void), setcr(void);
-void	account(void), doproxy(void), reset(void), setcase(void), setntrans(void), setnmap(void);
-void	setsunique(void), setrunique(void), cdup(void), macdef(void);
-void	sizecmd(void), modtime(void), newer(void), rmtstatus(void);
-void	do_chmod(void), do_umask(void), idle(void);
-void	shell(void), user(void), fsetmode(void);
-struct cmd	*getcmd(void);
+void setbell(int argc, const char *argv[]);
+void setdebug(int argc, const char *argv[]);
+void setglob(int argc, const char *argv[]);
+void sethash(int argc, const char *argv[]);
+void setport(int argc, const char *argv[]);
+void setprompt(int argc, const char *argv[]);
+void settrace(int argc, const char *argv[]);
+void setverbose(int argc, const char *argv[]);
+void settype(int argc, const char *argv[]);
+void setform(int argc, const char *argv[]);
+void setstruct(int argc, const char *argv[]);
+void restart(int argc, const char *argv[]);
+void syst(int argc, const char *argv[]);
+void cd(int argc, const char *argv[]);
+void lcd(int argc, const char *argv[]);
+void delete(int argc, const char *argv[]);
+void mdelete(int argc, const char *argv[]);
+void ls(int argc, const char *argv[]);
+void mls(int argc, const char *argv[]);
+void get(int argc, const char *argv[]);
+void mget(int argc, const char *argv[]);
+void help(int argc, const char *argv[]);
+void put(int argc, const char *argv[]);
+void mput(int argc, const char *argv[]);
+void reget(int argc, const char *argv[]);
+void status(int argc, const char *argv[]);
+void renamefile(int argc, const char *argv[]);
+void quote(int argc, const char *argv[]);
+void rmthelp(int argc, const char *argv[]);
+void site(int argc, const char *argv[]);
+void pwd(int argc, const char *argv[]);
+void makedir(int argc, const char *argv[]);
+void removedir(int argc, const char *argv[]);
+void setcr(int argc, const char *argv[]);
+void account(int argc, const char *argv[]);
+void doproxy(int argc, const char *argv[]);
+void reset(int argc, const char *argv[]);
+void setcase(int argc, const char *argv[]);
+void setntrans(int argc, const char *argv[]);
+void setnmap(int argc, const char *argv[]);
+void setsunique(int argc, const char *argv[]);
+void setrunique(int argc, const char *argv[]);
+void cdup(int argc, const char *argv[]);
+void macdef(int argc, const char *argv[]);
+void sizecmd(int argc, const char *argv[]);
+void modtime(int argc, const char *argv[]);
+void newer(int argc, const char *argv[]);
+void rmtstatus(int argc, const char *argv[]);
+void do_chmod(int argc, const char *argv[]);
+void do_umask(int argc, const char *argv[]);
+void idle(int argc, const char *argv[]);
+void shell(int argc, const char *argv[]);
+void user(int argc, const char *argv[]);
+void fsetmode(int argc, const char *argv[]);
+struct cmd	*getcmd(const char *name);




More information about the Ros-diffs mailing list