1*11652Ssam /* ftp_var.h 4.4 83/03/23 */ 210298Ssam 310298Ssam /* 410298Ssam * FTP global variables. 510298Ssam */ 610298Ssam 710298Ssam /* 810298Ssam * Options and other state info. 910298Ssam */ 1010298Ssam int trace; /* trace packets exchanged */ 11*11652Ssam int hash; /* print # for each buffer transferred */ 12*11652Ssam int sendport; /* use PORT cmd for each data connection */ 1310298Ssam int verbose; /* print messages coming back from server */ 1410298Ssam int connected; /* connected to server */ 1510298Ssam int fromatty; /* input is from a terminal */ 1610298Ssam int interactive; /* interactively prompt on m* cmds */ 1710298Ssam int debug; /* debugging level */ 1810298Ssam int bell; /* ring bell on cmd completion */ 1911349Ssam int doglob; /* glob local file names */ 2010298Ssam int autologin; /* establish user account on connection */ 2110298Ssam 2210298Ssam char typename[32]; /* name of file transfer type */ 2310298Ssam int type; /* file transfer type */ 2410298Ssam char structname[32]; /* name of file transfer structure */ 2510298Ssam int stru; /* file transfer structure */ 2610298Ssam char formname[32]; /* name of file transfer format */ 2710298Ssam int form; /* file transfer format */ 2810298Ssam char modename[32]; /* name of file transfer mode */ 2910298Ssam int mode; /* file transfer mode */ 3011220Ssam char bytename[32]; /* local byte size in ascii */ 3111220Ssam int bytesize; /* local byte size in binary */ 3210298Ssam 3310298Ssam char *hostname; /* name of host connected to */ 3410298Ssam 3510298Ssam struct servent *sp; /* service spec for tcp/ftp */ 3610298Ssam 3710298Ssam #include <setjmp.h> 3810298Ssam jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ 3910298Ssam 4010298Ssam char line[200]; /* input line buffer */ 4110298Ssam char *stringbase; /* current scan point in line buffer */ 4210298Ssam char argbuf[200]; /* argument storage buffer */ 4310298Ssam char *argbase; /* current storage point in arg buffer */ 4410298Ssam int margc; /* count of arguments on input line */ 4510298Ssam char *margv[20]; /* args parsed from input line */ 4610298Ssam 4710298Ssam int options; /* used during socket creation */ 4810298Ssam 4910298Ssam /* 5010298Ssam * Format of command table. 5110298Ssam */ 5210298Ssam struct cmd { 5310298Ssam char *c_name; /* name of command */ 5410298Ssam char *c_help; /* help string */ 5510298Ssam char c_bell; /* give bell when command completes */ 56*11652Ssam char c_conn; /* must be connected to use command */ 5710298Ssam int (*c_handler)(); /* function to call */ 5810298Ssam }; 5910298Ssam 6010298Ssam extern char *tail(); 6110298Ssam extern char *index(); 6210298Ssam extern char *rindex(); 63*11652Ssam extern char *remglob(); 6410298Ssam extern int errno; 65