From b8aaa8bec8414f8e55cf9b61fe0873d242c773b8 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 10 Jun 2003 22:20:55 +0000 Subject: mostly ansi cleanup; pval ok --- usr.bin/finger/finger.c | 14 +++++--------- usr.bin/finger/lprint.c | 19 +++++++------------ usr.bin/finger/sprint.c | 14 ++++++-------- usr.bin/finger/util.c | 48 +++++++++++++++--------------------------------- 4 files changed, 33 insertions(+), 62 deletions(-) (limited to 'usr.bin/finger') diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 978b4732175..66f100afa1b 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: finger.c,v 1.13 2003/06/03 02:56:08 millert Exp $ */ +/* $OpenBSD: finger.c,v 1.14 2003/06/10 22:20:46 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -50,7 +50,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)finger.c 5.22 (Berkeley) 6/29/90";*/ -static char rcsid[] = "$OpenBSD: finger.c,v 1.13 2003/06/03 02:56:08 millert Exp $"; +static char rcsid[] = "$OpenBSD: finger.c,v 1.14 2003/06/10 22:20:46 deraadt Exp $"; #endif /* not lint */ /* @@ -84,9 +84,7 @@ int entries, lflag, sflag, mflag, oflag, pplan, Mflag; char tbuf[1024]; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { extern int optind; extern char *__progname; @@ -170,7 +168,7 @@ main(argc, argv) } void -loginlist() +loginlist(void) { PERSON *pn; struct passwd *pw; @@ -196,9 +194,7 @@ loginlist() } void -userlist(argc, argv) - int argc; - char **argv; +userlist(int argc, char **argv) { int i; PERSON *pn; diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c index e7271b3f1e0..df8909aa320 100644 --- a/usr.bin/finger/lprint.c +++ b/usr.bin/finger/lprint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lprint.c,v 1.6 2003/06/03 02:56:08 millert Exp $ */ +/* $OpenBSD: lprint.c,v 1.7 2003/06/10 22:20:46 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -34,7 +34,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)lprint.c 5.13 (Berkeley) 10/31/90";*/ -static char rcsid[] = "$OpenBSD: lprint.c,v 1.6 2003/06/03 02:56:08 millert Exp $"; +static char rcsid[] = "$OpenBSD: lprint.c,v 1.7 2003/06/10 22:20:46 deraadt Exp $"; #endif /* not lint */ #include @@ -57,7 +57,7 @@ static char rcsid[] = "$OpenBSD: lprint.c,v 1.6 2003/06/03 02:56:08 millert Exp #define _PATH_PROJECT ".project" void -lflag_print() +lflag_print(void) { PERSON *pn; @@ -75,8 +75,7 @@ lflag_print() } void -lprint(pn) - PERSON *pn; +lprint(PERSON *pn) { struct tm *delta; WHERE *w; @@ -225,9 +224,7 @@ lprint(pn) } int -demi_print(str, oddfield) - char *str; - int oddfield; +demi_print(char *str, int oddfield) { static int lenlast; int lenthis, maxlen; @@ -265,8 +262,7 @@ demi_print(str, oddfield) } int -show_text(directory, file_name, header) - char *directory, *file_name, *header; +show_text(char *directory, char *file_name, char *header) { int ch, lastc; FILE *fp; @@ -285,8 +281,7 @@ show_text(directory, file_name, header) } void -vputc(ch) - int ch; +vputc(int ch) { char visout[5], *s2; diff --git a/usr.bin/finger/sprint.c b/usr.bin/finger/sprint.c index 9bc48c15fca..26428046f19 100644 --- a/usr.bin/finger/sprint.c +++ b/usr.bin/finger/sprint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sprint.c,v 1.7 2003/06/03 02:56:08 millert Exp $ */ +/* $OpenBSD: sprint.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -34,7 +34,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)sprint.c 5.8 (Berkeley) 12/4/90";*/ -static char rcsid[] = "$OpenBSD: sprint.c,v 1.7 2003/06/03 02:56:08 millert Exp $"; +static char rcsid[] = "$OpenBSD: sprint.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $"; #endif /* not lint */ #include @@ -47,7 +47,7 @@ static char rcsid[] = "$OpenBSD: sprint.c,v 1.7 2003/06/03 02:56:08 millert Exp #include "extern.h" void -sflag_print() +sflag_print(void) { PERSON *pn; WHERE *w; @@ -132,7 +132,7 @@ office: } PERSON ** -sort() +sort(void) { PERSON *pn, **lp; PERSON **list; @@ -146,15 +146,13 @@ sort() } int -psort(p, t) - const void *p, *t; +psort(const void *p, const void *t) { return(strcmp((*(PERSON **)p)->name, (*(PERSON **)t)->name)); } void -stimeprint(w) - WHERE *w; +stimeprint(WHERE *w) { struct tm *delta; diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 40eb703ad55..aefbbaa4a08 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.16 2003/06/03 02:56:08 millert Exp $ */ +/* $OpenBSD: util.c,v 1.17 2003/06/10 22:20:46 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)util.c 5.14 (Berkeley) 1/17/91";*/ -static char rcsid[] = "$OpenBSD: util.c,v 1.16 2003/06/03 02:56:08 millert Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.17 2003/06/10 22:20:46 deraadt Exp $"; #endif /* not lint */ #include @@ -59,8 +59,7 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.16 2003/06/03 02:56:08 millert Exp $ char *estrdup(char *); void -find_idle_and_ttywrite(w) - WHERE *w; +find_idle_and_ttywrite(WHERE *w) { struct stat sb; @@ -88,9 +87,7 @@ estrdup(char *s) } void -userinfo(pn, pw) - PERSON *pn; - struct passwd *pw; +userinfo(PERSON *pn, struct passwd *pw) { char *p; char *bp, name[1024]; @@ -131,9 +128,7 @@ userinfo(pn, pw) } int -match(pw, user) - struct passwd *pw; - char *user; +match(struct passwd *pw, char *user) { char *p, *t; char name[1024]; @@ -152,11 +147,7 @@ match(pw, user) /* inspired by usr.sbin/sendmail/util.c::buildfname */ void -expandusername(gecos, login, buf, buflen) - char *gecos; - char *login; - char *buf; - int buflen; +expandusername(char *gecos, char *login, char *buf, int buflen) { char *p, *bp; @@ -186,8 +177,7 @@ expandusername(gecos, login, buf, buflen) } void -enter_lastlog(pn) - PERSON *pn; +enter_lastlog(PERSON *pn) { WHERE *w; static int opened, fd; @@ -236,9 +226,7 @@ enter_lastlog(pn) } void -enter_where(ut, pn) - struct utmp *ut; - PERSON *pn; +enter_where(struct utmp *ut, PERSON *pn) { WHERE *w = walloc(pn); @@ -252,8 +240,7 @@ enter_where(ut, pn) } PERSON * -enter_person(pw) - struct passwd *pw; +enter_person(struct passwd *pw) { PERSON *pn, **pp; @@ -280,8 +267,7 @@ enter_person(pw) } PERSON * -find_person(name) - char *name; +find_person(char *name) { PERSON *pn; @@ -294,8 +280,7 @@ find_person(name) } int -hash(name) - char *name; +hash(char *name) { int h, i; @@ -307,7 +292,7 @@ hash(name) } PERSON * -palloc() +palloc(void) { PERSON *p; @@ -317,8 +302,7 @@ palloc() } WHERE * -walloc(pn) - PERSON *pn; +walloc(PERSON *pn) { WHERE *w; @@ -335,8 +319,7 @@ walloc(pn) } char * -prphone(num) - char *num; +prphone(char *num) { char *p; int len; @@ -390,8 +373,7 @@ prphone(num) * The caller is responsible for free()'ing the returned string. */ char * -vs(src) - char *src; +vs(char *src) { char *dst; -- cgit v1.2.3