ansify - drop the K&R style prototypes & implementations.

This commit is contained in:
sevan 2018-01-23 21:06:24 +00:00
parent bb295c756a
commit 421949a31f
53 changed files with 469 additions and 884 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: prefix.c,v 1.8 2010/11/26 18:58:43 christos Exp $ */
/* $NetBSD: prefix.c,v 1.9 2018/01/23 21:06:24 sevan Exp $ */
/* $KAME: prefix.c,v 1.13 2003/09/02 22:50:17 itojun Exp $ */
/*
@ -47,11 +47,11 @@
#include "faithd.h"
#include "prefix.h"
static int prefix_set __P((const char *, struct prefix *, int));
static struct config *config_load1 __P((const char *));
static int prefix_set(const char *, struct prefix *, int);
static struct config *config_load1(const char *);
#if 0
static void config_show1 __P((const struct config *));
static void config_show __P((void));
static void config_show1(const struct config *);
static void config_show(void);
#endif
struct config *config_list = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec.h,v 1.1 2000/01/31 14:28:20 itojun Exp $ */
/* $NetBSD: ipsec.h,v 1.2 2018/01/23 21:06:24 sevan Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -29,6 +29,6 @@
* SUCH DAMAGE.
*/
extern int ipsecsetup __P((int, int, const char *));
extern int ipsecsetup_test __P((const char *));
extern int ipsecsetup0 __P((int, int, const char *, int));
extern int ipsecsetup(int, int, const char *);
extern int ipsecsetup_test(const char *);
extern int ipsecsetup0(int, int, const char *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: daicctl.h,v 1.7 2008/04/28 20:24:16 martin Exp $ */
/* $NetBSD: daicctl.h,v 1.8 2018/01/23 21:06:24 sevan Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -31,10 +31,10 @@
#define PATH_ISDN_DEV "/dev/isdn"
extern void download __P((int fd, int controller, char *filename));
extern void simpccard __P((char *controller, int insert));
extern void xlog __P((int fd, int controller));
extern void xversion __P((int fd, int controller));
extern void istat __P((int fd, int controller));
extern void passthrough __P((int fd, int controller));
extern void download(int fd, int controller, char *filename);
extern void simpccard(char *controller, int insert);
extern void xlog(int fd, int controller);
extern void xversion(int fd, int controller);
extern void istat(int fd, int controller);
extern void passthrough(int fd, int controller);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dnload.c,v 1.7 2009/04/16 05:56:32 lukem Exp $ */
/* $NetBSD: dnload.c,v 1.8 2018/01/23 21:06:24 sevan Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -40,9 +40,7 @@
#include "daicctl.h"
void
download(fd, controller, filename)
int fd, controller;
char *filename;
download(int fd, int controller, char *filename)
{
int i, num_ports = 1;
struct isdn_download_request dr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $ */
/* $NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $");
__RCSID("$NetBSD: iteconfig.c,v 1.10 2018/01/23 21:06:25 sevan Exp $");
#endif
#include <sys/types.h>
@ -67,19 +67,16 @@ __RCSID("$NetBSD: iteconfig.c,v 1.9 2009/04/26 19:56:20 mlelstv Exp $");
#include "pathnames.h"
int initialize __P((const char *, struct itewinsize *, struct itebell *,
struct itewinsize *, struct itebell *));
int main __P((int, char **));
void printcmap __P((colormap_t *, int));
void xioctl __P((int, int, void *));
colormap_t *xgetcmap __P((int, int));
long xstrtol __P((char *));
void usage __P((void));
int initialize(const char *, struct itewinsize *, struct itebell *,
struct itewinsize *, struct itebell *);
void printcmap(colormap_t *, int);
void xioctl(int, int, void *);
colormap_t *xgetcmap(int, int);
long xstrtol(char *);
static void usage(void) __dead;
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
struct itewinsize is, newis;
struct itebell ib, newib;
@ -194,17 +191,14 @@ main(argc, argv)
}
void
xioctl(fd, cmd, addr)
int fd, cmd;
void *addr;
xioctl(int fd, int cmd, void *addr)
{
if (ioctl(fd, cmd, addr) == -1)
err(1, "ioctl");
}
long
xstrtol(s)
char *s;
xstrtol(char *s)
{
long rv;
@ -216,9 +210,7 @@ xstrtol(s)
}
colormap_t *
xgetcmap(fd, ncolors)
int fd;
int ncolors;
xgetcmap(int fd, int ncolors)
{
colormap_t *cm;
@ -233,9 +225,7 @@ xgetcmap(fd, ncolors)
}
void
printcmap(cm, ncols)
colormap_t *cm;
int ncols;
printcmap(colormap_t *cm, int ncols)
{
int i, nel;
@ -283,8 +273,8 @@ initialize(file, is, ib, newis, newib)
return(fd);
}
void
usage()
static void
usage(void)
{
fprintf(stderr, "%s\n\t\t%s\n\t\t%s\n",
"usage: iteconfig [-i] [-f file] [-v volume] [-p pitch] [-t msec]",

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.19 2003/08/07 11:25:23 agc Exp $ */
/* $NetBSD: extern.h,v 1.20 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -97,22 +97,22 @@
/* #define NLIST_ELF64 */
#endif
void create_knlist __P((const char *, DB *));
void punt __P((void));
int testdb __P((void));
void create_knlist(const char *, DB *);
void punt(void);
int testdb(void);
#ifdef NLIST_AOUT
int create_knlist_aout __P((const char *, DB *));
int create_knlist_aout(const char *, DB *);
#endif
#ifdef NLIST_COFF
int create_knlist_coff __P((const char *, DB *));
int create_knlist_coff(const char *, DB *);
#endif
#ifdef NLIST_ECOFF
int create_knlist_ecoff __P((const char *, DB *));
int create_knlist_ecoff(const char *, DB *);
#endif
#ifdef NLIST_ELF32
int create_knlist_elf32 __P((const char *, DB *));
int create_knlist_elf32(const char *, DB *);
#endif
#ifdef NLIST_ELF64
int create_knlist_elf64 __P((const char *, DB *));
int create_knlist_elf64(const char *, DB *);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $ */
/* $NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
#if 0
static char sccsid[] = "from: @(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $");
__RCSID("$NetBSD: kvm_mkdb.c,v 1.21 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -90,8 +90,7 @@ __RCSID("$NetBSD: kvm_mkdb.c,v 1.20 2008/07/21 13:36:58 lukem Exp $");
#include "extern.h"
int main __P((int, char **));
static void usage __P((void));
static void usage(void) __dead;
HASHINFO openinfo = {
4096, /* bsize */
@ -107,9 +106,7 @@ static char *dbname = NULL;
static char dbtemp[MAXPATHLEN];
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int ch;
char *nlistpath;
@ -181,8 +178,8 @@ main(argc, argv)
exit(0);
}
void
usage()
static void
usage(void)
{
(void)fprintf(stderr, "usage: kvm_mkdb [-o database] [file]\n");
exit(1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $ */
/* $NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $");
__RCSID("$NetBSD: nlist.c,v 1.20 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -87,7 +87,7 @@ __RCSID("$NetBSD: nlist.c,v 1.19 2003/08/07 11:25:23 agc Exp $");
#include "extern.h"
static struct {
int (*knlist) __P((const char *, DB *));
int (*knlist)(const char *, DB *);
} knlist_fmts[] = {
#ifdef NLIST_AOUT
{ create_knlist_aout },
@ -107,9 +107,7 @@ static struct {
};
void
create_knlist(name, db)
const char *name;
DB *db;
create_knlist(const char *name, DB *db)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nlist_aout.c,v 1.9 2011/01/04 09:36:13 wiz Exp $ */
/* $NetBSD: nlist_aout.c,v 1.10 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: nlist_aout.c,v 1.9 2011/01/04 09:36:13 wiz Exp $");
__RCSID("$NetBSD: nlist_aout.c,v 1.10 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -98,15 +98,13 @@ typedef struct nlist NLIST;
punt(); \
} while (0)
static void badread __P((int, char *));
static u_long get_kerntext __P((const char *kfn));
static void badread(int, char *);
static u_long get_kerntext(const char *kfn);
static const char *kfile;
int
create_knlist_aout(name, db)
const char *name;
DB *db;
create_knlist_aout(const char *name, DB *db)
{
int nsyms;
struct exec ebuf;
@ -244,9 +242,7 @@ create_knlist_aout(name, db)
}
static void
badread(nr, p)
int nr;
char *p;
badread(int nr, char *p)
{
if (nr < 0) {
warn("%s", kfile);
@ -262,8 +258,7 @@ badread(nr, p)
* when the standard symbol name is not found.
*/
static u_long
get_kerntext(name)
const char *name;
get_kerntext(const char *name)
{
struct nlist nl[2];

View File

@ -1,4 +1,4 @@
/* $NetBSD: mailwrapper.c,v 1.10 2009/04/16 07:13:16 lukem Exp $ */
/* $NetBSD: mailwrapper.c,v 1.11 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1998
@ -44,14 +44,11 @@ struct arglist {
const char **argv;
};
int main __P((int, char *[], char *[]));
static void initarg __P((struct arglist *));
static void addarg __P((struct arglist *, const char *, int));
static void initarg(struct arglist *);
static void addarg(struct arglist *, const char *, int);
static void
initarg(al)
struct arglist *al;
initarg(struct arglist *al)
{
al->argc = 0;
al->maxc = 10;
@ -68,10 +65,7 @@ initarg(al)
}
static void
addarg(al, arg, copy)
struct arglist *al;
const char *arg;
int copy;
addarg(struct arglist *al, const char *arg, int copy)
{
if (al->argc == al->maxc) {
al->maxc <<= 1;
@ -87,10 +81,7 @@ addarg(al, arg, copy)
}
int
main(argc, argv, envp)
int argc;
char *argv[];
char *envp[];
main(int argc, char *argv[], char *envp[])
{
FILE *config;
char *line, *cp, *from, *to, *ap;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $ */
/* $NetBSD: mdconfig.c,v 1.6 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $");
__RCSID("$NetBSD: mdconfig.c,v 1.6 2018/01/23 21:06:25 sevan Exp $");
#endif
/*
@ -48,12 +48,8 @@ __RCSID("$NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $");
#include <stdio.h>
#include <stdlib.h>
int main __P((int, char **));
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
struct md_conf md;
size_t nblks;

View File

@ -1,4 +1,4 @@
/* $NetBSD: memswitch.c,v 1.12 2011/01/14 13:31:47 minoura Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -58,9 +58,7 @@ int nflag = 0;
u_int8_t *current_values = 0;
u_int8_t *modified_values = 0;
int main __P((int, char*[]));
void
static void
usage(void)
{
fprintf(stderr, "usage: %s -a\n", progname);
@ -71,9 +69,7 @@ usage(void)
}
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int ch;
enum md {
@ -155,8 +151,7 @@ main(argc, argv)
}
void
show_single(name)
const char *name;
show_single(const char *name)
{
int i;
int n = 0;
@ -198,8 +193,7 @@ show_all(void)
}
void
modify_single(expr)
const char *expr;
modify_single(const char *expr)
{
int i, l, n;
char *class = NULL, *node = NULL;
@ -257,8 +251,7 @@ modify_single(expr)
}
void
help_single(name)
const char *name;
help_single(const char *name)
{
int i;
char fullname[50];
@ -419,8 +412,7 @@ flush(void)
}
int
save(name)
const char *name;
save(const char *name)
{
#ifndef DEBUG
int fd;
@ -448,8 +440,7 @@ save(name)
}
int
restore(name)
const char *name;
restore(const char *name)
{
#ifndef DEBUG
int sramfd, fd, i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: memswitch.h,v 1.2 2008/04/28 20:24:17 martin Exp $ */
/* $NetBSD: memswitch.h,v 1.3 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -45,10 +45,10 @@
struct property;
typedef int (*parse_t) __P((struct property*, const char*));
typedef int (*print_t) __P((struct property*, char*));
typedef int (*fill_t) __P((struct property*));
typedef int (*flush_t) __P((struct property*));
typedef int (*parse_t)(struct property*, const char*);
typedef int (*print_t)(struct property*, char*);
typedef int (*fill_t)(struct property*);
typedef int (*flush_t)(struct property*);
struct property {
const char *class;
@ -79,13 +79,13 @@ extern char *progname;
extern u_int8_t *current_values;
extern u_int8_t *modified_values;
void usage __P((void)) __attribute__((noreturn));
void show_single __P((const char*));
void show_all __P((void));
void modify_single __P((const char*));
void help_single __P((const char*));
void alloc_current_values __P((void));
void alloc_modified_values __P((void));
void flush __P((void));
int save __P((const char*));
int restore __P((const char*));
static void usage(void)) __dead;
void show_single(const char*));
void show_all(void));
void modify_single(const char*));
void help_single(const char*));
void alloc_current_values(void));
void alloc_modified_values(void));
void flush(void));
int save(const char*));
int restore(const char*));

View File

@ -1,4 +1,4 @@
/* $NetBSD: methods.c,v 1.7 2011/01/14 13:31:47 minoura Exp $ */
/* $NetBSD: methods.c,v 1.8 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,8 +38,7 @@
#include "methods.h"
int
atoi_(p)
const char **p;
atoi_(const char **p)
{
const char *p1 = *p;
int v = 0;
@ -96,8 +95,7 @@ atoi_(p)
}
int
fill_uchar(prop)
struct property *prop;
fill_uchar(struct property *prop)
{
if (current_values == 0)
alloc_current_values();
@ -112,8 +110,7 @@ fill_uchar(prop)
}
int
fill_ushort(prop)
struct property *prop;
fill_ushort(struct property *prop)
{
if (current_values == 0)
alloc_current_values();
@ -128,8 +125,7 @@ fill_ushort(prop)
}
int
fill_ulong(prop)
struct property *prop;
fill_ulong(struct property *prop)
{
if (current_values == 0)
alloc_current_values();
@ -144,8 +140,7 @@ fill_ulong(prop)
}
int
flush_uchar(prop)
struct property *prop;
flush_uchar(struct property *prop)
{
if (!prop->modified)
return 0;
@ -159,8 +154,7 @@ flush_uchar(prop)
}
int
flush_ushort(prop)
struct property *prop;
flush_ushort(struct property *prop)
{
if (!prop->modified)
return 0;
@ -175,8 +169,7 @@ flush_ushort(prop)
}
int
flush_ulong(prop)
struct property *prop;
flush_ulong(struct property *prop)
{
if (!prop->modified)
return 0;
@ -193,16 +186,13 @@ flush_ulong(prop)
}
int
flush_dummy(prop)
struct property *prop;
flush_dummy(struct property *prop)
{
return 0;
}
int
parse_dummy(prop, value)
struct property *prop;
const char *value;
parse_dummy(struct property *prop, const char *value)
{
warnx("Cannot modify %s.%s", prop->class, prop->node);
@ -210,9 +200,7 @@ parse_dummy(prop, value)
}
int
parse_byte(prop, value)
struct property *prop;
const char *value;
parse_byte(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -248,9 +236,7 @@ parse_byte(prop, value)
}
int
parse_uchar(prop, value)
struct property *prop;
const char *value;
parse_uchar(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -276,9 +262,7 @@ parse_uchar(prop, value)
}
int
parse_ulong(prop, value)
struct property *prop;
const char *value;
parse_ulong(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -304,9 +288,7 @@ parse_ulong(prop, value)
}
int
parse_ushort(prop, value)
struct property *prop;
const char *value;
parse_ushort(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -332,9 +314,7 @@ parse_ushort(prop, value)
}
int
parse_time(prop, value)
struct property *prop;
const char *value;
parse_time(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -377,9 +357,7 @@ parse_time(prop, value)
}
int
parse_bootdev(prop, value)
struct property *prop;
const char *value;
parse_bootdev(struct property *prop, const char *value)
{
const char *p = value;
int v;
@ -441,9 +419,7 @@ parse_bootdev(prop, value)
}
int
parse_serial(prop, value)
struct property *prop;
const char *value;
parse_serial(struct property *prop, const char *value)
#define NEXTSPEC while (*p == ' ' || *p == '\t') p++; \
if (*p++ != ',') { \
warnx("%s: Invalid value", value); \
@ -543,9 +519,7 @@ parse_serial(prop, value)
#undef NEXTSPEC
int
parse_srammode(prop, value)
struct property *prop;
const char *value;
parse_srammode(struct property *prop, const char *value)
{
static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"};
int i;
@ -566,9 +540,7 @@ parse_srammode(prop, value)
}
int
print_uchar(prop, str)
struct property *prop;
char *str;
print_uchar(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -584,9 +556,7 @@ print_uchar(prop, str)
}
int
print_ucharh(prop, str)
struct property *prop;
char *str;
print_ucharh(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -602,9 +572,7 @@ print_ucharh(prop, str)
}
int
print_ushorth(prop, str)
struct property *prop;
char *str;
print_ushorth(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -620,9 +588,7 @@ print_ushorth(prop, str)
}
int
print_ulong(prop, str)
struct property *prop;
char *str;
print_ulong(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -638,9 +604,7 @@ print_ulong(prop, str)
}
int
print_ulongh(prop, str)
struct property *prop;
char *str;
print_ulongh(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -656,9 +620,7 @@ print_ulongh(prop, str)
}
int
print_magic(prop, str)
struct property *prop;
char *str;
print_magic(struct property *prop, char *str)
{
if (!prop->value_valid)
prop->fill(prop);
@ -672,9 +634,7 @@ print_magic(prop, str)
}
int
print_timesec(prop, str)
struct property *prop;
char *str;
print_timesec(struct property *prop, char *str)
{
if (prop->modified)
snprintf(str, MAXVALUELEN,
@ -690,9 +650,7 @@ print_timesec(prop, str)
}
int
print_bootdev(prop, str)
struct property *prop;
char *str;
print_bootdev(struct property *prop, char *str)
{
unsigned int v;
@ -721,9 +679,7 @@ print_bootdev(prop, str)
}
int
print_serial(prop, str)
struct property *prop;
char *str;
print_serial(struct property *prop, char *str)
{
unsigned int v;
const char *baud, *stop;
@ -754,9 +710,7 @@ print_serial(prop, str)
}
int
print_srammode(prop, str)
struct property *prop;
char *str;
print_srammode(struct property *prop, char *str)
{
int v;
static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"};

View File

@ -1,4 +1,4 @@
/* $NetBSD: methods.h,v 1.4 2008/04/28 20:24:17 martin Exp $ */
/* $NetBSD: methods.h,v 1.5 2018/01/23 21:06:25 sevan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -30,34 +30,34 @@
*/
int atoi_ __P((const char**));
int atoi_(const char**);
int fill_uchar __P((struct property*));
int fill_ushort __P((struct property*));
int fill_ulong __P((struct property*));
int fill_uchar(struct property*);
int fill_ushort(struct property*);
int fill_ulong(struct property*);
int flush_uchar __P((struct property*));
int flush_ushort __P((struct property*));
int flush_ulong __P((struct property*));
int flush_dummy __P((struct property*));
int flush_uchar(struct property*);
int flush_ushort(struct property*);
int flush_ulong(struct property*);
int flush_dummy(struct property*);
int parse_dummy __P((struct property*, const char*));
int parse_uchar __P((struct property*, const char*));
int parse_ushort __P((struct property*, const char*));
int parse_ulong __P((struct property*, const char*));
int parse_byte __P((struct property*, const char*));
int parse_time __P((struct property*, const char*));
int parse_bootdev __P((struct property*, const char*));
int parse_serial __P((struct property*, const char*));
int parse_srammode __P((struct property*, const char*));
int parse_dummy(struct property*, const char*);
int parse_uchar(struct property*, const char*);
int parse_ushort(struct property*, const char*);
int parse_ulong(struct property*, const char*);
int parse_byte(struct property*, const char*);
int parse_time(struct property*, const char*);
int parse_bootdev(struct property*, const char*);
int parse_serial(struct property*, const char*);
int parse_srammode(struct property*, const char*);
int print_uchar __P((struct property*, char*));
int print_ucharh __P((struct property*, char*));
int print_ushorth __P((struct property*, char*));
int print_ulong __P((struct property*, char*));
int print_ulongh __P((struct property*, char*));
int print_magic __P((struct property*, char*));
int print_timesec __P((struct property*, char*));
int print_bootdev __P((struct property*, char*));
int print_serial __P((struct property*, char*));
int print_srammode __P((struct property*, char*));
int print_uchar(struct property*, char*);
int print_ucharh(struct property*, char*);
int print_ushorth(struct property*, char*);
int print_ulong(struct property*, char*);
int print_ulongh(struct property*, char*);
int print_magic(struct property*, char*);
int print_timesec(struct property*, char*);
int print_bootdev(struct property*, char*);
int print_serial(struct property*, char*);
int print_srammode(struct property*, char*);

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.5 2017/01/10 21:03:36 christos Exp $ */
/* $NetBSD: main.c,v 1.6 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 2002, 2005
@ -53,7 +53,6 @@
static int getcdtoc(int);
static int getfaketoc(int);
int main(int, char **);
const char *disk = "cd0";
int ntracks;
@ -123,9 +122,7 @@ getfaketoc(int fd)
}
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
int fd, res, i, j, rawpart;
char fullname[MAXPATHLEN];

View File

@ -1,4 +1,4 @@
/* $NetBSD: bpf.c,v 1.20 2011/02/08 20:20:28 rmind Exp $ */
/* $NetBSD: bpf.c,v 1.21 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: bpf.c,v 1.20 2011/02/08 20:20:28 rmind Exp $");
__RCSID("$NetBSD: bpf.c,v 1.21 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -215,8 +215,7 @@ BpfOpen()
** None.
*/
char *
BpfGetIntfName(errmsg)
char **errmsg;
BpfGetIntfName(char **errmsg)
{
struct ifaddrs *ifap, *ifa, *p;
int minunit, n;
@ -281,9 +280,7 @@ BpfGetIntfName(errmsg)
** None.
*/
int
BpfRead(rconn, doread)
RMPCONN *rconn;
int doread;
BpfRead(RMPCONN *rconn, int doread)
{
int datlen, caplen, hdrlen;
static u_int8_t *bp = NULL, *ep = NULL;
@ -348,8 +345,7 @@ BpfRead(rconn, doread)
** None.
*/
int
BpfWrite(rconn)
RMPCONN *rconn;
BpfWrite(RMPCONN *rconn)
{
if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) {
syslog(LOG_ERR, "write: %s: %m", EnetStr(rconn));

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.11 2011/08/31 13:32:40 joerg Exp $ */
/* $NetBSD: defs.h,v 1.12 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -146,36 +146,36 @@ extern RMPCONN *RmpConns; /* list of active connections */
extern u_int8_t RmpMcastAddr[]; /* RMP multicast address */
void AddConn __P((RMPCONN *));
int BootDone __P((RMPCONN *));
void BpfClose __P((void));
char *BpfGetIntfName __P((char **));
int BpfOpen __P((void));
int BpfRead __P((RMPCONN *, int));
int BpfWrite __P((RMPCONN *));
void DebugOff __P((int));
void DebugOn __P((int));
void DispPkt __P((RMPCONN *, int));
void DoTimeout __P((void));
void DspFlnm __P((u_int, char *));
void Exit __P((int)) __dead;
CLIENT *FindClient __P((RMPCONN *));
RMPCONN *FindConn __P((RMPCONN *));
void FreeClients __P((void));
void FreeConn __P((RMPCONN *));
void FreeConns __P((void));
int GetBootFiles __P((void));
char *GetEtherAddr __P((u_int8_t *));
CLIENT *NewClient __P((u_int8_t *));
RMPCONN *NewConn __P((RMPCONN *));
char *NewStr __P((char *));
u_int8_t *ParseAddr __P((char *));
int ParseConfig __P((void));
void ProcessPacket __P((RMPCONN *, CLIENT *));
void ReConfig __P((int));
void RemoveConn __P((RMPCONN *));
int SendBootRepl __P((struct rmp_packet *, RMPCONN *, char *[]));
int SendFileNo __P((struct rmp_packet *, RMPCONN *, char *[]));
int SendPacket __P((RMPCONN *));
int SendReadRepl __P((RMPCONN *));
int SendServerID __P((RMPCONN *));
void AddConn(RMPCONN *);
int BootDone(RMPCONN *);
void BpfClose(void);
char *BpfGetIntfName(char **);
int BpfOpen(void);
int BpfRead(RMPCONN *, int);
int BpfWrite(RMPCONN *);
void DebugOff(int);
void DebugOn(int);
void DispPkt(RMPCONN *, int);
void DoTimeout(void);
void DspFlnm(u_int, char *);
void Exit(int) __dead;
CLIENT *FindClient(RMPCONN *);
RMPCONN *FindConn(RMPCONN *);
void FreeClients(void);
void FreeConn(RMPCONN *);
void FreeConns(void);
int GetBootFiles(void);
char *GetEtherAddr(u_int8_t *);
CLIENT *NewClient(u_int8_t *);
RMPCONN *NewConn(RMPCONN *);
char *NewStr(char *);
u_int8_t *ParseAddr(char *);
int ParseConfig(void);
void ProcessPacket(RMPCONN *, CLIENT *);
void ReConfig(int);
void RemoveConn(RMPCONN *);
int SendBootRepl(struct rmp_packet *, RMPCONN *, char *[]);
int SendFileNo(struct rmp_packet *, RMPCONN *, char *[]);
int SendPacket(RMPCONN *);
int SendReadRepl(RMPCONN *);
int SendServerID(RMPCONN *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: parseconf.c,v 1.11 2011/02/08 20:20:28 rmind Exp $ */
/* $NetBSD: parseconf.c,v 1.12 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: parseconf.c,v 1.11 2011/02/08 20:20:28 rmind Exp $");
__RCSID("$NetBSD: parseconf.c,v 1.12 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -246,8 +246,7 @@ ParseConfig()
** be copied if it's to be saved.
*/
u_int8_t *
ParseAddr(str)
char *str;
ParseAddr(char *str)
{
static u_int8_t addr[RMP_ADDRLEN];
char *cp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $ */
/* $NetBSD: rmpproto.c,v 1.16 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $");
__RCSID("$NetBSD: rmpproto.c,v 1.16 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -85,9 +85,7 @@ __RCSID("$NetBSD: rmpproto.c,v 1.15 2011/02/08 20:20:28 rmind Exp $");
** sent to the host that sent the packet.
*/
void
ProcessPacket(rconn, client)
RMPCONN *rconn;
CLIENT *client;
ProcessPacket(RMPCONN *rconn, CLIENT *client)
{
struct rmp_packet *rmp;
RMPCONN *rconnout;
@ -175,8 +173,7 @@ ProcessPacket(rconn, client)
** none.
*/
int
SendServerID(rconn)
RMPCONN *rconn;
SendServerID(RMPCONN *rconn)
{
struct rmp_packet *rpl;
char *src, *dst;
@ -227,10 +224,7 @@ SendServerID(rconn)
** none.
*/
int
SendFileNo(req, rconn, filelist)
struct rmp_packet *req;
RMPCONN *rconn;
char *filelist[];
SendFileNo(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
{
struct rmp_packet *rpl;
char *src, *dst;
@ -290,10 +284,7 @@ SendFileNo(req, rconn, filelist)
** none.
*/
int
SendBootRepl(req, rconn, filelist)
struct rmp_packet *req;
RMPCONN *rconn;
char *filelist[];
SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
{
int retval;
char *filename, filepath[RMPBOOTDATA+1];
@ -408,8 +399,7 @@ sendpkt:
** none.
*/
int
SendReadRepl(rconn)
RMPCONN *rconn;
SendReadRepl(RMPCONN *rconn)
{
int retval = 0;
RMPCONN *oldconn;
@ -526,8 +516,7 @@ sendpkt:
** none.
*/
int
BootDone(rconn)
RMPCONN *rconn;
BootDone(RMPCONN *rconn)
{
RMPCONN *oldconn;
struct rmp_packet *rpl;
@ -574,8 +563,7 @@ BootDone(rconn)
** none.
*/
int
SendPacket(rconn)
RMPCONN *rconn;
SendPacket(RMPCONN *rconn)
{
/*
* Set Ethernet Destination address to Source (BPF and the enet

View File

@ -1,4 +1,4 @@
/* $NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $ */
/* $NetBSD: utils.c,v 1.18 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $");
__RCSID("$NetBSD: utils.c,v 1.18 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -78,9 +78,7 @@ __RCSID("$NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $");
** None.
*/
void
DispPkt(rconn, direct)
RMPCONN *rconn;
int direct;
DispPkt(RMPCONN *rconn, int direct)
{
static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u";
static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n";
@ -207,8 +205,7 @@ DispPkt(rconn, direct)
** be copied if it's to be saved.
*/
char *
GetEtherAddr(addr)
u_int8_t *addr;
GetEtherAddr(u_int8_t *addr)
{
static char Hex[] = "0123456789abcdef";
static char etherstr[RMP_ADDRLEN*3];
@ -248,9 +245,7 @@ GetEtherAddr(addr)
** - Characters are sent to `DbgFp'.
*/
void
DspFlnm(size, flnm)
u_int size;
char *flnm;
DspFlnm(u_int size, char *flnm)
{
size_t i;
@ -275,8 +270,7 @@ DspFlnm(size, flnm)
** - If malloc() fails, a log message will be generated.
*/
CLIENT *
NewClient(addr)
u_int8_t *addr;
NewClient(u_int8_t *addr)
{
CLIENT *ctmp;
@ -333,8 +327,7 @@ FreeClients()
** - If malloc() fails, a log message will be generated.
*/
char *
NewStr(str)
char *str;
NewStr(char *str)
{
char *stmp;
@ -367,8 +360,7 @@ static RMPCONN *LastFree = NULL;
** - If malloc() fails, a log message will be generated.
*/
RMPCONN *
NewConn(rconn)
RMPCONN *rconn;
NewConn(RMPCONN *rconn)
{
RMPCONN *rtmp;
@ -408,8 +400,7 @@ NewConn(rconn)
** - File desc associated with `rtmp->bootfd' will be closed.
*/
void
FreeConn(rtmp)
RMPCONN *rtmp;
FreeConn(RMPCONN *rtmp)
{
/*
* If the file descriptor is in use, close the file.
@ -475,8 +466,7 @@ FreeConns()
** - This routine must be called with SIGHUP blocked.
*/
void
AddConn(rconn)
RMPCONN *rconn;
AddConn(RMPCONN *rconn)
{
if (RmpConns != NULL)
rconn->next = RmpConns;
@ -503,8 +493,7 @@ AddConn(rconn)
** - This routine must be called with SIGHUP blocked.
*/
RMPCONN *
FindConn(rconn)
RMPCONN *rconn;
FindConn(RMPCONN *rconn)
{
RMPCONN *rtmp;
@ -533,8 +522,7 @@ FindConn(rconn)
** - This routine must be called with SIGHUP blocked.
*/
void
RemoveConn(rconn)
RMPCONN *rconn;
RemoveConn(RMPCONN *rconn)
{
RMPCONN *thisrconn, *lastrconn;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmt.c,v 1.16 2009/04/18 09:25:50 lukem Exp $ */
/* $NetBSD: rmt.c,v 1.17 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1983, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\
#if 0
static char sccsid[] = "@(#)rmt.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: rmt.c,v 1.16 2009/04/18 09:25:50 lukem Exp $");
__RCSID("$NetBSD: rmt.c,v 1.17 2018/01/23 21:06:25 sevan Exp $");
#endif
#endif /* not lint */
@ -74,15 +74,12 @@ FILE *debug;
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
char *checkbuf __P((char *, int));
void error __P((int));
int main __P((int, char **));
void getstring __P((char *, size_t));
char *checkbuf(char *, int);
void error(int);
void getstring(char *, size_t);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
char *record = NULL;
int rval;
@ -209,9 +206,7 @@ ioerror:
}
void
getstring(bp, size)
char *bp;
size_t size;
getstring(char *bp, size_t size)
{
char *cp = bp;
char *ep = bp + size - 1;
@ -224,9 +219,7 @@ getstring(bp, size)
}
char *
checkbuf(record, size)
char *record;
int size;
checkbuf(char *record, int size)
{
if (size <= maxrecsize)
@ -246,8 +239,7 @@ checkbuf(record, size)
}
void
error(num)
int num;
error(int num)
{
DEBUG2("rmtd: E %d (%s)\n", num, strerror(num));

View File

@ -1,4 +1,4 @@
/* $NetBSD: lockd.h,v 1.2 2000/06/07 14:34:40 bouyer Exp $ */
/* $NetBSD: lockd.h,v 1.3 2018/01/23 21:06:25 sevan Exp $ */
/*
* Copyright (c) 1995
@ -35,4 +35,4 @@
extern int debug_level;
extern int grace_expired;
void sigchild_handler __P((int));
void sigchild_handler(int);

View File

@ -1,36 +1,36 @@
/* $NetBSD: extern.h,v 1.3 2014/03/29 18:54:36 apb Exp $ */
/* $NetBSD: extern.h,v 1.4 2018/01/23 21:06:25 sevan Exp $ */
extern int interrupted;
extern pr_list printers;
extern pr_queue queue;
extern char sp_name[1024];
void add_printer_alias __P((char *, char *, char *));
void add_cache_entry __P((struct passwd *));
int build_pr_list __P((void));
pirstat build_pr_queue __P((printername, username, int, int *, int *));
int check_cache __P((char *, char *, int *, int *));
void free_mapreq_results __P((mapreq_res));
void fillin_extra_groups __P((char *, u_int, int *, u_int[]));
void add_printer_alias(char *, char *, char *);
void add_cache_entry(struct passwd *);
int build_pr_list(void);
pirstat build_pr_queue(printername, username, int, int *, int *);
int check_cache(char *, char *, int *, int *);
void free_mapreq_results(mapreq_res);
void fillin_extra_groups(char *, u_int, int *, u_int[]);
#ifdef USE_YP
char *find_entry __P((const char *, const char *));
char *find_entry(const char *, const char *);
#endif
void free_pr_list_item __P((pr_list));
void free_pr_queue_item __P((pr_queue));
struct passwd *get_password __P((char *));
pirstat get_pr_status __P((printername, bool_t *, bool_t *, int *,
bool_t *, char *, size_t));
void *grab __P((int));
pcrstat pr_cancel __P((char *, char *, char *));
pirstat pr_init __P((char *, char *, char **));
psrstat pr_start __P((void));
psrstat pr_start2 __P((char *, char *, char *, char *, char *,
char **));
void run_ps630 __P((char *, char *));
void scramble __P((char *, char *));
int strembedded __P((const char *, const char *));
FILE *su_popen __P((char *, char *, int));
int su_pclose __P((FILE *));
void free_pr_list_item(pr_list);
void free_pr_queue_item(pr_queue);
struct passwd *get_password(char *);
pirstat get_pr_status(printername, bool_t *, bool_t *, int *,
bool_t *, char *, size_t);
void *grab(int);
pcrstat pr_cancel(char *, char *, char *);
pirstat pr_init(char *, char *, char **);
psrstat pr_start(void);
psrstat pr_start2(char *, char *, char *, char *, char *,
char **);
void run_ps630(char *, char *);
void scramble(char *, char *);
int strembedded(const char *, const char *);
FILE *su_popen(char *, char *, int);
int su_pclose(FILE *);
#ifdef WTMP
void wlogin __P((char *, struct svc_req *));
void wlogin(char *, struct svc_req *);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_cache.c,v 1.4 2003/07/16 08:22:01 itojun Exp $ */
/* $NetBSD: pcnfsd_cache.c,v 1.5 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_cache.c 1.1 91/09/03 12:45:14 SMI */
/*
@ -52,11 +52,7 @@ struct cache {
int
check_cache(name, pw, p_uid, p_gid)
char *name;
char *pw;
int *p_uid;
int *p_gid;
check_cache(char *name, char *pw, int *p_uid, int *p_gid)
{
int i;
int c1, c2;
@ -80,8 +76,7 @@ check_cache(name, pw, p_uid, p_gid)
}
void
add_cache_entry(p)
struct passwd *p;
add_cache_entry(struct passwd *p)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_misc.c,v 1.15 2012/11/04 22:26:04 christos Exp $ */
/* $NetBSD: pcnfsd_misc.c,v 1.16 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_misc.c 1.5 92/01/24 19:59:13 SMI */
/*
@ -67,10 +67,10 @@ int wtmp_enabled = 1;
char tempstr[256];
char *mapfont __P((char, char, char));
void myhandler __P((int));
void start_watchdog __P((int));
void stop_watchdog __P((void));
char *mapfont(char, char, char);
void myhandler(int);
void start_watchdog(int);
void stop_watchdog(void);
/*
**=====================================================================
@ -85,9 +85,7 @@ void stop_watchdog __P((void));
void
scramble(s1, s2)
char *s1;
char *s2;
scramble(char *s1, char *s2)
{
while (*s1) {
*s2++ = (*s1 ^ zchar) & 0x7f;
@ -99,8 +97,7 @@ scramble(s1, s2)
struct passwd *
get_password(usrnam)
char *usrnam;
get_password(char *usrnam)
{
struct passwd *p;
static struct passwd localp;
@ -238,9 +235,7 @@ finis: return (&fontname[0]);
/* #define PS630_IS_BROKEN 1 */
void
run_ps630(f, opts)
char *f;
char *opts;
run_ps630(char *f, char *opts)
{
char temp_file[256];
char commbuf[256];
@ -298,9 +293,7 @@ run_ps630(f, opts)
#ifdef WTMP
void
wlogin(name, req)
char *name;
struct svc_req *req;
wlogin(char *name, struct svc_req *req)
{
struct sockaddr_in *who;
struct hostent *hp;
@ -357,8 +350,7 @@ int interrupted = 0;
static FILE *pipe_handle;
void
myhandler(dummy)
int dummy;
myhandler(int dummy)
{
interrupted = 1;
fclose(pipe_handle);
@ -367,8 +359,7 @@ myhandler(dummy)
}
void
start_watchdog(n)
int n;
start_watchdog(int n)
{
/*
* Setup SIGALRM handler, force interrupt of ongoing syscall
@ -414,10 +405,7 @@ stop_watchdog()
}
FILE *
su_popen(user, cmd, maxtime)
char *user;
char *cmd;
int maxtime;
su_popen(char *user, char *cmd, int maxtime)
{
int p[2];
int parent_fd, child_fd, pid;
@ -475,8 +463,7 @@ su_popen(user, cmd, maxtime)
}
int
su_pclose(ptr)
FILE *ptr;
su_pclose(FILE *ptr)
{
int pid, status;
@ -579,9 +566,7 @@ main(int argc, char *argv[])
*/
int
strembedded(s1, s2)
const char *s1;
const char *s2;
strembedded(const char *s1, const char *s2)
{
while (*s2) {
if (!strcasecmp(s1, s2))

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_print.c,v 1.13 2014/03/29 18:54:36 apb Exp $ */
/* $NetBSD: pcnfsd_print.c,v 1.14 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_print.c 1.7 92/01/24 19:58:58 SMI */
/*
@ -75,12 +75,12 @@
#define SIZECOL 62
#define FILECOL 24
char *expand_alias __P((char *, char *, char *, char *));
pr_list list_virtual_printers __P((void));
char *map_printer_name __P((char *));
void substitute __P((char *, const char *, const char *));
int suspicious __P((char *));
int valid_pr __P((char *));
char *expand_alias(char *, char *, char *, char *);
pr_list list_virtual_printers(void);
char *map_printer_name(char *);
void substitute(char *, const char *, const char *);
int suspicious(char *);
int valid_pr(char *);
/*
**---------------------------------------------------------------------
@ -114,8 +114,7 @@ pr_queue queue = NULL;
*/
int
suspicious(s)
char *s;
suspicious(char *s)
{
if (strpbrk(s, ";|&<>`'#!?*()[]^/${}\n\r\"\\:") != NULL)
return 1;
@ -124,8 +123,7 @@ suspicious(s)
int
valid_pr(pr)
char *pr;
valid_pr(char *pr)
{
char *p;
pr_list curr;
@ -155,10 +153,7 @@ valid_pr(pr)
* doing a chmod on something that could be a symlink...
*/
pirstat
pr_init(sys, pr, sp)
char *sys;
char *pr;
char **sp;
pr_init(char *sys, char *pr, char **sp)
{
int dir_mode = 0777;
int rc;
@ -208,13 +203,7 @@ badspool:
return (PI_RES_OK);
}
psrstat
pr_start2(sys, pr, user, fname, opts, id)
char *sys;
char *pr;
char *user;
char *fname;
char *opts;
char **id;
pr_start2(char *sys, char *pr, char *user, char *fname, char *opts, char **id)
{
char snum[20];
static char req_id[256];
@ -588,8 +577,7 @@ build_pr_list()
#endif /* SVR4 */
void *
grab(n)
int n;
grab(int n)
{
void *p;
@ -602,8 +590,7 @@ grab(n)
}
void
free_pr_list_item(curr)
pr_list curr;
free_pr_list_item(pr_list curr)
{
if (curr->pn)
free(curr->pn);
@ -649,12 +636,7 @@ free_pr_list_item(curr)
**/
pirstat
build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
printername pn;
username user;
int just_mine;
int *p_qlen;
int *p_qshown;
build_pr_queue(printername pn, username user, int just_mine, int p_qlen, int p_qshown)
{
pr_queue last = NULL;
pr_queue curr = NULL;
@ -730,12 +712,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
#else /* SVR4 */
pirstat
build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
printername pn;
username user;
int just_mine;
int *p_qlen;
int *p_qshown;
build_pr_queue(printername pn, username user, int just_mine, int *p_qlen, int *p_qshown)
{
pr_queue last = NULL;
pr_queue curr = NULL;
@ -834,8 +811,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
#endif /* SVR4 */
void
free_pr_queue_item(curr)
pr_queue curr;
free_pr_queue_item(pr_queue curr)
{
if (curr->id)
free(curr->id);
@ -904,14 +880,7 @@ free_pr_queue_item(curr)
*/
pirstat
get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
printername pn;
bool_t *avail;
bool_t *printing;
int *qlen;
bool_t *needs_operator;
char *status;
size_t statuslen;
get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen)
{
char buff[256];
char cmd[64];
@ -969,14 +938,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
* BSD way: lpc status
*/
pirstat
get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
printername pn;
bool_t *avail;
bool_t *printing;
int *qlen;
bool_t *needs_operator;
char *status;
size_t statuslen;
get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen)
{
char cmd[128];
char buff[256];
@ -1106,10 +1068,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
** messages are localized..... :-(
*/
pcrstat
pr_cancel(pr, user, id)
char *pr;
char *user;
char *id;
pr_cancel(char *pr, char *user, char *id)
{
char cmdbuf[256];
char resbuf[256];
@ -1154,10 +1113,7 @@ pr_cancel(pr, user, id)
* BSD way: lprm
*/
pcrstat
pr_cancel(pr, user, id)
char *pr;
char *user;
char *id;
pr_cancel(char *pr, char *user, char *id)
{
char cmdbuf[256];
char resbuf[256];
@ -1246,10 +1202,7 @@ struct {
} alias[NPRINTERDEFS];
void
add_printer_alias(printer, alias_for, command)
char *printer;
char *alias_for;
char *command;
add_printer_alias(char *printer, char *alias_for, char *command)
{
size_t l;
@ -1305,8 +1258,7 @@ list_virtual_printers()
char *
map_printer_name(printer)
char *printer;
map_printer_name(char *printer)
{
int i;
for (i = 0; i < num_aliases; i++) {
@ -1317,10 +1269,7 @@ map_printer_name(printer)
}
void
substitute(string, token, data)
char *string;
const char *token;
const char *data;
substitute(char *string, const char *token, const char *data)
{
char temp[512];
char *c;
@ -1336,11 +1285,7 @@ substitute(string, token, data)
}
char *
expand_alias(printer, file, user, host)
char *printer;
char *file;
char *user;
char *host;
expand_alias(char *printer, char *file, char *user, char *host)
{
static char expansion[512];
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_test.c,v 1.3 2003/07/16 08:22:01 itojun Exp $ */
/* $NetBSD: pcnfsd_test.c,v 1.4 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_test.c 1.2 92/01/27 18:00:39 SMI */
#include <stdio.h>
@ -18,10 +18,8 @@ void free_pr_queue_item();
void good();
void bad();
main(argc, argv)
int argc;
char *argv[];
int
main(int argc, char *argv[])
{
char *host_name;
@ -99,9 +97,7 @@ char *transport = "udp";
#define zchar 0x5b
void
scramble(s1, s2)
char *s1;
char *s2;
scramble(char *s1, char *s2)
{
while (*s1)
{
@ -151,10 +147,7 @@ int i;
return(0);
}
test_v2_auth(host_name, user_name , pwrd)
char *host_name;
char *user_name;
char *pwrd;
test_v2_auth(char *host_name, char *user_name , char *pwrd)
{
v2_auth_args a;
v2_auth_results *rp;
@ -202,9 +195,7 @@ int i;
return(0);
}
test_v2_init(host_name, printer)
char *host_name;
char *printer;
test_v2_init(char *host_name, char *printer)
{
v2_pr_init_args a;
v2_pr_init_results *rp;
@ -232,12 +223,7 @@ v2_pr_init_results *rp;
}
test_v2_start(host_name, printer, user_name, tag1, tag2)
char *host_name;
char *printer;
char *user_name;
char *tag1;
char *tag2;
test_v2_start(char *host_name, char *printer, char *user_name, char *tag1, char *tag2)
{
v2_pr_start_args a;
v2_pr_start_results *rp;
@ -289,11 +275,7 @@ FILE *fp;
}
test_v2_cancel(host_name, printer, user_name, id)
char *host_name;
char *printer;
char *user_name;
char *id;
test_v2_cancel(char *host_name, char *printer, char *user_name, char *id)
{
v2_pr_cancel_args a;
v2_pr_cancel_results *rp;
@ -362,8 +344,7 @@ pr_list curr;
void
free_pr_list_item(curr)
pr_list curr;
free_pr_list_item(pr_list curr)
{
if(curr->pn)
free(curr->pn);
@ -380,10 +361,7 @@ pr_list curr;
test_v2_queue(printer, user_name, private)
char *printer;
char *user_name;
int private;
test_v2_queue(char *printer, char *user_name, int private)
{
struct v2_pr_queue_args a;
v2_pr_queue_results *rp;
@ -432,8 +410,7 @@ pr_queue curr;
void
free_pr_queue_item(curr)
pr_queue curr;
free_pr_queue_item(pr_queue curr)
{
if(curr->id)
free(curr->id);
@ -456,8 +433,7 @@ pr_queue curr;
test_v2_stat(printer)
char *printer;
test_v2_stat(char *printer)
{
v2_pr_status_args a;
v2_pr_status_results *rp;
@ -491,11 +467,7 @@ v2_pr_status_results *rp;
return(0);
}
struct mapreq_arg_item * make_mapreq_entry(t, i, n, next)
mapreq t;
int i;
char *n;
struct mapreq_arg_item *next;
struct mapreq_arg_item * make_mapreq_entry(mapreq t, int i, char *n, struct mapreq_arg_item *next)
{
struct mapreq_arg_item *x;
x = (struct mapreq_arg_item *)malloc(sizeof(struct mapreq_arg_item));
@ -559,8 +531,7 @@ printf("********************************************************\n");
}
void
bad(reason)
char *reason;
bad(char *reason)
{
printf("\n");
printf("********************************************************\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_v1.c,v 1.4 2011/08/31 16:24:59 plunky Exp $ */
/* $NetBSD: pcnfsd_v1.c,v 1.5 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v1.c 1.1 91/09/03 12:41:50 SMI */
/*
@ -61,18 +61,14 @@ int buggit = 0;
/*ARGSUSED*/
void *
pcnfsd_null_1_svc(arg, req)
void *arg;
struct svc_req *req;
pcnfsd_null_1_svc(void *arg, struct svc_req *req)
{
static char dummy;
return ((void *) &dummy);
}
auth_results *
pcnfsd_auth_1_svc(arg, req)
auth_args *arg;
struct svc_req *req;
pcnfsd_auth_1_svc(auth_args *arg, struct svc_req *req)
{
static auth_results r;
@ -124,9 +120,7 @@ pcnfsd_auth_1_svc(arg, req)
}
pr_init_results *
pcnfsd_pr_init_1_svc(pi_arg, req)
pr_init_args *pi_arg;
struct svc_req *req;
pcnfsd_pr_init_1_svc(pr_init_args *pi_arg, struct svc_req *req)
{
static pr_init_results pi_res;
@ -137,9 +131,7 @@ pcnfsd_pr_init_1_svc(pi_arg, req)
}
pr_start_results *
pcnfsd_pr_start_1_svc(ps_arg, req)
pr_start_args *ps_arg;
struct svc_req *req;
pcnfsd_pr_start_1_svc(pr_start_args *ps_arg, struct svc_req *req)
{
static pr_start_results ps_res;
char *dummyptr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcnfsd_v2.c,v 1.13 2014/03/29 18:54:36 apb Exp $ */
/* $NetBSD: pcnfsd_v2.c,v 1.14 2018/01/23 21:06:25 sevan Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v2.c 1.2 91/12/18 13:26:13 SMI */
/*
@ -63,18 +63,14 @@ static char pcnfsd_version[] = "@(#)pcnfsd_v2.c 1.2 - rpc.pcnfsd V2.0 (c) 1991 S
/*ARGSUSED*/
void *
pcnfsd2_null_2_svc(arg, req)
void *arg;
struct svc_req *req;
pcnfsd2_null_2_svc(void *arg, struct svc_req *req)
{
static char dummy;
return ((void *) &dummy);
}
v2_auth_results *
pcnfsd2_auth_2_svc(arg, req)
v2_auth_args *arg;
struct svc_req *req;
pcnfsd2_auth_2_svc(v2_auth_args *arg, struct svc_req *req)
{
static v2_auth_results r;
@ -168,9 +164,7 @@ pcnfsd2_auth_2_svc(arg, req)
}
v2_pr_init_results *
pcnfsd2_pr_init_2_svc(arg, req)
v2_pr_init_args *arg;
struct svc_req *req;
pcnfsd2_pr_init_2_svc(v2_pr_init_args *arg, struct svc_req *req)
{
static v2_pr_init_results res;
@ -183,9 +177,7 @@ pcnfsd2_pr_init_2_svc(arg, req)
}
v2_pr_start_results *
pcnfsd2_pr_start_2_svc(arg, req)
v2_pr_start_args *arg;
struct svc_req *req;
pcnfsd2_pr_start_2_svc(v2_pr_start_args *arg, struct svc_req *req)
{
static v2_pr_start_results res;
@ -198,9 +190,7 @@ pcnfsd2_pr_start_2_svc(arg, req)
}
/*ARGSUSED*/
v2_pr_list_results *
pcnfsd2_pr_list_2_svc(arg, req)
void *arg;
struct svc_req *req;
pcnfsd2_pr_list_2_svc(void *arg, struct svc_req *req)
{
static v2_pr_list_results res;
@ -213,9 +203,7 @@ pcnfsd2_pr_list_2_svc(arg, req)
}
v2_pr_queue_results *
pcnfsd2_pr_queue_2_svc(arg, req)
v2_pr_queue_args *arg;
struct svc_req *req;
pcnfsd2_pr_queue_2_svc(v2_pr_queue_args *arg, struct svc_req *req)
{
static v2_pr_queue_results res;
@ -230,9 +218,7 @@ pcnfsd2_pr_queue_2_svc(arg, req)
}
v2_pr_status_results *
pcnfsd2_pr_status_2_svc(arg, req)
v2_pr_status_args *arg;
struct svc_req *req;
pcnfsd2_pr_status_2_svc(v2_pr_status_args *arg, struct svc_req *req)
{
static v2_pr_status_results res;
static char status[128];
@ -246,9 +232,7 @@ pcnfsd2_pr_status_2_svc(arg, req)
}
v2_pr_cancel_results *
pcnfsd2_pr_cancel_2_svc(arg, req)
v2_pr_cancel_args *arg;
struct svc_req *req;
pcnfsd2_pr_cancel_2_svc(v2_pr_cancel_args *arg, struct svc_req *req)
{
static v2_pr_cancel_results res;
@ -259,9 +243,7 @@ pcnfsd2_pr_cancel_2_svc(arg, req)
}
/*ARGSUSED*/
v2_pr_requeue_results *
pcnfsd2_pr_requeue_2_svc(arg, req)
v2_pr_requeue_args *arg;
struct svc_req *req;
pcnfsd2_pr_requeue_2_svc(v2_pr_requeue_args *arg, struct svc_req *req)
{
static v2_pr_requeue_results res;
res.stat = PC_RES_FAIL;
@ -271,9 +253,7 @@ pcnfsd2_pr_requeue_2_svc(arg, req)
}
/*ARGSUSED*/
v2_pr_hold_results *
pcnfsd2_pr_hold_2_svc(arg, req)
v2_pr_hold_args *arg;
struct svc_req *req;
pcnfsd2_pr_hold_2_svc(v2_pr_hold_args *arg, struct svc_req *req)
{
static v2_pr_hold_results res;
@ -284,9 +264,7 @@ pcnfsd2_pr_hold_2_svc(arg, req)
}
/*ARGSUSED*/
v2_pr_release_results *
pcnfsd2_pr_release_2_svc(arg, req)
v2_pr_release_args *arg;
struct svc_req *req;
pcnfsd2_pr_release_2_svc(v2_pr_release_args *arg, struct svc_req *req)
{
static v2_pr_release_results res;
@ -297,9 +275,7 @@ pcnfsd2_pr_release_2_svc(arg, req)
}
/*ARGSUSED*/
v2_pr_admin_results *
pcnfsd2_pr_admin_2_svc(arg, req)
v2_pr_admin_args *arg;
struct svc_req *req;
pcnfsd2_pr_admin_2_svc(v2_pr_admin_args *arg, struct svc_req *req)
{
static v2_pr_admin_results res;
/*
@ -316,8 +292,7 @@ pcnfsd2_pr_admin_2_svc(arg, req)
}
void
free_mapreq_results(p)
mapreq_res p;
free_mapreq_results(mapreq_res p)
{
if (p->mapreq_next)
free_mapreq_results(p->mapreq_next); /* recurse */
@ -327,11 +302,10 @@ free_mapreq_results(p)
return;
}
static char *my_strdup __P((const char *));
static char *my_strdup(const char *);
static char *
my_strdup(s)
const char *s;
my_strdup(const char *s)
{
size_t len;
char *r;
@ -342,9 +316,7 @@ my_strdup(s)
}
v2_mapid_results *
pcnfsd2_mapid_2_svc(arg, req)
v2_mapid_args *arg;
struct svc_req *req;
pcnfsd2_mapid_2_svc(v2_mapid_args *arg, struct svc_req *req)
{
static v2_mapid_results res;
struct passwd *p_passwd;
@ -419,9 +391,7 @@ pcnfsd2_mapid_2_svc(arg, req)
/*ARGSUSED*/
v2_alert_results *
pcnfsd2_alert_2_svc(arg, req)
v2_alert_args *arg;
struct svc_req *req;
pcnfsd2_alert_2_svc(v2_alert_args *arg, struct svc_req *req)
{
static v2_alert_results res;
@ -432,9 +402,7 @@ pcnfsd2_alert_2_svc(arg, req)
}
/*ARGSUSED*/
v2_info_results *
pcnfsd2_info_2_svc(arg, req)
v2_info_args *arg;
struct svc_req *req;
pcnfsd2_info_2_svc(v2_info_args *arg, struct svc_req *req)
{
static v2_info_results res;
static int facilities[FACILITIESMAX];
@ -474,11 +442,7 @@ pcnfsd2_info_2_svc(arg, req)
void
fillin_extra_groups(uname, main_gid, len, extra_gids)
char *uname;
gid_t main_gid;
int *len;
gid_t extra_gids[EXTRAGIDLEN];
fillin_extra_groups(char *uname, gid_t main_gid, int *len, gid_t extra_gids[EXTRAGIDLEN])
{
struct group *grp;
__aconst char *__aconst *members;
@ -513,9 +477,7 @@ fillin_extra_groups(uname, main_gid, len, extra_gids)
* is responsible for free()ing the result string.
*/
char *
find_entry(key, map)
const char *key;
const char *map;
find_entry(const char *key, const char *map)
{
int err;
char *val = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $ */
/* $NetBSD: stat_proc.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */
/*
* Copyright (c) 1995
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $");
__RCSID("$NetBSD: stat_proc.c,v 1.9 2018/01/23 21:06:26 sevan Exp $");
#endif
#include <errno.h>
@ -58,9 +58,7 @@ __RCSID("$NetBSD: stat_proc.c,v 1.8 2009/04/18 13:04:50 lukem Exp $");
* an address.
*/
struct sm_stat_res *
sm_stat_1_svc(arg, req)
sm_name *arg;
struct svc_req *req;
sm_stat_1_svc(sm_name *arg, struct svc_req *req)
{
static sm_stat_res smres;
struct addrinfo *ai;
@ -92,9 +90,7 @@ sm_stat_1_svc(arg, req)
* valid (as judged by gethostbyname())
*/
struct sm_stat_res *
sm_mon_1_svc(arg, req)
mon *arg;
struct svc_req *req;
sm_mon_1_svc(mon *arg, struct svc_req *req)
{
static sm_stat_res smres;
struct addrinfo *ai;
@ -158,10 +154,7 @@ sm_mon_1_svc(arg, req)
* request, all are removed.
*/
int
do_unmon(name, hp, ptr)
char *name;
HostInfo *hp;
void *ptr;
do_unmon(char *name, HostInfo *hp, void *ptr)
{
my_id *idp = ptr;
MonList *lp, *next;
@ -199,9 +192,7 @@ do_unmon(name, hp, ptr)
* earlier call to sm_mon_1
*/
struct sm_stat *
sm_unmon_1_svc(arg, req)
mon_id *arg;
struct svc_req *req;
sm_unmon_1_svc(mon_id *arg, struct svc_req *req)
{
static sm_stat smres;
HostInfo *hp, h;
@ -241,9 +232,7 @@ sm_unmon_1_svc(arg, req)
* host and program number.
*/
struct sm_stat *
sm_unmon_all_1_svc(arg, req)
my_id *arg;
struct svc_req *req;
sm_unmon_all_1_svc(my_id *arg, struct svc_req *req)
{
static sm_stat smres;
@ -277,9 +266,7 @@ sm_unmon_all_1_svc(arg, req)
* and inform all hosts on the monitor list.
*/
void *
sm_simu_crash_1_svc(v, req)
void *v;
struct svc_req *req;
sm_simu_crash_1_svc(void *v, struct svc_req *req)
{
static char dummy;
@ -310,9 +297,7 @@ sm_simu_crash_1_svc(v, req)
* that modify the list.
*/
void *
sm_notify_1_svc(arg, req)
stat_chge *arg;
struct svc_req *req;
sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
{
struct timeval timeout = {20, 0}; /* 20 secs timeout */
CLIENT *cli;

View File

@ -1,4 +1,4 @@
/* $NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $ */
/* $NetBSD: statd.c,v 1.32 2018/01/23 21:06:26 sevan Exp $ */
/*
* Copyright (c) 1995
@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $");
__RCSID("$NetBSD: statd.c,v 1.32 2018/01/23 21:06:26 sevan Exp $");
#endif
/* main() function for status monitor daemon. Some of the code in this */
@ -79,22 +79,18 @@ static DBT undefkey = {
/* statd.c */
static int walk_one __P((int (*fun )__P ((DBT *, HostInfo *, void *)), DBT *, DBT *, void *));
static int walk_db __P((int (*fun )__P ((DBT *, HostInfo *, void *)), void *));
static int reset_host __P((DBT *, HostInfo *, void *));
static int check_work __P((DBT *, HostInfo *, void *));
static int unmon_host __P((DBT *, HostInfo *, void *));
static int notify_one __P((DBT *, HostInfo *, void *));
static void init_file __P((const char *));
static int notify_one_host __P((const char *));
static void die __P((int)) __dead;
int main __P((int, char **));
static int walk_one(int (*fun )(DBT *, HostInfo *, void *), DBT *, DBT *, void *);
static int walk_db(int (*fun )(DBT *, HostInfo *, void *), void *);
static int reset_host(DBT *, HostInfo *, void *);
static int check_work(DBT *, HostInfo *, void *);
static int unmon_host(DBT *, HostInfo *, void *);
static int notify_one(DBT *, HostInfo *, void *);
static void init_file(const char *);
static int notify_one_host(const char *);
static void die(int) __dead;
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
int ch;
struct sigaction nsa;
@ -181,8 +177,7 @@ main(argc, argv)
* children to exit when they have done their work.
*/
void
notify_handler(sig)
int sig;
notify_handler(int sig)
{
time_t now;
@ -241,9 +236,7 @@ bad:
*
*/
void
change_host(hostnamep, hp)
char *hostnamep;
HostInfo *hp;
change_host(char *hostnamep, HostInfo *hp)
{
DBT key, data;
char *ptr;
@ -282,9 +275,7 @@ change_host(hostnamep, hp)
*
*/
HostInfo *
find_host(hostname, hp)
char *hostname;
HostInfo *hp;
find_host(char *hostname, HostInfo *hp)
{
DBT key, data;
char *ptr;
@ -320,10 +311,7 @@ bad:
* Notes:
*/
static int
walk_one(fun, key, data, ptr)
int (*fun) __P((DBT *, HostInfo *, void *));
DBT *key, *data;
void *ptr;
walk_one(int (*fun)(DBT *, HostInfo *, void *), DBT *key, DBT *data, void *ptr)
{
HostInfo h;
if (key->size == undefkey.size &&
@ -344,9 +332,7 @@ walk_one(fun, key, data, ptr)
* Notes:
*/
static int
walk_db(fun, ptr)
int (*fun) __P((DBT *, HostInfo *, void *));
void *ptr;
walk_db(int (*fun)(DBT *, HostInfo *, void *), void *ptr)
{
DBT key, data;
@ -400,10 +386,7 @@ bad:
* notify them before the second crash occurred.
*/
static int
reset_host(key, hi, ptr)
DBT *key;
HostInfo *hi;
void *ptr;
reset_host(DBT *key, HostInfo *hi, void *ptr)
{
if (hi->monList) {
@ -422,10 +405,7 @@ reset_host(key, hi, ptr)
* Notes:
*/
static int
check_work(key, hi, ptr)
DBT *key;
HostInfo *hi;
void *ptr;
check_work(DBT *key, HostInfo *hi, void *ptr)
{
return hi->notifyReqd ? -1 : 0;
}
@ -437,10 +417,7 @@ check_work(key, hi, ptr)
* Notes:
*/
static int
unmon_host(key, hi, ptr)
DBT *key;
HostInfo *hi;
void *ptr;
unmon_host(DBT *key, HostInfo *hi, void *ptr)
{
char *name = key->data;
@ -456,10 +433,7 @@ unmon_host(key, hi, ptr)
* Notes:
*/
static int
notify_one(key, hi, ptr)
DBT *key;
HostInfo *hi;
void *ptr;
notify_one(DBT *key, HostInfo *hi, void *ptr)
{
time_t now = *(time_t *) ptr;
char *name = key->data;
@ -516,8 +490,7 @@ notify_one(key, hi, ptr)
* the state number to the next even value.
*/
static void
init_file(filename)
const char *filename;
init_file(const char *filename)
{
DBT data;
@ -584,8 +557,7 @@ unmon_hosts()
}
static int
notify_one_host(hostname)
const char *hostname;
notify_one_host(const char *hostname)
{
struct timeval timeout = {20, 0}; /* 20 secs timeout */
CLIENT *cli;
@ -621,8 +593,7 @@ notify_one_host(hostname)
static void
die(n)
int n;
die(int n)
{
(*db->close)(db);
exit(n);

View File

@ -1,4 +1,4 @@
/* $NetBSD: statd.h,v 1.2 1997/10/21 20:38:19 christos Exp $ */
/* $NetBSD: statd.h,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/*
* Copyright (c) 1995
@ -97,23 +97,23 @@ extern Header status_info;
/* Function prototypes */
/* stat_proc.c */
struct sm_stat_res *sm_stat_1_svc __P((sm_name *, struct svc_req *));
struct sm_stat_res *sm_mon_1_svc __P((mon *, struct svc_req *));
struct sm_stat *sm_unmon_1_svc __P((mon_id *, struct svc_req *));
struct sm_stat *sm_unmon_all_1_svc __P((my_id *, struct svc_req *));
void *sm_simu_crash_1_svc __P((void *, struct svc_req *));
void *sm_notify_1_svc __P((stat_chge *, struct svc_req *));
int do_unmon __P((char *, HostInfo *, void *));
struct sm_stat_res *sm_stat_1_svc(sm_name *, struct svc_req *);
struct sm_stat_res *sm_mon_1_svc(mon *, struct svc_req *);
struct sm_stat *sm_unmon_1_svc(mon_id *, struct svc_req *);
struct sm_stat *sm_unmon_all_1_svc(my_id *, struct svc_req *);
void *sm_simu_crash_1_svc(void *, struct svc_req *);
void *sm_notify_1_svc(stat_chge *, struct svc_req *);
int do_unmon(char *, HostInfo *, void *);
/* statd.c */
void notify_handler __P((int));
void sync_file __P((void));
void unmon_hosts __P((void));
void change_host __P((char *, HostInfo *));
HostInfo *find_host __P((char *, HostInfo *));
void reset_database __P((void));
void notify_handler(int);
void sync_file(void);
void unmon_hosts(void);
void change_host(char *, HostInfo *);
HostInfo *find_host(char *, HostInfo *);
void reset_database(void);
void sm_prog_1 __P((struct svc_req *, SVCXPRT *));
void sm_prog_1(struct svc_req *, SVCXPRT *);
#define NO_ALARM sa.sa_handler == SIG_DFL ? 0 : (sa.sa_handler = SIG_IGN, sigaction(SIGALRM, &sa, NULL))
#define ALARM sa.sa_handler == SIG_DFL ? 0 : (sa.sa_handler = notify_handler, sigaction(SIGALRM, &sa, NULL))

View File

@ -1,8 +1,8 @@
/* $NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $ */
/* $NetBSD: test.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $");
__RCSID("$NetBSD: test.c,v 1.3 2018/01/23 21:06:26 sevan Exp $");
#endif
#include <stdio.h>
@ -14,9 +14,7 @@ __RCSID("$NetBSD: test.c,v 1.2 1997/10/17 16:03:09 lukem Exp $");
static struct timeval TIMEOUT = {25, 0};
struct sm_stat_res *
sm_stat_1(argp, clnt)
struct sm_name *argp;
CLIENT *clnt;
sm_stat_1(struct sm_name *argp, CLIENT *clnt)
{
static struct sm_stat_res res;
@ -29,9 +27,7 @@ sm_stat_1(argp, clnt)
struct sm_stat_res *
sm_mon_1(argp, clnt)
struct mon *argp;
CLIENT *clnt;
sm_mon_1(struct mon *argp, CLIENT *clnt)
{
static struct sm_stat_res res;
@ -44,9 +40,7 @@ sm_mon_1(argp, clnt)
struct sm_stat *
sm_unmon_1(argp, clnt)
struct mon_id *argp;
CLIENT *clnt;
sm_unmon_1(struct mon_id *argp, CLIENT *clnt)
{
static struct sm_stat res;
@ -59,9 +53,7 @@ sm_unmon_1(argp, clnt)
struct sm_stat *
sm_unmon_all_1(argp, clnt)
struct my_id *argp;
CLIENT *clnt;
sm_unmon_all_1(struct my_id *argp, CLIENT *clnt)
{
static struct sm_stat res;
@ -74,9 +66,7 @@ sm_unmon_all_1(argp, clnt)
void *
sm_simu_crash_1(argp, clnt)
void *argp;
CLIENT *clnt;
sm_simu_crash_1(void *argp, CLIENT *clnt)
{
static char res;
@ -89,9 +79,7 @@ sm_simu_crash_1(argp, clnt)
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
CLIENT *cli;
char dummy;

View File

@ -1,4 +1,4 @@
/* $NetBSD: chpmon.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
/* $NetBSD: chpmon.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: src/share/examples/ses/chpmon.c,v 1.1 2000/01/15 22:47:16 mjacob Exp $ */
/*
* Copyright (c) 2000 by Matthew Jacob
@ -48,12 +48,8 @@
#define BADSTAT \
(SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL)
int main __P((int, char **));
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
int fd, delay, dev;
ses_encstat stat, *carray;

View File

@ -1,4 +1,4 @@
/* $NetBSD: eltsub.c,v 1.3 2009/11/17 18:37:45 drochner Exp $ */
/* $NetBSD: eltsub.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -40,13 +40,12 @@
#include <sys/ioctl.h>
#include SESINC
char *geteltnm __P((int));
static char *scode2ascii __P((u_char));
char *stat2ascii __P((int, u_char *));
char *geteltnm(int);
static char *scode2ascii(u_char);
char *stat2ascii(int, u_char *);
char *
geteltnm(type)
int type;
geteltnm(int type)
{
static char rbuf[132];
@ -159,9 +158,7 @@ scode2ascii(u_char code)
char *
stat2ascii(eletype, cstat)
int eletype;
u_char *cstat;
stat2ascii(int eletype, u_char *cstat)
{
static char ebuf[256], *scode;

View File

@ -1,4 +1,4 @@
/* $NetBSD: getencstat.c,v 1.3 2000/07/04 20:27:40 matt Exp $ */
/* $NetBSD: getencstat.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -42,14 +42,11 @@
#include <fcntl.h>
#include SESINC
extern char *geteltnm __P((int));
extern char *stat2ascii __P((int, u_char *));
int main __P((int, char **));
extern char *geteltnm(int);
extern char *stat2ascii(int, u_char *);
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
ses_object *objp;
ses_objstat ob;

View File

@ -1,4 +1,4 @@
/* $NetBSD: getnobj.c,v 1.3 2007/01/16 17:32:05 hubertf Exp $ */
/* $NetBSD: getnobj.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -41,12 +41,8 @@
#include <sys/ioctl.h>
#include SESINC
int main __P((int, char **));
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
unsigned int nobj;
int fd;

View File

@ -1,4 +1,4 @@
/* $NetBSD: getobjmap.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
/* $NetBSD: getobjmap.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -41,13 +41,10 @@
#include <sys/ioctl.h>
#include SESINC
int main __P((int, char **));
extern char *geteltnm __P((int));
extern char *geteltnm(int);
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
ses_object *objp;
int nobj, fd, i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: getobjstat.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
/* $NetBSD: getobjstat.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -40,12 +40,8 @@
#include <sys/ioctl.h>
#include SESINC
int main __P((int, char **));
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
int fd;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: inienc.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
/* $NetBSD: inienc.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -41,12 +41,8 @@
#include <sys/ioctl.h>
#include SESINC
int __P((int, char **));
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
int fd;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sesd.c,v 1.8 2013/04/07 18:49:35 wiz Exp $ */
/* $NetBSD: sesd.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -45,16 +45,13 @@
#define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \
SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO)
int main __P((int, char **));
/*
* Monitor named SES devices and note (via syslog) any changes in status.
*/
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
static const char usage[] =
"usage: %s [-d] [-t pollinterval] device [device ...]\n";

View File

@ -1,4 +1,4 @@
/* $NetBSD: setencstat.c,v 1.3 2009/04/18 13:57:44 lukem Exp $ */
/* $NetBSD: setencstat.c,v 1.4 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -41,12 +41,8 @@
#include <sys/ioctl.h>
#include SESINC
int main __P((int, char **));
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
int fd;
long val;

View File

@ -1,4 +1,4 @@
/* $NetBSD: setobjstat.c,v 1.2 2000/02/22 06:06:10 mjacob Exp $ */
/* $NetBSD: setobjstat.c,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -41,12 +41,8 @@
#include <sys/ioctl.h>
#include SESINC
int main __P((int, char **));
int
main(a, v)
int a;
char **v;
main(int a, char *v[])
{
int fd;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $ */
/* $NetBSD: fakelog.c,v 1.7 2018/01/23 21:06:26 sevan Exp $ */
/*
* This module intercepts syslog() library calls and redirects their output
@ -12,7 +12,7 @@
#if 0
static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
#else
__RCSID("$NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $");
__RCSID("$NetBSD: fakelog.c,v 1.7 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -27,10 +27,7 @@ __RCSID("$NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $");
/* ARGSUSED */
void
openlog(name, logopt, facility)
const char *name;
int logopt;
int facility;
openlog(const char *name, int logopt, int facility)
{
/* void */
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $ */
/* $NetBSD: inetcf.c,v 1.11 2018/01/23 21:06:26 sevan Exp $ */
/*
* Routines to parse an inetd.conf or tlid.conf file. This would be a great
@ -12,7 +12,7 @@
#if 0
static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
#else
__RCSID("$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $");
__RCSID("$NetBSD: inetcf.c,v 1.11 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -28,8 +28,8 @@ __RCSID("$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $");
#include "percent_m.h"
#include "scaffold.h"
static void inet_chk __P((char *, char *, char *, char *));
static char *base_name __P((char *));
static void inet_chk(char *, char *, char *, char *);
static char *base_name(char *);
/*
* Programs that use libwrap directly are not in inetd.conf, and so must
@ -191,11 +191,7 @@ char *conf;
/* inet_chk - examine one inetd.conf (tlid.conf?) entry */
static void inet_chk(protocol, path, arg0, arg1)
char *protocol;
char *path;
char *arg0;
char *arg1;
static void inet_chk(char *protocol, char *path, char *arg0, char *arg1)
{
char daemon[BUFSIZ];
struct stat st;
@ -306,9 +302,7 @@ char *arg1;
/* inet_set - remember service status */
void inet_set(name, type)
char *name;
int type;
void inet_set(char *name, int type)
{
struct inet_ent *ip =
(struct inet_ent *) malloc(sizeof(struct inet_ent) + strlen(name));
@ -325,8 +319,7 @@ int type;
/* inet_get - look up service status */
int inet_get(name)
char *name;
int inet_get(char *name)
{
struct inet_ent *ip;
@ -342,8 +335,7 @@ char *name;
/* base_name - compute last pathname component */
static char *base_name(path)
char *path;
static char *base_name(char *path)
{
char *cp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: inetcf.h,v 1.3 1998/01/09 08:11:48 perry Exp $ */
/* $NetBSD: inetcf.h,v 1.4 2018/01/23 21:06:26 sevan Exp $ */
/*
* @(#) inetcf.h 1.1 94/12/28 17:42:30
@ -6,9 +6,9 @@
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/
char *inet_cfg __P((char *)); /* read inetd.conf file */
void inet_set __P((char *, int)); /* remember internet service */
int inet_get __P((char *)); /* look up internet service */
char *inet_cfg(char *); /* read inetd.conf file */
void inet_set(char *, int); /* remember internet service */
int inet_get(char *); /* look up internet service */
#define WR_UNKNOWN (-1) /* service unknown */
#define WR_NOT 1 /* may not be wrapped */

View File

@ -1,4 +1,4 @@
/* $NetBSD: percent_m.c,v 1.4 2000/01/21 17:08:39 mycroft Exp $ */
/* $NetBSD: percent_m.c,v 1.5 2018/01/23 21:06:26 sevan Exp $ */
/*
* Replace %m by system error message.
@ -11,7 +11,7 @@
#if 0
static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
#else
__RCSID("$NetBSD: percent_m.c,v 1.4 2000/01/21 17:08:39 mycroft Exp $");
__RCSID("$NetBSD: percent_m.c,v 1.5 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -27,9 +27,7 @@ extern int sys_nerr;
#include "mystdarg.h"
#include "percent_m.h"
char *percent_m(obuf, ibuf)
char *obuf;
const char *ibuf;
char *percent_m(char *obuf, const char *ibuf)
{
char *bp = obuf;
const char *cp = ibuf;

View File

@ -1,4 +1,4 @@
/* $NetBSD: percent_m.h,v 1.2 2000/10/11 20:23:57 is Exp $ */
/* $NetBSD: percent_m.h,v 1.3 2018/01/23 21:06:26 sevan Exp $ */
char *percent_m __P((char *, const char *))
char *percent_m(char *, const char *)
__attribute__((__format_arg__(2)));

View File

@ -1,4 +1,4 @@
/* $NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $ */
/* $NetBSD: scaffold.c,v 1.12 2018/01/23 21:06:26 sevan Exp $ */
/*
* Routines for testing only. Not really industrial strength.
@ -11,7 +11,7 @@
#if 0
static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
#else
__RCSID("$NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $");
__RCSID("$NetBSD: scaffold.c,v 1.12 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -47,9 +47,7 @@ extern int rfc931_timeout; /* = RFC931_TIMEOUT; */
/* find_inet_addr - find all addresses for this host, result to free() */
struct addrinfo *find_inet_addr(host, flags)
char *host;
int flags;
struct addrinfo *find_inet_addr(char *host, int flags)
{
struct addrinfo hints, *res;
int error;
@ -72,8 +70,7 @@ int flags;
/* check_dns - give each address thorough workout, return address count */
int check_dns(host)
char *host;
int check_dns(char *host)
{
struct request_info request;
struct sockaddr_storage ss;
@ -112,8 +109,7 @@ char *host;
/* ARGSUSED */
void shell_cmd(command)
char *command;
void shell_cmd(char *command)
{
if (hosts_access_verbose)
printf("command: %s", command);
@ -123,8 +119,7 @@ char *command;
/* ARGSUSED */
void clean_exit(request)
struct request_info *request;
void clean_exit(struct request_info *request)
{
exit(0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $ */
/* $NetBSD: tcpdchk.c,v 1.13 2018/01/23 21:06:26 sevan Exp $ */
/*
* tcpdchk - examine all tcpd access control rules and inetd.conf entries
@ -21,7 +21,7 @@
#if 0
static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
#else
__RCSID("$NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $");
__RCSID("$NetBSD: tcpdchk.c,v 1.13 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -91,8 +91,6 @@ static int check_inet_addr(char *);
static int check_host(char *);
static int reserved_name(char *);
int main(int, char **);
#define PERMIT 1
#define DENY 0
@ -281,9 +279,7 @@ parse_table(const char *table, struct request_info *request)
/* print_list - pretty-print a list */
static void print_list(title, list)
char *title;
char *list;
static void print_list(char *title, char *list)
{
char buf[BUFLEN];
char *cp;
@ -303,8 +299,7 @@ char *list;
/* check_daemon_list - criticize daemon list */
static void check_daemon_list(list)
char *list;
static void check_daemon_list(char *list)
{
char buf[BUFLEN];
char *cp;
@ -331,8 +326,7 @@ char *list;
/* check_client_list - criticize client list */
static void check_client_list(list)
char *list;
static void check_client_list(char *list)
{
char buf[BUFLEN];
char *cp;
@ -370,8 +364,7 @@ char *list;
/* check_daemon - criticize daemon pattern */
static void check_daemon(pat)
char *pat;
static void check_daemon(char *pat)
{
if (pat[0] == '@') {
tcpd_warn("%s: daemon name begins with \"@\"", pat);
@ -402,8 +395,7 @@ char *pat;
/* check_user - criticize user pattern */
static void check_user(pat)
char *pat;
static void check_user(char *pat)
{
if (pat[0] == '@') { /* @netgroup */
tcpd_warn("%s: user name begins with \"@\"", pat);
@ -423,8 +415,7 @@ char *pat;
}
#ifdef INET6
static int check_inet_addr(pat)
char *pat;
static int check_inet_addr(char *pat)
{
struct addrinfo *res;
@ -438,8 +429,7 @@ char *pat;
#endif
/* check_host - criticize host pattern */
static int check_host(pat)
char *pat;
static int check_host(char *pat)
{
char *mask;
int addr_count = 1;
@ -502,8 +492,7 @@ char *pat;
/* reserved_name - determine if name is reserved */
static int reserved_name(pat)
char *pat;
static int reserved_name(char *pat)
{
return (STR_EQ(pat, unknown)
|| STR_EQ(pat, "KNOWN")

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $ */
/* $NetBSD: tcpdmatch.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */
/*
* tcpdmatch - explain what tcpd would do in a specific case
@ -20,7 +20,7 @@
#if 0
static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
#else
__RCSID("$NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $");
__RCSID("$NetBSD: tcpdmatch.c,v 1.9 2018/01/23 21:06:26 sevan Exp $");
#endif
#endif
@ -53,16 +53,13 @@ __RCSID("$NetBSD: tcpdmatch.c,v 1.8 2002/06/07 00:00:19 itojun Exp $");
#include "inetcf.h"
#include "scaffold.h"
static void usage __P((char *));
static void expand __P((char *, char *, struct request_info *));
static void tcpdmatch __P((struct request_info *));
int main __P((int, char **));
static void usage(char *);
static void expand(char *, char *, struct request_info *);
static void tcpdmatch(struct request_info *);
/* The main program */
int main(argc, argv)
int argc;
char **argv;
int main(int argc, char *argv[])
{
struct addrinfo *res, *res0;
char *myname = argv[0];
@ -269,8 +266,7 @@ char **argv;
/* Explain how to use this program */
static void usage(myname)
char *myname;
static void usage(char *myname)
{
fprintf(stderr, "usage: %s [-d] [-i inet_conf] daemon[@host] [user@]host\n",
myname);
@ -281,10 +277,7 @@ char *myname;
/* Print interesting expansions */
static void expand(text, pattern, request)
char *text;
char *pattern;
struct request_info *request;
static void expand(char *text, char *pattern, struct request_info *request)
{
char buf[BUFSIZ];
@ -294,8 +287,7 @@ struct request_info *request;
/* Try out a (server,client) pair */
static void tcpdmatch(request)
struct request_info *request;
static void tcpdmatch(struct request_info *request)
{
int verdict;

View File

@ -1,4 +1,4 @@
/* $NetBSD: videomode.c,v 1.8 2011/01/04 10:32:34 wiz Exp $ */
/* $NetBSD: videomode.c,v 1.9 2018/01/23 21:06:26 sevan Exp $ */
/*
* Copyright (c) 1995 Christian E. Hopps
@ -45,17 +45,14 @@
#include <stdlib.h>
#include <unistd.h>
void dump_mode __P((int));
void dump_vm __P((struct grfvideo_mode *));
int get_grf __P((void));
int main __P((int, char **));
void set_mode __P((int));
void usage __P((void));
void dump_mode(int);
void dump_vm(struct grfvideo_mode *);
int get_grf(void);
void set_mode(int);
void usage(void) __dead;
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int m;
int c;
@ -112,8 +109,7 @@ get_grf()
}
void
dump_mode(m)
int m;
dump_mode(int m)
{
struct grfvideo_mode vm;
int num_vm;
@ -146,8 +142,7 @@ dump_mode(m)
}
void
set_mode(m)
int m;
set_mode(int m)
{
int grffd;
@ -157,8 +152,7 @@ set_mode(m)
}
void
dump_vm(vm)
struct grfvideo_mode *vm;
dump_vm(struct grfvideo_mode *vm)
{
(void)printf("%d: %s\n", vm->mode_num, vm->mode_descr);
(void)printf(