ReactOS  0.4.12-dev-102-g4b7f1e0
cmdtab.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1985, 1989 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley. The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  */
17 
18 #include "precomp.h"
19 
20 #ifndef lint
21 static char sccsid[] = "@(#)cmdtab.c 5.9 (Berkeley) 3/21/89";
22 #endif /* not lint */
23 
24 /*
25  * User FTP -- Command Tables.
26  */
27 
28 char accounthelp[] = "send account command to remote server";
29 char appendhelp[] = "append to a file";
30 char asciihelp[] = "set ascii transfer type";
31 char beephelp[] = "beep when command completed";
32 char binaryhelp[] = "set binary transfer type";
33 char casehelp[] = "toggle mget upper/lower case id mapping";
34 char cdhelp[] = "change remote working directory";
35 char cduphelp[] = "change remote working directory to parent directory";
36 char chmodhelp[] = "change file permissions of remote file";
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 idlehelp[] = "get (set) idle timer on remote side";
49 char lcdhelp[] = "change local working directory";
50 char lshelp[] = "list contents of remote directory";
51 char macdefhelp[] = "define a macro";
52 char mdeletehelp[] = "delete multiple files";
53 char mdirhelp[] = "list contents of multiple remote directories";
54 char mgethelp[] = "get multiple files";
55 char mkdirhelp[] = "make directory on the remote machine";
56 char mlshelp[] = "list contents of multiple remote directories";
57 char modtimehelp[] = "show last modification time of remote file";
58 char modehelp[] = "set file transfer mode";
59 char mputhelp[] = "send multiple files";
60 char newerhelp[] = "get file if remote file is newer than local file ";
61 char nlisthelp[] = "nlist contents of remote directory";
62 char nmaphelp[] = "set templates for default file name mapping";
63 char ntranshelp[] = "set translation table for default file name mapping";
64 char porthelp[] = "toggle use of PORT cmd for each data connection";
65 char prompthelp[] = "force interactive prompting on multiple commands";
66 char proxyhelp[] = "issue command on alternate connection";
67 char pwdhelp[] = "print working directory on remote machine";
68 char quithelp[] = "terminate ftp session and exit";
69 char quotehelp[] = "send arbitrary ftp command";
70 char receivehelp[] = "receive file";
71 char regethelp[] = "get file restarting at end of local file";
72 char remotehelp[] = "get help from remote server";
73 char renamehelp[] = "rename file";
74 char restarthelp[]= "restart file transfer at bytecount";
75 char rmdirhelp[] = "remove directory on the remote machine";
76 char rmtstatushelp[]="show status of remote machine";
77 char runiquehelp[] = "toggle store unique for local files";
78 char resethelp[] = "clear queued command replies";
79 char sendhelp[] = "send one file";
80 char passivehelp[] = "enter passive transfer mode";
81 char sitehelp[] = "send site specific command to remote server\n\t\tTry \"rhelp site\" or \"site help\" for more information";
82 char shellhelp[] = "escape to the shell";
83 char sizecmdhelp[] = "show size of remote file";
84 char statushelp[] = "show current status";
85 char structhelp[] = "set file transfer structure";
86 char suniquehelp[] = "toggle store unique on remote machine";
87 char systemhelp[] = "show remote system type";
88 char tenexhelp[] = "set tenex file transfer type";
89 char tracehelp[] = "toggle packet tracing";
90 char typehelp[] = "set file transfer type";
91 char umaskhelp[] = "get (set) umask on remote side";
92 char userhelp[] = "send new user information";
93 char verbosehelp[] = "toggle verbose mode";
94 
95 struct cmd cmdtab[] = {
96  { "!", shellhelp, 0, 0, 0, shell },
97  { "$", domachelp, 1, 0, 0, domacro },
98  { "account", accounthelp, 0, 1, 1, account},
99  { "append", appendhelp, 1, 1, 1, put },
100  { "ascii", asciihelp, 0, 1, 1, setascii },
101  { "bell", beephelp, 0, 0, 0, setbell },
102  { "binary", binaryhelp, 0, 1, 1, setbinary },
103  { "bye", quithelp, 0, 0, 0, quit },
104  { "case", casehelp, 0, 0, 1, setcase },
105  { "cd", cdhelp, 0, 1, 1, cd },
106  { "cdup", cduphelp, 0, 1, 1, cdup },
107  { "chmod", chmodhelp, 0, 1, 1, do_chmod },
108  { "close", disconhelp, 0, 1, 1, disconnect },
109  { "cr", crhelp, 0, 0, 0, setcr },
110  { "delete", deletehelp, 0, 1, 1, delete },
111  { "debug", debughelp, 0, 0, 0, setdebug },
112  { "dir", dirhelp, 1, 1, 1, ls },
113  { "disconnect", disconhelp, 0, 1, 1, disconnect },
114  { "form", formhelp, 0, 1, 1, setform },
115  { "get", receivehelp, 1, 1, 1, get },
116  { "glob", globhelp, 0, 0, 0, setglob },
117  { "hash", hashhelp, 0, 0, 0, sethash },
118  { "help", helphelp, 0, 0, 1, help },
119  { "idle", idlehelp, 0, 1, 1, idle },
120  { "image", binaryhelp, 0, 1, 1, setbinary },
121  { "lcd", lcdhelp, 0, 0, 0, lcd },
122  { "ls", lshelp, 1, 1, 1, ls },
123  { "macdef", macdefhelp, 0, 0, 0, macdef },
124  { "mdelete", mdeletehelp, 1, 1, 1, mdelete },
125  { "mdir", mdirhelp, 1, 1, 1, mls },
126  { "mget", mgethelp, 1, 1, 1, mget },
127  { "mkdir", mkdirhelp, 0, 1, 1, makedir },
128  { "mls", mlshelp, 1, 1, 1, mls },
129  { "mode", modehelp, 0, 1, 1, fsetmode },
130  { "modtime", modtimehelp, 0, 1, 1, modtime },
131  { "mput", mputhelp, 1, 1, 1, mput },
132  { "newer", newerhelp, 1, 1, 1, newer },
133  { "nmap", nmaphelp, 0, 0, 1, setnmap },
134  { "nlist", nlisthelp, 1, 1, 1, ls },
135  { "ntrans", ntranshelp, 0, 0, 1, setntrans },
136  { "open", connecthelp, 0, 0, 1, setpeer },
137  { "passive",passivehelp,0, 0, 0, setpassive },
138  { "prompt", prompthelp, 0, 0, 0, setprompt },
139  { "proxy", proxyhelp, 0, 0, 1, doproxy },
140  { "sendport", porthelp, 0, 0, 0, setport },
141  { "put", sendhelp, 1, 1, 1, put },
142  { "pwd", pwdhelp, 0, 1, 1, pwd },
143  { "quit", quithelp, 0, 0, 0, quit },
144  { "quote", quotehelp, 1, 1, 1, quote },
145  { "recv", receivehelp, 1, 1, 1, get },
146  { "reget", regethelp, 1, 1, 1, reget },
147  { "rstatus", rmtstatushelp, 0, 1, 1, rmtstatus },
148  { "rhelp", remotehelp, 0, 1, 1, rmthelp },
149  { "rename", renamehelp, 0, 1, 1, renamefile },
150  { "reset", resethelp, 0, 1, 1, reset },
151  { "restart", restarthelp, 1, 1, 1, restart },
152  { "rmdir", rmdirhelp, 0, 1, 1, removedir },
153  { "runique", runiquehelp, 0, 0, 1, setrunique },
154  { "send", sendhelp, 1, 1, 1, put },
155  { "site", sitehelp, 0, 1, 1, site },
156  { "size", sizecmdhelp, 1, 1, 1, sizecmd },
157  { "status", statushelp, 0, 0, 1, status },
158  { "struct", structhelp, 0, 1, 1, setstruct },
159  { "system", systemhelp, 0, 1, 1, syst },
160  { "sunique", suniquehelp, 0, 0, 1, setsunique },
161  { "tenex", tenexhelp, 0, 1, 1, settenex },
162  { "trace", tracehelp, 0, 0, 0, settrace },
163  { "type", typehelp, 0, 1, 1, settype },
164  { "user", userhelp, 0, 1, 1, user },
165  { "umask", umaskhelp, 0, 1, 1, do_umask },
166  { "verbose", verbosehelp, 0, 0, 0, setverbose },
167  { "?", helphelp, 0, 0, 1, help },
168  { 0 },
169 };
170 
171 int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1;
void settype(int argc, const char *argv[])
Definition: cmds.c:147
void syst(int argc, const char *argv[])
Definition: cmds.c:2128
void setcase(int argc, const char *argv[])
Definition: cmds.c:1800
void rmtstatus(int argc, const char *argv[])
Definition: cmds.c:2270
void removedir(int argc, const char *argv[])
Definition: cmds.c:1450
void mput(int argc, const char *argv[])
Definition: cmds.c:344
char formhelp[]
Definition: cmdtab.c:44
void setbinary(int argc, const char *argv[])
Definition: cmds.c:202
char casehelp[]
Definition: cmdtab.c:33
char systemhelp[]
Definition: cmdtab.c:87
void setpeer(int argc, const char *argv[])
Definition: cmds.c:49
char accounthelp[]
Definition: cmdtab.c:28
void account(int argc, const char *argv[])
Definition: cmds.c:1690
char crhelp[]
Definition: cmdtab.c:38
void renamefile(int argc, const char *argv[])
Definition: cmds.c:1098
char deletehelp[]
Definition: cmdtab.c:39
void setrunique(int argc, const char *argv[])
Definition: cmds.c:2094
void mdelete(int argc, const char *argv[])
Definition: cmds.c:1049
static IActiveScriptSite * site
Definition: script.c:149
void do_chmod(int argc, const char *argv[])
Definition: cmds.c:1546
char rmtstatushelp[]
Definition: cmdtab.c:76
char idlehelp[]
Definition: cmdtab.c:48
Definition: ftp_var.h:139
char asciihelp[]
Definition: cmdtab.c:30
void setstruct(int argc, const char *argv[])
Definition: cmds.c:268
static struct cd_image cd
Definition: cdmake.c:182
char userhelp[]
Definition: cmdtab.c:92
void quit(int argc, const char *argv[])
Definition: cmds.c:1606
void setascii(int argc, const char *argv[])
Definition: cmds.c:212
char resethelp[]
Definition: cmdtab.c:78
char typehelp[]
Definition: cmdtab.c:90
void setverbose(int argc, const char *argv[])
Definition: cmds.c:882
void setport(int argc, const char *argv[])
Definition: cmds.c:895
char tenexhelp[]
Definition: cmdtab.c:88
void rmthelp(int argc, const char *argv[])
Definition: cmds.c:1593
void fsetmode(int argc, const char *argv[])
Definition: cmds.c:243
void sethash(int argc, const char *argv[])
Definition: cmds.c:866
char sizecmdhelp[]
Definition: cmdtab.c:83
char renamehelp[]
Definition: cmdtab.c:73
smooth lcd
Definition: ftsmooth.c:416
struct cmd cmdtab[]
Definition: cmdtab.c:95
char nmaphelp[]
Definition: cmdtab.c:62
char globhelp[]
Definition: cmdtab.c:45
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
char mputhelp[]
Definition: cmdtab.c:59
void setglob(int argc, const char *argv[])
Definition: cmds.c:923
#define put(ret, state, sp, n)
Definition: match.c:105
void cdup(int argc, const char *argv[])
Definition: cmds.c:2103
void ls(int argc, const char *argv[])
Definition: cmds.c:1136
void makedir(int argc, const char *argv[])
Definition: cmds.c:1420
char structhelp[]
Definition: cmdtab.c:85
int NCMDS
Definition: cmdtab.c:171
void modtime(int argc, const char *argv[])
Definition: cmds.c:2232
void reget(int argc, const char *argv[])
Definition: cmds.c:475
void pwd(int argc, const char *argv[])
Definition: cmds.c:1401
char statushelp[]
Definition: cmdtab.c:84
char lcdhelp[]
Definition: cmdtab.c:49
#define quote
Definition: macro.lex.yy.c:534
char runiquehelp[]
Definition: cmdtab.c:77
char quotehelp[]
Definition: cmdtab.c:69
char newerhelp[]
Definition: cmdtab.c:60
char pwdhelp[]
Definition: cmdtab.c:67
char domachelp[]
Definition: cmdtab.c:43
char debughelp[]
Definition: cmdtab.c:40
char proxyhelp[]
Definition: cmdtab.c:66
char dirhelp[]
Definition: cmdtab.c:41
void restart(int argc, const char *argv[])
Definition: cmds.c:2115
char modehelp[]
Definition: cmdtab.c:58
char cduphelp[]
Definition: cmdtab.c:35
char restarthelp[]
Definition: cmdtab.c:74
char appendhelp[]
Definition: cmdtab.c:29
void setpassive(int argc, const char *argv[])
Definition: cmds.c:1865
char macdefhelp[]
Definition: cmdtab.c:51
char prompthelp[]
Definition: cmdtab.c:65
char mlshelp[]
Definition: cmdtab.c:56
void setcr(int argc, const char *argv[])
Definition: cmds.c:1808
char mgethelp[]
Definition: cmdtab.c:54
char receivehelp[]
Definition: cmdtab.c:70
void setprompt(int argc, const char *argv[])
Definition: cmds.c:909
void idle(int argc, const char *argv[])
Definition: cmds.c:1581
char mkdirhelp[]
Definition: cmdtab.c:55
char remotehelp[]
Definition: cmdtab.c:72
char nlisthelp[]
Definition: cmdtab.c:61
char passivehelp[]
Definition: cmdtab.c:80
char chmodhelp[]
Definition: cmdtab.c:36
char suniquehelp[]
Definition: cmdtab.c:86
void newer(int argc, const char *argv[])
Definition: cmds.c:2278
char umaskhelp[]
Definition: cmdtab.c:91
char quithelp[]
Definition: cmdtab.c:68
char disconhelp[]
Definition: cmdtab.c:42
GLboolean reset
Definition: glext.h:5666
char regethelp[]
Definition: cmdtab.c:71
char cdhelp[]
Definition: cmdtab.c:34
char sitehelp[]
Definition: cmdtab.c:81
void sizecmd(int argc, const char *argv[])
Definition: cmds.c:2208
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
char verbosehelp[]
Definition: cmdtab.c:93
void domacro(int argc, const char *argv[])
Definition: domacro.c:26
void disconnect(int argc, const char *argv[])
Definition: cmds.c:1620
char mdirhelp[]
Definition: cmdtab.c:53
void settenex(int argc, const char *argv[])
Definition: cmds.c:222
void doproxy(int argc, const char *argv[])
Definition: cmds.c:1734
static char sccsid[]
Definition: cmdtab.c:21
void mget(int argc, const char *argv[])
Definition: cmds.c:642
void settrace(int argc, const char *argv[])
Definition: cmds.c:853
void macdef(int argc, const char *argv[])
Definition: cmds.c:2133
char porthelp[]
Definition: cmdtab.c:64
void do_umask(int argc, const char *argv[])
Definition: cmds.c:1572
char mdeletehelp[]
Definition: cmdtab.c:52
char modtimehelp[]
Definition: cmdtab.c:57
char rmdirhelp[]
Definition: cmdtab.c:75
void setnmap(int argc, const char *argv[])
Definition: cmds.c:1873
void setform(int argc, const char *argv[])
Definition: cmds.c:256
int help
Definition: sort.c:20
char sendhelp[]
Definition: cmdtab.c:79
char helphelp[]
Definition: cmdtab.c:47
char tracehelp[]
Definition: cmdtab.c:89
void user(int argc, const char *argv[])
Definition: cmds.c:1350
void setbell(int argc, const char *argv[])
Definition: cmds.c:840
char ntranshelp[]
Definition: cmdtab.c:63
void setsunique(int argc, const char *argv[])
Definition: cmds.c:2086
char hashhelp[]
Definition: cmdtab.c:46
char binaryhelp[]
Definition: cmdtab.c:32
char connecthelp[]
Definition: cmdtab.c:37
char beephelp[]
Definition: cmdtab.c:31
char lshelp[]
Definition: cmdtab.c:50
void setdebug(int argc, const char *argv[])
Definition: cmds.c:937
void setntrans(int argc, const char *argv[])
Definition: cmds.c:1816
char shellhelp[]
Definition: cmdtab.c:82
Definition: ps.c:97