diff options
author | mikeh <mikeh@FreeBSD.org> | 2001-05-27 20:26:22 +0000 |
---|---|---|
committer | mikeh <mikeh@FreeBSD.org> | 2001-05-27 20:26:22 +0000 |
commit | aa40e2eac7ab213ab193707b4dec5e4bb0a8325b (patch) | |
tree | 35781af5ff6a267c8e45e7cc6091e7df70c229ce /usr.bin/mail/def.h | |
parent | 83f67b8f31f7864baf3998922833c641684ff0f0 (diff) | |
download | FreeBSD-src-aa40e2eac7ab213ab193707b4dec5e4bb0a8325b.zip FreeBSD-src-aa40e2eac7ab213ab193707b4dec5e4bb0a8325b.tar.gz |
Cleanup mail(1)'s varying styles by converting to using style(9).
Also take a stab at cleaning up BDECFLAGS and convert all uses of
NOSTR, NIL, NONE, NOVAR, NOGRP, NOGE to NULL. Also kill 'register' to
get diffs somewhat closer to OpenBSD/NetBSD.
There are no functional changes however.
Reviewed by: nra (visual inspection)
Diffstat (limited to 'usr.bin/mail/def.h')
-rw-r--r-- | usr.bin/mail/def.h | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h index feb71eb..8b5e4ee 100644 --- a/usr.bin/mail/def.h +++ b/usr.bin/mail/def.h @@ -43,16 +43,18 @@ #include <sys/param.h> #include <sys/stat.h> -#include <sys/time.h> -#include <signal.h> -#include <termios.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> #include <ctype.h> #include <err.h> +#include <paths.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> #include <string.h> +#include <termios.h> +#include <time.h> +#include <unistd.h> + #include "pathnames.h" #define APPEND /* New mail goes to end of mailbox */ @@ -62,9 +64,8 @@ #define PATHSIZE MAXPATHLEN /* Size of pathnames throughout */ #define HSHSIZE 59 /* Hash size for aliases and vars */ #define LINESIZE BUFSIZ /* max readable line width */ -#define STRINGSIZE ((unsigned) 128)/* Dynamic allocation units */ +#define STRINGSIZE ((unsigned)128) /* Dynamic allocation units */ #define MAXARGC 1024 /* Maximum list of raw strings */ -#define NOSTR ((char *) 0) /* Null string pointer */ #define MAXEXP 25 /* Maximum expansion of aliases */ #define equal(a, b) (strcmp(a,b)==0)/* A nice function to string compare */ @@ -96,8 +97,8 @@ struct message { /* * Given a file address, determine the block number it represents. */ -#define blockof(off) ((int) ((off) / 4096)) -#define boffsetof(off) ((int) ((off) % 4096)) +#define blockof(off) ((int)((off) / 4096)) +#define boffsetof(off) ((int)((off) % 4096)) #define positionof(block, offset) ((off_t)(block) * 4096 + (offset)) /* @@ -106,7 +107,7 @@ struct message { * in lex.c */ struct cmd { - char *c_name; /* Name of command */ + const char *c_name; /* Name of command */ int (*c_func)(); /* Implementor of the command */ short c_argtype; /* Type of arglist (see below) */ short c_msgflag; /* Required flags of messages */ @@ -173,13 +174,13 @@ struct headline { */ struct header { - struct name *h_to; /* Dynamic "To:" string */ - char *h_subject; /* Subject string */ - struct name *h_cc; /* Carbon copies string */ - struct name *h_bcc; /* Blind carbon copies */ - char *h_replyto; /* Reply address */ - char *h_inreplyto; /* Reference */ - struct name *h_smopts; /* Sendmail options */ + struct name *h_bcc; /* Blind carbon copies */ + struct name *h_cc; /* Carbon copies string */ + struct name *h_smopts; /* Sendmail options */ + struct name *h_to; /* Dynamic "To:" string */ + char *h_inreplyto; /* Reference */ + char *h_replyto; /* Reply address */ + char *h_subject; /* Subject string */ }; /* @@ -218,20 +219,14 @@ struct grouphead { struct group *g_list; /* Users in group. */ }; -#define NIL ((struct name *) 0) /* The nil pointer for namelists */ -#define NONE ((struct cmd *) 0) /* The nil pointer to command tab */ -#define NOVAR ((struct var *) 0) /* The nil pointer to variables */ -#define NOGRP ((struct grouphead *) 0)/* The nil grouphead pointer */ -#define NOGE ((struct group *) 0) /* The nil group pointer */ - /* * Structure of the hash table of ignored header fields */ struct ignoretab { - int i_count; /* Number of entries */ - struct ignore { - struct ignore *i_link; /* Next ignored field in bucket */ - char *i_field; /* This ignored field */ + int i_count; /* Number of entries */ + struct ignore { + struct ignore *i_link; /* Next ignored field in bucket */ + char *i_field; /* This ignored field */ } *i_head[HSHSIZE]; }; @@ -279,5 +274,5 @@ struct ignoretab { */ #define trunc(stream) { \ (void)fflush(stream); \ - (void)ftruncate(fileno(stream), (long)ftell(stream)); \ + (void)ftruncate(fileno(stream), (off_t)ftell(stream)); \ } |