1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 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. 16 */ 17 18 #ifndef lint 19 static char sccsid[] = "@(#)cmdtab.c 5.9 (Berkeley) 07/07/88"; 20 #endif /* not lint */ 21 22 #include "def.h" 23 24 /* 25 * Mail -- a mail program 26 * 27 * Define all of the command names and bindings. 28 */ 29 30 extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir(); 31 extern int save(), help(), headers(), pdot(), respond(), editor(); 32 extern int edstop(), rexit(), pcmdlist(), sendmail(), from(), copycmd(); 33 extern int messize(), psalloc(), deltype(), unset(), set(), source(); 34 extern int pversion(), group(), top(), core(), null(), stouch(), visual(); 35 extern int swrite(), dosh(), file(), echo(), Respond(), scroll(), ifcmd(); 36 extern int elsecmd(), endifcmd(), mboxit(), clobber(), alternates(); 37 extern int folders(), igfield(), Type(), retfield(), more(), More(); 38 extern int saveigfield(), saveretfield(); 39 extern int unread(); /* , Header(); */ 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, 46 "Type", Type, MSGLIST, 0, MMNDEL, 47 "Print", Type, MSGLIST, 0, MMNDEL, 48 "visual", visual, I|MSGLIST, 0, MMNORM, 49 "top", top, MSGLIST, 0, MMNDEL, 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, 55 "undelete", undelete, P|MSGLIST, MDELETED,MMNDEL, 56 "unset", unset, M|RAWLIST, 1, 1000, 57 "mail", sendmail, R|M|I|STRLIST, 0, 0, 58 "mbox", mboxit, W|MSGLIST, 0, 0, 59 "more", more, MSGLIST, 0, MMNDEL, 60 "page", more, MSGLIST, 0, MMNDEL, 61 "More", More, MSGLIST, 0, MMNDEL, 62 "Page", More, MSGLIST, 0, MMNDEL, 63 "unread", unread, MSGLIST, 0, MMNDEL, 64 "!", shell, I|STRLIST, 0, 0, 65 "copy", copycmd, M|STRLIST, 0, 0, 66 "chdir", schdir, M|RAWLIST, 0, 1, 67 "cd", schdir, M|RAWLIST, 0, 1, 68 "save", save, STRLIST, 0, 0, 69 "source", source, M|RAWLIST, 1, 1, 70 "set", set, M|RAWLIST, 0, 1000, 71 "shell", dosh, I|NOLIST, 0, 0, 72 "version", pversion, M|NOLIST, 0, 0, 73 "group", group, M|RAWLIST, 0, 1000, 74 "write", swrite, STRLIST, 0, 0, 75 "from", from, MSGLIST, 0, MMNORM, 76 "file", file, T|M|RAWLIST, 0, 1, 77 "folder", file, T|M|RAWLIST, 0, 1, 78 "folders", folders, T|M|NOLIST, 0, 0, 79 "?", help, M|NOLIST, 0, 0, 80 "z", scroll, M|STRLIST, 0, 0, 81 "headers", headers, MSGLIST, 0, MMNDEL, 82 "help", help, M|NOLIST, 0, 0, 83 "=", pdot, NOLIST, 0, 0, 84 "Reply", Respond, R|I|MSGLIST, 0, MMNDEL, 85 "Respond", Respond, R|I|MSGLIST, 0, MMNDEL, 86 "reply", respond, R|I|MSGLIST, 0, MMNDEL, 87 "respond", respond, R|I|MSGLIST, 0, MMNDEL, 88 "edit", editor, I|MSGLIST, 0, MMNORM, 89 "echo", echo, M|RAWLIST, 0, 1000, 90 "quit", edstop, NOLIST, 0, 0, 91 "list", pcmdlist, M|NOLIST, 0, 0, 92 "xit", rexit, M|NOLIST, 0, 0, 93 "exit", rexit, M|NOLIST, 0, 0, 94 "size", messize, MSGLIST, 0, MMNDEL, 95 "hold", preserve, W|MSGLIST, 0, MMNDEL, 96 "if", ifcmd, F|M|RAWLIST, 1, 1, 97 "else", elsecmd, F|M|RAWLIST, 0, 0, 98 "endif", endifcmd, F|M|RAWLIST, 0, 0, 99 "alternates", alternates, M|RAWLIST, 0, 1000, 100 "ignore", igfield, M|RAWLIST, 0, 1000, 101 "discard", igfield, M|RAWLIST, 0, 1000, 102 "retain", retfield, M|RAWLIST, 0, 1000, 103 "saveignore", saveigfield, M|RAWLIST, 0, 1000, 104 "savediscard", saveigfield, M|RAWLIST, 0, 1000, 105 "saveretain", saveretfield, M|RAWLIST, 0, 1000, 106 /* "Header", Header, STRLIST, 0, 1000, */ 107 "core", core, M|NOLIST, 0, 0, 108 "#", null, M|NOLIST, 0, 0, 109 "clobber", clobber, M|RAWLIST, 0, 1, 110 0, 0, 0, 0, 0 111 }; 112