diff options
author | ceastha <none@none> | 2005-08-18 15:40:59 -0700 |
---|---|---|
committer | ceastha <none@none> | 2005-08-18 15:40:59 -0700 |
commit | b7d62af5b42f0da2eb668e8d33d24d2f4fdd98a8 (patch) | |
tree | 365a354cfe8236488955cf206e4f43644ca03ea0 /usr/src/cmd/mail | |
parent | d6555420322a42c16b93414c29a62f8e841abc7b (diff) | |
download | illumos-joyent-b7d62af5b42f0da2eb668e8d33d24d2f4fdd98a8.tar.gz |
6268906 ucbcmd/plot and gcc don't get along
6271073 gcc and cmd/fmt don't get along
6271996 gcc and cmd/mail don't get along
6272084 gcc and cmd/pax don't get along
6273914 gcc and cmd/tar don't get along
--HG--
rename : usr/src/cmd/fmt/head.c => deleted_files/usr/src/cmd/fmt/head.c
rename : usr/src/cmd/mail/maid.c => deleted_files/usr/src/cmd/mail/maid.c
Diffstat (limited to 'usr/src/cmd/mail')
-rw-r--r-- | usr/src/cmd/mail/Makefile | 4 | ||||
-rw-r--r-- | usr/src/cmd/mail/add_recip.c | 20 | ||||
-rw-r--r-- | usr/src/cmd/mail/copylet.c | 18 | ||||
-rw-r--r-- | usr/src/cmd/mail/getcomment.c | 17 | ||||
-rw-r--r-- | usr/src/cmd/mail/gethead.c | 33 | ||||
-rw-r--r-- | usr/src/cmd/mail/islocal.c | 10 | ||||
-rw-r--r-- | usr/src/cmd/mail/istext.c | 16 | ||||
-rw-r--r-- | usr/src/cmd/mail/maid.c | 29 | ||||
-rw-r--r-- | usr/src/cmd/mail/mail.h | 15 | ||||
-rw-r--r-- | usr/src/cmd/mail/main.c | 14 | ||||
-rw-r--r-- | usr/src/cmd/mail/parse.c | 17 | ||||
-rw-r--r-- | usr/src/cmd/mail/pckaffspot.c | 13 | ||||
-rw-r--r-- | usr/src/cmd/mail/pckrcvspot.c | 13 | ||||
-rw-r--r-- | usr/src/cmd/mail/pipletr.c | 16 | ||||
-rw-r--r-- | usr/src/cmd/mail/printhdr.c | 22 | ||||
-rw-r--r-- | usr/src/cmd/mail/sel_disp.c | 14 | ||||
-rw-r--r-- | usr/src/cmd/mail/sendlist.c | 22 |
17 files changed, 142 insertions, 151 deletions
diff --git a/usr/src/cmd/mail/Makefile b/usr/src/cmd/mail/Makefile index edc35db692..648d786859 100644 --- a/usr/src/cmd/mail/Makefile +++ b/usr/src/cmd/mail/Makefile @@ -21,7 +21,7 @@ # # # -# Copyright 1989, 2002 Sun Microsystems, Inc. All rights reserved. +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -51,7 +51,7 @@ MAILOBJS= add_recip.o cat.o ckdlivopts.o \ pickFrom.o pipletr.o poplist.o printhdr.o printmail.o \ pushlist.o savehdrs.o sel_disp.o sendlist.o \ sendmail.o setsig.o \ - stamp.o Tout.o maid.o + stamp.o Tout.o MAILSRC= $(MAILOBJS:%.o=%.c) diff --git a/usr/src/cmd/mail/add_recip.c b/usr/src/cmd/mail/add_recip.c index 29159034a1..13fb8519b3 100644 --- a/usr/src/cmd/mail/add_recip.c +++ b/usr/src/cmd/mail/add_recip.c @@ -19,19 +19,23 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 1.5 */ /* NAME add_recip, madd_recip - add recipients to recipient list SYNOPSIS int add_recip(reciplist *plist, char *name, int checkdups) - int madd_recip(reciplist *plist, char *name, int checkdups) + void madd_recip(reciplist *plist, char *name, int checkdups) DESCRIPTION add_recip() adds the name to the recipient linked list. @@ -44,10 +48,8 @@ #include "mail.h" -add_recip (plist, name, checkdups) -reciplist *plist; -char *name; -int checkdups; +int +add_recip(reciplist *plist, char *name, int checkdups) { char *p; static char pn[] = "add_recip"; @@ -95,10 +97,8 @@ int checkdups; return(1); } -madd_recip (plist, namelist, checkdups) -reciplist *plist; -char *namelist; -int checkdups; +void +madd_recip(reciplist *plist, char *namelist, int checkdups) { char *name; for (name = strtok(namelist, " \t"); name; name = strtok((char*)0, " \t")) diff --git a/usr/src/cmd/mail/copylet.c b/usr/src/cmd/mail/copylet.c index 2e61f9b1f2..63e02034b4 100644 --- a/usr/src/cmd/mail/copylet.c +++ b/usr/src/cmd/mail/copylet.c @@ -19,18 +19,18 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" + /* NAME copylet - copy a given letter to a file pointer @@ -49,8 +49,8 @@ Returns TRUE on a completely successful copy. */ -copylet(letnum, f, type) -register FILE *f; +int +copylet(int letnum, FILE *f, int type) { int pos = ftell(f); int rc = xxxcopylet(letnum, f, type); @@ -68,8 +68,8 @@ register FILE *f; return(rc); } -xxxcopylet(letnum, f, type) -register FILE *f; +int +xxxcopylet(int letnum, FILE *f, int type) { static char pn[] = "copylet"; char buf[LSIZE], lastc; diff --git a/usr/src/cmd/mail/getcomment.c b/usr/src/cmd/mail/getcomment.c index ff258f31e9..ac8674c066 100644 --- a/usr/src/cmd/mail/getcomment.c +++ b/usr/src/cmd/mail/getcomment.c @@ -19,12 +19,17 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 2. */ + #include "mail.h" /* * Get comment field, if any, from line. @@ -33,12 +38,12 @@ * -1 ==> no closing (terminating) paren found for comment. */ -getcomment(s, q) -register char *s; -register char *q; /* Copy comment, if found, to here */ +int +getcomment(char *s, char *q) + /* Copy comment, if found, to q */ { - register char *p, *sav_q; - register int depth = 0; + char *p, *sav_q; + int depth = 0; if ((p = strchr(s, '(')) == (char *)NULL) { /* no comment found */ diff --git a/usr/src/cmd/mail/gethead.c b/usr/src/cmd/mail/gethead.c index 6b72936efb..be671b8a23 100644 --- a/usr/src/cmd/mail/gethead.c +++ b/usr/src/cmd/mail/gethead.c @@ -19,15 +19,14 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - /* - * Copyright 2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" @@ -200,7 +199,7 @@ gethead(int current, int all) } void -tmperr() +tmperr(void) { fclose(tmpf); errmsg(E_TMP, ""); @@ -210,8 +209,8 @@ tmperr() * Write a string out to tmp file, with error checking. * Return 1 on success, else 0 */ -wtmpf(str, length) -char *str; +int +wtmpf(char *str, int length) { if (fwrite(str, 1, length, tmpf) != length) { tmperr(); @@ -225,10 +224,7 @@ char *str; * return number of bytes in length */ int -getline(ptr2line, max, f) -char *ptr2line; -int max; -FILE *f; +getline(char *ptr2line, int max, FILE *f) { int i, ch; for (i = 0; i < max-1 && (ch = getc(f)) != EOF; ) @@ -241,7 +237,7 @@ FILE *f; * Make temporary file for letter */ void -mktmp() +mktmp(void) { static char tmpl[] = "/var/tmp/mailXXXXXX"; int fd = mkstemp(lettmp = tmpl); @@ -257,8 +253,8 @@ mktmp() * Get a number from user's reply, * return its value or zero if none present, -1 on error */ -getnumbr(s) -char *s; +int +getnumbr(char *s) { int k = 0; @@ -283,7 +279,8 @@ char *s; * If valid msgnum return 1, * else print message and return 0 */ -validmsg(i) +int +validmsg(int i) { if ((i < 0) || (i > nlet)) { printf("No such message\n"); @@ -296,9 +293,7 @@ validmsg(i) * Set letter to passed status, and adjust changed as necessary */ void -setletr(letter, status) -int letter; -int status; +setletr(int letter, int status) { if (status == ' ') { if (let[letter].change != ' ') diff --git a/usr/src/cmd/mail/islocal.c b/usr/src/cmd/mail/islocal.c index ae0a4772d5..508f6b7b70 100644 --- a/usr/src/cmd/mail/islocal.c +++ b/usr/src/cmd/mail/islocal.c @@ -19,6 +19,11 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -30,9 +35,8 @@ /* * islocal (char *user, uid_t *puid) - see if user exists on this system */ -islocal(user, puid) -char *user; -uid_t *puid; +int +islocal(char *user, uid_t *puid) { char fname[MAXPATHLEN]; struct stat statb; diff --git a/usr/src/cmd/mail/istext.c b/usr/src/cmd/mail/istext.c index 799d51f159..72d5ce5d1d 100644 --- a/usr/src/cmd/mail/istext.c +++ b/usr/src/cmd/mail/istext.c @@ -19,23 +19,27 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1. */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include "mail.h" /* * istext(line, size) - check for text characters */ int -istext(s, size) -register unsigned char *s; -int size; +istext(unsigned char *s, int size) { - register unsigned char *ep; - register c; + unsigned char *ep; + int c; for (ep = s+size; --ep >= s; ) { c = *ep; diff --git a/usr/src/cmd/mail/maid.c b/usr/src/cmd/mail/maid.c deleted file mode 100644 index e2eb72780e..0000000000 --- a/usr/src/cmd/mail/maid.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ -ma_id() { -static char mastamp[]="@{#}@{#} ma.sl 2.116"; -static char mawhat[]="@(#) ma.sl 2.116"; } diff --git a/usr/src/cmd/mail/mail.h b/usr/src/cmd/mail/mail.h index e22a541778..35c3296ee5 100644 --- a/usr/src/cmd/mail/mail.h +++ b/usr/src/cmd/mail/mail.h @@ -19,15 +19,14 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #ifndef _MAIL_H #define _MAIL_H @@ -332,7 +331,7 @@ extern void createmf(uid_t uid, char *file); extern void del_reciplist (reciplist *list); extern void delete(int); extern void doFopt(void); -extern void done(int); +extern void done(int) __NORETURN; extern void sig_done(int); extern FILE *doopen(char *file, char *type, int errnum); extern int dowait(pid_t pidval); @@ -355,7 +354,7 @@ extern int islocal(char *user, uid_t *puid); extern int istext(unsigned char *s, int size); extern int legal(char *file); extern void lock(char *user); -extern int madd_recip(reciplist *plist, char *name, int checkdups); +extern void madd_recip(reciplist *plist, char *name, int checkdups); extern char *mailcompile(string *pattern, int *retlen, int *retnbra); extern void mkdead(void); extern void mktmp(void); @@ -433,7 +432,7 @@ extern int islocal(); extern int istext(); extern int legal(); extern void lock(); -extern int madd_recip(); +extern void madd_recip(); extern char *mailcompile(); extern void mkdead(); extern void mktmp(); diff --git a/usr/src/cmd/mail/main.c b/usr/src/cmd/mail/main.c index ffe89d581c..009e02cb3b 100644 --- a/usr/src/cmd/mail/main.c +++ b/usr/src/cmd/mail/main.c @@ -19,14 +19,14 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" @@ -39,8 +39,8 @@ * mail [ -tw ] [ -m messagetype ] persons * rmail [ -tw ] persons */ -main(argc, argv) -char **argv; +int +main(int argc, char **argv) { register int i; char *cptr, *p; @@ -240,5 +240,5 @@ char **argv; sending = TRUE; sendmail(argc, argv); } - done(0); /*NOTREACHED*/ + done(0); } diff --git a/usr/src/cmd/mail/parse.c b/usr/src/cmd/mail/parse.c index c449264b16..6fc32764f1 100644 --- a/usr/src/cmd/mail/parse.c +++ b/usr/src/cmd/mail/parse.c @@ -19,22 +19,27 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 2.1 */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include "mail.h" /* Parse the command line. Return index of first non-option field (i.e. user) */ -parse(argc, argv) -int argc; -char **argv; +int +parse(int argc, char **argv) { - register int c; - register char *tmailsurr; + int c; + char *tmailsurr; static char pn[] = "parse"; /* diff --git a/usr/src/cmd/mail/pckaffspot.c b/usr/src/cmd/mail/pckaffspot.c index 51cddaf0e5..7ffdf6e08b 100644 --- a/usr/src/cmd/mail/pckaffspot.c +++ b/usr/src/cmd/mail/pckaffspot.c @@ -19,12 +19,16 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #pragma ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 2. */ + #include "mail.h" /* * If any H_AFWDFROM lines in msg, decide where to put them. @@ -33,10 +37,11 @@ * > 0 ==> Header line type after (before) which to place H_AFWDFROM * lines and H_AFWDCNT */ -pckaffspot() +int +pckaffspot(void) { static char pn[] = "pckaffspot"; - register int rc; + int rc; if (hdrlines[H_AFWDFROM].head == (struct hdrs *)NULL) { rc = -1; diff --git a/usr/src/cmd/mail/pckrcvspot.c b/usr/src/cmd/mail/pckrcvspot.c index 87fbfdbbcc..bde3dfa851 100644 --- a/usr/src/cmd/mail/pckrcvspot.c +++ b/usr/src/cmd/mail/pckrcvspot.c @@ -19,12 +19,16 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #pragma ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 2. */ + #include "mail.h" /* * If any H_RECEIVED lines in msg, decide where to put them. @@ -32,10 +36,11 @@ * -1 ==> No H_RECEIVED lines to be printed. * > 0 ==> Header line type after (before) which to place H_RECEIVED lines */ -pckrcvspot() +int +pckrcvspot(void) { static char pn[] = "pckrcvspot"; - register int rc; + int rc; if (hdrlines[H_RECEIVED].head == (struct hdrs *)NULL) { rc = -1; diff --git a/usr/src/cmd/mail/pipletr.c b/usr/src/cmd/mail/pipletr.c index cfc22ac017..557d8bbcf1 100644 --- a/usr/src/cmd/mail/pipletr.c +++ b/usr/src/cmd/mail/pipletr.c @@ -19,18 +19,22 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" -dowait(pidval) -pid_t pidval; +int +dowait(pid_t pidval) { - register pid_t w; + pid_t w; int status; void (*istat)(), (*qstat)(); @@ -61,8 +65,8 @@ pid_t pidval; return: status -> command exit status */ -systm(s) -char *s; +int +systm(char *s) { pid_t pid; diff --git a/usr/src/cmd/mail/printhdr.c b/usr/src/cmd/mail/printhdr.c index 4852a0aa8d..9188793dcd 100644 --- a/usr/src/cmd/mail/printhdr.c +++ b/usr/src/cmd/mail/printhdr.c @@ -19,27 +19,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 2. */ - - /* - * Copyright 2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" + #include "mail.h" -printhdr(type, hdrtype, hptr, fp) -int hdrtype; -struct hdrs *hptr; -FILE *fp; +int +printhdr(int type, int hdrtype, struct hdrs *hptr, FILE *fp) { char buf[1024]; - register int n; + int n; struct hdrs *contptr; diff --git a/usr/src/cmd/mail/sel_disp.c b/usr/src/cmd/mail/sel_disp.c index 9b228d674d..0049391ef9 100644 --- a/usr/src/cmd/mail/sel_disp.c +++ b/usr/src/cmd/mail/sel_disp.c @@ -19,10 +19,14 @@ * * CDDL HEADER END */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" @@ -34,13 +38,11 @@ * the default output mode will be listed in the seldisp[] array. * This can all be overridden via the 'P' command at the ? prompt. */ -sel_disp (type, hdrtype, s) -int type; -int hdrtype; -char *s; +int +sel_disp(int type, int hdrtype, char *s) { static char pn[] = "sel_disp"; - register char *p; + char *p; static int sav_lastrc = 0; int i, rc = 0; diff --git a/usr/src/cmd/mail/sendlist.c b/usr/src/cmd/mail/sendlist.c index 9bde5837d5..00d5696a33 100644 --- a/usr/src/cmd/mail/sendlist.c +++ b/usr/src/cmd/mail/sendlist.c @@ -19,14 +19,13 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ - - /* - * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ + #pragma ident "%Z%%M% %I% %E% SMI" #include "mail.h" @@ -53,11 +52,10 @@ static char *sendmail_prog = SENDMAIL; +static void notifybiff(char *); + int -sendlist(list, letnum, level) -reciplist *list; -int letnum; -int level; +sendlist(reciplist *list, int letnum, int level) { recip *to; int rc = 0; @@ -141,9 +139,7 @@ int level; int -send_mbox(mbox, letnum) -char *mbox; -int letnum; +send_mbox(char *mbox, int letnum) { char file[PATH_MAX]; char biffmsg[PATH_MAX]; @@ -211,8 +207,8 @@ done: #include <sys/socket.h> #include <netinet/in.h> -notifybiff(msg) - char *msg; +static void +notifybiff(char *msg) { static struct sockaddr_in addr; static int f = -1; |