cmdtab.c revision 74769
11590Srgrimes/* 21590Srgrimes * Copyright (c) 1980, 1993 31590Srgrimes * The Regents of the University of California. All rights reserved. 41590Srgrimes * 51590Srgrimes * Redistribution and use in source and binary forms, with or without 61590Srgrimes * modification, are permitted provided that the following conditions 71590Srgrimes * are met: 81590Srgrimes * 1. Redistributions of source code must retain the above copyright 91590Srgrimes * notice, this list of conditions and the following disclaimer. 101590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111590Srgrimes * notice, this list of conditions and the following disclaimer in the 121590Srgrimes * documentation and/or other materials provided with the distribution. 131590Srgrimes * 3. All advertising materials mentioning features or use of this software 141590Srgrimes * must display the following acknowledgement: 151590Srgrimes * This product includes software developed by the University of 161590Srgrimes * California, Berkeley and its contributors. 171590Srgrimes * 4. Neither the name of the University nor the names of its contributors 181590Srgrimes * may be used to endorse or promote products derived from this software 191590Srgrimes * without specific prior written permission. 201590Srgrimes * 211590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241590Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311590Srgrimes * SUCH DAMAGE. 321590Srgrimes */ 331590Srgrimes 341590Srgrimes#ifndef lint 3574769Smikeh#if 0 361590Srgrimesstatic char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93"; 3774769Smikeh#endif 3874769Smikehstatic const char rcsid[] = 3974769Smikeh "$FreeBSD: head/usr.bin/mail/cmdtab.c 74769 2001-03-25 04:57:05Z mikeh $"; 401590Srgrimes#endif /* not lint */ 411590Srgrimes 421590Srgrimes#include "def.h" 431590Srgrimes#include "extern.h" 441590Srgrimes 451590Srgrimes/* 461590Srgrimes * Mail -- a mail program 471590Srgrimes * 481590Srgrimes * Define all of the command names and bindings. 491590Srgrimes */ 501590Srgrimes 511590Srgrimesstruct cmd cmdtab[] = { 521590Srgrimes "next", next, NDMLIST, 0, MMNDEL, 531590Srgrimes "alias", group, M|RAWLIST, 0, 1000, 541590Srgrimes "print", type, MSGLIST, 0, MMNDEL, 551590Srgrimes "type", type, MSGLIST, 0, MMNDEL, 561590Srgrimes "Type", Type, MSGLIST, 0, MMNDEL, 571590Srgrimes "Print", Type, MSGLIST, 0, MMNDEL, 581590Srgrimes "visual", visual, I|MSGLIST, 0, MMNORM, 591590Srgrimes "top", top, MSGLIST, 0, MMNDEL, 601590Srgrimes "touch", stouch, W|MSGLIST, 0, MMNDEL, 611590Srgrimes "preserve", preserve, W|MSGLIST, 0, MMNDEL, 621590Srgrimes "delete", delete, W|P|MSGLIST, 0, MMNDEL, 631590Srgrimes "dp", deltype, W|MSGLIST, 0, MMNDEL, 641590Srgrimes "dt", deltype, W|MSGLIST, 0, MMNDEL, 6524932Sbde "undelete", undelete_messages, P|MSGLIST, MDELETED,MMNDEL, 661590Srgrimes "unset", unset, M|RAWLIST, 1, 1000, 671590Srgrimes "mail", sendmail, R|M|I|STRLIST, 0, 0, 681590Srgrimes "mbox", mboxit, W|MSGLIST, 0, 0, 691590Srgrimes "more", more, MSGLIST, 0, MMNDEL, 701590Srgrimes "page", more, MSGLIST, 0, MMNDEL, 711590Srgrimes "More", More, MSGLIST, 0, MMNDEL, 721590Srgrimes "Page", More, MSGLIST, 0, MMNDEL, 731590Srgrimes "unread", unread, MSGLIST, 0, MMNDEL, 741590Srgrimes "!", shell, I|STRLIST, 0, 0, 751590Srgrimes "copy", copycmd, M|STRLIST, 0, 0, 761590Srgrimes "chdir", schdir, M|RAWLIST, 0, 1, 771590Srgrimes "cd", schdir, M|RAWLIST, 0, 1, 781590Srgrimes "save", save, STRLIST, 0, 0, 791590Srgrimes "source", source, M|RAWLIST, 1, 1, 801590Srgrimes "set", set, M|RAWLIST, 0, 1000, 811590Srgrimes "shell", dosh, I|NOLIST, 0, 0, 821590Srgrimes "version", pversion, M|NOLIST, 0, 0, 831590Srgrimes "group", group, M|RAWLIST, 0, 1000, 841590Srgrimes "write", swrite, STRLIST, 0, 0, 851590Srgrimes "from", from, MSGLIST, 0, MMNORM, 861590Srgrimes "file", file, T|M|RAWLIST, 0, 1, 871590Srgrimes "folder", file, T|M|RAWLIST, 0, 1, 881590Srgrimes "folders", folders, T|M|NOLIST, 0, 0, 891590Srgrimes "?", help, M|NOLIST, 0, 0, 901590Srgrimes "z", scroll, M|STRLIST, 0, 0, 911590Srgrimes "headers", headers, MSGLIST, 0, MMNDEL, 921590Srgrimes "help", help, M|NOLIST, 0, 0, 931590Srgrimes "=", pdot, NOLIST, 0, 0, 941590Srgrimes "Reply", Respond, R|I|MSGLIST, 0, MMNDEL, 951590Srgrimes "Respond", Respond, R|I|MSGLIST, 0, MMNDEL, 961590Srgrimes "reply", respond, R|I|MSGLIST, 0, MMNDEL, 971590Srgrimes "respond", respond, R|I|MSGLIST, 0, MMNDEL, 981590Srgrimes "edit", editor, I|MSGLIST, 0, MMNORM, 991590Srgrimes "echo", echo, M|RAWLIST, 0, 1000, 1001590Srgrimes "quit", quitcmd, NOLIST, 0, 0, 1011590Srgrimes "list", pcmdlist, M|NOLIST, 0, 0, 1021590Srgrimes "xit", rexit, M|NOLIST, 0, 0, 1031590Srgrimes "exit", rexit, M|NOLIST, 0, 0, 1041590Srgrimes "size", messize, MSGLIST, 0, MMNDEL, 1051590Srgrimes "hold", preserve, W|MSGLIST, 0, MMNDEL, 1061590Srgrimes "if", ifcmd, F|M|RAWLIST, 1, 1, 1071590Srgrimes "else", elsecmd, F|M|RAWLIST, 0, 0, 1081590Srgrimes "endif", endifcmd, F|M|RAWLIST, 0, 0, 1091590Srgrimes "alternates", alternates, M|RAWLIST, 0, 1000, 1101590Srgrimes "ignore", igfield, M|RAWLIST, 0, 1000, 1111590Srgrimes "discard", igfield, M|RAWLIST, 0, 1000, 1121590Srgrimes "retain", retfield, M|RAWLIST, 0, 1000, 1131590Srgrimes "saveignore", saveigfield, M|RAWLIST, 0, 1000, 1141590Srgrimes "savediscard", saveigfield, M|RAWLIST, 0, 1000, 1151590Srgrimes "saveretain", saveretfield, M|RAWLIST, 0, 1000, 1161590Srgrimes/* "Header", Header, STRLIST, 0, 1000, */ 1171590Srgrimes "core", core, M|NOLIST, 0, 0, 1181590Srgrimes "#", null, M|NOLIST, 0, 0, 1191590Srgrimes "clobber", clobber, M|RAWLIST, 0, 1, 1201590Srgrimes 0, 0, 0, 0, 0 1211590Srgrimes}; 122