diff options
author | charnier <charnier@FreeBSD.org> | 2010-12-19 16:25:23 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2010-12-19 16:25:23 +0000 |
commit | f4859bef574232113ba3dcc6bb533d0d9e06d304 (patch) | |
tree | cb3d657c33bdf93a7127358a4d9a36796aa4d3dd /usr.bin/mail/cmd2.c | |
parent | 708cd7af18dda847027342ccd0ee5ec588215d93 (diff) | |
download | FreeBSD-src-f4859bef574232113ba3dcc6bb533d0d9e06d304.zip FreeBSD-src-f4859bef574232113ba3dcc6bb533d0d9e06d304.tar.gz |
Add __unused. Ansi prototypes.
Diffstat (limited to 'usr.bin/mail/cmd2.c')
-rw-r--r-- | usr.bin/mail/cmd2.c | 66 |
1 files changed, 20 insertions, 46 deletions
diff --git a/usr.bin/mail/cmd2.c b/usr.bin/mail/cmd2.c index a6b3a28..dd7f6dd 100644 --- a/usr.bin/mail/cmd2.c +++ b/usr.bin/mail/cmd2.c @@ -53,8 +53,7 @@ extern int wait_status; * If given as first command with no arguments, print first message. */ int -next(msgvec) - int *msgvec; +next(int *msgvec) { struct message *mp; int *ip, *ip2, list[2], mdot; @@ -131,8 +130,7 @@ hitit: * so we can discard when the user quits. */ int -save(str) - char str[]; +save(char str[]) { return (save1(str, 1, "save", saveignore)); @@ -142,8 +140,7 @@ save(str) * Copy a message to a file without affected its saved-ness */ int -copycmd(str) - char str[]; +copycmd(char str[]) { return (save1(str, 0, "copy", saveignore)); @@ -154,11 +151,7 @@ copycmd(str) * If mark is true, mark the message "saved." */ int -save1(str, mark, cmd, ignore) - char str[]; - int mark; - const char *cmd; - struct ignoretab *ignore; +save1(char str[], int mark, const char *cmd, struct ignoretab *ignore) { struct message *mp; char *file; @@ -215,8 +208,7 @@ save1(str, mark, cmd, ignore) * file name, minus header and trailing blank line. */ int -swrite(str) - char str[]; +swrite(char str[]) { return (save1(str, 1, "write", ignoreall)); @@ -232,9 +224,7 @@ swrite(str) */ char * -snarf(linebuf, flag) - char linebuf[]; - int *flag; +snarf(char linebuf[], int *flag) { char *cp; @@ -270,8 +260,7 @@ snarf(linebuf, flag) * Delete messages. */ int -delete(msgvec) - int msgvec[]; +delete(int msgvec[]) { delm(msgvec); @@ -282,8 +271,7 @@ delete(msgvec) * Delete messages, then type the new dot. */ int -deltype(msgvec) - int msgvec[]; +deltype(int msgvec[]) { int list[2]; int lastdot; @@ -308,8 +296,7 @@ deltype(msgvec) * Internal interface. */ int -delm(msgvec) - int *msgvec; +delm(int *msgvec) { struct message *mp; int *ip, last; @@ -346,8 +333,7 @@ delm(msgvec) * Undelete the indicated messages. */ int -undelete_messages(msgvec) - int *msgvec; +undelete_messages(int *msgvec) { struct message *mp; int *ip; @@ -365,7 +351,7 @@ undelete_messages(msgvec) * Interactively dump core on "core" */ int -core() +core(void) { int pid; @@ -391,8 +377,7 @@ core() * Clobber as many bytes of stack as the user requests. */ int -clobber(argv) - char **argv; +clobber(char **argv) { int times; @@ -408,8 +393,7 @@ clobber(argv) * Clobber the stack. */ void -clob1(n) - int n; +clob1(int n) { char buf[512]; char *cp; @@ -426,8 +410,7 @@ clob1(n) * If no arguments, print the current list of retained fields. */ int -retfield(list) - char *list[]; +retfield(char *list[]) { return (ignore1(list, ignore + 1, "retained")); @@ -438,34 +421,28 @@ retfield(list) * If no arguments, print the current list of ignored fields. */ int -igfield(list) - char *list[]; +igfield(char *list[]) { return (ignore1(list, ignore, "ignored")); } int -saveretfield(list) - char *list[]; +saveretfield(char *list[]) { return (ignore1(list, saveignore + 1, "retained")); } int -saveigfield(list) - char *list[]; +saveigfield(char *list[]) { return (ignore1(list, saveignore, "ignored")); } int -ignore1(list, tab, which) - char *list[]; - struct ignoretab *tab; - const char *which; +ignore1(char *list[], struct ignoretab *tab, const char *which) { char field[LINESIZE]; int h; @@ -494,9 +471,7 @@ ignore1(list, tab, which) * Print out all currently retained fields. */ int -igshow(tab, which) - struct ignoretab *tab; - const char *which; +igshow(struct ignoretab *tab, const char *which) { int h; struct ignore *igp; @@ -522,8 +497,7 @@ igshow(tab, which) * Compare two names for sorting ignored field list. */ int -igcomp(l, r) - const void *l, *r; +igcomp(const void *l, const void *r) { return (strcmp(*(const char **)l, *(const char **)r)); |