Exemple #1
0
char	userhelp[] =	"send new user information";
char	verbosehelp[] =	"toggle verbose mode";

#ifdef SMALL
#define CMPL(x)
#define CMPL0
#else  /* !SMALL */
#define CMPL(x)	__STRING(x), 
#define CMPL0	"",
#endif /* !SMALL */

struct cmd cmdtab[] = {
	{ "!",		shellhelp,	0, 0, 0, CMPL0		shell },
	{ "$",		domachelp,	1, 0, 0, CMPL0		domacro },
	{ "account",	accounthelp,	0, 1, 1, CMPL0		account},
	{ "append",	appendhelp,	1, 1, 1, CMPL(lr)	put },
	{ "ascii",	asciihelp,	0, 1, 1, CMPL0		setascii },
	{ "bell",	beephelp,	0, 0, 0, CMPL0		setbell },
	{ "binary",	binaryhelp,	0, 1, 1, CMPL0		setbinary },
	{ "bye",	quithelp,	0, 0, 0, CMPL0		quit },
	{ "case",	casehelp,	0, 0, 1, CMPL0		setcase },
	{ "cd",		cdhelp,		0, 1, 1, CMPL(r)	cd },
	{ "cdup",	cduphelp,	0, 1, 1, CMPL0		cdup },
	{ "chmod",	chmodhelp,	0, 1, 1, CMPL(nr)	do_chmod },
	{ "close",	disconhelp,	0, 1, 1, CMPL0		disconnect },
	{ "cr",		crhelp,		0, 0, 0, CMPL0		setcr },
	{ "debug",	debughelp,	0, 0, 0, CMPL0		setdebug },
	{ "delete",	deletehelp,	0, 1, 1, CMPL(r)	delete },
	{ "dir",	dirhelp,	1, 1, 1, CMPL(rl)	ls },
	{ "disconnect",	disconhelp,	0, 1, 1, CMPL0		disconnect },
#ifndef SMALL
Exemple #2
0
#define H(x)	x
#endif

#ifdef NO_EDITCOMPLETE
#define	CMPL(x)
#define	CMPL0
#else  /* !NO_EDITCOMPLETE */
#define	CMPL(x)	#x,
#define	CMPL0	empty,
#endif /* !NO_EDITCOMPLETE */

struct cmd cmdtab[] = {
	{ "!",		H(shellhelp),	0, 0, 0, CMPL0		shell },
	{ "$",		H(domachelp),	1, 0, 0, CMPL0		domacro },
	{ "account",	H(accounthelp),	0, 1, 1, CMPL0		account},
	{ "append",	H(appendhelp),	1, 1, 1, CMPL(lr)	put },
	{ "ascii",	H(asciihelp),	0, 1, 1, CMPL0		setascii },
	{ "bell",	H(beephelp),	0, 0, 0, CMPL0		setbell },
	{ "binary",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
	{ "bye",	H(quithelp),	0, 0, 0, CMPL0		quit },
	{ "case",	H(casehelp),	0, 0, 1, CMPL0		setcase },
	{ "cd",		H(cdhelp),	0, 1, 1, CMPL(r)	cd },
	{ "cdup",	H(cduphelp),	0, 1, 1, CMPL0		cdup },
	{ "chmod",	H(chmodhelp),	0, 1, 1, CMPL(nr)	do_chmod },
	{ "close",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
	{ "cr",		H(crhelp),	0, 0, 0, CMPL0		setcr },
	{ "debug",	H(debughelp),	0, 0, 0, CMPL0		setdebug },
	{ "delete",	H(deletehelp),	0, 1, 1, CMPL(r)	delete },
	{ "dir",	H(lshelp),	1, 1, 1, CMPL(rl)	ls },
	{ "disconnect",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
	{ "edit",	H(edithelp),	0, 0, 0, CMPL0		setedit },
Exemple #3
0
char	typehelp[] =	"set file transfer type";
char	umaskhelp[] =	"get (set) umask on remote side";
char	userhelp[] =	"send new user information";
char	verbosehelp[] =	"toggle verbose mode";

char	empty[] = "";

#define CMPL(x)	__STRING(x), 
#define CMPL0	"",
#define H(x)	x

struct cmd cmdtab[] = {
	{ "!",		H(shellhelp),	0, 0, 0, CMPL0		shell },
	{ "$",		H(domachelp),	1, 0, 0, CMPL0		domacro },
	{ "account",	H(accounthelp),	0, 1, 1, CMPL0		account},
	{ "append",	H(appendhelp),	1, 1, 1, CMPL(lr)	put },
	{ "ascii",	H(asciihelp),	0, 1, 1, CMPL0		setascii },
	{ "bell",	H(beephelp),	0, 0, 0, CMPL0		setbell },
	{ "binary",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
	{ "bye",	H(quithelp),	0, 0, 0, CMPL0		quit },
	{ "case",	H(casehelp),	0, 0, 1, CMPL0		setcase },
	{ "cd",		H(cdhelp),	0, 1, 1, CMPL(r)	cd },
	{ "cdup",	H(cduphelp),	0, 1, 1, CMPL0		cdup },
	{ "chmod",	H(chmodhelp),	0, 1, 1, CMPL(nr)	do_chmod },
	{ "close",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
	{ "cr",		H(crhelp),	0, 0, 0, CMPL0		setcr },
	{ "debug",	H(debughelp),	0, 0, 0, CMPL0		setdebug },
	{ "delete",	H(deletehelp),	0, 1, 1, CMPL(r)	deletecmd },
	{ "dir",	H(dirhelp),	1, 1, 1, CMPL(rl)	ls },
	{ "disconnect",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
	{ "edit",	H(edithelp),	0, 0, 0, CMPL0		setedit },