Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ypserv/ypxfr de__P, ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/2286b611dd79
branches: trunk
changeset: 533640:2286b611dd79
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Jul 06 00:53:54 2002 +0000
description:
de__P, ANSIfy.
diffstat:
usr.sbin/ypserv/ypxfr/ypxfr.c | 96 ++++++++++++++----------------------------
1 files changed, 33 insertions(+), 63 deletions(-)
diffs (210 lines):
diff -r bf110e7428b6 -r 2286b611dd79 usr.sbin/ypserv/ypxfr/ypxfr.c
--- a/usr.sbin/ypserv/ypxfr/ypxfr.c Sat Jul 06 00:47:55 2002 +0000
+++ b/usr.sbin/ypserv/ypxfr/ypxfr.c Sat Jul 06 00:53:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ypxfr.c,v 1.11 2001/02/19 23:22:53 cgd Exp $ */
+/* $NetBSD: ypxfr.c,v 1.12 2002/07/06 00:53:54 wiz Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ypxfr.c,v 1.11 2001/02/19 23:22:53 cgd Exp $");
+__RCSID("$NetBSD: ypxfr.c,v 1.12 2002/07/06 00:53:54 wiz Exp $");
#endif
#include <sys/types.h>
@@ -63,26 +63,24 @@
DBM *db;
-static int ypxfr_foreach __P((int, char *, int, char *, int, char *));
+static int ypxfr_foreach(int, char *, int, char *, int, char *);
-int main __P((int, char *[]));
-int get_local_ordernum __P((char *, char *, u_int *));
-int get_remote_ordernum __P((CLIENT *, char *, char *, u_int, u_int *));
-void get_map __P((CLIENT *, char *, char *, struct ypall_callback *));
-DBM *create_db __P((char *, char *, char *));
-int install_db __P((char *, char *, char *));
-int unlink_db __P((char *, char *, char *));
-int add_order __P((DBM *, u_int));
-int add_master __P((CLIENT *, char *, char *, DBM *));
-int add_interdomain __P((CLIENT *, char *, char *, DBM *));
-int add_secure __P((CLIENT *, char *, char *, DBM *));
-int send_clear __P((CLIENT *));
-int send_reply __P((CLIENT *, int, int));
+int main(int, char *[]);
+int get_local_ordernum(char *, char *, u_int *);
+int get_remote_ordernum(CLIENT *, char *, char *, u_int, u_int *);
+void get_map(CLIENT *, char *, char *, struct ypall_callback *);
+DBM *create_db(char *, char *, char *);
+int install_db(char *, char *, char *);
+int unlink_db(char *, char *, char *);
+int add_order(DBM *, u_int);
+int add_master(CLIENT *, char *, char *, DBM *);
+int add_interdomain(CLIENT *, char *, char *, DBM *);
+int add_secure(CLIENT *, char *, char *, DBM *);
+int send_clear(CLIENT *);
+int send_reply(CLIENT *, int, int);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
int need_usage = 0, cflag = 0, fflag = 0, Cflag = 0;
int ch;
@@ -275,13 +273,8 @@
}
static int
-ypxfr_foreach(status, keystr, keylen, valstr, vallen, data)
- int status;
- char *keystr;
- int keylen;
- char *valstr;
- int vallen;
- char *data;
+ypxfr_foreach(int status, char *keystr, int keylen, char *valstr,
+ int vallen, char *data)
{
datum key, val;
@@ -303,9 +296,7 @@
}
int
-get_local_ordernum(domain, map, lordernum)
- char *domain, *map;
- u_int *lordernum;
+get_local_ordernum(char *domain, char *map, u_int *lordernum)
{
char map_path[1024];
char order_key[] = YP_LAST_KEY;
@@ -371,10 +362,8 @@
}
int
-get_remote_ordernum(client, domain, map, lordernum, rordernum)
- CLIENT *client;
- char *domain, *map;
- u_int lordernum, *rordernum;
+get_remote_ordernum(CLIENT *client, char *domain, char *map,
+ u_int lordernum, u_int *rordernum)
{
int status;
@@ -391,18 +380,15 @@
}
void
-get_map(client, domain, map, incallback)
- CLIENT *client;
- char *domain, *map;
- struct ypall_callback *incallback;
+get_map(CLIENT *client, char *domain, char *map,
+ struct ypall_callback *incallback)
{
(void)yp_all_host(client, domain, map, incallback);
}
DBM *
-create_db(domain, map, temp_map)
- char *domain, *map, *temp_map;
+create_db(char *domain, char *map, char *temp_map)
{
char db_temp[255];
DBM *db;
@@ -417,8 +403,7 @@
}
int
-install_db(domain, map, temp_map)
- char *domain, *map, *temp_map;
+install_db(char *domain, char *map, char *temp_map)
{
char db_name[255], db_temp[255];
@@ -439,8 +424,7 @@
}
int
-unlink_db(domain, map, temp_map)
- char *domain, *map, *temp_map;
+unlink_db(char *domain, char *map, char *temp_map)
{
char db_temp[255];
@@ -457,9 +441,7 @@
}
int
-add_order(db, ordernum)
- DBM *db;
- u_int ordernum;
+add_order(DBM *db, u_int ordernum)
{
char datestr[11];
datum key, val;
@@ -485,10 +467,7 @@
}
int
-add_master(client, domain, map, db)
- CLIENT *client;
- char *domain, *map;
- DBM *db;
+add_master(CLIENT *client, char *domain, char *map, DBM *db)
{
char keystr[] = YP_MASTER_KEY;
char *master;
@@ -518,10 +497,7 @@
}
int
-add_interdomain(client, domain, map, db)
- CLIENT *client;
- char *domain, *map;
- DBM *db;
+add_interdomain(CLIENT *client, char *domain, char *map, DBM *db)
{
char keystr[] = YP_INTERDOMAIN_KEY;
char *value;
@@ -553,10 +529,7 @@
}
int
-add_secure(client, domain, map, db)
- CLIENT *client;
- char *domain, *map;
- DBM *db;
+add_secure(CLIENT *client, char *domain, char *map, DBM *db)
{
char keystr[] = YP_SECURE_KEY;
char *value;
@@ -588,8 +561,7 @@
}
int
-send_clear(client)
- CLIENT *client;
+send_clear(CLIENT *client)
{
struct timeval tv;
int r;
@@ -611,9 +583,7 @@
}
int
-send_reply(client, status, tid)
- CLIENT *client;
- int status, tid;
+send_reply(CLIENT *client, int status, int tid)
{
struct timeval tv;
struct ypresp_xfr resp;
Home |
Main Index |
Thread Index |
Old Index