diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-03-27 19:33:22 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-03-27 19:33:22 +0000 |
commit | b4d055c56d56b705a9874806044897b6f933a892 (patch) | |
tree | ea6944e4424f24dce67f9a7422a498a2e3e97486 /usr.bin/mail | |
parent | d413353d829242c97addbbe6aace0c12d53c4772 (diff) |
From NetBSD: merge of 960317
Diffstat (limited to 'usr.bin/mail')
-rw-r--r-- | usr.bin/mail/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/mail/cmd1.c | 8 | ||||
-rw-r--r-- | usr.bin/mail/cmdtab.c | 6 | ||||
-rw-r--r-- | usr.bin/mail/extern.h | 4 | ||||
-rw-r--r-- | usr.bin/mail/lex.c | 12 |
5 files changed, 20 insertions, 13 deletions
diff --git a/usr.bin/mail/Makefile b/usr.bin/mail/Makefile index c17232028bf..f67171f6e18 100644 --- a/usr.bin/mail/Makefile +++ b/usr.bin/mail/Makefile @@ -1,8 +1,7 @@ +# $OpenBSD: Makefile,v 1.2 1996/03/27 19:32:29 niklas Exp $ # from: @(#)Makefile 8.2 (Berkeley) 1/25/94 -# $Id: Makefile,v 1.1 1995/10/18 08:45:37 deraadt Exp $ PROG= mail -CFLAGS+=-DUSE_OLD_TTY SRCS= version.c aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \ quit.c send.c strings.c temp.c tty.c vars.c diff --git a/usr.bin/mail/cmd1.c b/usr.bin/mail/cmd1.c index 7778c4713e0..21f2e7b274c 100644 --- a/usr.bin/mail/cmd1.c +++ b/usr.bin/mail/cmd1.c @@ -1,3 +1,5 @@ +/* $OpenBSD: cmd1.c,v 1.2 1996/03/27 19:32:30 niklas Exp $ */ + /*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. @@ -33,7 +35,7 @@ #ifndef lint static char sccsid[] = "from: @(#)cmd1.c 8.1 (Berkeley) 6/6/93"; -static char rcsid[] = "$Id: cmd1.c,v 1.1 1995/10/18 08:45:38 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cmd1.c,v 1.2 1996/03/27 19:32:30 niklas Exp $"; #endif /* not lint */ #include "rcv.h" @@ -224,9 +226,9 @@ pdot() int pcmdlist() { - register struct cmd *cp; + extern const struct cmd cmdtab[]; + register const struct cmd *cp; register int cc; - extern struct cmd cmdtab[]; printf("Commands are:\n"); for (cc = 0, cp = cmdtab; cp->c_name != NULL; cp++) { diff --git a/usr.bin/mail/cmdtab.c b/usr.bin/mail/cmdtab.c index c5d5063ee22..c7b1cdd0fa5 100644 --- a/usr.bin/mail/cmdtab.c +++ b/usr.bin/mail/cmdtab.c @@ -1,3 +1,5 @@ +/* $OpenBSD: cmdtab.c,v 1.2 1996/03/27 19:32:31 niklas Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. @@ -33,7 +35,7 @@ #ifndef lint static char sccsid[] = "from: @(#)cmdtab.c 8.1 (Berkeley) 6/6/93"; -static char rcsid[] = "$Id: cmdtab.c,v 1.1 1995/10/18 08:45:38 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cmdtab.c,v 1.2 1996/03/27 19:32:31 niklas Exp $"; #endif /* not lint */ #include "def.h" @@ -45,7 +47,7 @@ static char rcsid[] = "$Id: cmdtab.c,v 1.1 1995/10/18 08:45:38 deraadt Exp $"; * Define all of the command names and bindings. */ -struct cmd cmdtab[] = { +const struct cmd cmdtab[] = { "next", next, NDMLIST, 0, MMNDEL, "alias", group, M|RAWLIST, 0, 1000, "print", type, MSGLIST, 0, MMNDEL, diff --git a/usr.bin/mail/extern.h b/usr.bin/mail/extern.h index 616235810e9..469a3faddec 100644 --- a/usr.bin/mail/extern.h +++ b/usr.bin/mail/extern.h @@ -1,3 +1,5 @@ +/* $OpenBSD: extern.h,v 1.2 1996/03/27 19:32:32 niklas Exp $ */ + /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -156,7 +158,7 @@ int ishead __P((char [])); int isign __P((char *, struct ignoretab [])); int isprefix __P((char *, char *)); void istrcpy __P((char *, char *)); -struct cmd * +const struct cmd * lex __P((char [])); void load __P((char *)); struct var * diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c index 733f1d237cc..d5741a0bbfa 100644 --- a/usr.bin/mail/lex.c +++ b/usr.bin/mail/lex.c @@ -1,3 +1,5 @@ +/* $OpenBSD: lex.c,v 1.2 1996/03/27 19:32:33 niklas Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. @@ -33,7 +35,7 @@ #ifndef lint static char sccsid[] = "from: @(#)lex.c 8.1 (Berkeley) 6/6/93"; -static char rcsid[] = "$Id: lex.c,v 1.1 1995/10/18 08:45:39 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: lex.c,v 1.2 1996/03/27 19:32:33 niklas Exp $"; #endif /* not lint */ #include "rcv.h" @@ -247,7 +249,7 @@ execute(linebuf, contxt) { char word[LINESIZE]; char *arglist[MAXARGC]; - struct cmd *com; + const struct cmd *com; register char *cp, *cp2; register int c; int muvec[2]; @@ -452,12 +454,12 @@ setmsize(sz) * to the passed command "word" */ -struct cmd * +const struct cmd * lex(word) char word[]; { - register struct cmd *cp; - extern struct cmd cmdtab[]; + extern const struct cmd cmdtab[]; + register const struct cmd *cp; for (cp = &cmdtab[0]; cp->c_name != NOSTR; cp++) if (isprefix(word, cp->c_name)) |