void lostpeer();
char *getlogin();
-short portnum;
+short portnum;
-char home[128];
+char home[128];
char *globerr;
-int autologin;
+int autologin;
*/
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 */
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 */
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();
extern int data;
if (connected) {
- if (cout != (int) NULL) {
+ if (cout) {
closesocket(cout);
- cout = (int) NULL;
+ cout = 0;
}
if (data >= 0) {
(void) shutdown(data, 1+1);
}
pswitch(1);
if (connected) {
- if (cout != (int)NULL) {
+ if (cout) {
closesocket(cout);
- cout = (int) NULL;
+ cout = 0;
}
connected = 0;
}
char *argv[];
{
extern struct cmd cmdtab[];
- register struct cmd *c;
+ struct cmd *c;
if (argc == 1) {
register int i, j, w, k;
else if (c == (struct cmd *)0)
printf("?Invalid help command %s\n", arg);
else
- printf("%-*s\t%s\n", HELPINDENT,
+ printf("%-*s\t%s\n", (int)HELPINDENT,
c->c_name, c->c_help);
}
(void) fflush(stdout);