diff options
author | imp <imp@FreeBSD.org> | 2002-02-03 15:53:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-03 15:53:02 +0000 |
commit | f15fa6acaf2a7df329fb5cad790604693f576999 (patch) | |
tree | 45fb32e48f4b8853e4ea238778aa50091474c0de /libexec/comsat | |
parent | 5a8788fb41a56e1b006239c7d620c0372bba7e50 (diff) | |
download | FreeBSD-src-f15fa6acaf2a7df329fb5cad790604693f576999.zip FreeBSD-src-f15fa6acaf2a7df329fb5cad790604693f576999.tar.gz |
o Eliminate __P
o Use new-style function definitions
o remove some !__STDC__ code
o eliminate register
Diffstat (limited to 'libexec/comsat')
-rw-r--r-- | libexec/comsat/comsat.c | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index a738762..a966002 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -78,19 +78,17 @@ struct utmp *utmp = NULL; time_t lastmsgtime; int nutmp, uf; -void jkfprintf __P((FILE *, char[], char[], off_t)); -void mailfor __P((char *)); -void notify __P((struct utmp *, char[], off_t, int)); -void onalrm __P((int)); -void reapchildren __P((int)); +void jkfprintf(FILE *, char[], char[], off_t); +void mailfor(char *); +void notify(struct utmp *, char[], off_t, int); +void onalrm(int); +void reapchildren(int); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct sockaddr_in from; - register int cc; + int cc; int fromlen; char msgbuf[256]; @@ -134,15 +132,13 @@ main(argc, argv) } void -reapchildren(signo) - int signo; +reapchildren(int signo) { while (wait3(NULL, WNOHANG, NULL) > 0); } void -onalrm(signo) - int signo; +onalrm(int signo) { static u_int utmpsize; /* last malloced size for utmp */ static u_int utmpmtime; /* last modification time for utmp */ @@ -167,11 +163,10 @@ onalrm(signo) } void -mailfor(name) - char *name; +mailfor(char *name) { - register struct utmp *utp = &utmp[nutmp]; - register char *cp; + struct utmp *utp = &utmp[nutmp]; + char *cp; char *file; off_t offset; int folder; @@ -202,11 +197,7 @@ mailfor(name) static char *cr; void -notify(utp, file, offset, folder) - register struct utmp *utp; - char file[]; - off_t offset; - int folder; +notify(struct utmp *utp, char file[], off_t offset, int folder) { FILE *tp; struct stat stb; @@ -247,16 +238,12 @@ notify(utp, file, offset, folder) } void -jkfprintf(tp, user, file, offset) - register FILE *tp; - char user[]; - char file[]; - off_t offset; +jkfprintf(FILE *tp, char user[], char file[], off_t offset) { - register unsigned char *cp, ch; - register FILE *fi; - register int linecnt, charcnt, inheader; - register struct passwd *p; + unsigned char *cp, ch; + FILE *fi; + int linecnt, charcnt, inheader; + struct passwd *p; unsigned char line[BUFSIZ]; /* Set effective uid to user in case mail drop is on nfs */ |