1: /* $Header: cmdtab.c,v 2.0a 85/11/21 07:22:43 jqj and danc Exp $ */
   2: /* $Log:	cmdtab.c,v $
   3:  * Revision 2.0  85/11/21  07:22:43  jqj
   4:  * 4.3BSD standard release
   5:  *
   6:  * Revision 1.1  85/11/20  14:18:58  jqj
   7:  * Initial revision
   8:  *
   9:  */
  10: #ifndef lint
  11: static char sccsid[] = "@(#)cmdtab.c	4.7 (Berkeley) 7/26/83";
  12: #endif
  13: 
  14: #include "ftp_var.h"
  15: 
  16: /*
  17:  * User FTP -- Command Tables.
  18:  */
  19: int setascii(), setbell(), setbinary(), setdebug(), setform();
  20: int setglob(), sethash(), setmode(), setpeer();
  21: int setprompt(), setstruct();
  22: int settenex(), settrace(), settype(), setverbose();
  23: int disconnect();
  24: int cd(), lcd(), delete(), mdelete(), user();
  25: int ls(), mls(), get(), mget(), help(), append(), put(), mput();
  26: int quit(), renamefile(), status();
  27: int shell();
  28: int pwd(), makedir(), removedir();
  29: 
  30: char    appendhelp[] =  "append to a file";
  31: char    asciihelp[] =   "set ascii transfer type";
  32: char    beephelp[] =    "beep when command completed";
  33: char    binaryhelp[] =  "set binary transfer type";
  34: char    cdhelp[] =  "change remote working directory";
  35: char    connecthelp[] = "connect to remote tftp";
  36: char    deletehelp[] =  "delete remote file";
  37: char    debughelp[] =   "toggle/set debugging mode";
  38: char    dirhelp[] = "list contents of remote directory";
  39: char    disconhelp[] =  "terminate ftp session";
  40: char    formhelp[] =    "set file transfer format";
  41: char    globhelp[] =    "toggle metacharacter expansion of local file names";
  42: char    hashhelp[] =    "toggle printing `#' for each buffer transferred";
  43: char    helphelp[] =    "print local help information";
  44: char    lcdhelp[] = "change local working directory";
  45: char    lshelp[] =  "nlist contents of remote directory";
  46: char    mdeletehelp[] = "delete multiple files";
  47: char    mdirhelp[] =    "list contents of multiple remote directories";
  48: char    mgethelp[] =    "get multiple files";
  49: char    mkdirhelp[] =   "make directory on the remote machine";
  50: char    mlshelp[] = "nlist contents of multiple remote directories";
  51: char    modehelp[] =    "set file transfer mode";
  52: char    mputhelp[] =    "send multiple files";
  53: char    porthelp[] =    "toggle use of PORT cmd for each data connection";
  54: char    prompthelp[] =  "force interactive prompting on multiple commands";
  55: char    pwdhelp[] = "print working directory on remote machine";
  56: char    quithelp[] =    "terminate ftp session and exit";
  57: char    quotehelp[] =   "send arbitrary ftp command";
  58: char    receivehelp[] = "receive file";
  59: char    remotehelp[] =  "get help from remote server";
  60: char    renamehelp[] =  "rename file";
  61: char    rmdirhelp[] =   "remove directory on the remote machine";
  62: char    sendhelp[] =    "send one file";
  63: char    shellhelp[] =   "escape to the shell";
  64: char    statushelp[] =  "show current status";
  65: char    structhelp[] =  "set file transfer structure";
  66: char    tenexhelp[] =   "set tenex file transfer type";
  67: char    tracehelp[] =   "toggle packet tracing";
  68: char    typehelp[] =    "set file transfer type";
  69: char    userhelp[] =    "send new user information";
  70: char    verbosehelp[] = "toggle verbose mode";
  71: 
  72: struct cmd cmdtab[] = {
  73:     { "!",      shellhelp,  0,  0,  shell },
  74:     { "append", appendhelp, 1,  1,  put },
  75:     { "ascii",  asciihelp,  0,  1,  setascii },
  76:     { "bell",   beephelp,   0,  0,  setbell },
  77:     { "binary", binaryhelp, 0,  1,  setbinary },
  78:     { "bye",    quithelp,   0,  0,  quit },
  79:     { "cd",     cdhelp,     0,  1,  cd },
  80:     { "close",  disconhelp, 0,  1,  disconnect },
  81:     { "delete", deletehelp, 0,  1,  delete },
  82:     { "debug",  debughelp,  0,  0,  setdebug },
  83:     { "dir",    dirhelp,    1,  1,  ls },
  84:     { "form",   formhelp,   0,  1,  setform },
  85:     { "get",    receivehelp,    1,  1,  get },
  86:     { "glob",   globhelp,   0,  0,  setglob },
  87:     { "hash",   hashhelp,   0,  0,  sethash },
  88:     { "help",   helphelp,   0,  0,  help },
  89:     { "lcd",    lcdhelp,    0,  0,  lcd },
  90:     { "ls",     lshelp,     1,  1,  ls },
  91:     { "mdelete",    mdeletehelp,    1,  1,  mdelete },
  92:     { "mdir",   mdirhelp,   1,  1,  mls },
  93:     { "mget",   mgethelp,   1,  1,  mget },
  94:     { "mkdir",  mkdirhelp,  0,  1,  makedir },
  95:     { "mls",    mlshelp,    1,  1,  mls },
  96:     { "mode",   modehelp,   0,  1,  setmode },
  97:     { "mput",   mputhelp,   1,  1,  mput },
  98:     { "open",   connecthelp,    0,  0,  setpeer },
  99:     { "prompt", prompthelp, 0,  0,  setprompt },
 100:     { "put",    sendhelp,   1,  1,  put },
 101:     { "pwd",    pwdhelp,    0,  1,  pwd },
 102:     { "quit",   quithelp,   0,  0,  quit },
 103:     { "recv",   receivehelp,    1,  1,  get },
 104:     { "rename", renamehelp, 0,  1,  renamefile },
 105:     { "rmdir",  rmdirhelp,  0,  1,  removedir },
 106:     { "send",   sendhelp,   1,  1,  put },
 107:     { "status", statushelp, 0,  0,  status },
 108:     { "struct", structhelp, 0,  1,  setstruct },
 109:     { "trace",  tracehelp,  0,  0,  settrace },
 110:     { "type",   typehelp,   0,  1,  settype },
 111:     { "user",   userhelp,   0,  1,  user },
 112:     { "verbose",    verbosehelp,    0,  0,  setverbose },
 113:     { "?",      helphelp,   0,  0,  help },
 114:     { 0 },
 115: };
 116: 
 117: int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]) - 1;

Defined variables

NCMDS defined in line 117; never used
appendhelp defined in line 30; used 1 times
  • in line 74
asciihelp defined in line 31; used 1 times
  • in line 75
beephelp defined in line 32; used 1 times
  • in line 76
binaryhelp defined in line 33; used 1 times
  • in line 77
cdhelp defined in line 34; used 1 times
  • in line 79
cmdtab defined in line 72; used 2 times
  • in line 117(2)
connecthelp defined in line 35; used 1 times
  • in line 98
debughelp defined in line 37; used 1 times
  • in line 82
deletehelp defined in line 36; used 1 times
  • in line 81
dirhelp defined in line 38; used 1 times
  • in line 83
disconhelp defined in line 39; used 1 times
  • in line 80
formhelp defined in line 40; used 1 times
  • in line 84
globhelp defined in line 41; used 1 times
  • in line 86
hashhelp defined in line 42; used 1 times
  • in line 87
helphelp defined in line 43; used 2 times
lcdhelp defined in line 44; used 1 times
  • in line 89
lshelp defined in line 45; used 1 times
  • in line 90
mdeletehelp defined in line 46; used 1 times
  • in line 91
mdirhelp defined in line 47; used 1 times
  • in line 92
mgethelp defined in line 48; used 1 times
  • in line 93
mkdirhelp defined in line 49; used 1 times
  • in line 94
mlshelp defined in line 50; used 1 times
  • in line 95
modehelp defined in line 51; used 1 times
  • in line 96
mputhelp defined in line 52; used 1 times
  • in line 97
porthelp defined in line 53; never used
prompthelp defined in line 54; used 1 times
  • in line 99
pwdhelp defined in line 55; used 1 times
quithelp defined in line 56; used 2 times
quotehelp defined in line 57; never used
receivehelp defined in line 58; used 2 times
remotehelp defined in line 59; never used
renamehelp defined in line 60; used 1 times
rmdirhelp defined in line 61; used 1 times
sccsid defined in line 11; never used
sendhelp defined in line 62; used 2 times
shellhelp defined in line 63; used 1 times
  • in line 73
statushelp defined in line 64; used 1 times
structhelp defined in line 65; used 1 times
tenexhelp defined in line 66; never used
tracehelp defined in line 67; used 1 times
typehelp defined in line 68; used 1 times
userhelp defined in line 69; used 1 times
verbosehelp defined in line 70; used 1 times
Last modified: 1986-03-13
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1702
Valid CSS Valid XHTML 1.0 Strict