must rm before ln
[unix-history] / usr / src / usr.bin / ftp / ftp_var.h
CommitLineData
614e24b6 1/* ftp_var.h 4.5 83/06/19 */
88648cc6
SL
2
3/*
4 * FTP global variables.
5 */
6
7/*
8 * Options and other state info.
9 */
10int trace; /* trace packets exchanged */
5ac6fc46
SL
11int hash; /* print # for each buffer transferred */
12int sendport; /* use PORT cmd for each data connection */
88648cc6
SL
13int verbose; /* print messages coming back from server */
14int connected; /* connected to server */
15int fromatty; /* input is from a terminal */
16int interactive; /* interactively prompt on m* cmds */
17int debug; /* debugging level */
18int bell; /* ring bell on cmd completion */
faf9f493 19int doglob; /* glob local file names */
614e24b6 20int linger; /* linger on close of data connections */
88648cc6
SL
21int autologin; /* establish user account on connection */
22
23char typename[32]; /* name of file transfer type */
24int type; /* file transfer type */
25char structname[32]; /* name of file transfer structure */
26int stru; /* file transfer structure */
27char formname[32]; /* name of file transfer format */
28int form; /* file transfer format */
29char modename[32]; /* name of file transfer mode */
30int mode; /* file transfer mode */
d33c618b
SL
31char bytename[32]; /* local byte size in ascii */
32int bytesize; /* local byte size in binary */
88648cc6
SL
33
34char *hostname; /* name of host connected to */
35
36struct servent *sp; /* service spec for tcp/ftp */
37
38#include <setjmp.h>
39jmp_buf toplevel; /* non-local goto stuff for cmd scanner */
40
41char line[200]; /* input line buffer */
42char *stringbase; /* current scan point in line buffer */
43char argbuf[200]; /* argument storage buffer */
44char *argbase; /* current storage point in arg buffer */
45int margc; /* count of arguments on input line */
46char *margv[20]; /* args parsed from input line */
47
48int options; /* used during socket creation */
49
50/*
51 * Format of command table.
52 */
53struct cmd {
54 char *c_name; /* name of command */
55 char *c_help; /* help string */
56 char c_bell; /* give bell when command completes */
5ac6fc46 57 char c_conn; /* must be connected to use command */
88648cc6
SL
58 int (*c_handler)(); /* function to call */
59};
60
61extern char *tail();
62extern char *index();
63extern char *rindex();
5ac6fc46 64extern char *remglob();
88648cc6 65extern int errno;