Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mail fix nested externs



details:   https://anonhg.NetBSD.org/src/rev/3541bba10153
branches:  trunk
changeset: 503379:3541bba10153
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 05 02:07:52 2001 +0000

description:
fix nested externs
rename raise to upcase to avoid clash with raise(3)

diffstat:

 usr.bin/mail/aux.c     |   6 +++---
 usr.bin/mail/cmd1.c    |   6 +++---
 usr.bin/mail/cmd2.c    |   6 +++---
 usr.bin/mail/collect.c |  11 +++++------
 usr.bin/mail/edit.c    |   6 +++---
 usr.bin/mail/extern.h  |   6 +++---
 usr.bin/mail/fio.c     |   8 ++++----
 usr.bin/mail/lex.c     |  12 ++++++------
 usr.bin/mail/list.c    |  12 ++++++------
 usr.bin/mail/main.c    |   8 ++++----
 usr.bin/mail/names.c   |   7 ++++---
 usr.bin/mail/quit.c    |   9 +++++----
 usr.bin/mail/send.c    |   7 ++++---
 13 files changed, 53 insertions(+), 51 deletions(-)

diffs (truncated from 517 to 300 lines):

diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/aux.c
--- a/usr.bin/mail/aux.c        Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/aux.c        Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aux.c,v 1.10 1998/12/19 16:30:52 christos Exp $        */
+/*     $NetBSD: aux.c,v 1.11 2001/02/05 02:07:52 christos Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)aux.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: aux.c,v 1.10 1998/12/19 16:30:52 christos Exp $");
+__RCSID("$NetBSD: aux.c,v 1.11 2001/02/05 02:07:52 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -628,7 +628,7 @@
  * Convert c to upper case
  */
 int
-raise(c)
+upcase(c)
        int c;
 {
 
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/cmd1.c
--- a/usr.bin/mail/cmd1.c       Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/cmd1.c       Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmd1.c,v 1.13 2000/02/10 12:34:42 tron Exp $   */
+/*     $NetBSD: cmd1.c,v 1.14 2001/02/05 02:07:52 christos Exp $       */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)cmd1.c     8.2 (Berkeley) 4/20/95";
 #else
-__RCSID("$NetBSD: cmd1.c,v 1.13 2000/02/10 12:34:42 tron Exp $");
+__RCSID("$NetBSD: cmd1.c,v 1.14 2001/02/05 02:07:52 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,6 +50,7 @@
  *
  * User commands.
  */
+extern const struct cmd cmdtab[];
 
 /*
  * Print the current active headings.
@@ -235,7 +236,6 @@
 pcmdlist(v)
        void *v;
 {
-       extern const struct cmd cmdtab[];
        const struct cmd *cp;
        int cc;
 
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/cmd2.c
--- a/usr.bin/mail/cmd2.c       Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/cmd2.c       Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmd2.c,v 1.10 2000/02/10 12:34:43 tron Exp $   */
+/*     $NetBSD: cmd2.c,v 1.11 2001/02/05 02:07:52 christos Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)cmd2.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: cmd2.c,v 1.10 2000/02/10 12:34:43 tron Exp $");
+__RCSID("$NetBSD: cmd2.c,v 1.11 2001/02/05 02:07:52 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,6 +50,7 @@
  *
  * More user commands.
  */
+extern int wait_status;
 static int igcomp __P((const void *, const void *));
 
 /*
@@ -382,7 +383,6 @@
        void *v;
 {
        int pid;
-       extern int wait_status;
 
        switch (pid = vfork()) {
        case -1:
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/collect.c
--- a/usr.bin/mail/collect.c    Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/collect.c    Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: collect.c,v 1.20 2000/02/10 12:34:43 tron Exp $        */
+/*     $NetBSD: collect.c,v 1.21 2001/02/05 02:07:53 christos Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)collect.c  8.2 (Berkeley) 4/19/94";
 #else
-__RCSID("$NetBSD: collect.c,v 1.20 2000/02/10 12:34:43 tron Exp $");
+__RCSID("$NetBSD: collect.c,v 1.21 2001/02/05 02:07:53 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -52,6 +52,9 @@
 #include "rcv.h"
 #include "extern.h"
 
+extern char *tempMail;
+extern char *tempEdit;
+
 /*
  * Read a message from standard output and return a read file to it
  * or NULL on error.
@@ -84,7 +87,6 @@
        int lc, cc, escape, eofcount;
        int c, t;
        char linebuf[LINESIZE], *cp;
-       extern char *tempMail;
        char getsub;
        sigset_t nset;
        int longline, lastlong, rc;     /* So we don't make 2 or more lines
@@ -334,7 +336,6 @@
                                break;
 
                        if (*cp == '!') {       /* insert stdout of command */
-                               extern char *tempEdit;
                                char *shell;
                                int nullfd;
                                int rc;
@@ -564,7 +565,6 @@
 {
        FILE *nf;
        sig_t sigint = signal(SIGINT, SIG_IGN);
-       extern char *tempEdit;
        char *shell;
 
        if ((nf = Fopen(tempEdit, "w+")) == NULL) {
@@ -613,7 +613,6 @@
        int f;
 {
        int *msgvec;
-       extern char *tempMail;
        struct ignoretab *ig;
        char *tabst;
 
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/edit.c
--- a/usr.bin/mail/edit.c       Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/edit.c       Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: edit.c,v 1.7 1997/11/25 17:58:17 bad Exp $     */
+/*     $NetBSD: edit.c,v 1.8 2001/02/05 02:07:53 christos Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)edit.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: edit.c,v 1.7 1997/11/25 17:58:17 bad Exp $");
+__RCSID("$NetBSD: edit.c,v 1.8 2001/02/05 02:07:53 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,6 +50,7 @@
  *
  * Perform message editing functions.
  */
+extern char *tempEdit;
 
 /*
  * Edit a message list.
@@ -156,7 +157,6 @@
        time_t modtime;
        char *edit;
        struct stat statb;
-       extern char *tempEdit;
 
        if ((t = creat(tempEdit, readonly ? 0400 : 0600)) < 0) {
                perror(tempEdit);
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/extern.h
--- a/usr.bin/mail/extern.h     Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/extern.h     Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.11 2000/02/10 12:34:43 tron Exp $ */
+/*     $NetBSD: extern.h,v 1.12 2001/02/05 02:07:53 christos Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  *     @(#)extern.h    8.2 (Berkeley) 4/20/95 
- *     $NetBSD: extern.h,v 1.11 2000/02/10 12:34:43 tron Exp $
+ *     $NetBSD: extern.h,v 1.12 2001/02/05 02:07:53 christos Exp $
  */
 
 struct name;
@@ -203,7 +203,7 @@
 int     pversion __P((void *));
 void    quit __P((void));
 int     quitcmd __P((void *));
-int     raise __P((int));
+int     upcase __P((int));
 int     readline __P((FILE *, char *, int));
 void    register_file __P((FILE *, int, int));
 void    regret __P((int));
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/fio.c
--- a/usr.bin/mail/fio.c        Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/fio.c        Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fio.c,v 1.12 1998/12/19 16:32:34 christos Exp $        */
+/*     $NetBSD: fio.c,v 1.13 2001/02/05 02:07:53 christos Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fio.c      8.2 (Berkeley) 4/20/95";
 #else
-__RCSID("$NetBSD: fio.c,v 1.12 1998/12/19 16:32:34 christos Exp $");
+__RCSID("$NetBSD: fio.c,v 1.13 2001/02/05 02:07:53 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,6 +50,8 @@
  *
  * File I/O.
  */
+extern int wait_status;
+extern char *tmpdir;
 
 /*
  * Set up the input pointers while copying the mail file into /tmp.
@@ -59,7 +61,6 @@
        FILE *ibuf;
        off_t offset;
 {
-       extern char *tmpdir;
        int c, count;
        char *cp, *cp2;
        struct message this;
@@ -355,7 +356,6 @@
        char *cp, *shell;
        int pivec[2];
        struct stat sbuf;
-       extern int wait_status;
 
        /*
         * The order of evaluation is "%" and "#" expand into constants.
diff -r 688e76b959d9 -r 3541bba10153 usr.bin/mail/lex.c
--- a/usr.bin/mail/lex.c        Mon Feb 05 01:56:51 2001 +0000
+++ b/usr.bin/mail/lex.c        Mon Feb 05 02:07:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lex.c,v 1.15 2000/07/06 14:12:31 ad Exp $      */
+/*     $NetBSD: lex.c,v 1.16 2001/02/05 02:07:53 christos Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)lex.c      8.2 (Berkeley) 4/20/95";
 #else
-__RCSID("$NetBSD: lex.c,v 1.15 2000/07/06 14:12:31 ad Exp $");
+__RCSID("$NetBSD: lex.c,v 1.16 2001/02/05 02:07:53 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,6 +51,10 @@
  * Lexical processing of commands.
  */
 
+extern char *version;
+extern const struct cmd cmdtab[];
+extern char *tempMesg;
+
 char   *prompt = "& ";
 
 /*
@@ -69,7 +73,6 @@
        char isedit = *name != '%' || getuserid(myname) != getuid();
        char *who = name[1] ? name + 1 : myname;
        static int shudclob;
-       extern char *tempMesg;
 
        if ((name = expand(name)) == NOSTR)
                return -1;
@@ -502,7 +505,6 @@
 lex(word)
        char word[];
 {



Home | Main Index | Thread Index | Old Index