ReactOS  0.4.12-dev-43-g63b00d8
main.c File Reference
#include "precomp.h"
#include <fcntl.h>
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define HELPINDENT   (sizeof ("directory"))
 

Functions

uid_t getuid (void)
 
void intr (void)
 
void lostpeer (void)
 
chargetlogin (void)
 
static const charslurpstring ()
 
int main (int argc, const char *argv[])
 
void cmdscanner (int top)
 
struct cmdgetcmd (const char *name)
 
void makeargv (void)
 
void help (int argc, const char *argv[])
 

Variables

char copyright []
 
static char sccsid [] = "@(#)main.c based on 5.13 (Berkeley) 3/14/89"
 
short portnum
 
char home [128]
 
chargloberr
 
int autologin
 
int trace
 
int hash
 
int verbose
 
int connected
 
int fromatty
 
int interactive
 
int debug
 
int bell
 
int doglob
 
int proxy
 
int passivemode
 
int proxflag
 
int sunique
 
int runique
 
int mcase
 
int ntflag
 
int mapflag
 
int code
 
int crflag
 
char pasv [64]
 
charaltarg
 
char ntin [17]
 
char ntout [17]
 
char mapin [MAXPATHLEN]
 
char mapout [MAXPATHLEN]
 
char typename [32]
 
int type
 
char structname [32]
 
int stru
 
char formname [32]
 
int form
 
char modename [32]
 
int mode
 
char bytename [32]
 
int bytesize
 
jmp_buf toplevel
 
char line [200]
 
charstringbase
 
char argbuf [200]
 
charargbase
 
int margc
 
const charmargv [20]
 
int cpend
 
int mflag
 
int options
 
int macnum
 
struct macel macros [16]
 
char macbuf [4096]
 
int sendport = -1
 
int slrflag
 

Macro Definition Documentation

◆ HELPINDENT

#define HELPINDENT   (sizeof ("directory"))

Definition at line 520 of file main.c.

Referenced by help().

Function Documentation

◆ cmdscanner()

void cmdscanner ( int  top)

Definition at line 302 of file main.c.

Referenced by main().

303 {
304  register struct cmd *c;
305 
306  if (!top)
307  (void) putchar('\n');
308  for (;;) {
309  (void) fflush(stdout);
310  if (fromatty) {
311  printf("ftp> ");
312  (void) fflush(stdout);
313  }
314  if (gets(line) == 0) {
315  if (feof(stdin) || ferror(stdin))
316  quit(0, NULL);
317  break;
318  }
319  if (line[0] == 0)
320  break;
321  makeargv();
322  if (margc == 0) {
323  continue;
324  }
325  c = getcmd(margv[0]);
326  if (c == (struct cmd *)-1) {
327  printf("?Ambiguous command\n");
328  continue;
329  }
330  if (c == 0) {
331  printf("?Invalid command\n");
332  continue;
333  }
334  if (c->c_conn && !connected) {
335  printf ("Not connected.\n");
336  continue;
337  }
338  (*c->c_handler)(margc, margv);
339  if (bell && c->c_bell)
340  (void) putchar('\007');
341  if (c->c_handler != help)
342  break;
343  }
344  (void) fflush(stdout);
345 // (void) signal(SIGINT, intr);
346 // (void) signal(SIGPIPE, lostpeer);
347 }
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int bell
Definition: main.c:65
Definition: ftp_var.h:139
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3643
void quit(int argc, const char *argv[])
Definition: cmds.c:1606
FILE * stdin
FILE * stdout
int fromatty
Definition: main.c:62
int putchar(int c)
Definition: crtsupp.c:12
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
int margc
Definition: main.c:101
_Check_return_ _CRTIMP int __cdecl feof(_In_ FILE *_File)
char c_conn
Definition: ftp_var.h:143
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int connected
Definition: main.c:61
char c_bell
Definition: ftp_var.h:142
#define c
Definition: ke_i.h:80
const char * margv[20]
Definition: main.c:102
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
struct cmd * getcmd(const char *name)
Definition: main.c:350
void help(int argc, const char *argv[])
Definition: main.c:526
void(* c_handler)(int argc, const char *argv[])
Definition: ftp_var.h:145
#define printf
Definition: config.h:203

◆ getcmd()

struct cmd* getcmd ( const char name)

Definition at line 350 of file main.c.

Referenced by cmdscanner(), domacro(), doproxy(), and help().

351 {
352  extern struct cmd cmdtab[];
353  const char *p, *q;
354  struct cmd *c, *found;
355  int nmatches, longest;
356 
357  longest = 0;
358  nmatches = 0;
359  found = 0;
360  for (c = cmdtab; (p = c->c_name); c++) {
361  for (q = name; *q == *p++; q++)
362  if (*q == 0) /* exact match? */
363  return (c);
364  if (!*q) { /* the name was a prefix */
365  if (q - name > longest) {
366  longest = q - name;
367  nmatches = 1;
368  found = c;
369  } else if (q - name == longest)
370  nmatches++;
371  }
372  }
373  if (nmatches > 1)
374  return ((struct cmd *)-1);
375  return (found);
376 }
Definition: ftp_var.h:139
const char * name
Definition: main.c:224
struct cmd cmdtab[]
Definition: cmdtab.c:95
const char * c_name
Definition: ftp_var.h:140
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
Definition: name.c:36
#define c
Definition: ke_i.h:80
GLfloat GLfloat p
Definition: glext.h:8902

◆ getlogin()

char* getlogin ( void  )

Referenced by GetPwByName(), gl_set_home_dir(), and main().

◆ getuid()

uid_t getuid ( void  )

Definition at line 27 of file uid.c.

Referenced by main().

28 {
29  return (0);
30 }

◆ help()

void help ( int  argc,
const char argv[] 
)

Definition at line 526 of file main.c.

Referenced by cmdscanner().

527 {
528  extern struct cmd cmdtab[];
529  struct cmd *c;
530 
531  if (argc == 1) {
532  register int i, j, w, k;
533  int columns, width = 0, lines;
534  extern int NCMDS;
535 
536  printf("Commands may be abbreviated. Commands are:\n\n");
537  for (c = cmdtab; c < &cmdtab[NCMDS]; c++) {
538  int len = strlen(c->c_name);
539 
540  if (len > width)
541  width = len;
542  }
543  width = (width + 8) &~ 7;
544  columns = 80 / width;
545  if (columns == 0)
546  columns = 1;
547  lines = (NCMDS + columns - 1) / columns;
548  for (i = 0; i < lines; i++) {
549  for (j = 0; j < columns; j++) {
550  c = cmdtab + j * lines + i;
551  if (c->c_name && (!proxy || c->c_proxy)) {
552  printf("%s", c->c_name);
553  }
554  else if (c->c_name) {
555  for (k=0; k < (int) strlen(c->c_name); k++) {
556  (void) putchar(' ');
557  }
558  }
559  if (c + lines >= &cmdtab[NCMDS]) {
560  printf("\n");
561  break;
562  }
563  w = strlen(c->c_name);
564  while (w < width) {
565  w = (w + 8) &~ 7;
566  (void) putchar('\t');
567  }
568  }
569  }
570  (void) fflush(stdout);
571  return;
572  }
573  while (--argc > 0) {
574  const char *arg;
575  arg = *++argv;
576  c = getcmd(arg);
577  if (c == (struct cmd *)-1)
578  printf("?Ambiguous help command %s\n", arg);
579  else if (c == (struct cmd *)0)
580  printf("?Invalid help command %s\n", arg);
581  else
582  printf("%-*s\t%s\n", (int)HELPINDENT,
583  c->c_name, c->c_help);
584  }
585  (void) fflush(stdout);
586 }
static int argc
Definition: ServiceArgs.c:12
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
Definition: ftp_var.h:139
void * arg
Definition: msvc.h:12
struct cmd cmdtab[]
Definition: cmdtab.c:95
static char ** argv
Definition: ServiceArgs.c:11
FILE * stdout
char c_proxy
Definition: ftp_var.h:144
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int NCMDS
Definition: cmdtab.c:171
int putchar(int c)
Definition: crtsupp.c:12
const char * c_name
Definition: ftp_var.h:140
GLenum GLsizei len
Definition: glext.h:6722
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
const char * c_help
Definition: ftp_var.h:141
#define c
Definition: ke_i.h:80
#define HELPINDENT
Definition: main.c:520
struct cmd * getcmd(const char *name)
Definition: main.c:350
int proxy
Definition: main.c:67
int k
Definition: mpi.c:3369
#define printf
Definition: config.h:203
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

◆ intr()

void intr ( void  )

Definition at line 249 of file main.c.

Referenced by UhciInterruptService().

250 {
251  longjmp(toplevel, 1);
252 }
int longjmp(jmp_buf buf, int retval)
jmp_buf toplevel
Definition: main.c:95

◆ lostpeer()

void lostpeer ( void  )

Definition at line 254 of file main.c.

Referenced by getreply(), proxtrans(), recvrequest(), and reset().

255 {
256  extern SOCKET cout;
257  extern int data;
258 
259  if (connected) {
260  if (cout) {
261  closesocket(cout);
262  cout = 0;
263  }
264  if (data >= 0) {
265  (void) shutdown(data, 1+1);
266  (void) close(data);
267  data = -1;
268  }
269  connected = 0;
270  }
271  pswitch(1);
272  if (connected) {
273  if (cout) {
274  closesocket(cout);
275  cout = 0;
276  }
277  connected = 0;
278  }
279  proxflag = 0;
280  pswitch(0);
281 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int proxflag
Definition: main.c:69
#define cout
Definition: iostream.cpp:38
#define closesocket
Definition: main.c:39
INT WSAAPI shutdown(IN SOCKET s, IN INT how)
Definition: sockctrl.c:506
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define close
Definition: acwin.h:74
void pswitch(int flag)
Definition: ftp.c:1310
int connected
Definition: main.c:61
UINT_PTR SOCKET
Definition: winsock.h:47

◆ main()

int main ( int argc  ,
const char argv[] 
)

Definition at line 122 of file main.c.

Referenced by mainCRTStartup().

123 {
124  const char *cp;
125  int top;
126 #if 0
127  char homedir[MAXPATHLEN];
128 #endif
129 
130  int err;
131  WORD wVerReq;
132 
134  struct servent *sp; /* service spec for tcp/ftp */
135 
136  /* Disable output buffering, for the benefit of Emacs. */
137  //setbuf(stdout, NULL);
138 
139  _fmode = O_BINARY; // This causes an error somewhere.
140 
141  wVerReq = MAKEWORD(1,1);
142 
143  err = WSAStartup(wVerReq, &WSAData);
144  if (err != 0)
145  {
146  fprintf(stderr, "Could not initialize Windows socket interface.");
147  exit(1);
148  }
149 
150  sp = getservbyname("ftp", "tcp");
151  if (sp == 0) {
152  fprintf(stderr, "ftp: ftp/tcp: unknown service\n");
153  exit(1);
154  }
155 
156  portnum = sp->s_port;
157 
158 
159  doglob = 1;
160  interactive = 1;
161  autologin = 1;
162  argc--, argv++;
163  while (argc > 0 && **argv == '-') {
164  for (cp = *argv + 1; *cp; cp++)
165  switch (*cp) {
166 
167  case 'd':
168  options |= SO_DEBUG;
169  debug++;
170  break;
171 
172  case 'v':
173  verbose++;
174  break;
175 
176  case 't':
177  trace++;
178  break;
179 
180  case 'i':
181  interactive = 0;
182  break;
183 
184  case 'n':
185  autologin = 0;
186  break;
187 
188  case 'g':
189  doglob = 0;
190  break;
191 
192  default:
193  fprintf(stdout,
194  "ftp: %c: unknown option\n", *cp);
195  exit(1);
196  }
197  argc--, argv++;
198  }
199 // fromatty = isatty(fileno(stdin));
200  fromatty = 1; // Strengthen this test
201  /*
202  * Set up defaults for FTP.
203  */
204  (void) strcpy(typename, "ascii"), type = TYPE_A;
205  (void) strcpy(formname, "non-print"), form = FORM_N;
206  (void) strcpy(modename, "stream"), mode = MODE_S;
207  (void) strcpy(structname, "file"), stru = STRU_F;
208  (void) strcpy(bytename, "8"), bytesize = 8;
209  if (fromatty)
210  verbose++;
211  cpend = 0; /* no pending replies */
212  proxy = 0; /* proxy not active */
213  passivemode = 1; /* passive mode *is* active */
214  crflag = 1; /* strip c.r. on ascii gets */
215  /*
216  * Set up the home directory in case we're globbing.
217  */
218 #if 0
219  cp = getlogin();
220  if (cp != NULL) {
221  pw = getpwnam(cp);
222  }
223  if (pw == NULL)
224  pw = getpwuid(getuid());
225  if (pw != NULL) {
226  home = homedir;
227  (void) strcpy(home, pw->pw_dir);
228  }
229 #endif
230  strcpy(home, "C:/");
231  if (argc > 0) {
232  if (setjmp(toplevel))
233  exit(0);
234 // (void) signal(SIGINT, intr);
235 // (void) signal(SIGPIPE, lostpeer);
236  setpeer(argc + 1, argv - 1);
237  }
238  top = setjmp(toplevel) == 0;
239  if (top) {
240 // (void) signal(SIGINT, intr);
241 // (void) signal(SIGPIPE, lostpeer);
242  }
243  for (;;) {
244  cmdscanner(top);
245  top = 1;
246  }
247 }
WSADATA WSAData
Definition: wintirpc.c:31
char formname[32]
Definition: main.c:88
static int argc
Definition: ServiceArgs.c:12
void setpeer(int argc, const char *argv[])
Definition: cmds.c:49
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
#define MAKEWORD(a, b)
Definition: typedefs.h:247
#define FORM_N
Definition: ftp_var.h:54
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
void cmdscanner(int top)
Definition: main.c:302
char structname[32]
Definition: main.c:86
int autologin
Definition: main.c:49
static char ** argv
Definition: ServiceArgs.c:11
FILE * stdout
int doglob
Definition: main.c:66
int fromatty
Definition: main.c:62
short portnum
Definition: main.c:45
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
int crflag
Definition: main.c:76
int bytesize
Definition: main.c:93
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
Definition: startup.c:113
smooth NULL
Definition: ftsmooth.c:416
#define STRU_F
Definition: ftp_var.h:50
PSERVENT WSAAPI getservbyname(IN const char FAR *name, IN const char FAR *proto)
Definition: getxbyxx.c:500
Definition: tftpd.h:37
unsigned short WORD
Definition: ntddk_ex.h:93
char * getlogin(void)
int interactive
Definition: main.c:63
int form
Definition: main.c:89
int cpend
Definition: main.c:103
#define MAXPATHLEN
Definition: ftp_var.h:35
jmp_buf toplevel
Definition: main.c:95
#define err(...)
_CRTIMP int _fmode
Definition: txtmode.c:13
int debug
Definition: main.c:64
int passivemode
Definition: main.c:68
uid_t getuid(void)
Definition: uid.c:27
#define MODE_S
Definition: ftp_var.h:46
short s_port
Definition: winsock.h:165
#define O_BINARY
Definition: acwin.h:83
int stru
Definition: main.c:87
int verbose
Definition: main.c:60
char modename[32]
Definition: main.c:90
#define setjmp
Definition: setjmp.h:183
int trace
Definition: main.c:57
POINT cp
Definition: magnifier.c:60
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
FILE * stderr
static const WCHAR sp[]
Definition: suminfo.c:288
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
void exit(int exitcode)
Definition: _exit.c:33
int proxy
Definition: main.c:67
#define TYPE_A
Definition: ftp_var.h:36
char bytename[32]
Definition: main.c:92
#define SO_DEBUG
Definition: winsock.h:178

◆ makeargv()

void makeargv ( void  )

Definition at line 384 of file main.c.

Referenced by cd(), cmdscanner(), delete(), do_chmod(), domacro(), doproxy(), getit(), login(), macdef(), makedir(), mdelete(), mget(), mls(), modtime(), mput(), put(), quote(), removedir(), renamefile(), setnmap(), setpeer(), site(), sizecmd(), and user().

385 {
386  const char **argp;
387 
388  margc = 0;
389  argp = margv;
390  stringbase = line; /* scan from first of buffer */
391  argbase = argbuf; /* store from first of buffer */
392  slrflag = 0;
393  while ((*argp++ = slurpstring()))
394  margc++;
395 }
char argbuf[200]
Definition: main.c:99
static const char * slurpstring()
Definition: main.c:403
char * stringbase
Definition: main.c:98
char * argbase
Definition: main.c:100
char line[200]
Definition: main.c:97
int margc
Definition: main.c:101
int slrflag
Definition: main.c:382
const char * margv[20]
Definition: main.c:102

◆ slurpstring()

static const char * slurpstring ( void  )
static

Definition at line 403 of file main.c.

Referenced by makeargv().

404 {
405  int got_one = 0;
406  register char *sb = stringbase;
407  register char *ap = argbase;
408  char *tmp = argbase; /* will return this if token found */
409 
410  if (*sb == '!' || *sb == '$') { /* recognize ! as a token for shell */
411  switch (slrflag) { /* and $ as token for macro invoke */
412  case 0:
413  slrflag++;
414  stringbase++;
415  return ((*sb == '!') ? "!" : "$");
416  /* NOTREACHED */
417  case 1:
418  slrflag++;
419  altarg = stringbase;
420  break;
421  default:
422  break;
423  }
424  }
425 
426 S0:
427  switch (*sb) {
428 
429  case '\0':
430  goto OUT1;
431 
432  case ' ':
433  case '\t':
434  sb++; goto S0;
435 
436  default:
437  switch (slrflag) {
438  case 0:
439  slrflag++;
440  break;
441  case 1:
442  slrflag++;
443  altarg = sb;
444  break;
445  default:
446  break;
447  }
448  goto S1;
449  }
450 
451 S1:
452  switch (*sb) {
453 
454  case ' ':
455  case '\t':
456  case '\0':
457  goto OUT1; /* end of token */
458 
459  case '\\':
460  sb++; goto S2; /* slurp next character */
461 
462  case '"':
463  sb++; goto S3; /* slurp quoted string */
464 
465  default:
466  *ap++ = *sb++; /* add character to token */
467  got_one = 1;
468  goto S1;
469  }
470 
471 S2:
472  switch (*sb) {
473 
474  case '\0':
475  goto OUT1;
476 
477  default:
478  *ap++ = *sb++;
479  got_one = 1;
480  goto S1;
481  }
482 
483 S3:
484  switch (*sb) {
485 
486  case '\0':
487  goto OUT1;
488 
489  case '"':
490  sb++; goto S1;
491 
492  default:
493  *ap++ = *sb++;
494  got_one = 1;
495  goto S3;
496  }
497 
498 OUT1:
499  if (got_one)
500  *ap++ = '\0';
501  argbase = ap; /* update storage pointer */
502  stringbase = sb; /* update scan pointer */
503  if (got_one) {
504  return(tmp);
505  }
506  switch (slrflag) {
507  case 0:
508  slrflag++;
509  break;
510  case 1:
511  slrflag++;
512  altarg = (char *) 0;
513  break;
514  default:
515  break;
516  }
517  return((char *)0);
518 }
#define S1(x)
Definition: test.h:191
superblock * sb
Definition: btrfs.c:3861
#define S2(x)
Definition: test.h:192
void got_one(struct protocol *l)
Definition: dispatch.c:195
#define S3(x)
Definition: test.h:193
char * stringbase
Definition: main.c:98
char * argbase
Definition: main.c:100
int slrflag
Definition: main.c:382
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
char * altarg
Definition: main.c:78

Variable Documentation

◆ altarg

char* altarg

Definition at line 78 of file main.c.

Referenced by setnmap(), shell(), and slurpstring().

◆ argbase

char* argbase

Definition at line 100 of file main.c.

Referenced by makeargv(), and slurpstring().

◆ argbuf

char argbuf[200]

Definition at line 99 of file main.c.

Referenced by makeargv().

◆ autologin

int autologin

Definition at line 49 of file main.c.

Referenced by main(), and setpeer().

◆ bell

int bell

Definition at line 65 of file main.c.

Referenced by cmdscanner(), domacro(), setbell(), and status().

◆ bytename

char bytename[32]

Definition at line 92 of file main.c.

Referenced by main().

◆ bytesize

int bytesize

Definition at line 93 of file main.c.

Referenced by main().

◆ code

Definition at line 75 of file main.c.

Referenced by extract_test().

◆ connected

int connected

Definition at line 61 of file main.c.

Referenced by cmdscanner(), and lostpeer().

◆ copyright

char copyright[]
Initial value:
=
"@(#) Copyright (c) 1985, 1989 Regents of the University of California.\n\
All rights reserved.\n"

Definition at line 27 of file main.c.

Referenced by pvd_write().

◆ cpend

int cpend

Definition at line 103 of file main.c.

Referenced by command(), getreply(), main(), proxtrans(), pswitch(), recvrequest(), and sendrequest().

◆ crflag

int crflag

Definition at line 76 of file main.c.

Referenced by main(), recvrequest(), setcr(), and status().

◆ debug

int debug

Definition at line 64 of file main.c.

Referenced by main().

◆ doglob

int doglob

Definition at line 66 of file main.c.

Referenced by globulize(), main(), mput(), remglob(), setglob(), and status().

◆ form

◆ formname

char formname[32]

Definition at line 88 of file main.c.

Referenced by main(), setform(), and status().

◆ fromatty

int fromatty

Definition at line 62 of file main.c.

Referenced by cmdscanner(), getit(), main(), mdelete(), mget(), mls(), and mput().

◆ globerr

char* globerr

Definition at line 48 of file main.c.

Referenced by globulize(), and mput().

◆ hash

Definition at line 58 of file main.c.

Referenced by CRYPTDLG_IsCertAllowed().

◆ home

◆ interactive

int interactive

Definition at line 63 of file main.c.

Referenced by main(), and WinMain().

◆ line

char line[200]

Definition at line 97 of file main.c.

Referenced by makeargv().

◆ macbuf

char macbuf[4096]

Definition at line 110 of file main.c.

Referenced by macdef(), and ruserpass().

◆ macnum

int macnum

Definition at line 108 of file main.c.

Referenced by disconnect(), domacro(), login(), macdef(), ruserpass(), and status().

◆ macros

struct macel macros[16]

Definition at line 109 of file main.c.

Referenced by domacro(), login(), macdef(), ruserpass(), and status().

◆ mapflag

int mapflag

Definition at line 74 of file main.c.

Referenced by getit(), mget(), mput(), pswitch(), put(), setnmap(), and status().

◆ mapin

char mapin[MAXPATHLEN]

Definition at line 82 of file main.c.

Referenced by domap(), pswitch(), setnmap(), and status().

◆ mapout

char mapout[MAXPATHLEN]

Definition at line 83 of file main.c.

Referenced by domap(), pswitch(), setnmap(), and status().

◆ margc

◆ margv

◆ mcase

int mcase

Definition at line 72 of file main.c.

Referenced by getit(), mget(), mput(), pswitch(), setcase(), and status().

◆ mflag

int mflag

Definition at line 104 of file main.c.

◆ mode

Definition at line 91 of file main.c.

◆ modename

char modename[32]

Definition at line 90 of file main.c.

Referenced by fsetmode(), main(), and status().

◆ ntflag

int ntflag

Definition at line 73 of file main.c.

Referenced by getit(), mget(), mput(), pswitch(), put(), setntrans(), and status().

◆ ntin

char ntin[17]

Definition at line 79 of file main.c.

Referenced by dotrans(), pswitch(), setntrans(), and status().

◆ ntout

char ntout[17]

Definition at line 80 of file main.c.

Referenced by dotrans(), pswitch(), setntrans(), and status().

◆ options

Definition at line 106 of file main.c.

◆ passivemode

int passivemode

Definition at line 68 of file main.c.

Referenced by dataconn(), initconn(), main(), and setpassive().

◆ pasv

char pasv[64]

Definition at line 77 of file main.c.

Referenced by getreply(), initconn(), and proxtrans().

◆ portnum

short portnum

Definition at line 45 of file main.c.

Referenced by main(), and setpeer().

◆ proxflag

int proxflag

Definition at line 69 of file main.c.

Referenced by doproxy(), getreply(), and lostpeer().

◆ proxy

◆ runique

int runique

Definition at line 71 of file main.c.

Referenced by proxtrans(), pswitch(), recvrequest(), setrunique(), and status().

◆ sccsid

char sccsid[] = "@(#)main.c based on 5.13 (Berkeley) 3/14/89"
static

Definition at line 33 of file main.c.

◆ sendport

int sendport = -1

Definition at line 117 of file main.c.

Referenced by initconn(), setport(), and status().

◆ slrflag

int slrflag

Definition at line 382 of file main.c.

Referenced by makeargv(), and slurpstring().

◆ stringbase

char* stringbase

Definition at line 98 of file main.c.

Referenced by makeargv(), and slurpstring().

◆ stru

int stru

Definition at line 87 of file main.c.

Referenced by main().

◆ structname

char structname[32]

Definition at line 86 of file main.c.

Referenced by main(), setstruct(), and status().

◆ sunique

int sunique

Definition at line 70 of file main.c.

Referenced by mput(), pswitch(), put(), setsunique(), and status().

◆ toplevel

jmp_buf toplevel

Definition at line 95 of file main.c.

Referenced by intr(), and main().

◆ trace

int trace

Definition at line 57 of file main.c.

Referenced by main(), testEnumerateSecurityPackages(), and testQuerySecurityPackageInfo().

◆ type

◆ typename

char typename[32]

Definition at line 84 of file main.c.

Referenced by of_type().

◆ verbose

int verbose

Definition at line 60 of file main.c.

Referenced by main().