1331722Seadler/*
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 * 4. Neither the name of the University nor the names of its contributors
141590Srgrimes *    may be used to endorse or promote products derived from this software
151590Srgrimes *    without specific prior written permission.
161590Srgrimes *
171590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201590Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271590Srgrimes * SUCH DAMAGE.
281590Srgrimes */
291590Srgrimes
301590Srgrimes#ifndef lint
3174769Smikeh#if 0
321590Srgrimesstatic char sccsid[] = "@(#)cmdtab.c	8.1 (Berkeley) 6/6/93";
3374769Smikeh#endif
341590Srgrimes#endif /* not lint */
3599112Sobrien#include <sys/cdefs.h>
3699112Sobrien__FBSDID("$FreeBSD$");
371590Srgrimes
381590Srgrimes#include "def.h"
391590Srgrimes#include "extern.h"
401590Srgrimes
411590Srgrimes/*
421590Srgrimes * Mail -- a mail program
431590Srgrimes *
441590Srgrimes * Define all of the command names and bindings.
451590Srgrimes */
461590Srgrimes
4777274Smikehconst struct cmd cmdtab[] = {
4877274Smikeh	/*						msgmask msgflag  */
4977274Smikeh	/* command	function	argtype		result	& mask   */
5077274Smikeh	/* -------	--------	-------		------	-------  */
5177274Smikeh	{ "next",	next,		NDMLIST,	0,	MMNDEL	},
5277274Smikeh	{ "alias",	group,		M|RAWLIST,	0,	1000 	},
5377274Smikeh	{ "print",	type,		MSGLIST,	0,	MMNDEL	},
5477274Smikeh	{ "type",	type,		MSGLIST,	0,	MMNDEL	},
5577274Smikeh	{ "Type",	Type,		MSGLIST,	0,	MMNDEL	},
5677274Smikeh	{ "Print",	Type,		MSGLIST,	0,	MMNDEL	},
5777274Smikeh	{ "visual",	visual,		I|MSGLIST,	0,	MMNORM	},
5877274Smikeh	{ "top",	top,		MSGLIST,	0,	MMNDEL	},
5977274Smikeh	{ "touch",	stouch,		W|MSGLIST,	0,	MMNDEL	},
6077274Smikeh	{ "preserve",	preserve,	W|MSGLIST,	0,	MMNDEL	},
6177274Smikeh	{ "delete",	delete,		W|P|MSGLIST,	0,	MMNDEL	},
6277274Smikeh	{ "dp",		deltype,	W|MSGLIST,	0,	MMNDEL	},
6377274Smikeh	{ "dt",		deltype,	W|MSGLIST,	0,	MMNDEL	},
6477274Smikeh	{ "undelete",	undelete_messages, P|MSGLIST,	MDELETED,MMNDEL },
6577274Smikeh	{ "unset",	unset,		M|RAWLIST,	1,	1000 	},
6677274Smikeh	{ "mail",	sendmail,	R|M|I|STRLIST,	0,	0 	},
6777274Smikeh	{ "mbox",	mboxit,		W|MSGLIST,	0,	0 	},
6877274Smikeh	{ "more",	more,		MSGLIST,	0,	MMNDEL	},
6977274Smikeh	{ "page",	more,		MSGLIST,	0,	MMNDEL	},
7077274Smikeh	{ "More",	More,		MSGLIST,	0,	MMNDEL	},
7177274Smikeh	{ "Page",	More,		MSGLIST,	0,	MMNDEL	},
7277274Smikeh	{ "unread",	unread,		MSGLIST,	0,	MMNDEL	},
7377274Smikeh	{ "!",		shell,		I|STRLIST,	0,	0	},
7477274Smikeh	{ "copy",	copycmd,	M|STRLIST,	0,	0 	},
7577274Smikeh	{ "chdir",	schdir,		M|RAWLIST,	0,	1 	},
7677274Smikeh	{ "cd",		schdir,		M|RAWLIST,	0,	1 	},
7777274Smikeh	{ "save",	save,		STRLIST,	0,	0	},
7877274Smikeh	{ "source",	source,		M|RAWLIST,	1,	1	},
7977274Smikeh	{ "set",	set,		M|RAWLIST,	0,	1000 	},
8077274Smikeh	{ "shell",	dosh,		I|NOLIST,	0,	0 	},
8177274Smikeh	{ "version",	pversion,	M|NOLIST,	0,	0 	},
8277274Smikeh	{ "group",	group,		M|RAWLIST,	0,	1000 	},
8377274Smikeh	{ "write",	swrite,		STRLIST,	0,	0 	},
8477274Smikeh	{ "from",	from,		MSGLIST,	0,	MMNORM	},
8577274Smikeh	{ "file",	file,		T|M|RAWLIST,	0,	1 	},
8677274Smikeh	{ "folder",	file,		T|M|RAWLIST,	0,	1 	},
8777274Smikeh	{ "folders",	folders,	T|M|NOLIST,	0,	0 	},
8877274Smikeh	{ "?",		help,		M|NOLIST,	0,	0 	},
8977274Smikeh	{ "z",		scroll,		M|STRLIST,	0,	0 	},
9077274Smikeh	{ "headers",	headers,	MSGLIST,	0,	MMNDEL	},
9177274Smikeh	{ "help",	help,		M|NOLIST,	0,	0 	},
9277274Smikeh	{ "=",		pdot,		NOLIST,		0,	0 	},
9377274Smikeh	{ "Reply",	Respond,	R|I|MSGLIST,	0,	MMNDEL	},
9477274Smikeh	{ "Respond",	Respond,	R|I|MSGLIST,	0,	MMNDEL	},
9577274Smikeh	{ "reply",	respond,	R|I|MSGLIST,	0,	MMNDEL	},
9677274Smikeh	{ "respond",	respond,	R|I|MSGLIST,	0,	MMNDEL	},
9777274Smikeh	{ "edit",	editor,		I|MSGLIST,	0,	MMNORM	},
9877274Smikeh	{ "echo",	echo,		M|RAWLIST,	0,	1000 	},
9977274Smikeh	{ "quit",	quitcmd,	NOLIST,		0,	0 	},
10077274Smikeh	{ "list",	pcmdlist,	M|NOLIST,	0,	0 	},
10177274Smikeh	{ "xit",	rexit,		M|NOLIST,	0,	0 	},
10277274Smikeh	{ "exit",	rexit,		M|NOLIST,	0,	0 	},
10377274Smikeh	{ "size",	messize,	MSGLIST,	0,	MMNDEL	},
10477274Smikeh	{ "hold",	preserve,	W|MSGLIST,	0,	MMNDEL	},
10577274Smikeh	{ "if",		ifcmd,		F|M|RAWLIST,	1,	1 	},
10677274Smikeh	{ "else",	elsecmd,	F|M|RAWLIST,	0,	0 	},
10777274Smikeh	{ "endif",	endifcmd,	F|M|RAWLIST,	0,	0 	},
10877274Smikeh	{ "alternates",	alternates,	M|RAWLIST,	0,	1000 	},
10977274Smikeh	{ "ignore",	igfield,	M|RAWLIST,	0,	1000 	},
11077274Smikeh	{ "discard",	igfield,	M|RAWLIST,	0,	1000 	},
11177274Smikeh	{ "retain",	retfield,	M|RAWLIST,	0,	1000 	},
11277274Smikeh	{ "saveignore",	saveigfield,	M|RAWLIST,	0,	1000 	},
11377274Smikeh	{ "savediscard",saveigfield,	M|RAWLIST,	0,	1000 	},
11477274Smikeh	{ "saveretain",	saveretfield,	M|RAWLIST,	0,	1000 	},
11577274Smikeh/*	{ "Header",	Header,		STRLIST,	0,	1000	}, */
11677274Smikeh	{ "core",	core,		M|NOLIST,	0,	0 	},
11777274Smikeh	{ "#",		null,		M|NOLIST,	0,	0 	},
11877274Smikeh	{ "clobber",	clobber,	M|RAWLIST,	0,	1 	},
11988150Smikeh	{ "inc",	inc,		T|NOLIST,	0,	0 	},
12077274Smikeh	{ 0,		0,		0,		0,	0 	}
1211590Srgrimes};
122