xref: /original-bsd/usr.bin/mail/cmdtab.c (revision a6b493b4)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)cmdtab.c	5.11 (Berkeley) 06/01/90";
10 #endif /* not lint */
11 
12 #include "def.h"
13 
14 /*
15  * Mail -- a mail program
16  *
17  * Define all of the command names and bindings.
18  */
19 
20 extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir();
21 extern int save(), help(), headers(), pdot(), respond(), editor();
22 extern int quitcmd(), rexit(), pcmdlist(), sendmail(), from(), copycmd();
23 extern int messize(), psalloc(), deltype(), unset(), set(), source();
24 extern int pversion(), group(), top(), core(), null(), stouch(), visual();
25 extern int swrite(), dosh(), file(), echo(), Respond(), scroll(), ifcmd();
26 extern int elsecmd(), endifcmd(), mboxit(), clobber(), alternates();
27 extern int folders(), igfield(), Type(), retfield(), more(), More();
28 extern int saveigfield(), saveretfield();
29 extern int unread();	/* , Header(); */
30 
31 struct cmd cmdtab[] = {
32 	"next",		next,		NDMLIST,	0,	MMNDEL,
33 	"alias",	group,		M|RAWLIST,	0,	1000,
34 	"print",	type,		MSGLIST,	0,	MMNDEL,
35 	"type",		type,		MSGLIST,	0,	MMNDEL,
36 	"Type",		Type,		MSGLIST,	0,	MMNDEL,
37 	"Print",	Type,		MSGLIST,	0,	MMNDEL,
38 	"visual",	visual,		I|MSGLIST,	0,	MMNORM,
39 	"top",		top,		MSGLIST,	0,	MMNDEL,
40 	"touch",	stouch,		W|MSGLIST,	0,	MMNDEL,
41 	"preserve",	preserve,	W|MSGLIST,	0,	MMNDEL,
42 	"delete",	delete,		W|P|MSGLIST,	0,	MMNDEL,
43 	"dp",		deltype,	W|MSGLIST,	0,	MMNDEL,
44 	"dt",		deltype,	W|MSGLIST,	0,	MMNDEL,
45 	"undelete",	undelete,	P|MSGLIST,	MDELETED,MMNDEL,
46 	"unset",	unset,		M|RAWLIST,	1,	1000,
47 	"mail",		sendmail,	R|M|I|STRLIST,	0,	0,
48 	"mbox",		mboxit,		W|MSGLIST,	0,	0,
49 	"more",		more,		MSGLIST,	0,	MMNDEL,
50 	"page",		more,		MSGLIST,	0,	MMNDEL,
51 	"More",		More,		MSGLIST,	0,	MMNDEL,
52 	"Page",		More,		MSGLIST,	0,	MMNDEL,
53 	"unread",	unread,		MSGLIST,	0,	MMNDEL,
54 	"!",		shell,		I|STRLIST,	0,	0,
55 	"copy",		copycmd,	M|STRLIST,	0,	0,
56 	"chdir",	schdir,		M|RAWLIST,	0,	1,
57 	"cd",		schdir,		M|RAWLIST,	0,	1,
58 	"save",		save,		STRLIST,	0,	0,
59 	"source",	source,		M|RAWLIST,	1,	1,
60 	"set",		set,		M|RAWLIST,	0,	1000,
61 	"shell",	dosh,		I|NOLIST,	0,	0,
62 	"version",	pversion,	M|NOLIST,	0,	0,
63 	"group",	group,		M|RAWLIST,	0,	1000,
64 	"write",	swrite,		STRLIST,	0,	0,
65 	"from",		from,		MSGLIST,	0,	MMNORM,
66 	"file",		file,		T|M|RAWLIST,	0,	1,
67 	"folder",	file,		T|M|RAWLIST,	0,	1,
68 	"folders",	folders,	T|M|NOLIST,	0,	0,
69 	"?",		help,		M|NOLIST,	0,	0,
70 	"z",		scroll,		M|STRLIST,	0,	0,
71 	"headers",	headers,	MSGLIST,	0,	MMNDEL,
72 	"help",		help,		M|NOLIST,	0,	0,
73 	"=",		pdot,		NOLIST,		0,	0,
74 	"Reply",	Respond,	R|I|MSGLIST,	0,	MMNDEL,
75 	"Respond",	Respond,	R|I|MSGLIST,	0,	MMNDEL,
76 	"reply",	respond,	R|I|MSGLIST,	0,	MMNDEL,
77 	"respond",	respond,	R|I|MSGLIST,	0,	MMNDEL,
78 	"edit",		editor,		I|MSGLIST,	0,	MMNORM,
79 	"echo",		echo,		M|RAWLIST,	0,	1000,
80 	"quit",		quitcmd,	NOLIST,		0,	0,
81 	"list",		pcmdlist,	M|NOLIST,	0,	0,
82 	"xit",		rexit,		M|NOLIST,	0,	0,
83 	"exit",		rexit,		M|NOLIST,	0,	0,
84 	"size",		messize,	MSGLIST,	0,	MMNDEL,
85 	"hold",		preserve,	W|MSGLIST,	0,	MMNDEL,
86 	"if",		ifcmd,		F|M|RAWLIST,	1,	1,
87 	"else",		elsecmd,	F|M|RAWLIST,	0,	0,
88 	"endif",	endifcmd,	F|M|RAWLIST,	0,	0,
89 	"alternates",	alternates,	M|RAWLIST,	0,	1000,
90 	"ignore",	igfield,	M|RAWLIST,	0,	1000,
91 	"discard",	igfield,	M|RAWLIST,	0,	1000,
92 	"retain",	retfield,	M|RAWLIST,	0,	1000,
93 	"saveignore",	saveigfield,	M|RAWLIST,	0,	1000,
94 	"savediscard",	saveigfield,	M|RAWLIST,	0,	1000,
95 	"saveretain",	saveretfield,	M|RAWLIST,	0,	1000,
96 /*	"Header",	Header,		STRLIST,	0,	1000,	*/
97 	"core",		core,		M|NOLIST,	0,	0,
98 	"#",		null,		M|NOLIST,	0,	0,
99 	"clobber",	clobber,	M|RAWLIST,	0,	1,
100 	0,		0,		0,		0,	0
101 };
102