de-__P, ANSIfy prototypes, and kill register

This commit is contained in:
perry 2006-01-04 01:17:54 +00:00
parent c2e350ed82
commit ee5c979c9f
6 changed files with 59 additions and 86 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.9 2003/08/07 11:13:44 agc Exp $ */
/* $NetBSD: extern.h,v 1.10 2006/01/04 01:17:54 perry Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,17 +41,17 @@ extern int gflag;
extern int eightflag;
extern int pplan;
void enter_lastlog __P((PERSON *));
PERSON *enter_person __P((struct passwd *));
void enter_where __P((struct utmpentry *, PERSON *));
void expandusername __P((const char *, const char *, char *, int));
PERSON *find_person __P((char *));
int hash __P((char *));
void lflag_print __P((void));
int match __P((struct passwd *, char *));
void netfinger __P((char *));
PERSON *palloc __P((void));
char *prphone __P((char *));
int psort __P((const void *, const void *));
void sflag_print __P((void));
PERSON **sort __P((void));
void enter_lastlog(PERSON *);
PERSON *enter_person(struct passwd *);
void enter_where(struct utmpentry *, PERSON *);
void expandusername(const char *, const char *, char *, int);
PERSON *find_person(char *);
int hash(char *);
void lflag_print(void);
int match(struct passwd *, char *);
void netfinger(char *);
PERSON *palloc(void);
char *prphone(char *);
int psort(const void *, const void *);
void sflag_print(void);
PERSON **sort(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: finger.c,v 1.24 2004/06/03 18:32:18 kleink Exp $ */
/* $NetBSD: finger.c,v 1.25 2006/01/04 01:17:54 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -52,7 +52,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)finger.c 8.5 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: finger.c,v 1.24 2004/06/03 18:32:18 kleink Exp $");
__RCSID("$NetBSD: finger.c,v 1.25 2006/01/04 01:17:54 perry Exp $");
#endif
#endif /* not lint */
@ -97,14 +97,12 @@ int entries, gflag, lflag, mflag, oflag, sflag, eightflag, pplan;
char tbuf[1024];
struct utmpentry *ehead;
static void loginlist __P((void));
static void userlist __P((int, char **));
int main __P((int, char **));
static void loginlist(void);
static void userlist(int, char **);
int main(int, char **);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int ch;
@ -189,7 +187,7 @@ main(argc, argv)
}
static void
loginlist()
loginlist(void)
{
PERSON *pn;
DBT data, key;
@ -220,11 +218,9 @@ loginlist()
}
static void
userlist(argc, argv)
int argc;
char **argv;
userlist(int argc, char **argv)
{
register PERSON *pn;
PERSON *pn;
DBT data, key;
struct passwd *pw;
int r, sflag, *used, *ip;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lprint.c,v 1.20 2004/06/03 18:33:57 kleink Exp $ */
/* $NetBSD: lprint.c,v 1.21 2006/01/04 01:17:54 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)lprint.c 8.3 (Berkeley) 4/28/95";
#else
__RCSID( "$NetBSD: lprint.c,v 1.20 2004/06/03 18:33:57 kleink Exp $");
__RCSID( "$NetBSD: lprint.c,v 1.21 2006/01/04 01:17:54 perry Exp $");
#endif
#endif /* not lint */
@ -68,10 +68,10 @@ __RCSID( "$NetBSD: lprint.c,v 1.20 2004/06/03 18:33:57 kleink Exp $");
#define _PATH_PLAN ".plan"
#define _PATH_PROJECT ".project"
static int demi_print __P((char *, int));
static void lprint __P((PERSON *));
static int show_text __P((char *, char *, char *));
static void vputc __P((int));
static int demi_print(char *, int);
static void lprint(PERSON *);
static int show_text(char *, char *, char *);
static void vputc(int);
#ifdef __SVR4
#define TIMEZONE(a) tzname[0]
@ -80,7 +80,7 @@ static void vputc __P((int));
#endif
void
lflag_print()
lflag_print(void)
{
PERSON *pn;
int sflag, r;
@ -112,8 +112,7 @@ lflag_print()
}
static void
lprint(pn)
PERSON *pn;
lprint(PERSON *pn)
{
struct tm *delta;
WHERE *w;
@ -264,9 +263,7 @@ no_gecos:
}
static int
demi_print(str, oddfield)
char *str;
int oddfield;
demi_print(char *str, int oddfield)
{
static int lenlast;
int lenthis, maxlen;
@ -304,8 +301,7 @@ demi_print(str, oddfield)
}
static int
show_text(directory, file_name, header)
char *directory, *file_name, *header;
show_text(char *directory, char *file_name, char *header)
{
struct stat sb;
FILE *fp;
@ -353,8 +349,7 @@ show_text(directory, file_name, header)
}
static void
vputc(ch)
int ch;
vputc(int ch)
{
char visout[5], *s2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: net.c,v 1.21 2004/06/03 18:33:57 kleink Exp $ */
/* $NetBSD: net.c,v 1.22 2006/01/04 01:17:54 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)net.c 8.4 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: net.c,v 1.21 2004/06/03 18:33:57 kleink Exp $");
__RCSID("$NetBSD: net.c,v 1.22 2006/01/04 01:17:54 perry Exp $");
#endif
#endif /* not lint */
@ -64,8 +64,7 @@ __RCSID("$NetBSD: net.c,v 1.21 2004/06/03 18:33:57 kleink Exp $");
#include "extern.h"
void
netfinger(name)
char *name;
netfinger(char *name)
{
FILE *fp;
int c, lastc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sprint.c,v 1.16 2004/11/16 04:52:46 christos Exp $ */
/* $NetBSD: sprint.c,v 1.17 2006/01/04 01:17:54 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)sprint.c 8.3 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: sprint.c,v 1.16 2004/11/16 04:52:46 christos Exp $");
__RCSID("$NetBSD: sprint.c,v 1.17 2006/01/04 01:17:54 perry Exp $");
#endif
#endif /* not lint */
@ -59,10 +59,10 @@ __RCSID("$NetBSD: sprint.c,v 1.16 2004/11/16 04:52:46 christos Exp $");
#include "finger.h"
#include "extern.h"
static void stimeprint __P((WHERE *));
static void stimeprint(WHERE *);
void
sflag_print()
sflag_print(void)
{
PERSON *pn;
WHERE *w;
@ -154,8 +154,7 @@ no_gecos:
}
static void
stimeprint(w)
WHERE *w;
stimeprint(WHERE *w)
{
struct tm *delta;

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.23 2004/11/12 21:48:58 christos Exp $ */
/* $NetBSD: util.c,v 1.24 2006/01/04 01:17:54 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -72,7 +72,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.3 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: util.c,v 1.23 2004/11/12 21:48:58 christos Exp $");
__RCSID("$NetBSD: util.c,v 1.24 2006/01/04 01:17:54 perry Exp $");
#endif
#endif /* not lint */
@ -97,14 +97,12 @@ __RCSID("$NetBSD: util.c,v 1.23 2004/11/12 21:48:58 christos Exp $");
#include "finger.h"
#include "extern.h"
static void find_idle_and_ttywrite __P((WHERE *));
static void userinfo __P((PERSON *, struct passwd *));
static WHERE *walloc __P((PERSON *));
static void find_idle_and_ttywrite(WHERE *);
static void userinfo(PERSON *, struct passwd *);
static WHERE *walloc(PERSON *);
int
match(pw, user)
struct passwd *pw;
char *user;
match(struct passwd *pw, char *user)
{
char *p;
char *bp, name[1024];
@ -128,11 +126,7 @@ match(pw, user)
/* inspired by usr.sbin/sendmail/util.c::buildfname */
void
expandusername(gecos, login, buf, buflen)
const char *gecos;
const char *login;
char *buf;
int buflen;
expandusername(const char *gecos, const char *login, char *buf, int buflen)
{
const char *p;
char *bp;
@ -163,8 +157,7 @@ expandusername(gecos, login, buf, buflen)
}
void
enter_lastlog(pn)
PERSON *pn;
enter_lastlog(PERSON *pn)
{
WHERE *w;
static int opened, fd;
@ -215,9 +208,7 @@ enter_lastlog(pn)
}
void
enter_where(ep, pn)
struct utmpentry *ep;
PERSON *pn;
enter_where(struct utmpentry *ep, PERSON *pn)
{
WHERE *w = walloc(pn);
@ -229,8 +220,7 @@ enter_where(ep, pn)
}
PERSON *
enter_person(pw)
struct passwd *pw;
enter_person(struct passwd *pw)
{
DBT data, key;
PERSON *pn;
@ -265,8 +255,7 @@ enter_person(pw)
}
PERSON *
find_person(name)
char *name;
find_person(char *name)
{
DBT data, key;
PERSON *p;
@ -284,7 +273,7 @@ find_person(name)
}
PERSON *
palloc()
palloc(void)
{
PERSON *p;
@ -294,8 +283,7 @@ palloc()
}
static WHERE *
walloc(pn)
PERSON *pn;
walloc(PERSON *pn)
{
WHERE *w;
@ -312,8 +300,7 @@ walloc(pn)
}
char *
prphone(num)
char *num;
prphone(char *num)
{
char *p;
int len;
@ -362,8 +349,7 @@ prphone(num)
}
static void
find_idle_and_ttywrite(w)
WHERE *w;
find_idle_and_ttywrite(WHERE *w)
{
struct stat sb;
@ -379,9 +365,7 @@ find_idle_and_ttywrite(w)
}
static void
userinfo(pn, pw)
PERSON *pn;
struct passwd *pw;
userinfo(PERSON *pn, struct passwd *pw)
{
char *p;
char *bp, name[1024];