Author: dgorbachev
Date: Sun Oct 18 20:52:15 2009
New Revision: 43571
URL:
http://svn.reactos.org/svn/reactos?rev=43571&view=rev
Log:
Fix double definition of a variable, add extern.
Modified:
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
Modified: trunk/reactos/base/applications/network/ftp/ftp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] Sun Oct 18 20:52:15
2009
@@ -1135,13 +1135,6 @@
ptransfer("received", bytes, &start, &stop);
null();// (void) signal(SIGINT,oldintr);
}
-
-/*
- * Need to start a listen on the data channel
- * before we send the command, otherwise the
- * server's connect may fail.
- */
-int sendport = -1;
int
initconn()
Modified: trunk/reactos/base/applications/network/ftp/ftp_var.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- 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] Sun Oct 18 20:52:15
2009
@@ -101,7 +101,7 @@
extern int code; /* return/reply code for ftp command */
extern int crflag; /* if 1, strip car. rets. on ascii gets */
extern char pasv[64]; /* passive port for proxy data connection */
-extern int passivemode; /* passive mode enabled */
+extern int passivemode; /* passive mode enabled */
extern char *altarg; /* argv[1] with no shell-like preprocessing */
extern char ntin[17]; /* input translation table */
extern char ntout[17]; /* output translation table */
@@ -126,8 +126,8 @@
extern char argbuf[200]; /* argument storage buffer */
extern char *argbase; /* current storage point in arg buffer */
extern int margc; /* count of arguments on input line */
-extern const char *margv[20]; /* args parsed from input line */
-extern int cpend; /* flag: if != 0, then pending server reply */
+extern const char *margv[20]; /* args parsed from input line */
+extern int cpend; /* flag: if != 0, then pending server reply */
extern int mflag; /* flag: if != 0, then active multi command */
extern int options; /* used during socket creation */
@@ -138,21 +138,21 @@
struct cmd {
const char *c_name; /* name of command */
const char *c_help; /* help string */
- 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)(); /* function to call */
+ 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)(); /* function to call */
};
struct macel {
- char mac_name[9]; /* macro name */
- char *mac_start; /* start of macro in macbuf */
- char *mac_end; /* end of macro in macbuf */
+ char mac_name[9]; /* macro name */
+ char *mac_start; /* start of macro in macbuf */
+ char *mac_end; /* end of macro in macbuf */
};
-int macnum; /* number of defined macros */
-struct macel macros[16];
-char macbuf[4096];
+extern int macnum; /* number of defined macros */
+extern struct macel macros[16];
+extern char macbuf[4096];
#if defined(__ANSI__) || defined(sparc)
typedef void sig_t;
Modified: trunk/reactos/base/applications/network/ftp/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/ftp/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ftp/main.c [iso-8859-1] Sun Oct 18 20:52:15
2009
@@ -58,11 +58,11 @@
void lostpeer();
char *getlogin();
-short portnum;
-
-char home[128];
+short portnum;
+
+char home[128];
char *globerr;
-int autologin;
+int autologin;
@@ -72,7 +72,7 @@
*/
int trace; /* trace packets exchanged */
int hash; /* print # for each buffer transferred */
-int sendport; /* use PORT cmd for each data connection */
+//int sendport; /* use PORT cmd for each data connection */
int verbose; /* print messages coming back from server */
int connected; /* connected to server */
int fromatty; /* input is from a terminal */
@@ -81,7 +81,7 @@
int bell; /* ring bell on cmd completion */
int doglob; /* glob local file names */
int proxy; /* proxy server connection active */
-int passivemode;
+int passivemode;
int proxflag; /* proxy connection exists */
int sunique; /* store files on server with unique name */
int runique; /* store local files with unique name */
@@ -115,11 +115,22 @@
char argbuf[200]; /* argument storage buffer */
char *argbase; /* current storage point in arg buffer */
int margc; /* count of arguments on input line */
-const char *margv[20]; /* args parsed from input line */
-int cpend; /* flag: if != 0, then pending server reply */
+const char *margv[20]; /* args parsed from input line */
+int cpend; /* flag: if != 0, then pending server reply */
int mflag; /* flag: if != 0, then active multi command */
int options; /* used during socket creation */
+
+int macnum; /* number of defined macros */
+struct macel macros[16];
+char macbuf[4096];
+
+/*
+ * Need to start a listen on the data channel
+ * before we send the command, otherwise the
+ * server's connect may fail.
+ */
+int sendport = -1;
static const char *slurpstring();