aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mail/util.c')
-rw-r--r--usr.bin/mail/util.c69
1 files changed, 19 insertions, 50 deletions
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c
index 3df22e0c0ee9..461738df2001 100644
--- a/usr.bin/mail/util.c
+++ b/usr.bin/mail/util.c
@@ -52,8 +52,7 @@ static char *save2str(char *, char *);
* Return a pointer to a dynamic copy of the argument.
*/
char *
-savestr(str)
- char *str;
+savestr(char *str)
{
char *new;
int size = strlen(str) + 1;
@@ -67,8 +66,7 @@ savestr(str)
* Make a copy of new argument incorporating old one.
*/
static char *
-save2str(str, old)
- char *str, *old;
+save2str(char *str, char *old)
{
char *new;
int newsize = strlen(str) + 1;
@@ -90,8 +88,7 @@ save2str(str, old)
* back to the system mailbox on exit.
*/
void
-touch(mp)
- struct message *mp;
+touch(struct message *mp)
{
mp->m_flag |= MTOUCH;
@@ -104,8 +101,7 @@ touch(mp)
* Return true if it is.
*/
int
-isdir(name)
- char name[];
+isdir(char name[])
{
struct stat sbuf;
@@ -118,8 +114,7 @@ isdir(name)
* Count the number of arguments in the given string raw list.
*/
int
-argcount(argv)
- char **argv;
+argcount(char **argv)
{
char **ap;
@@ -133,9 +128,7 @@ argcount(argv)
* pointer (or NULL if the desired header field is not available).
*/
char *
-hfield(field, mp)
- const char *field;
- struct message *mp;
+hfield(const char *field, struct message *mp)
{
FILE *ibuf;
char linebuf[LINESIZE];
@@ -164,11 +157,7 @@ hfield(field, mp)
* Must deal with \ continuations & other such fraud.
*/
int
-gethfield(f, linebuf, rem, colon)
- FILE *f;
- char linebuf[];
- int rem;
- char **colon;
+gethfield(FILE *f, char linebuf[], int rem, char **colon)
{
char line2[LINESIZE];
char *cp, *cp2;
@@ -223,10 +212,7 @@ gethfield(f, linebuf, rem, colon)
*/
char*
-ishfield(linebuf, colon, field)
- char linebuf[];
- char *colon;
- const char *field;
+ishfield(char linebuf[], char *colon, const char *field)
{
char *cp = colon;
@@ -246,10 +232,7 @@ ishfield(linebuf, colon, field)
* dsize: space left in buffer (including space for NULL)
*/
void
-istrncpy(dest, src, dsize)
- char *dest;
- const char *src;
- size_t dsize;
+istrncpy(char *dest, const char *src, size_t dsize)
{
strlcpy(dest, src, dsize);
@@ -278,8 +261,7 @@ static struct sstack sstack[SSTACK_SIZE];
* that they are no longer reading from a tty (in all probability).
*/
int
-source(arglist)
- char **arglist;
+source(char **arglist)
{
FILE *fi;
char *cp;
@@ -311,7 +293,7 @@ source(arglist)
* Update the "sourcing" flag as appropriate.
*/
int
-unstack()
+unstack(void)
{
if (ssp <= 0) {
printf("\"Source\" stack over-pop.\n");
@@ -335,8 +317,7 @@ unstack()
* This is nifty for the shell.
*/
void
-alter(name)
- char *name;
+alter(char *name)
{
struct stat sb;
struct timeval tv[2];
@@ -355,9 +336,7 @@ alter(name)
* before returning it.
*/
char *
-nameof(mp, reptype)
- struct message *mp;
- int reptype;
+nameof(struct message *mp, int reptype)
{
char *cp, *cp2;
@@ -378,8 +357,7 @@ nameof(mp, reptype)
* Ignore it.
*/
char *
-skip_comment(cp)
- char *cp;
+skip_comment(char *cp)
{
int nesting = 1;
@@ -405,8 +383,7 @@ skip_comment(cp)
* of "host-phrase."
*/
char *
-skin(name)
- char *name;
+skin(char *name)
{
char *nbuf, *bufend, *cp, *cp2;
int c, gotlt, lastsp;
@@ -517,9 +494,7 @@ skin(name)
* 2 -- get sender's name for Reply
*/
char *
-name1(mp, reptype)
- struct message *mp;
- int reptype;
+name1(struct message *mp, int reptype)
{
char namebuf[LINESIZE];
char linebuf[LINESIZE];
@@ -578,9 +553,7 @@ newname:
* Count the occurances of c in str
*/
int
-charcount(str, c)
- char *str;
- int c;
+charcount(char *str, int c)
{
char *cp;
int i;
@@ -595,9 +568,7 @@ charcount(str, c)
* See if the given header field is supposed to be ignored.
*/
int
-isign(field, ignore)
- const char *field;
- struct ignoretab ignore[2];
+isign(const char *field, struct ignoretab ignore[2])
{
char realfld[LINESIZE];
@@ -615,9 +586,7 @@ isign(field, ignore)
}
int
-member(realfield, table)
- char *realfield;
- struct ignoretab *table;
+member(char *realfield, struct ignoretab *table)
{
struct ignore *igp;