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: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)cmdtab.c	5.3 (Berkeley) 2/3/86";
   9: #endif not lint
  10: 
  11: #include "ftp_var.h"
  12: 
  13: /*
  14:  * User FTP -- Command Tables.
  15:  */
  16: int setascii(), setbell(), setbinary(), setdebug(), setform();
  17: int setglob(), sethash(), setmode(), setpeer(), setport();
  18: int setprompt(), setstruct();
  19: int settenex(), settrace(), settype(), setverbose();
  20: int disconnect();
  21: int cd(), lcd(), delete(), mdelete(), user();
  22: int ls(), mls(), get(), mget(), help(), append(), put(), mput();
  23: int quit(), renamefile(), status();
  24: int quote(), rmthelp(), shell();
  25: int pwd(), makedir(), removedir(), setcr();
  26: int account(), doproxy(), reset(), setcase(), setntrans(), setnmap();
  27: int setsunique(), setrunique(), cdup(), macdef(), domacro();
  28: 
  29: char    accounthelp[] = "send account command to remote server";
  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    casehelp[] =    "toggle mget upper/lower case id mapping";
  35: char    cdhelp[] =  "change remote working directory";
  36: char    cduphelp[] =    "change remote working directory to parent directory";
  37: char    connecthelp[] = "connect to remote tftp";
  38: char    crhelp[] =  "toggle carriage return stripping on ascii gets";
  39: char    deletehelp[] =  "delete remote file";
  40: char    debughelp[] =   "toggle/set debugging mode";
  41: char    dirhelp[] = "list contents of remote directory";
  42: char    disconhelp[] =  "terminate ftp session";
  43: char    domachelp[] =   "execute macro";
  44: char    formhelp[] =    "set file transfer format";
  45: char    globhelp[] =    "toggle metacharacter expansion of local file names";
  46: char    hashhelp[] =    "toggle printing `#' for each buffer transferred";
  47: char    helphelp[] =    "print local help information";
  48: char    lcdhelp[] = "change local working directory";
  49: char    lshelp[] =  "nlist contents of remote directory";
  50: char    macdefhelp[] =  "define a macro";
  51: char    mdeletehelp[] = "delete multiple files";
  52: char    mdirhelp[] =    "list contents of multiple remote directories";
  53: char    mgethelp[] =    "get multiple files";
  54: char    mkdirhelp[] =   "make directory on the remote machine";
  55: char    mlshelp[] = "nlist contents of multiple remote directories";
  56: char    modehelp[] =    "set file transfer mode";
  57: char    mputhelp[] =    "send multiple files";
  58: char    nmaphelp[] =    "set templates for default file name mapping";
  59: char    ntranshelp[] =  "set translation table for default file name mapping";
  60: char    porthelp[] =    "toggle use of PORT cmd for each data connection";
  61: char    prompthelp[] =  "force interactive prompting on multiple commands";
  62: char    proxyhelp[] =   "issue command on alternate connection";
  63: char    pwdhelp[] = "print working directory on remote machine";
  64: char    quithelp[] =    "terminate ftp session and exit";
  65: char    quotehelp[] =   "send arbitrary ftp command";
  66: char    receivehelp[] = "receive file";
  67: char    remotehelp[] =  "get help from remote server";
  68: char    renamehelp[] =  "rename file";
  69: char    rmdirhelp[] =   "remove directory on the remote machine";
  70: char    runiquehelp[] = "toggle store unique for local files";
  71: char    resethelp[] =   "clear queued command replies";
  72: char    sendhelp[] =    "send one file";
  73: char    shellhelp[] =   "escape to the shell";
  74: char    statushelp[] =  "show current status";
  75: char    structhelp[] =  "set file transfer structure";
  76: char    suniquehelp[] = "toggle store unique on remote machine";
  77: char    tenexhelp[] =   "set tenex file transfer type";
  78: char    tracehelp[] =   "toggle packet tracing";
  79: char    typehelp[] =    "set file transfer type";
  80: char    userhelp[] =    "send new user information";
  81: char    verbosehelp[] = "toggle verbose mode";
  82: 
  83: struct cmd cmdtab[] = {
  84:     { "!",      shellhelp,  0,  0,  0,  shell },
  85:     { "$",      domachelp,  1,  0,  0,  domacro },
  86:     { "account",    accounthelp,    0,  1,  1,  account},
  87:     { "append", appendhelp, 1,  1,  1,  put },
  88:     { "ascii",  asciihelp,  0,  1,  1,  setascii },
  89:     { "bell",   beephelp,   0,  0,  0,  setbell },
  90:     { "binary", binaryhelp, 0,  1,  1,  setbinary },
  91:     { "bye",    quithelp,   0,  0,  0,  quit },
  92:     { "case",   casehelp,   0,  0,  1,  setcase },
  93:     { "cd",     cdhelp,     0,  1,  1,  cd },
  94:     { "cdup",   cduphelp,   0,  1,  1,  cdup },
  95:     { "close",  disconhelp, 0,  1,  1,  disconnect },
  96:     { "cr",     crhelp,     0,  0,  0,  setcr },
  97:     { "delete", deletehelp, 0,  1,  1,  delete },
  98:     { "debug",  debughelp,  0,  0,  0,  setdebug },
  99:     { "dir",    dirhelp,    1,  1,  1,  ls },
 100:     { "disconnect", disconhelp, 0,  1,  1,  disconnect },
 101:     { "form",   formhelp,   0,  1,  1,  setform },
 102:     { "get",    receivehelp,    1,  1,  1,  get },
 103:     { "glob",   globhelp,   0,  0,  0,  setglob },
 104:     { "hash",   hashhelp,   0,  0,  0,  sethash },
 105:     { "help",   helphelp,   0,  0,  1,  help },
 106:     { "lcd",    lcdhelp,    0,  0,  0,  lcd },
 107:     { "ls",     lshelp,     1,  1,  1,  ls },
 108:     { "macdef", macdefhelp, 0,  0,  0,  macdef },
 109:     { "mdelete",    mdeletehelp,    1,  1,  1,  mdelete },
 110:     { "mdir",   mdirhelp,   1,  1,  1,  mls },
 111:     { "mget",   mgethelp,   1,  1,  1,  mget },
 112:     { "mkdir",  mkdirhelp,  0,  1,  1,  makedir },
 113:     { "mls",    mlshelp,    1,  1,  1,  mls },
 114:     { "mode",   modehelp,   0,  1,  1,  setmode },
 115:     { "mput",   mputhelp,   1,  1,  1,  mput },
 116:     { "nmap",   nmaphelp,   0,  0,  1,  setnmap },
 117:     { "ntrans", ntranshelp, 0,  0,  1,  setntrans },
 118:     { "open",   connecthelp,    0,  0,  1,  setpeer },
 119:     { "prompt", prompthelp, 0,  0,  0,  setprompt },
 120:     { "proxy",  proxyhelp,  0,  0,  1,  doproxy },
 121:     { "sendport",   porthelp,   0,  0,  0,  setport },
 122:     { "put",    sendhelp,   1,  1,  1,  put },
 123:     { "pwd",    pwdhelp,    0,  1,  1,  pwd },
 124:     { "quit",   quithelp,   0,  0,  0,  quit },
 125:     { "quote",  quotehelp,  1,  1,  1,  quote },
 126:     { "recv",   receivehelp,    1,  1,  1,  get },
 127:     { "remotehelp", remotehelp, 0,  1,  1,  rmthelp },
 128:     { "rename", renamehelp, 0,  1,  1,  renamefile },
 129:     { "reset",  resethelp,  0,  1,  1,  reset },
 130:     { "rmdir",  rmdirhelp,  0,  1,  1,  removedir },
 131:     { "runique",    runiquehelp,    0,  0,  1,  setrunique },
 132:     { "send",   sendhelp,   1,  1,  1,  put },
 133:     { "status", statushelp, 0,  0,  1,  status },
 134:     { "struct", structhelp, 0,  1,  1,  setstruct },
 135:     { "sunique",    suniquehelp,    0,  0,  1,  setsunique },
 136:     { "tenex",  tenexhelp,  0,  1,  1,  settenex },
 137:     { "trace",  tracehelp,  0,  0,  0,  settrace },
 138:     { "type",   typehelp,   0,  1,  1,  settype },
 139:     { "user",   userhelp,   0,  1,  1,  user },
 140:     { "verbose",    verbosehelp,    0,  0,  0,  setverbose },
 141:     { "?",      helphelp,   0,  0,  1,  help },
 142:     { 0 },
 143: };
 144: 
 145: int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1;

Defined variables

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