Assume __STDC__, remove non-__STDC__ code.

Reviewed by: md5
This commit is contained in:
Alfred Perlstein 2002-05-28 18:31:41 +00:00
parent 59b19ff14a
commit 5ed136e814
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97416
14 changed files with 17 additions and 97 deletions

View File

@ -105,11 +105,7 @@ SOFTWARE.
* Externals, forward declarations, and global variables
*/
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern void dumptab P((char *));

View File

@ -29,11 +29,7 @@
#include "report.h"
#include "dovend.h"
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
PRIVATE int insert_generic P((struct shared_bindata *, byte **, int *));

View File

@ -1,13 +1,6 @@
/* dovend.h */
/* $FreeBSD$ */
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern int dovend_rfc1497 P((struct host *hp, u_char *buf, int len));
extern int insert_ip P((int, struct in_addr_list *, u_char **, int *));
extern void insert_u_long P((u_int32, u_char **));
#undef P
extern int dovend_rfc1497(struct host *hp, u_char *buf, int len);
extern int insert_ip(int, struct in_addr_list *, u_char **, int *);
extern void insert_u_long(u_int32, u_char **);

View File

@ -28,11 +28,7 @@
#include "patchlevel.h"
#include "bootpd.h"
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
#ifdef DEBUG
static void dump_generic P((FILE *, struct shared_bindata *));

View File

@ -1,7 +1,4 @@
/* getether.h */
/* $FreeBSD$ */
#ifdef __STDC__
extern int getether(char *ifname, char *eaptr);
#else
extern int getether();
#endif

View File

@ -1,7 +1,4 @@
/* getif.h */
/* $FreeBSD$ */
#ifdef __STDC__
extern struct ifreq *getif(int, struct in_addr *);
#else
extern struct ifreq *getif();
#endif

View File

@ -61,11 +61,7 @@ SOFTWARE.
#define PRIVATE static
#endif
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
PRIVATE void hashi_FreeMembers P((hash_member *, hash_freefp));

View File

@ -25,6 +25,7 @@ SOFTWARE.
/*
* Generalized hash table ADT
* $FreeBSD$
*
* Provides multiple, dynamically-allocated, variable-sized hash tables on
* various data and keys.
@ -93,11 +94,7 @@ SOFTWARE.
/*
* Define "hash_datum" as a universal data type
*/
#ifdef __STDC__
typedef void hash_datum;
#else
typedef char hash_datum;
#endif
typedef struct hash_memberstruct hash_member;
typedef struct hash_tblstruct hash_tbl;
@ -120,11 +117,7 @@ struct hash_tblstruct {
};
/* ANSI function prototypes or empty arg list? */
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
typedef int (*hash_cmpfp) P((hash_datum *, hash_datum *));
typedef void (*hash_freefp) P((hash_datum *));

View File

@ -22,11 +22,7 @@ struct hwinfo {
extern struct hwinfo hwinfolist[];
extern int hwinfocnt;
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern void setarp P((int, struct in_addr *, int, u_char *, int));
extern char *haddrtoa P((u_char *, int));

View File

@ -1,15 +1,8 @@
/* lookup.h */
/* $FreeBSD$ */
#include "bptypes.h" /* for int32, u_int32 */
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern u_char *lookup_hwa P((char *hostname, int htype));
extern int lookup_ipa P((char *hostname, u_int32 *addr));
extern int lookup_netmask P((u_int32 addr, u_int32 *mask));
#undef P
extern u_char *lookup_hwa(char *hostname, int htype);
extern int lookup_ipa(char *hostname, u_int32 *addr);
extern int lookup_netmask(u_int32 addr, u_int32 *mask);

View File

@ -227,11 +227,7 @@ PRIVATE struct htypename htnamemap[] = {
* Externals and forward declarations.
*/
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern boolean iplookcmp();
boolean nmcmp P((hash_datum *, hash_datum *));

View File

@ -1,19 +1,11 @@
/* readfile.h */
/* $FreeBSD$ */
#include "bptypes.h"
#include "hash.h"
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern boolean hwlookcmp P((hash_datum *, hash_datum *));
extern boolean iplookcmp P((hash_datum *, hash_datum *));
extern boolean nmcmp P((hash_datum *, hash_datum *));
extern void readtab P((int));
extern void rdtab_init P((void));
#undef P
extern boolean hwlookcmp(hash_datum *, hash_datum *);
extern boolean iplookcmp(hash_datum *, hash_datum *);
extern boolean nmcmp(hash_datum *, hash_datum *);
extern void readtab(int);
extern void rdtab_init(void);

View File

@ -4,11 +4,7 @@
* report() - calls syslog
*/
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
#include <syslog.h>
@ -92,17 +88,8 @@ static int numlevels = sizeof(levelnames) / sizeof(levelnames[0]);
* Print a log message using syslog(3) and/or stderr.
* The message passed in should not include a newline.
*/
#ifdef __STDC__
void
report(int priority, const char *fmt,...)
#else
/*VARARGS2*/
void
report(priority, fmt, va_alist)
int priority;
const char *fmt;
va_dcl
#endif
{
va_list ap;
static char buf[128];
@ -110,11 +97,7 @@ report(priority, fmt, va_alist)
if ((priority < 0) || (priority >= numlevels)) {
priority = numlevels - 1;
}
#ifdef __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);

View File

@ -1,11 +1,7 @@
/* report.h */
/* $FreeBSD$ */
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
extern void report_init P((int nolog));
extern void report P((int, const char *, ...)) __printflike(2, 3);