3 #include "prototypes.h"
6 //typedef void (*Sig_t)(int);
8 /* The following defines are from ftp.h and telnet.h from bsd.h */
9 /* All relevent copyrights below apply. */
33 #define MAXPATHLEN 255
63 * Copyright (c) 1985 Regents of the University of California.
64 * All rights reserved.
66 * Redistribution and use in source and binary forms are permitted
67 * provided that the above copyright notice and this paragraph are
68 * duplicated in all such forms and that any documentation,
69 * advertising materials, and other materials related to such
70 * distribution and use acknowledge that the software was developed
71 * by the University of California, Berkeley. The name of the
72 * University may not be used to endorse or promote products derived
73 * from this software without specific prior written permission.
74 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
75 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
76 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
78 * @(#)ftp_var.h 5.5 (Berkeley) 6/29/88
82 * FTP global variables.
86 * Options and other state info.
88 extern int trace
; /* trace packets exchanged */
89 extern int hash
; /* print # for each buffer transferred */
90 extern int sendport
; /* use PORT cmd for each data connection */
91 extern int verbose
; /* print messages coming back from server */
92 extern int connected
; /* connected to server */
93 extern int fromatty
; /* input is from a terminal */
94 extern int interactive
; /* interactively prompt on m* cmds */
95 extern int debug
; /* debugging level */
96 extern int bell
; /* ring bell on cmd completion */
97 extern int doglob
; /* glob local file names */
98 extern int proxy
; /* proxy server connection active */
99 extern int proxflag
; /* proxy connection exists */
100 extern int sunique
; /* store files on server with unique name */
101 extern int runique
; /* store local files with unique name */
102 extern int mcase
; /* map upper to lower case for mget names */
103 extern int ntflag
; /* use ntin ntout tables for name translation */
104 extern int mapflag
; /* use mapin mapout templates on file names */
105 extern int code
; /* return/reply code for ftp command */
106 extern int crflag
; /* if 1, strip car. rets. on ascii gets */
107 extern char pasv
[64]; /* passive port for proxy data connection */
108 extern int passivemode
; /* passive mode enabled */
109 extern char *altarg
; /* argv[1] with no shell-like preprocessing */
110 extern char ntin
[17]; /* input translation table */
111 extern char ntout
[17]; /* output translation table */
113 extern char mapin
[MAXPATHLEN
]; /* input map template */
114 extern char mapout
[MAXPATHLEN
]; /* output map template */
115 extern char typename
[32]; /* name of file transfer type */
116 extern int type
; /* file transfer type */
117 extern char structname
[32]; /* name of file transfer structure */
118 extern int stru
; /* file transfer structure */
119 extern char formname
[32]; /* name of file transfer format */
120 extern int form
; /* file transfer format */
121 extern char modename
[32]; /* name of file transfer mode */
122 extern int mode
; /* file transfer mode */
123 extern char bytename
[32]; /* local byte size in ascii */
124 extern int bytesize
; /* local byte size in binary */
126 extern jmp_buf toplevel
; /* non-local goto stuff for cmd scanner */
128 extern char line
[200]; /* input line buffer */
129 extern char *stringbase
; /* current scan point in line buffer */
130 extern char argbuf
[200]; /* argument storage buffer */
131 extern char *argbase
; /* current storage point in arg buffer */
132 extern int margc
; /* count of arguments on input line */
133 extern const char *margv
[20]; /* args parsed from input line */
134 extern int cpend
; /* flag: if != 0, then pending server reply */
135 extern int mflag
; /* flag: if != 0, then active multi command */
137 extern int options
; /* used during socket creation */
140 * Format of command table.
143 const char *c_name
; /* name of command */
144 const char *c_help
; /* help string */
145 char c_bell
; /* give bell when command completes */
146 char c_conn
; /* must be connected to use command */
147 char c_proxy
; /* proxy server may execute */
148 void (*c_handler
)(); /* function to call */
152 char mac_name
[9]; /* macro name */
153 char *mac_start
; /* start of macro in macbuf */
154 char *mac_end
; /* end of macro in macbuf */
157 int macnum
; /* number of defined macros */
158 struct macel macros
[16];
161 #if defined(__ANSI__) || defined(sparc)