1: /*
   2:  * Copyright (c) 1985 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)ftp_var.h	5.3 (Berkeley) 3/7/86
   7:  */
   8: 
   9: /*
  10:  * FTP global variables.
  11:  */
  12: 
  13: /*
  14:  * Options and other state info.
  15:  */
  16: int trace;          /* trace packets exchanged */
  17: int hash;           /* print # for each buffer transferred */
  18: int sendport;       /* use PORT cmd for each data connection */
  19: int verbose;        /* print messages coming back from server */
  20: int connected;      /* connected to server */
  21: int fromatty;       /* input is from a terminal */
  22: int interactive;        /* interactively prompt on m* cmds */
  23: int debug;          /* debugging level */
  24: int bell;           /* ring bell on cmd completion */
  25: int doglob;         /* glob local file names */
  26: int autologin;      /* establish user account on connection */
  27: int proxy;          /* proxy server connection active */
  28: int proxflag;       /* proxy connection exists */
  29: int sunique;        /* store files on server with unique name */
  30: int runique;        /* store local files with unique name */
  31: int mcase;          /* map upper to lower case for mget names */
  32: int ntflag;         /* use ntin ntout tables for name translation */
  33: int mapflag;        /* use mapin mapout templates on file names */
  34: int code;           /* return/reply code for ftp command */
  35: int crflag;         /* if 1, strip car. rets. on ascii gets */
  36: char    pasv[64];       /* passive port for proxy data connection */
  37: char    *altarg;        /* argv[1] with no shell-like preprocessing  */
  38: char    ntin[17];       /* input translation table */
  39: char    ntout[17];      /* output translation table */
  40: #include <sys/param.h>
  41: char    mapin[MAXPATHLEN];  /* input map template */
  42: char    mapout[MAXPATHLEN]; /* output map template */
  43: char    typename[32];       /* name of file transfer type */
  44: int type;           /* file transfer type */
  45: char    structname[32];     /* name of file transfer structure */
  46: int stru;           /* file transfer structure */
  47: char    formname[32];       /* name of file transfer format */
  48: int form;           /* file transfer format */
  49: char    modename[32];       /* name of file transfer mode */
  50: int mode;           /* file transfer mode */
  51: char    bytename[32];       /* local byte size in ascii */
  52: int bytesize;       /* local byte size in binary */
  53: 
  54: char    *hostname;      /* name of host connected to */
  55: 
  56: struct  servent *sp;        /* service spec for tcp/ftp */
  57: 
  58: #include <setjmp.h>
  59: jmp_buf toplevel;       /* non-local goto stuff for cmd scanner */
  60: 
  61: char    line[200];      /* input line buffer */
  62: char    *stringbase;        /* current scan point in line buffer */
  63: char    argbuf[200];        /* argument storage buffer */
  64: char    *argbase;       /* current storage point in arg buffer */
  65: int margc;          /* count of arguments on input line */
  66: char    *margv[20];     /* args parsed from input line */
  67: int     cpend;                  /* flag: if != 0, then pending server reply */
  68: int mflag;          /* flag: if != 0, then active multi command */
  69: 
  70: int options;        /* used during socket creation */
  71: 
  72: /*
  73:  * Format of command table.
  74:  */
  75: struct cmd {
  76:     char    *c_name;    /* name of command */
  77:     char    *c_help;    /* help string */
  78:     char    c_bell;     /* give bell when command completes */
  79:     char    c_conn;     /* must be connected to use command */
  80:     char    c_proxy;    /* proxy server may execute */
  81:     int (*c_handler)(); /* function to call */
  82: };
  83: 
  84: struct macel {
  85:     char mac_name[9];   /* macro name */
  86:     char *mac_start;    /* start of macro in macbuf */
  87:     char *mac_end;      /* end of macro in macbuf */
  88: };
  89: 
  90: int macnum;         /* number of defined macros */
  91: struct macel macros[16];
  92: char macbuf[4096];
  93: 
  94: extern  char *tail();
  95: extern  char *index();
  96: extern  char *rindex();
  97: extern  char *remglob();
  98: extern  int errno;
  99: extern  char *mktemp();
 100: extern  char *strncpy();
 101: extern  char *strncat();
 102: extern  char *strcat();
 103: extern  char *strcpy();

Defined variables

altarg defined in line 37; used 8 times
argbase defined in line 64; used 4 times
argbuf defined in line 63; used 1 times
autologin defined in line 26; used 3 times
bell defined in line 24; used 7 times
bytename defined in line 51; used 2 times
bytesize defined in line 52; used 1 times
code defined in line 34; used 117 times
cpend defined in line 67; used 16 times
crflag defined in line 35; used 7 times
debug defined in line 23; used 15 times
doglob defined in line 25; used 11 times
form defined in line 48; used 1 times
formname defined in line 47; used 3 times
fromatty defined in line 21; used 10 times
hash defined in line 17; used 17 times
hostname defined in line 54; used 10 times
interactive defined in line 22; used 31 times
line defined in line 61; used 78 times
macbuf defined in line 92; used 5 times
macnum defined in line 90; used 24 times
macros defined in line 91; used 20 times
mapflag defined in line 33; used 12 times
mapin defined in line 41; used 5 times
mapout defined in line 42; used 5 times
mcase defined in line 31; used 10 times
mflag defined in line 68; used 36 times
mode defined in line 50; used 14 times
modename defined in line 49; used 3 times
ntflag defined in line 32; used 13 times
ntin defined in line 38; used 7 times
ntout defined in line 39; used 8 times
options defined in line 70; used 4 times
pasv defined in line 36; used 2 times
proxflag defined in line 28; used 6 times
runique defined in line 30; used 11 times
sendport defined in line 18; used 5 times
sp defined in line 56; used 3 times
stringbase defined in line 62; used 5 times
stru defined in line 46; used 1 times
structname defined in line 45; used 3 times
sunique defined in line 29; used 11 times
toplevel defined in line 59; used 3 times
trace defined in line 16; used 5 times
type defined in line 44; used 13 times
typename defined in line 43; used 4 times
verbose defined in line 19; used 36 times

Defined struct's

cmd defined in line 75; used 36 times
macel defined in line 84; used 2 times
  • in line 91(2)

Usage of this include

Last modified: 1986-03-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2050
Valid CSS Valid XHTML 1.0 Strict