fixed warnings when compiled with -Wwrite-strings
[reactos.git] / reactos / apps / utils / net / ftp / ftp_var.h
1 #include <winsock.h>
2 #include "fake.h"
3 #include "prototypes.h"
4 #include <setjmp.h>
5
6 //typedef void (*Sig_t)(int);
7
8 /* The following defines are from ftp.h and telnet.h from bsd.h */
9 /* All relevent copyrights below apply. */
10
11 #define IAC 255
12 #define DONT 254
13 #define DO 253
14 #define WONT 252
15 #define WILL 251
16 #define SB 250
17 #define GA 249
18 #define EL 248
19 #define EC 247
20 #define AYT 246
21 #define AO 245
22 #define IP 244
23 #define BREAK 243
24 #define DM 242
25 #define NOP 241
26 #define SE 240
27 #define EOR 239
28 #define ABORT 238
29 #define SUSP 237
30 #define xEOF 236
31
32
33 #define MAXPATHLEN 255
34 #define TYPE_A 'A'
35 #define TYPE_I 'I'
36 #define TYPE_E 'E'
37 #define TYPE_L 'L'
38
39 #define PRELIM 1
40 #define COMPLETE 2
41 #define CONTINUE 3
42 #define TRANSIENT 4
43
44 #define MODE_S 1
45 #define MODE_B 2
46 #define MODE_C 3
47
48 #define STRU_F 1
49 #define STRU_R 2
50 #define STRU_P 3
51
52 #define SIGQUIT 1
53 #define SIGPIPE 2
54 #define SIGALRM 3
55
56
57 #define FORM_N 1
58 #define FORM_T 2
59 #define FORM_C 3
60
61
62 /*
63 * Copyright (c) 1985 Regents of the University of California.
64 * All rights reserved.
65 *
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.
77 *
78 * @(#)ftp_var.h 5.5 (Berkeley) 6/29/88
79 */
80
81 /*
82 * FTP global variables.
83 */
84
85 /*
86 * Options and other state info.
87 */
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 */
112
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 */
125
126 extern jmp_buf toplevel; /* non-local goto stuff for cmd scanner */
127
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 */
136
137 extern int options; /* used during socket creation */
138
139 /*
140 * Format of command table.
141 */
142 struct cmd {
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 */
149 };
150
151 struct macel {
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 */
155 };
156
157 int macnum; /* number of defined macros */
158 struct macel macros[16];
159 char macbuf[4096];
160
161 #if defined(__ANSI__) || defined(sparc)
162 typedef void sig_t;
163 #else
164 typedef int sig_t;
165 #endif
166
167 typedef int uid_t;
168