Commit | Line | Data |
---|---|---|
b059c7be DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
0c5f72fb KB |
3 | * All rights reserved. |
4 | * | |
5 | * Redistribution and use in source and binary forms are permitted | |
acfc7e9b KB |
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 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
b059c7be DF |
16 | */ |
17 | ||
acfc7e9b KB |
18 | #ifndef lint |
19 | static char sccsid[] = "@(#)cmdtab.c 5.7 (Berkeley) %G%"; | |
20 | #endif /* not lint */ | |
1d3a1a2f KS |
21 | |
22 | #include "def.h" | |
23 | ||
24 | /* | |
25 | * Mail -- a mail program | |
26 | * | |
27 | * Define all of the command names and bindings. | |
28 | */ | |
29 | ||
1d3a1a2f | 30 | extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir(); |
828615a1 | 31 | extern int save(), help(), headers(), pdot(), respond(), editor(); |
0d149b8b | 32 | extern int edstop(), rexit(), pcmdlist(), sendmail(), from(), copycmd(); |
1d3a1a2f KS |
33 | extern int messize(), psalloc(), deltype(), unset(), set(), source(); |
34 | extern int pversion(), group(), top(), core(), null(), stouch(), visual(); | |
1bd5b11d | 35 | extern int swrite(), dosh(), file(), echo(), Respond(), scroll(), ifcmd(); |
26210b9d | 36 | extern int elsecmd(), endifcmd(), mboxit(), clobber(), alternates(); |
b041ccec | 37 | extern int local(), folders(), igfield(), Type(), retfield(), more(), More(); |
887efe38 | 38 | extern int saveigfield(), saveretfield(); |
de7ac1f4 | 39 | extern int unread(); /* , Header(); */ |
1d3a1a2f KS |
40 | |
41 | struct cmd cmdtab[] = { | |
42 | "next", next, NDMLIST, 0, MMNDEL, | |
43 | "alias", group, M|RAWLIST, 0, 1000, | |
44 | "print", type, MSGLIST, 0, MMNDEL, | |
45 | "type", type, MSGLIST, 0, MMNDEL, | |
e6160718 KS |
46 | "Type", Type, MSGLIST, 0, MMNDEL, |
47 | "Print", Type, MSGLIST, 0, MMNDEL, | |
67cb9e50 | 48 | "visual", visual, I|MSGLIST, 0, MMNORM, |
1d3a1a2f | 49 | "top", top, MSGLIST, 0, MMNDEL, |
c548598c KS |
50 | "touch", stouch, W|MSGLIST, 0, MMNDEL, |
51 | "preserve", preserve, W|MSGLIST, 0, MMNDEL, | |
52 | "delete", delete, W|P|MSGLIST, 0, MMNDEL, | |
53 | "dp", deltype, W|MSGLIST, 0, MMNDEL, | |
54 | "dt", deltype, W|MSGLIST, 0, MMNDEL, | |
1d3a1a2f KS |
55 | "undelete", undelete, P|MSGLIST, MDELETED,MMNDEL, |
56 | "unset", unset, M|RAWLIST, 1, 1000, | |
cbaa6c31 | 57 | "mail", sendmail, R|M|I|STRLIST, 0, 0, |
b06be156 | 58 | "mbox", mboxit, W|MSGLIST, 0, 0, |
b041ccec S |
59 | "more", more, MSGLIST, 0, MMNDEL, |
60 | "page", more, MSGLIST, 0, MMNDEL, | |
61 | "More", More, MSGLIST, 0, MMNDEL, | |
62 | "Page", More, MSGLIST, 0, MMNDEL, | |
de7ac1f4 S |
63 | "unread", unread, MSGLIST, 0, MMNDEL, |
64 | "Unread", unread, MSGLIST, 0, MMNDEL, | |
65 | "new", unread, MSGLIST, 0, MMNDEL, | |
66 | "New", unread, MSGLIST, 0, MMNDEL, | |
1d3a1a2f | 67 | "!", shell, I|STRLIST, 0, 0, |
0d149b8b | 68 | "copy", copycmd, M|STRLIST, 0, 0, |
1d3a1a2f KS |
69 | "chdir", schdir, M|STRLIST, 0, 0, |
70 | "cd", schdir, M|STRLIST, 0, 0, | |
71 | "save", save, STRLIST, 0, 0, | |
72 | "source", source, M|STRLIST, 0, 0, | |
73 | "set", set, M|RAWLIST, 0, 1000, | |
74 | "shell", dosh, I|NOLIST, 0, 0, | |
75 | "version", pversion, M|NOLIST, 0, 0, | |
76 | "group", group, M|RAWLIST, 0, 1000, | |
77 | "write", swrite, STRLIST, 0, 0, | |
78 | "from", from, MSGLIST, 0, MMNORM, | |
1bd5b11d | 79 | "file", file, T|M|RAWLIST, 0, 1, |
176b7b1e | 80 | "folder", file, T|M|RAWLIST, 0, 1, |
c8883d70 | 81 | "folders", folders, T|M|RAWLIST, 0, 1, |
1d3a1a2f KS |
82 | "?", help, M|NOLIST, 0, 0, |
83 | "z", scroll, M|STRLIST, 0, 0, | |
84 | "headers", headers, MSGLIST, 0, MMNDEL, | |
85 | "help", help, M|NOLIST, 0, 0, | |
86 | "=", pdot, NOLIST, 0, 0, | |
cbaa6c31 KS |
87 | "Reply", Respond, R|I|MSGLIST, 0, MMNDEL, |
88 | "Respond", Respond, R|I|MSGLIST, 0, MMNDEL, | |
89 | "reply", respond, R|I|MSGLIST, 0, MMNDEL, | |
90 | "respond", respond, R|I|MSGLIST, 0, MMNDEL, | |
67cb9e50 | 91 | "edit", editor, I|MSGLIST, 0, MMNORM, |
e90df9d9 | 92 | "echo", echo, M|RAWLIST, 0, 1000, |
1d3a1a2f KS |
93 | "quit", edstop, NOLIST, 0, 0, |
94 | "list", pcmdlist, M|NOLIST, 0, 0, | |
15002fd1 | 95 | "local", local, M|RAWLIST, 0, 1000, |
8715a8f1 KS |
96 | "xit", rexit, M|NOLIST, 0, 0, |
97 | "exit", rexit, M|NOLIST, 0, 0, | |
1d3a1a2f | 98 | "size", messize, MSGLIST, 0, MMNDEL, |
c548598c | 99 | "hold", preserve, W|MSGLIST, 0, MMNDEL, |
e90df9d9 KS |
100 | "if", ifcmd, F|M|RAWLIST, 1, 1, |
101 | "else", elsecmd, F|M|RAWLIST, 0, 0, | |
102 | "endif", endifcmd, F|M|RAWLIST, 0, 0, | |
26210b9d | 103 | "alternates", alternates, M|RAWLIST, 0, 1000, |
e6160718 KS |
104 | "ignore", igfield, M|RAWLIST, 0, 1000, |
105 | "discard", igfield, M|RAWLIST, 0, 1000, | |
46053c99 | 106 | "retain", retfield, M|RAWLIST, 0, 1000, |
887efe38 EW |
107 | "saveignore", saveigfield, M|RAWLIST, 0, 1000, |
108 | "savediscard", saveigfield, M|RAWLIST, 0, 1000, | |
109 | "saveretain", saveretfield, M|RAWLIST, 0, 1000, | |
de7ac1f4 | 110 | /* "Header", Header, STRLIST, 0, 1000, */ |
1d3a1a2f KS |
111 | "core", core, M|NOLIST, 0, 0, |
112 | "#", null, M|NOLIST, 0, 0, | |
cafd3e72 | 113 | "clobber", clobber, M|RAWLIST, 0, 1, |
1d3a1a2f KS |
114 | 0, 0, 0, 0, 0 |
115 | }; |