Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/bootp ANSIfy. Remove ifndef __STDC__.
details: https://anonhg.NetBSD.org/src/rev/504d23bfcdfb
branches: trunk
changeset: 534037:504d23bfcdfb
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Jul 13 23:56:39 2002 +0000
description:
ANSIfy. Remove ifndef __STDC__.
diffstat:
usr.sbin/bootp/bootpd/bootpd.c | 60 ++++--------
usr.sbin/bootp/bootpef/bootpef.c | 29 +----
usr.sbin/bootp/bootpgw/bootpgw.c | 28 +----
usr.sbin/bootp/bootptest/bootptest.c | 31 +----
usr.sbin/bootp/bootptest/bootptest.h | 16 +--
usr.sbin/bootp/bootptest/getether.c | 41 +++-----
usr.sbin/bootp/bootptest/print-bootp.c | 39 ++------
usr.sbin/bootp/bootptest/trygetea.c | 8 +-
usr.sbin/bootp/common/dovend.c | 32 +-----
usr.sbin/bootp/common/dovend.h | 16 +--
usr.sbin/bootp/common/dumptab.c | 38 ++-----
usr.sbin/bootp/common/getif.c | 24 +---
usr.sbin/bootp/common/getif.h | 6 +-
usr.sbin/bootp/common/hash.c | 61 +++---------
usr.sbin/bootp/common/hash.h | 50 +++------
usr.sbin/bootp/common/hwaddr.c | 24 +---
usr.sbin/bootp/common/hwaddr.h | 16 +--
usr.sbin/bootp/common/lookup.c | 18 +--
usr.sbin/bootp/common/lookup.h | 16 +--
usr.sbin/bootp/common/readfile.c | 153 +++++++++++---------------------
usr.sbin/bootp/common/readfile.h | 21 +---
usr.sbin/bootp/common/report.c | 26 +----
usr.sbin/bootp/common/report.h | 16 +--
usr.sbin/bootp/common/trygetif.c | 8 +-
usr.sbin/bootp/common/trylook.c | 12 +-
usr.sbin/bootp/common/tzone.c | 6 +-
usr.sbin/bootp/common/tzone.h | 12 +--
27 files changed, 249 insertions(+), 558 deletions(-)
diffs (truncated from 1891 to 300 lines):
diff -r 11ea576b9946 -r 504d23bfcdfb usr.sbin/bootp/bootpd/bootpd.c
--- a/usr.sbin/bootp/bootpd/bootpd.c Sat Jul 13 22:48:40 2002 +0000
+++ b/usr.sbin/bootp/bootpd/bootpd.c Sat Jul 13 23:56:39 2002 +0000
@@ -22,7 +22,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootpd.c,v 1.13 2000/10/11 20:23:48 is Exp $");
+__RCSID("$NetBSD: bootpd.c,v 1.14 2002/07/13 23:56:39 wiz Exp $");
#endif
/*
@@ -109,27 +109,19 @@
* Externals, forward declarations, and global variables
*/
-#ifdef __STDC__
-#define P(args) args
-#else
-#define P(args) ()
-#endif
+extern void dumptab(char *);
-extern void dumptab P((char *));
-
-PRIVATE void catcher P((int));
-PRIVATE int chk_access P((char *, int32 *));
+PRIVATE void catcher(int);
+PRIVATE int chk_access(char *, int32 *);
#ifdef VEND_CMU
-PRIVATE void dovend_cmu P((struct bootp *, struct host *));
+PRIVATE void dovend_cmu(struct bootp *, struct host *);
#endif
-PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32));
-PRIVATE void handle_reply P((void));
-PRIVATE void handle_request P((void));
-PRIVATE void sendreply P((int forward, int32 dest_override));
-PRIVATE void usage P((void));
-int main P((int, char **));
-
-#undef P
+PRIVATE void dovend_rfc1048(struct bootp *, struct host *, int32);
+PRIVATE void handle_reply(void);
+PRIVATE void handle_request(void);
+PRIVATE void sendreply(int forward, int32 dest_override);
+PRIVATE void usage(void);
+int main(int, char **);
/*
* IP port numbers for client and server obtained from /etc/services
@@ -188,9 +180,7 @@
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
struct timeval *timeout;
struct bootp *bp;
@@ -564,7 +554,7 @@
*/
PRIVATE void
-usage()
+usage(void)
{
fprintf(stderr,
"usage: bootpd [-d level] [-i] [-s] [-t timeout] [configfile [dumpfile]]\n");
@@ -578,8 +568,7 @@
/* Signal catchers */
PRIVATE void
-catcher(sig)
- int sig;
+catcher(int sig)
{
if (sig == SIGHUP)
do_readtab = 1;
@@ -606,7 +595,7 @@
* forward the request there.)
*/
PRIVATE void
-handle_request()
+handle_request(void)
{
struct bootp *bp = (struct bootp *) pktbuf;
struct host *hp = NULL;
@@ -1006,7 +995,7 @@
* Process BOOTREPLY packet.
*/
PRIVATE void
-handle_reply()
+handle_reply(void)
{
if (debug) {
report(LOG_INFO, "processing boot reply");
@@ -1021,9 +1010,7 @@
* not the originator of this reply packet.
*/
PRIVATE void
-sendreply(forward, dst_override)
- int forward;
- int32 dst_override;
+sendreply(int forward, int32 dst_override)
{
struct bootp *bp = (struct bootp *) pktbuf;
struct in_addr dst;
@@ -1134,9 +1121,7 @@
*/
PRIVATE int
-chk_access(path, filesize)
- char *path;
- int32 *filesize;
+chk_access(char *path, int32 *filesize)
{
struct stat st;
@@ -1164,9 +1149,7 @@
*/
PRIVATE void
-dovend_cmu(bp, hp)
- struct bootp *bp;
- struct host *hp;
+dovend_cmu(struct bootp *bp, struct host *hp)
{
struct cmu_vend *vendp;
struct in_addr_list *taddr;
@@ -1234,10 +1217,7 @@
return; \
} while (0)
PRIVATE void
-dovend_rfc1048(bp, hp, bootsize)
- struct bootp *bp;
- struct host *hp;
- int32 bootsize;
+dovend_rfc1048(struct bootp *bp, struct host *hp, int32 bootsize)
{
int bytesleft, len;
byte *vp;
diff -r 11ea576b9946 -r 504d23bfcdfb usr.sbin/bootp/bootpef/bootpef.c
--- a/usr.sbin/bootp/bootpef/bootpef.c Sat Jul 13 22:48:40 2002 +0000
+++ b/usr.sbin/bootp/bootpef/bootpef.c Sat Jul 13 23:56:39 2002 +0000
@@ -22,7 +22,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootpef.c,v 1.4 1998/03/14 04:39:53 lukem Exp $");
+__RCSID("$NetBSD: bootpef.c,v 1.5 2002/07/13 23:58:30 wiz Exp $");
#endif
@@ -40,11 +40,7 @@
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <sys/types.h>
#include <sys/time.h>
@@ -92,17 +88,9 @@
* Externals, forward declarations, and global variables
*/
-#ifdef __STDC__
-#define P(args) args
-#else
-#define P(args) ()
-#endif
-
-static void mktagfile P((struct host *));
-static void usage P((void));
-int main P((int, char **));
-
-#undef P
+static void mktagfile(struct host *);
+static void usage(void);
+int main(int, char **);
/*
@@ -125,7 +113,7 @@
* Print "usage" message and exit
*/
static void
-usage()
+usage(void)
{
fprintf(stderr,
"usage: $s [ -c chdir ] [-d level] [-f configfile] [host...]\n");
@@ -141,9 +129,7 @@
* main server loop is started.
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
struct host *hp;
char *stmp;
@@ -287,8 +273,7 @@
*/
static void
-mktagfile(hp)
- struct host *hp;
+mktagfile(struct host *hp)
{
FILE *fp;
int bytesleft, len;
diff -r 11ea576b9946 -r 504d23bfcdfb usr.sbin/bootp/bootpgw/bootpgw.c
--- a/usr.sbin/bootp/bootpgw/bootpgw.c Sat Jul 13 22:48:40 2002 +0000
+++ b/usr.sbin/bootp/bootpgw/bootpgw.c Sat Jul 13 23:56:39 2002 +0000
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootpgw.c,v 1.8 1998/07/06 07:02:17 mrg Exp $");
+__RCSID("$NetBSD: bootpgw.c,v 1.9 2002/07/13 23:59:45 wiz Exp $");
#endif
/*
@@ -90,18 +90,10 @@
* Externals, forward declarations, and global variables
*/
-#ifdef __STDC__
-#define P(args) args
-#else
-#define P(args) ()
-#endif
-
-static void usage P((void));
-static void handle_reply P((void));
-static void handle_request P((void));
-int main P((int, char **));
-
-#undef P
+static void usage(void);
+static void handle_reply(void);
+static void handle_request(void);
+int main(int, char **);
/*
* IP port numbers for client and server obtained from /etc/services
@@ -154,9 +146,7 @@
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
struct timeval *timeout;
struct bootp *bp;
@@ -492,7 +482,7 @@
*/
static void
-usage()
+usage(void)
{
fprintf(stderr,
"usage: bootpgw [-d level] [-i] [-s] [-t timeout] server\n");
@@ -513,7 +503,7 @@
* Note, this just forwards the request to a real server.
*/
static void
-handle_request()
+handle_request(void)
{
struct bootp *bp = (struct bootp *) pktbuf;
#if 0
@@ -604,7 +594,7 @@
* Process BOOTREPLY packet.
*/
static void
-handle_reply()
+handle_reply(void)
{
struct bootp *bp = (struct bootp *) pktbuf;
struct ifreq *ifr;
diff -r 11ea576b9946 -r 504d23bfcdfb usr.sbin/bootp/bootptest/bootptest.c
--- a/usr.sbin/bootp/bootptest/bootptest.c Sat Jul 13 22:48:40 2002 +0000
+++ b/usr.sbin/bootp/bootptest/bootptest.c Sat Jul 13 23:56:39 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootptest.c,v 1.7 1999/09/26 10:27:40 kleink Exp $ */
+/* $NetBSD: bootptest.c,v 1.8 2002/07/14 00:07:00 wiz Exp $ */
/*
* bootptest.c - Test out a bootp server.
Home |
Main Index |
Thread Index |
Old Index