version 1.25, 2009/04/27 22:51:51 |
version 1.26, 2009/05/05 19:35:30 |
|
|
* SUCH DAMAGE. |
* SUCH DAMAGE. |
*/ |
*/ |
|
|
|
#ifndef SMALL |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include "ftp_var.h" |
#include "ftp_var.h" |
|
#include "cmds.h" |
|
|
/* |
/* |
* User FTP -- Command Tables. |
* User FTP -- Command Tables. |
*/ |
*/ |
|
|
#ifndef SMALL |
|
char accounthelp[] = "send account command to remote server"; |
char accounthelp[] = "send account command to remote server"; |
char appendhelp[] = "append to a file"; |
char appendhelp[] = "append to a file"; |
char asciihelp[] = "set ascii transfer type"; |
char asciihelp[] = "set ascii transfer type"; |
|
|
char umaskhelp[] = "get (set) umask on remote side"; |
char umaskhelp[] = "get (set) umask on remote side"; |
char userhelp[] = "send new user information"; |
char userhelp[] = "send new user information"; |
char verbosehelp[] = "toggle verbose mode"; |
char verbosehelp[] = "toggle verbose mode"; |
#endif /* !SMALL */ |
|
|
|
char empty[] = ""; |
char empty[] = ""; |
|
|
#ifdef SMALL |
|
#define CMPL(x) |
|
#define CMPL0 |
|
#define H(x) empty |
|
#else /* SMALL */ |
|
#define CMPL(x) __STRING(x), |
#define CMPL(x) __STRING(x), |
#define CMPL0 "", |
#define CMPL0 "", |
#define H(x) x |
#define H(x) x |
#endif /* SMALL */ |
|
|
|
struct cmd cmdtab[] = { |
struct cmd cmdtab[] = { |
{ "!", H(shellhelp), 0, 0, 0, CMPL0 shell }, |
{ "!", H(shellhelp), 0, 0, 0, CMPL0 shell }, |
#ifndef SMALL |
|
{ "$", H(domachelp), 1, 0, 0, CMPL0 domacro }, |
{ "$", H(domachelp), 1, 0, 0, CMPL0 domacro }, |
#endif /* !SMALL */ |
|
{ "account", H(accounthelp), 0, 1, 1, CMPL0 account}, |
{ "account", H(accounthelp), 0, 1, 1, CMPL0 account}, |
#ifndef SMALL |
|
{ "append", H(appendhelp), 1, 1, 1, CMPL(lr) put }, |
{ "append", H(appendhelp), 1, 1, 1, CMPL(lr) put }, |
#endif /* !SMALL */ |
|
{ "ascii", H(asciihelp), 0, 1, 1, CMPL0 setascii }, |
{ "ascii", H(asciihelp), 0, 1, 1, CMPL0 setascii }, |
{ "bell", H(beephelp), 0, 0, 0, CMPL0 setbell }, |
{ "bell", H(beephelp), 0, 0, 0, CMPL0 setbell }, |
{ "binary", H(binaryhelp), 0, 1, 1, CMPL0 setbinary }, |
{ "binary", H(binaryhelp), 0, 1, 1, CMPL0 setbinary }, |
|
|
{ "chmod", H(chmodhelp), 0, 1, 1, CMPL(nr) do_chmod }, |
{ "chmod", H(chmodhelp), 0, 1, 1, CMPL(nr) do_chmod }, |
{ "close", H(disconhelp), 0, 1, 1, CMPL0 disconnect }, |
{ "close", H(disconhelp), 0, 1, 1, CMPL0 disconnect }, |
{ "cr", H(crhelp), 0, 0, 0, CMPL0 setcr }, |
{ "cr", H(crhelp), 0, 0, 0, CMPL0 setcr }, |
#ifndef SMALL |
|
{ "debug", H(debughelp), 0, 0, 0, CMPL0 setdebug }, |
{ "debug", H(debughelp), 0, 0, 0, CMPL0 setdebug }, |
#endif /* !SMALL */ |
|
{ "delete", H(deletehelp), 0, 1, 1, CMPL(r) deletecmd }, |
{ "delete", H(deletehelp), 0, 1, 1, CMPL(r) deletecmd }, |
{ "dir", H(dirhelp), 1, 1, 1, CMPL(rl) ls }, |
{ "dir", H(dirhelp), 1, 1, 1, CMPL(rl) ls }, |
{ "disconnect", H(disconhelp), 0, 1, 1, CMPL0 disconnect }, |
{ "disconnect", H(disconhelp), 0, 1, 1, CMPL0 disconnect }, |
#ifndef SMALL |
|
{ "edit", H(edithelp), 0, 0, 0, CMPL0 setedit }, |
{ "edit", H(edithelp), 0, 0, 0, CMPL0 setedit }, |
#endif /* !SMALL */ |
|
{ "epsv4", H(epsv4help), 0, 0, 0, CMPL0 setepsv4 }, |
{ "epsv4", H(epsv4help), 0, 0, 0, CMPL0 setepsv4 }, |
{ "exit", H(quithelp), 0, 0, 0, CMPL0 quit }, |
{ "exit", H(quithelp), 0, 0, 0, CMPL0 quit }, |
{ "form", H(formhelp), 0, 1, 1, CMPL0 setform }, |
{ "form", H(formhelp), 0, 1, 1, CMPL0 setform }, |
|
|
{ "less", H(pagehelp), 1, 1, 1, CMPL(r) page }, |
{ "less", H(pagehelp), 1, 1, 1, CMPL(r) page }, |
{ "lpwd", H(lpwdhelp), 0, 0, 0, CMPL0 lpwd }, |
{ "lpwd", H(lpwdhelp), 0, 0, 0, CMPL0 lpwd }, |
{ "ls", H(lshelp), 1, 1, 1, CMPL(rl) ls }, |
{ "ls", H(lshelp), 1, 1, 1, CMPL(rl) ls }, |
#ifndef SMALL |
|
{ "macdef", H(macdefhelp), 0, 0, 0, CMPL0 macdef }, |
{ "macdef", H(macdefhelp), 0, 0, 0, CMPL0 macdef }, |
#endif /* !SMALL */ |
|
{ "mdelete", H(mdeletehelp), 1, 1, 1, CMPL(R) mdelete }, |
{ "mdelete", H(mdeletehelp), 1, 1, 1, CMPL(R) mdelete }, |
{ "mdir", H(mdirhelp), 1, 1, 1, CMPL(R) mls }, |
{ "mdir", H(mdirhelp), 1, 1, 1, CMPL(R) mls }, |
{ "mget", H(mgethelp), 1, 1, 1, CMPL(R) mget }, |
{ "mget", H(mgethelp), 1, 1, 1, CMPL(R) mget }, |
|
|
{ "mode", H(modehelp), 0, 1, 1, CMPL0 setftmode }, |
{ "mode", H(modehelp), 0, 1, 1, CMPL0 setftmode }, |
{ "modtime", H(modtimehelp), 0, 1, 1, CMPL(r) modtime }, |
{ "modtime", H(modtimehelp), 0, 1, 1, CMPL(r) modtime }, |
{ "more", H(pagehelp), 1, 1, 1, CMPL(r) page }, |
{ "more", H(pagehelp), 1, 1, 1, CMPL(r) page }, |
#ifndef SMALL |
|
{ "mput", H(mputhelp), 1, 1, 1, CMPL(L) mput }, |
{ "mput", H(mputhelp), 1, 1, 1, CMPL(L) mput }, |
{ "msend", H(mputhelp), 1, 1, 1, CMPL(L) mput }, |
{ "msend", H(mputhelp), 1, 1, 1, CMPL(L) mput }, |
#endif /* !SMALL */ |
|
{ "newer", H(newerhelp), 1, 1, 1, CMPL(r) newer }, |
{ "newer", H(newerhelp), 1, 1, 1, CMPL(r) newer }, |
{ "nlist", H(nlisthelp), 1, 1, 1, CMPL(rl) ls }, |
{ "nlist", H(nlisthelp), 1, 1, 1, CMPL(rl) ls }, |
{ "nmap", H(nmaphelp), 0, 0, 1, CMPL0 setnmap }, |
{ "nmap", H(nmaphelp), 0, 0, 1, CMPL0 setnmap }, |
|
|
{ "progress", H(progresshelp),0, 0, 0, CMPL0 setprogress }, |
{ "progress", H(progresshelp),0, 0, 0, CMPL0 setprogress }, |
{ "prompt", H(prompthelp), 0, 0, 0, CMPL0 setprompt }, |
{ "prompt", H(prompthelp), 0, 0, 0, CMPL0 setprompt }, |
{ "proxy", H(proxyhelp), 0, 0, 1, CMPL(c) doproxy }, |
{ "proxy", H(proxyhelp), 0, 0, 1, CMPL(c) doproxy }, |
#ifndef SMALL |
|
{ "put", H(sendhelp), 1, 1, 1, CMPL(lr) put }, |
{ "put", H(sendhelp), 1, 1, 1, CMPL(lr) put }, |
#endif /* !SMALL */ |
|
{ "pwd", H(pwdhelp), 0, 1, 1, CMPL0 pwd }, |
{ "pwd", H(pwdhelp), 0, 1, 1, CMPL0 pwd }, |
{ "quit", H(quithelp), 0, 0, 0, CMPL0 quit }, |
{ "quit", H(quithelp), 0, 0, 0, CMPL0 quit }, |
{ "quote", H(quotehelp), 1, 1, 1, CMPL0 quote }, |
{ "quote", H(quotehelp), 1, 1, 1, CMPL0 quote }, |
{ "recv", H(receivehelp), 1, 1, 1, CMPL(rl) get }, |
{ "recv", H(receivehelp), 1, 1, 1, CMPL(rl) get }, |
#ifndef SMALL |
|
{ "reget", H(regethelp), 1, 1, 1, CMPL(rl) reget }, |
{ "reget", H(regethelp), 1, 1, 1, CMPL(rl) reget }, |
#endif /* !SMALL */ |
|
{ "rename", H(renamehelp), 0, 1, 1, CMPL(rr) renamefile }, |
{ "rename", H(renamehelp), 0, 1, 1, CMPL(rr) renamefile }, |
#ifndef SMALL |
|
{ "reput", H(reputhelp), 1, 1, 1, CMPL(lr) reput }, |
{ "reput", H(reputhelp), 1, 1, 1, CMPL(lr) reput }, |
#endif /* !SMALL */ |
|
{ "reset", H(resethelp), 0, 1, 1, CMPL0 reset }, |
{ "reset", H(resethelp), 0, 1, 1, CMPL0 reset }, |
{ "restart", H(restarthelp), 1, 1, 1, CMPL0 restart }, |
{ "restart", H(restarthelp), 1, 1, 1, CMPL0 restart }, |
{ "rhelp", H(remotehelp), 0, 1, 1, CMPL0 rmthelp }, |
{ "rhelp", H(remotehelp), 0, 1, 1, CMPL0 rmthelp }, |
{ "rmdir", H(rmdirhelp), 0, 1, 1, CMPL(r) removedir }, |
{ "rmdir", H(rmdirhelp), 0, 1, 1, CMPL(r) removedir }, |
{ "rstatus", H(rmtstatushelp),0, 1, 1, CMPL(r) rmtstatus }, |
{ "rstatus", H(rmtstatushelp),0, 1, 1, CMPL(r) rmtstatus }, |
{ "runique", H(runiquehelp), 0, 0, 1, CMPL0 setrunique }, |
{ "runique", H(runiquehelp), 0, 0, 1, CMPL0 setrunique }, |
#ifndef SMALL |
|
{ "send", H(sendhelp), 1, 1, 1, CMPL(lr) put }, |
{ "send", H(sendhelp), 1, 1, 1, CMPL(lr) put }, |
#endif /* !SMALL */ |
|
{ "sendport", H(porthelp), 0, 0, 0, CMPL0 setport }, |
{ "sendport", H(porthelp), 0, 0, 0, CMPL0 setport }, |
{ "site", H(sitehelp), 0, 1, 1, CMPL0 site }, |
{ "site", H(sitehelp), 0, 1, 1, CMPL0 site }, |
{ "size", H(sizecmdhelp), 1, 1, 1, CMPL(r) sizecmd }, |
{ "size", H(sizecmdhelp), 1, 1, 1, CMPL(r) sizecmd }, |
|
|
}; |
}; |
|
|
int NCMDS = (sizeof(cmdtab) / sizeof(cmdtab[0])) - 1; |
int NCMDS = (sizeof(cmdtab) / sizeof(cmdtab[0])) - 1; |
|
|
|
#endif /* !SMALL */ |
|
|