Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ypserv/revnetgroup de-__P(), ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/60b9c777f699
branches: trunk
changeset: 533643:60b9c777f699
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Jul 06 01:00:15 2002 +0000
description:
de-__P(), ANSIfy.
diffstat:
usr.sbin/ypserv/revnetgroup/hash.c | 28 ++++++++++------------------
usr.sbin/ypserv/revnetgroup/hash.h | 16 ++++++++--------
usr.sbin/ypserv/revnetgroup/parse_netgroup.c | 22 +++++++++-------------
usr.sbin/ypserv/revnetgroup/revnetgroup.c | 14 ++++++--------
4 files changed, 33 insertions(+), 47 deletions(-)
diffs (238 lines):
diff -r 9de3a492756c -r 60b9c777f699 usr.sbin/ypserv/revnetgroup/hash.c
--- a/usr.sbin/ypserv/revnetgroup/hash.c Sat Jul 06 00:56:32 2002 +0000
+++ b/usr.sbin/ypserv/revnetgroup/hash.c Sat Jul 06 01:00:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.2 1997/10/06 06:54:11 lukem Exp $ */
+/* $NetBSD: hash.c,v 1.3 2002/07/06 01:00:15 wiz Exp $ */
/*
* Copyright (c) 1995
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hash.c,v 1.2 1997/10/06 06:54:11 lukem Exp $");
+__RCSID("$NetBSD: hash.c,v 1.3 2002/07/06 01:00:15 wiz Exp $");
#endif
#include <sys/types.h>
@@ -46,8 +46,8 @@
#include "hash.h"
-u_int32_t hash __P((const void *, size_t));
-u_int32_t hashkey __P((const char *));
+u_int32_t hash(const void *, size_t);
+u_int32_t hashkey(const char *);
/*
@@ -61,9 +61,7 @@
* OZ's original sdbm hash
*/
u_int32_t
-hash(keyarg, len)
- const void *keyarg;
- size_t len;
+hash(const void *keyarg, size_t len)
{
const u_char *key;
size_t loop;
@@ -113,8 +111,7 @@
* can only hold 256 elements.
*/
u_int32_t
-hashkey(key)
- const char *key;
+hashkey(const char *key)
{
if (key == NULL)
@@ -124,9 +121,7 @@
/* Find an entry in the hash table (may be hanging off a linked list). */
char *
-lookup(table, key)
- struct group_entry *table[];
- const char *key;
+lookup(struct group_entry **table, const char *key)
{
struct group_entry *cur;
@@ -159,9 +154,7 @@
* That's a lot of comment for such a small piece of code, isn't it.
*/
void
-store(table, key, data)
- struct group_entry *table[];
- const char *key, *data;
+store(struct group_entry *table[], const char *key, const char *data)
{
struct group_entry *new;
u_int32_t i;
@@ -190,9 +183,8 @@
* to update its grouplist.
*/
void
-mstore(table, key, data, domain)
- struct member_entry *table[];
- const char *key, *data, *domain;
+mstore(struct member_entry *table[], const char *key, const char *data,
+ const char *domain)
{
struct member_entry *cur, *new;
struct grouplist *tmp,*p;
diff -r 9de3a492756c -r 60b9c777f699 usr.sbin/ypserv/revnetgroup/hash.h
--- a/usr.sbin/ypserv/revnetgroup/hash.h Sat Jul 06 00:56:32 2002 +0000
+++ b/usr.sbin/ypserv/revnetgroup/hash.h Sat Jul 06 01:00:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.h,v 1.2 1997/10/06 06:54:12 lukem Exp $ */
+/* $NetBSD: hash.h,v 1.3 2002/07/06 01:00:15 wiz Exp $ */
/*
* Copyright (c) 1995
@@ -60,10 +60,10 @@
#define LINSIZ 1024 * 10
-char *lookup __P((struct group_entry **, const char *));
-void mstore __P((struct member_entry **, const char *, const char *, const
-char *));
-void store __P((struct group_entry **, const char *, const char *));
-void rng_endnetgrent __P((void));
-int rng_getnetgrent __P((char **, char **, char **));
-void rng_setnetgrent __P((const char *));
+char *lookup(struct group_entry **, const char *);
+void mstore(struct member_entry **, const char *, const char *,
+ const char *);
+void store(struct group_entry **, const char *, const char *);
+void rng_endnetgrent(void);
+int rng_getnetgrent(char **, char **, char **);
+void rng_setnetgrent(const char *);
diff -r 9de3a492756c -r 60b9c777f699 usr.sbin/ypserv/revnetgroup/parse_netgroup.c
--- a/usr.sbin/ypserv/revnetgroup/parse_netgroup.c Sat Jul 06 00:56:32 2002 +0000
+++ b/usr.sbin/ypserv/revnetgroup/parse_netgroup.c Sat Jul 06 01:00:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse_netgroup.c,v 1.2 1997/10/06 06:54:13 lukem Exp $ */
+/* $NetBSD: parse_netgroup.c,v 1.3 2002/07/06 01:00:15 wiz Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: parse_netgroup.c,v 1.2 1997/10/06 06:54:13 lukem Exp $");
+__RCSID("$NetBSD: parse_netgroup.c,v 1.3 2002/07/06 01:00:15 wiz Exp $");
#endif
/*
@@ -92,8 +92,8 @@
extern struct group_entry *gtable[];
-static int parse_netgrp __P((const char *));
-static struct linelist *read_for_group __P((const char *));
+static int parse_netgrp(const char *);
+static struct linelist *read_for_group(const char *);
/*
@@ -103,8 +103,7 @@
* most of the work.
*/
void
-rng_setnetgrent(group)
- const char *group;
+rng_setnetgrent(const char *group)
{
/* Sanity check */
@@ -129,8 +128,7 @@
* Get the next netgroup off the list.
*/
int
-rng_getnetgrent(hostp, userp, domp)
- char **hostp, **userp, **domp;
+rng_getnetgrent(char **hostp, char **userp, char **domp)
{
if (nextgrp) {
*hostp = nextgrp->ng_str[NG_HOST];
@@ -146,7 +144,7 @@
* rng_endnetgrent() - cleanup
*/
void
-rng_endnetgrent()
+rng_endnetgrent(void)
{
struct linelist *lp, *olp;
struct netgrp *gp, *ogp;
@@ -183,8 +181,7 @@
* Parse the netgroup file setting up the linked lists.
*/
static int
-parse_netgrp(group)
- const char *group;
+parse_netgrp(const char *group)
{
char *spos, *epos;
int len, strpos;
@@ -298,8 +295,7 @@
* is found. Return 1 if eof is encountered.
*/
static struct linelist *
-read_for_group(group)
- const char *group;
+read_for_group(const char *group)
{
char *pos, *spos, *linep = NULL, *olinep = NULL;
int len, olen;
diff -r 9de3a492756c -r 60b9c777f699 usr.sbin/ypserv/revnetgroup/revnetgroup.c
--- a/usr.sbin/ypserv/revnetgroup/revnetgroup.c Sat Jul 06 00:56:32 2002 +0000
+++ b/usr.sbin/ypserv/revnetgroup/revnetgroup.c Sat Jul 06 01:00:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: revnetgroup.c,v 1.9 2001/02/19 23:22:51 cgd Exp $ */
+/* $NetBSD: revnetgroup.c,v 1.10 2002/07/06 01:00:15 wiz Exp $ */
/*
* Copyright (c) 1995
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: revnetgroup.c,v 1.9 2001/02/19 23:22:51 cgd Exp $");
+__RCSID("$NetBSD: revnetgroup.c,v 1.10 2002/07/06 01:00:15 wiz Exp $");
#endif
#include <ctype.h>
@@ -56,8 +56,8 @@
#include "hash.h"
#include "protos.h"
-int main __P((int, char *[]));
-void usage __P((void));
+int main(int, char *[]);
+void usage(void);
@@ -74,7 +74,7 @@
struct member_entry *mtable[TABLESIZE];
void
-usage()
+usage(void)
{
fprintf (stderr,"usage: %s -u|-h [-f netgroup file]\n", getprogname());
@@ -82,9 +82,7 @@
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct group_entry *gcur;
struct member_entry *mcur;
Home |
Main Index |
Thread Index |
Old Index