Initial import from FreeBSD RELENG_4:
[games.git] / crypto / kerberosIV / appl / ftp / ftp / globals.c
1 #include "ftp_locl.h"
2 RCSID("$Id: globals.c,v 1.6 1996/08/26 22:46:26 assar Exp $");
3
4 /*
5  * Options and other state info.
6  */
7 int     trace;                  /* trace packets exchanged */
8 int     hash;                   /* print # for each buffer transferred */
9 int     sendport;               /* use PORT cmd for each data connection */
10 int     verbose;                /* print messages coming back from server */
11 int     connected;              /* connected to server */
12 int     fromatty;               /* input is from a terminal */
13 int     interactive;            /* interactively prompt on m* cmds */
14 int     debug;                  /* debugging level */
15 int     bell;                   /* ring bell on cmd completion */
16 int     doglob;                 /* glob local file names */
17 int     autologin;              /* establish user account on connection */
18 int     proxy;                  /* proxy server connection active */
19 int     proxflag;               /* proxy connection exists */
20 int     sunique;                /* store files on server with unique name */
21 int     runique;                /* store local files with unique name */
22 int     mcase;                  /* map upper to lower case for mget names */
23 int     ntflag;                 /* use ntin ntout tables for name translation */
24 int     mapflag;                /* use mapin mapout templates on file names */
25 int     code;                   /* return/reply code for ftp command */
26 int     crflag;                 /* if 1, strip car. rets. on ascii gets */
27 char    pasv[64];               /* passive port for proxy data connection */
28 int     passivemode;            /* passive mode enabled */
29 char    *altarg;                /* argv[1] with no shell-like preprocessing  */
30 char    ntin[17];               /* input translation table */
31 char    ntout[17];              /* output translation table */
32 char    mapin[MaxPathLen];      /* input map template */
33 char    mapout[MaxPathLen];     /* output map template */
34 char    typename[32];           /* name of file transfer type */
35 int     type;                   /* requested file transfer type */
36 int     curtype;                /* current file transfer type */
37 char    structname[32];         /* name of file transfer structure */
38 int     stru;                   /* file transfer structure */
39 char    formname[32];           /* name of file transfer format */
40 int     form;                   /* file transfer format */
41 char    modename[32];           /* name of file transfer mode */
42 int     mode;                   /* file transfer mode */
43 char    bytename[32];           /* local byte size in ascii */
44 int     bytesize;               /* local byte size in binary */
45
46 char    *hostname;              /* name of host connected to */
47 int     unix_server;            /* server is unix, can use binary for ascii */
48 int     unix_proxy;             /* proxy is unix, can use binary for ascii */
49
50 jmp_buf toplevel;               /* non-local goto stuff for cmd scanner */
51
52 char    line[200];              /* input line buffer */
53 char    *stringbase;            /* current scan point in line buffer */
54 char    argbuf[200];            /* argument storage buffer */
55 char    *argbase;               /* current storage point in arg buffer */
56 int     margc;                  /* count of arguments on input line */
57 char    **margv;                /* args parsed from input line */
58 int     margvlen;               /* how large margv is currently */
59 int     cpend;                  /* flag: if != 0, then pending server reply */
60 int     mflag;                  /* flag: if != 0, then active multi command */
61
62 int     options;                /* used during socket creation */
63
64 /*
65  * Format of command table.
66  */
67
68 int macnum;                     /* number of defined macros */
69 struct macel macros[16];
70 char macbuf[4096];
71
72 char username[32];
73
74 /* these are set in ruserpass */
75 char myhostname[MaxHostNameLen];
76 char *mydomain;