Marked all mailing commands with R to prevent recursive invocation
[unix-history] / usr / src / usr.bin / mail / cmdtab.c
CommitLineData
1d3a1a2f
KS
1#
2
3#include "def.h"
4
5/*
6 * Mail -- a mail program
7 *
8 * Define all of the command names and bindings.
9 */
10
cbaa6c31 11static char *SccsId = "@(#)cmdtab.c 1.6 %G%";
1d3a1a2f
KS
12
13extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir();
14extern int save(), help(), headers(), pdot(), strace(), respond(), editor();
15extern int edstop(), exit(), pcmdlist(), sendmail(), from();
16extern int messize(), psalloc(), deltype(), unset(), set(), source();
17extern int pversion(), group(), top(), core(), null(), stouch(), visual();
1bd5b11d
KS
18extern int swrite(), dosh(), file(), echo(), Respond(), scroll(), ifcmd();
19extern int elsecmd(), endifcmd();
1d3a1a2f
KS
20
21struct cmd cmdtab[] = {
22 "next", next, NDMLIST, 0, MMNDEL,
23 "alias", group, M|RAWLIST, 0, 1000,
24 "print", type, MSGLIST, 0, MMNDEL,
25 "type", type, MSGLIST, 0, MMNDEL,
67cb9e50 26 "visual", visual, I|MSGLIST, 0, MMNORM,
1d3a1a2f 27 "top", top, MSGLIST, 0, MMNDEL,
c548598c
KS
28 "touch", stouch, W|MSGLIST, 0, MMNDEL,
29 "preserve", preserve, W|MSGLIST, 0, MMNDEL,
30 "delete", delete, W|P|MSGLIST, 0, MMNDEL,
31 "dp", deltype, W|MSGLIST, 0, MMNDEL,
32 "dt", deltype, W|MSGLIST, 0, MMNDEL,
1d3a1a2f
KS
33 "undelete", undelete, P|MSGLIST, MDELETED,MMNDEL,
34 "unset", unset, M|RAWLIST, 1, 1000,
cbaa6c31 35 "mail", sendmail, R|M|I|STRLIST, 0, 0,
c548598c 36 "mbox", stouch, W|MSGLIST, 0, 0,
1d3a1a2f
KS
37 "!", shell, I|STRLIST, 0, 0,
38 "chdir", schdir, M|STRLIST, 0, 0,
39 "cd", schdir, M|STRLIST, 0, 0,
40 "save", save, STRLIST, 0, 0,
41 "source", source, M|STRLIST, 0, 0,
42 "set", set, M|RAWLIST, 0, 1000,
43 "shell", dosh, I|NOLIST, 0, 0,
44 "version", pversion, M|NOLIST, 0, 0,
45 "group", group, M|RAWLIST, 0, 1000,
46 "write", swrite, STRLIST, 0, 0,
47 "from", from, MSGLIST, 0, MMNORM,
1bd5b11d 48 "file", file, T|M|RAWLIST, 0, 1,
1d3a1a2f
KS
49 "?", help, M|NOLIST, 0, 0,
50 "z", scroll, M|STRLIST, 0, 0,
51 "headers", headers, MSGLIST, 0, MMNDEL,
52 "help", help, M|NOLIST, 0, 0,
53 "=", pdot, NOLIST, 0, 0,
cbaa6c31
KS
54 "Reply", Respond, R|I|MSGLIST, 0, MMNDEL,
55 "Respond", Respond, R|I|MSGLIST, 0, MMNDEL,
56 "reply", respond, R|I|MSGLIST, 0, MMNDEL,
57 "respond", respond, R|I|MSGLIST, 0, MMNDEL,
67cb9e50 58 "edit", editor, I|MSGLIST, 0, MMNORM,
1d3a1a2f
KS
59 "echo", echo, RAWLIST, 0, 1000,
60 "quit", edstop, NOLIST, 0, 0,
61 "list", pcmdlist, M|NOLIST, 0, 0,
62 "xit", exit, M|NOLIST, 0, 0,
63 "exit", exit, M|NOLIST, 0, 0,
64 "size", messize, MSGLIST, 0, MMNDEL,
c548598c 65 "hold", preserve, W|MSGLIST, 0, MMNDEL,
5585d6d0
KS
66 "if", ifcmd, F|RAWLIST, 1, 1,
67 "else", elsecmd, F|RAWLIST, 0, 0,
68 "endif", endifcmd, F|RAWLIST, 0, 0,
1d3a1a2f
KS
69 "core", core, M|NOLIST, 0, 0,
70 "#", null, M|NOLIST, 0, 0,
71 0, 0, 0, 0, 0
72};