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 $ */ /* $KAME: prefix.c,v 1.13 2003/09/02 22:50:17 itojun Exp $ */
/* /*
@ -47,11 +47,11 @@
#include "faithd.h" #include "faithd.h"
#include "prefix.h" #include "prefix.h"
static int prefix_set __P((const char *, struct prefix *, int)); static int prefix_set(const char *, struct prefix *, int);
static struct config *config_load1 __P((const char *)); static struct config *config_load1(const char *);
#if 0 #if 0
static void config_show1 __P((const struct config *)); static void config_show1(const struct config *);
static void config_show __P((void)); static void config_show(void);
#endif #endif
struct config *config_list = NULL; 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. * Copyright (C) 1999 WIDE Project.
@ -29,6 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
extern int ipsecsetup __P((int, int, const char *)); extern int ipsecsetup(int, int, const char *);
extern int ipsecsetup_test __P((const char *)); extern int ipsecsetup_test(const char *);
extern int ipsecsetup0 __P((int, int, const char *, int)); 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. * Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -31,10 +31,10 @@
#define PATH_ISDN_DEV "/dev/isdn" #define PATH_ISDN_DEV "/dev/isdn"
extern void download __P((int fd, int controller, char *filename)); extern void download(int fd, int controller, char *filename);
extern void simpccard __P((char *controller, int insert)); extern void simpccard(char *controller, int insert);
extern void xlog __P((int fd, int controller)); extern void xlog(int fd, int controller);
extern void xversion __P((int fd, int controller)); extern void xversion(int fd, int controller);
extern void istat __P((int fd, int controller)); extern void istat(int fd, int controller);
extern void passthrough __P((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. * Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -40,9 +40,7 @@
#include "daicctl.h" #include "daicctl.h"
void void
download(fd, controller, filename) download(int fd, int controller, char *filename)
int fd, controller;
char *filename;
{ {
int i, num_ports = 1; int i, num_ports = 1;
struct isdn_download_request dr; 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 * Copyright (c) 1994 Christian E. Hopps
* All rights reserved. * All rights reserved.
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #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 #endif
#include <sys/types.h> #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" #include "pathnames.h"
int initialize __P((const char *, struct itewinsize *, struct itebell *, int initialize(const char *, struct itewinsize *, struct itebell *,
struct itewinsize *, struct itebell *)); struct itewinsize *, struct itebell *);
int main __P((int, char **)); void printcmap(colormap_t *, int);
void printcmap __P((colormap_t *, int)); void xioctl(int, int, void *);
void xioctl __P((int, int, void *)); colormap_t *xgetcmap(int, int);
colormap_t *xgetcmap __P((int, int)); long xstrtol(char *);
long xstrtol __P((char *)); static void usage(void) __dead;
void usage __P((void));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
struct itewinsize is, newis; struct itewinsize is, newis;
struct itebell ib, newib; struct itebell ib, newib;
@ -194,17 +191,14 @@ main(argc, argv)
} }
void void
xioctl(fd, cmd, addr) xioctl(int fd, int cmd, void *addr)
int fd, cmd;
void *addr;
{ {
if (ioctl(fd, cmd, addr) == -1) if (ioctl(fd, cmd, addr) == -1)
err(1, "ioctl"); err(1, "ioctl");
} }
long long
xstrtol(s) xstrtol(char *s)
char *s;
{ {
long rv; long rv;
@ -216,9 +210,7 @@ xstrtol(s)
} }
colormap_t * colormap_t *
xgetcmap(fd, ncolors) xgetcmap(int fd, int ncolors)
int fd;
int ncolors;
{ {
colormap_t *cm; colormap_t *cm;
@ -233,9 +225,7 @@ xgetcmap(fd, ncolors)
} }
void void
printcmap(cm, ncols) printcmap(colormap_t *cm, int ncols)
colormap_t *cm;
int ncols;
{ {
int i, nel; int i, nel;
@ -283,8 +273,8 @@ initialize(file, is, ib, newis, newib)
return(fd); return(fd);
} }
void static void
usage() usage(void)
{ {
fprintf(stderr, "%s\n\t\t%s\n\t\t%s\n", fprintf(stderr, "%s\n\t\t%s\n\t\t%s\n",
"usage: iteconfig [-i] [-f file] [-v volume] [-p pitch] [-t msec]", "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 * Copyright (c) 1992, 1993
@ -97,22 +97,22 @@
/* #define NLIST_ELF64 */ /* #define NLIST_ELF64 */
#endif #endif
void create_knlist __P((const char *, DB *)); void create_knlist(const char *, DB *);
void punt __P((void)); void punt(void);
int testdb __P((void)); int testdb(void);
#ifdef NLIST_AOUT #ifdef NLIST_AOUT
int create_knlist_aout __P((const char *, DB *)); int create_knlist_aout(const char *, DB *);
#endif #endif
#ifdef NLIST_COFF #ifdef NLIST_COFF
int create_knlist_coff __P((const char *, DB *)); int create_knlist_coff(const char *, DB *);
#endif #endif
#ifdef NLIST_ECOFF #ifdef NLIST_ECOFF
int create_knlist_ecoff __P((const char *, DB *)); int create_knlist_ecoff(const char *, DB *);
#endif #endif
#ifdef NLIST_ELF32 #ifdef NLIST_ELF32
int create_knlist_elf32 __P((const char *, DB *)); int create_knlist_elf32(const char *, DB *);
#endif #endif
#ifdef NLIST_ELF64 #ifdef NLIST_ELF64
int create_knlist_elf64 __P((const char *, DB *)); int create_knlist_elf64(const char *, DB *);
#endif #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 * Copyright (c) 1990, 1993
@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
#if 0 #if 0
static char sccsid[] = "from: @(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95"; static char sccsid[] = "from: @(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95";
#else #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
#endif /* not lint */ #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" #include "extern.h"
int main __P((int, char **)); static void usage(void) __dead;
static void usage __P((void));
HASHINFO openinfo = { HASHINFO openinfo = {
4096, /* bsize */ 4096, /* bsize */
@ -107,9 +106,7 @@ static char *dbname = NULL;
static char dbtemp[MAXPATHLEN]; static char dbtemp[MAXPATHLEN];
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char *argv[];
{ {
int ch; int ch;
char *nlistpath; char *nlistpath;
@ -181,8 +178,8 @@ main(argc, argv)
exit(0); exit(0);
} }
void static void
usage() usage(void)
{ {
(void)fprintf(stderr, "usage: kvm_mkdb [-o database] [file]\n"); (void)fprintf(stderr, "usage: kvm_mkdb [-o database] [file]\n");
exit(1); 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 * Copyright (c) 1990, 1993
@ -66,7 +66,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else #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
#endif /* not lint */ #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" #include "extern.h"
static struct { static struct {
int (*knlist) __P((const char *, DB *)); int (*knlist)(const char *, DB *);
} knlist_fmts[] = { } knlist_fmts[] = {
#ifdef NLIST_AOUT #ifdef NLIST_AOUT
{ create_knlist_aout }, { create_knlist_aout },
@ -107,9 +107,7 @@ static struct {
}; };
void void
create_knlist(name, db) create_knlist(const char *name, DB *db)
const char *name;
DB *db;
{ {
int i; 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 * Copyright (c) 1990, 1993
@ -66,7 +66,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -98,15 +98,13 @@ typedef struct nlist NLIST;
punt(); \ punt(); \
} while (0) } while (0)
static void badread __P((int, char *)); static void badread(int, char *);
static u_long get_kerntext __P((const char *kfn)); static u_long get_kerntext(const char *kfn);
static const char *kfile; static const char *kfile;
int int
create_knlist_aout(name, db) create_knlist_aout(const char *name, DB *db)
const char *name;
DB *db;
{ {
int nsyms; int nsyms;
struct exec ebuf; struct exec ebuf;
@ -244,9 +242,7 @@ create_knlist_aout(name, db)
} }
static void static void
badread(nr, p) badread(int nr, char *p)
int nr;
char *p;
{ {
if (nr < 0) { if (nr < 0) {
warn("%s", kfile); warn("%s", kfile);
@ -262,8 +258,7 @@ badread(nr, p)
* when the standard symbol name is not found. * when the standard symbol name is not found.
*/ */
static u_long static u_long
get_kerntext(name) get_kerntext(const char *name)
const char *name;
{ {
struct nlist nl[2]; 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 * Copyright (c) 1998
@ -44,14 +44,11 @@ struct arglist {
const char **argv; const char **argv;
}; };
int main __P((int, char *[], char *[])); static void initarg(struct arglist *);
static void addarg(struct arglist *, const char *, int);
static void initarg __P((struct arglist *));
static void addarg __P((struct arglist *, const char *, int));
static void static void
initarg(al) initarg(struct arglist *al)
struct arglist *al;
{ {
al->argc = 0; al->argc = 0;
al->maxc = 10; al->maxc = 10;
@ -68,10 +65,7 @@ initarg(al)
} }
static void static void
addarg(al, arg, copy) addarg(struct arglist *al, const char *arg, int copy)
struct arglist *al;
const char *arg;
int copy;
{ {
if (al->argc == al->maxc) { if (al->argc == al->maxc) {
al->maxc <<= 1; al->maxc <<= 1;
@ -87,10 +81,7 @@ addarg(al, arg, copy)
} }
int int
main(argc, argv, envp) main(int argc, char *argv[], char *envp[])
int argc;
char *argv[];
char *envp[];
{ {
FILE *config; FILE *config;
char *line, *cp, *from, *to, *ap; 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 * Copyright (c) 1995 Gordon W. Ross
@ -27,7 +27,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #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 #endif
/* /*
@ -48,12 +48,8 @@ __RCSID("$NetBSD: mdconfig.c,v 1.5 2009/10/21 23:12:10 snj Exp $");
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
int main __P((int, char **));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
struct md_conf md; struct md_conf md;
size_t nblks; 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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -58,9 +58,7 @@ int nflag = 0;
u_int8_t *current_values = 0; u_int8_t *current_values = 0;
u_int8_t *modified_values = 0; u_int8_t *modified_values = 0;
int main __P((int, char*[])); static void
void
usage(void) usage(void)
{ {
fprintf(stderr, "usage: %s -a\n", progname); fprintf(stderr, "usage: %s -a\n", progname);
@ -71,9 +69,7 @@ usage(void)
} }
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char *argv[];
{ {
int ch; int ch;
enum md { enum md {
@ -155,8 +151,7 @@ main(argc, argv)
} }
void void
show_single(name) show_single(const char *name)
const char *name;
{ {
int i; int i;
int n = 0; int n = 0;
@ -198,8 +193,7 @@ show_all(void)
} }
void void
modify_single(expr) modify_single(const char *expr)
const char *expr;
{ {
int i, l, n; int i, l, n;
char *class = NULL, *node = NULL; char *class = NULL, *node = NULL;
@ -257,8 +251,7 @@ modify_single(expr)
} }
void void
help_single(name) help_single(const char *name)
const char *name;
{ {
int i; int i;
char fullname[50]; char fullname[50];
@ -419,8 +412,7 @@ flush(void)
} }
int int
save(name) save(const char *name)
const char *name;
{ {
#ifndef DEBUG #ifndef DEBUG
int fd; int fd;
@ -448,8 +440,7 @@ save(name)
} }
int int
restore(name) restore(const char *name)
const char *name;
{ {
#ifndef DEBUG #ifndef DEBUG
int sramfd, fd, i; 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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -45,10 +45,10 @@
struct property; struct property;
typedef int (*parse_t) __P((struct property*, const char*)); typedef int (*parse_t)(struct property*, const char*);
typedef int (*print_t) __P((struct property*, char*)); typedef int (*print_t)(struct property*, char*);
typedef int (*fill_t) __P((struct property*)); typedef int (*fill_t)(struct property*);
typedef int (*flush_t) __P((struct property*)); typedef int (*flush_t)(struct property*);
struct property { struct property {
const char *class; const char *class;
@ -79,13 +79,13 @@ extern char *progname;
extern u_int8_t *current_values; extern u_int8_t *current_values;
extern u_int8_t *modified_values; extern u_int8_t *modified_values;
void usage __P((void)) __attribute__((noreturn)); static void usage(void)) __dead;
void show_single __P((const char*)); void show_single(const char*));
void show_all __P((void)); void show_all(void));
void modify_single __P((const char*)); void modify_single(const char*));
void help_single __P((const char*)); void help_single(const char*));
void alloc_current_values __P((void)); void alloc_current_values(void));
void alloc_modified_values __P((void)); void alloc_modified_values(void));
void flush __P((void)); void flush(void));
int save __P((const char*)); int save(const char*));
int restore __P((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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,8 +38,7 @@
#include "methods.h" #include "methods.h"
int int
atoi_(p) atoi_(const char **p)
const char **p;
{ {
const char *p1 = *p; const char *p1 = *p;
int v = 0; int v = 0;
@ -96,8 +95,7 @@ atoi_(p)
} }
int int
fill_uchar(prop) fill_uchar(struct property *prop)
struct property *prop;
{ {
if (current_values == 0) if (current_values == 0)
alloc_current_values(); alloc_current_values();
@ -112,8 +110,7 @@ fill_uchar(prop)
} }
int int
fill_ushort(prop) fill_ushort(struct property *prop)
struct property *prop;
{ {
if (current_values == 0) if (current_values == 0)
alloc_current_values(); alloc_current_values();
@ -128,8 +125,7 @@ fill_ushort(prop)
} }
int int
fill_ulong(prop) fill_ulong(struct property *prop)
struct property *prop;
{ {
if (current_values == 0) if (current_values == 0)
alloc_current_values(); alloc_current_values();
@ -144,8 +140,7 @@ fill_ulong(prop)
} }
int int
flush_uchar(prop) flush_uchar(struct property *prop)
struct property *prop;
{ {
if (!prop->modified) if (!prop->modified)
return 0; return 0;
@ -159,8 +154,7 @@ flush_uchar(prop)
} }
int int
flush_ushort(prop) flush_ushort(struct property *prop)
struct property *prop;
{ {
if (!prop->modified) if (!prop->modified)
return 0; return 0;
@ -175,8 +169,7 @@ flush_ushort(prop)
} }
int int
flush_ulong(prop) flush_ulong(struct property *prop)
struct property *prop;
{ {
if (!prop->modified) if (!prop->modified)
return 0; return 0;
@ -193,16 +186,13 @@ flush_ulong(prop)
} }
int int
flush_dummy(prop) flush_dummy(struct property *prop)
struct property *prop;
{ {
return 0; return 0;
} }
int int
parse_dummy(prop, value) parse_dummy(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
warnx("Cannot modify %s.%s", prop->class, prop->node); warnx("Cannot modify %s.%s", prop->class, prop->node);
@ -210,9 +200,7 @@ parse_dummy(prop, value)
} }
int int
parse_byte(prop, value) parse_byte(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -248,9 +236,7 @@ parse_byte(prop, value)
} }
int int
parse_uchar(prop, value) parse_uchar(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -276,9 +262,7 @@ parse_uchar(prop, value)
} }
int int
parse_ulong(prop, value) parse_ulong(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -304,9 +288,7 @@ parse_ulong(prop, value)
} }
int int
parse_ushort(prop, value) parse_ushort(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -332,9 +314,7 @@ parse_ushort(prop, value)
} }
int int
parse_time(prop, value) parse_time(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -377,9 +357,7 @@ parse_time(prop, value)
} }
int int
parse_bootdev(prop, value) parse_bootdev(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
const char *p = value; const char *p = value;
int v; int v;
@ -441,9 +419,7 @@ parse_bootdev(prop, value)
} }
int int
parse_serial(prop, value) parse_serial(struct property *prop, const char *value)
struct property *prop;
const char *value;
#define NEXTSPEC while (*p == ' ' || *p == '\t') p++; \ #define NEXTSPEC while (*p == ' ' || *p == '\t') p++; \
if (*p++ != ',') { \ if (*p++ != ',') { \
warnx("%s: Invalid value", value); \ warnx("%s: Invalid value", value); \
@ -543,9 +519,7 @@ parse_serial(prop, value)
#undef NEXTSPEC #undef NEXTSPEC
int int
parse_srammode(prop, value) parse_srammode(struct property *prop, const char *value)
struct property *prop;
const char *value;
{ {
static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"}; static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"};
int i; int i;
@ -566,9 +540,7 @@ parse_srammode(prop, value)
} }
int int
print_uchar(prop, str) print_uchar(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -584,9 +556,7 @@ print_uchar(prop, str)
} }
int int
print_ucharh(prop, str) print_ucharh(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -602,9 +572,7 @@ print_ucharh(prop, str)
} }
int int
print_ushorth(prop, str) print_ushorth(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -620,9 +588,7 @@ print_ushorth(prop, str)
} }
int int
print_ulong(prop, str) print_ulong(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -638,9 +604,7 @@ print_ulong(prop, str)
} }
int int
print_ulongh(prop, str) print_ulongh(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -656,9 +620,7 @@ print_ulongh(prop, str)
} }
int int
print_magic(prop, str) print_magic(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (!prop->value_valid) if (!prop->value_valid)
prop->fill(prop); prop->fill(prop);
@ -672,9 +634,7 @@ print_magic(prop, str)
} }
int int
print_timesec(prop, str) print_timesec(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
if (prop->modified) if (prop->modified)
snprintf(str, MAXVALUELEN, snprintf(str, MAXVALUELEN,
@ -690,9 +650,7 @@ print_timesec(prop, str)
} }
int int
print_bootdev(prop, str) print_bootdev(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
unsigned int v; unsigned int v;
@ -721,9 +679,7 @@ print_bootdev(prop, str)
} }
int int
print_serial(prop, str) print_serial(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
unsigned int v; unsigned int v;
const char *baud, *stop; const char *baud, *stop;
@ -754,9 +710,7 @@ print_serial(prop, str)
} }
int int
print_srammode(prop, str) print_srammode(struct property *prop, char *str)
struct property *prop;
char *str;
{ {
int v; int v;
static const char *const sramstrs[] = {"unused", "SRAMDISK", "program"}; 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. * 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_uchar(struct property*);
int fill_ushort __P((struct property*)); int fill_ushort(struct property*);
int fill_ulong __P((struct property*)); int fill_ulong(struct property*);
int flush_uchar __P((struct property*)); int flush_uchar(struct property*);
int flush_ushort __P((struct property*)); int flush_ushort(struct property*);
int flush_ulong __P((struct property*)); int flush_ulong(struct property*);
int flush_dummy __P((struct property*)); int flush_dummy(struct property*);
int parse_dummy __P((struct property*, const char*)); int parse_dummy(struct property*, const char*);
int parse_uchar __P((struct property*, const char*)); int parse_uchar(struct property*, const char*);
int parse_ushort __P((struct property*, const char*)); int parse_ushort(struct property*, const char*);
int parse_ulong __P((struct property*, const char*)); int parse_ulong(struct property*, const char*);
int parse_byte __P((struct property*, const char*)); int parse_byte(struct property*, const char*);
int parse_time __P((struct property*, const char*)); int parse_time(struct property*, const char*);
int parse_bootdev __P((struct property*, const char*)); int parse_bootdev(struct property*, const char*);
int parse_serial __P((struct property*, const char*)); int parse_serial(struct property*, const char*);
int parse_srammode __P((struct property*, const char*)); int parse_srammode(struct property*, const char*);
int print_uchar __P((struct property*, char*)); int print_uchar(struct property*, char*);
int print_ucharh __P((struct property*, char*)); int print_ucharh(struct property*, char*);
int print_ushorth __P((struct property*, char*)); int print_ushorth(struct property*, char*);
int print_ulong __P((struct property*, char*)); int print_ulong(struct property*, char*);
int print_ulongh __P((struct property*, char*)); int print_ulongh(struct property*, char*);
int print_magic __P((struct property*, char*)); int print_magic(struct property*, char*);
int print_timesec __P((struct property*, char*)); int print_timesec(struct property*, char*);
int print_bootdev __P((struct property*, char*)); int print_bootdev(struct property*, char*);
int print_serial __P((struct property*, char*)); int print_serial(struct property*, char*);
int print_srammode __P((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 * Copyright (c) 2002, 2005
@ -53,7 +53,6 @@
static int getcdtoc(int); static int getcdtoc(int);
static int getfaketoc(int); static int getfaketoc(int);
int main(int, char **);
const char *disk = "cd0"; const char *disk = "cd0";
int ntracks; int ntracks;
@ -123,9 +122,7 @@ getfaketoc(int fd)
} }
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
int fd, res, i, j, rawpart; int fd, res, i, j, rawpart;
char fullname[MAXPATHLEN]; 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 * Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -215,8 +215,7 @@ BpfOpen()
** None. ** None.
*/ */
char * char *
BpfGetIntfName(errmsg) BpfGetIntfName(char **errmsg)
char **errmsg;
{ {
struct ifaddrs *ifap, *ifa, *p; struct ifaddrs *ifap, *ifa, *p;
int minunit, n; int minunit, n;
@ -281,9 +280,7 @@ BpfGetIntfName(errmsg)
** None. ** None.
*/ */
int int
BpfRead(rconn, doread) BpfRead(RMPCONN *rconn, int doread)
RMPCONN *rconn;
int doread;
{ {
int datlen, caplen, hdrlen; int datlen, caplen, hdrlen;
static u_int8_t *bp = NULL, *ep = NULL; static u_int8_t *bp = NULL, *ep = NULL;
@ -348,8 +345,7 @@ BpfRead(rconn, doread)
** None. ** None.
*/ */
int int
BpfWrite(rconn) BpfWrite(RMPCONN *rconn)
RMPCONN *rconn;
{ {
if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) { if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) {
syslog(LOG_ERR, "write: %s: %m", EnetStr(rconn)); 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 * 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 */ extern u_int8_t RmpMcastAddr[]; /* RMP multicast address */
void AddConn __P((RMPCONN *)); void AddConn(RMPCONN *);
int BootDone __P((RMPCONN *)); int BootDone(RMPCONN *);
void BpfClose __P((void)); void BpfClose(void);
char *BpfGetIntfName __P((char **)); char *BpfGetIntfName(char **);
int BpfOpen __P((void)); int BpfOpen(void);
int BpfRead __P((RMPCONN *, int)); int BpfRead(RMPCONN *, int);
int BpfWrite __P((RMPCONN *)); int BpfWrite(RMPCONN *);
void DebugOff __P((int)); void DebugOff(int);
void DebugOn __P((int)); void DebugOn(int);
void DispPkt __P((RMPCONN *, int)); void DispPkt(RMPCONN *, int);
void DoTimeout __P((void)); void DoTimeout(void);
void DspFlnm __P((u_int, char *)); void DspFlnm(u_int, char *);
void Exit __P((int)) __dead; void Exit(int) __dead;
CLIENT *FindClient __P((RMPCONN *)); CLIENT *FindClient(RMPCONN *);
RMPCONN *FindConn __P((RMPCONN *)); RMPCONN *FindConn(RMPCONN *);
void FreeClients __P((void)); void FreeClients(void);
void FreeConn __P((RMPCONN *)); void FreeConn(RMPCONN *);
void FreeConns __P((void)); void FreeConns(void);
int GetBootFiles __P((void)); int GetBootFiles(void);
char *GetEtherAddr __P((u_int8_t *)); char *GetEtherAddr(u_int8_t *);
CLIENT *NewClient __P((u_int8_t *)); CLIENT *NewClient(u_int8_t *);
RMPCONN *NewConn __P((RMPCONN *)); RMPCONN *NewConn(RMPCONN *);
char *NewStr __P((char *)); char *NewStr(char *);
u_int8_t *ParseAddr __P((char *)); u_int8_t *ParseAddr(char *);
int ParseConfig __P((void)); int ParseConfig(void);
void ProcessPacket __P((RMPCONN *, CLIENT *)); void ProcessPacket(RMPCONN *, CLIENT *);
void ReConfig __P((int)); void ReConfig(int);
void RemoveConn __P((RMPCONN *)); void RemoveConn(RMPCONN *);
int SendBootRepl __P((struct rmp_packet *, RMPCONN *, char *[])); int SendBootRepl(struct rmp_packet *, RMPCONN *, char *[]);
int SendFileNo __P((struct rmp_packet *, RMPCONN *, char *[])); int SendFileNo(struct rmp_packet *, RMPCONN *, char *[]);
int SendPacket __P((RMPCONN *)); int SendPacket(RMPCONN *);
int SendReadRepl __P((RMPCONN *)); int SendReadRepl(RMPCONN *);
int SendServerID __P((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 * Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -246,8 +246,7 @@ ParseConfig()
** be copied if it's to be saved. ** be copied if it's to be saved.
*/ */
u_int8_t * u_int8_t *
ParseAddr(str) ParseAddr(char *str)
char *str;
{ {
static u_int8_t addr[RMP_ADDRLEN]; static u_int8_t addr[RMP_ADDRLEN];
char *cp; 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 * Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93";
#else #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
#endif /* not lint */ #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. ** sent to the host that sent the packet.
*/ */
void void
ProcessPacket(rconn, client) ProcessPacket(RMPCONN *rconn, CLIENT *client)
RMPCONN *rconn;
CLIENT *client;
{ {
struct rmp_packet *rmp; struct rmp_packet *rmp;
RMPCONN *rconnout; RMPCONN *rconnout;
@ -175,8 +173,7 @@ ProcessPacket(rconn, client)
** none. ** none.
*/ */
int int
SendServerID(rconn) SendServerID(RMPCONN *rconn)
RMPCONN *rconn;
{ {
struct rmp_packet *rpl; struct rmp_packet *rpl;
char *src, *dst; char *src, *dst;
@ -227,10 +224,7 @@ SendServerID(rconn)
** none. ** none.
*/ */
int int
SendFileNo(req, rconn, filelist) SendFileNo(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
struct rmp_packet *req;
RMPCONN *rconn;
char *filelist[];
{ {
struct rmp_packet *rpl; struct rmp_packet *rpl;
char *src, *dst; char *src, *dst;
@ -290,10 +284,7 @@ SendFileNo(req, rconn, filelist)
** none. ** none.
*/ */
int int
SendBootRepl(req, rconn, filelist) SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
struct rmp_packet *req;
RMPCONN *rconn;
char *filelist[];
{ {
int retval; int retval;
char *filename, filepath[RMPBOOTDATA+1]; char *filename, filepath[RMPBOOTDATA+1];
@ -408,8 +399,7 @@ sendpkt:
** none. ** none.
*/ */
int int
SendReadRepl(rconn) SendReadRepl(RMPCONN *rconn)
RMPCONN *rconn;
{ {
int retval = 0; int retval = 0;
RMPCONN *oldconn; RMPCONN *oldconn;
@ -526,8 +516,7 @@ sendpkt:
** none. ** none.
*/ */
int int
BootDone(rconn) BootDone(RMPCONN *rconn)
RMPCONN *rconn;
{ {
RMPCONN *oldconn; RMPCONN *oldconn;
struct rmp_packet *rpl; struct rmp_packet *rpl;
@ -574,8 +563,7 @@ BootDone(rconn)
** none. ** none.
*/ */
int int
SendPacket(rconn) SendPacket(RMPCONN *rconn)
RMPCONN *rconn;
{ {
/* /*
* Set Ethernet Destination address to Source (BPF and the enet * 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 * Copyright (c) 1988, 1992 The University of Utah and the Center
@ -47,7 +47,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -78,9 +78,7 @@ __RCSID("$NetBSD: utils.c,v 1.17 2011/02/08 20:20:28 rmind Exp $");
** None. ** None.
*/ */
void void
DispPkt(rconn, direct) DispPkt(RMPCONN *rconn, int direct)
RMPCONN *rconn;
int direct;
{ {
static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u"; 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"; 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. ** be copied if it's to be saved.
*/ */
char * char *
GetEtherAddr(addr) GetEtherAddr(u_int8_t *addr)
u_int8_t *addr;
{ {
static char Hex[] = "0123456789abcdef"; static char Hex[] = "0123456789abcdef";
static char etherstr[RMP_ADDRLEN*3]; static char etherstr[RMP_ADDRLEN*3];
@ -248,9 +245,7 @@ GetEtherAddr(addr)
** - Characters are sent to `DbgFp'. ** - Characters are sent to `DbgFp'.
*/ */
void void
DspFlnm(size, flnm) DspFlnm(u_int size, char *flnm)
u_int size;
char *flnm;
{ {
size_t i; size_t i;
@ -275,8 +270,7 @@ DspFlnm(size, flnm)
** - If malloc() fails, a log message will be generated. ** - If malloc() fails, a log message will be generated.
*/ */
CLIENT * CLIENT *
NewClient(addr) NewClient(u_int8_t *addr)
u_int8_t *addr;
{ {
CLIENT *ctmp; CLIENT *ctmp;
@ -333,8 +327,7 @@ FreeClients()
** - If malloc() fails, a log message will be generated. ** - If malloc() fails, a log message will be generated.
*/ */
char * char *
NewStr(str) NewStr(char *str)
char *str;
{ {
char *stmp; char *stmp;
@ -367,8 +360,7 @@ static RMPCONN *LastFree = NULL;
** - If malloc() fails, a log message will be generated. ** - If malloc() fails, a log message will be generated.
*/ */
RMPCONN * RMPCONN *
NewConn(rconn) NewConn(RMPCONN *rconn)
RMPCONN *rconn;
{ {
RMPCONN *rtmp; RMPCONN *rtmp;
@ -408,8 +400,7 @@ NewConn(rconn)
** - File desc associated with `rtmp->bootfd' will be closed. ** - File desc associated with `rtmp->bootfd' will be closed.
*/ */
void void
FreeConn(rtmp) FreeConn(RMPCONN *rtmp)
RMPCONN *rtmp;
{ {
/* /*
* If the file descriptor is in use, close the file. * If the file descriptor is in use, close the file.
@ -475,8 +466,7 @@ FreeConns()
** - This routine must be called with SIGHUP blocked. ** - This routine must be called with SIGHUP blocked.
*/ */
void void
AddConn(rconn) AddConn(RMPCONN *rconn)
RMPCONN *rconn;
{ {
if (RmpConns != NULL) if (RmpConns != NULL)
rconn->next = RmpConns; rconn->next = RmpConns;
@ -503,8 +493,7 @@ AddConn(rconn)
** - This routine must be called with SIGHUP blocked. ** - This routine must be called with SIGHUP blocked.
*/ */
RMPCONN * RMPCONN *
FindConn(rconn) FindConn(RMPCONN *rconn)
RMPCONN *rconn;
{ {
RMPCONN *rtmp; RMPCONN *rtmp;
@ -533,8 +522,7 @@ FindConn(rconn)
** - This routine must be called with SIGHUP blocked. ** - This routine must be called with SIGHUP blocked.
*/ */
void void
RemoveConn(rconn) RemoveConn(RMPCONN *rconn)
RMPCONN *rconn;
{ {
RMPCONN *thisrconn, *lastrconn; 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 * Copyright (c) 1983, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\
#if 0 #if 0
static char sccsid[] = "@(#)rmt.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)rmt.c 8.1 (Berkeley) 6/6/93";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -74,15 +74,12 @@ FILE *debug;
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a) #define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2) #define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
char *checkbuf __P((char *, int)); char *checkbuf(char *, int);
void error __P((int)); void error(int);
int main __P((int, char **)); void getstring(char *, size_t);
void getstring __P((char *, size_t));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
char *record = NULL; char *record = NULL;
int rval; int rval;
@ -209,9 +206,7 @@ ioerror:
} }
void void
getstring(bp, size) getstring(char *bp, size_t size)
char *bp;
size_t size;
{ {
char *cp = bp; char *cp = bp;
char *ep = bp + size - 1; char *ep = bp + size - 1;
@ -224,9 +219,7 @@ getstring(bp, size)
} }
char * char *
checkbuf(record, size) checkbuf(char *record, int size)
char *record;
int size;
{ {
if (size <= maxrecsize) if (size <= maxrecsize)
@ -246,8 +239,7 @@ checkbuf(record, size)
} }
void void
error(num) error(int num)
int num;
{ {
DEBUG2("rmtd: E %d (%s)\n", num, strerror(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 * Copyright (c) 1995
@ -35,4 +35,4 @@
extern int debug_level; extern int debug_level;
extern int grace_expired; 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 int interrupted;
extern pr_list printers; extern pr_list printers;
extern pr_queue queue; extern pr_queue queue;
extern char sp_name[1024]; extern char sp_name[1024];
void add_printer_alias __P((char *, char *, char *)); void add_printer_alias(char *, char *, char *);
void add_cache_entry __P((struct passwd *)); void add_cache_entry(struct passwd *);
int build_pr_list __P((void)); int build_pr_list(void);
pirstat build_pr_queue __P((printername, username, int, int *, int *)); pirstat build_pr_queue(printername, username, int, int *, int *);
int check_cache __P((char *, char *, int *, int *)); int check_cache(char *, char *, int *, int *);
void free_mapreq_results __P((mapreq_res)); void free_mapreq_results(mapreq_res);
void fillin_extra_groups __P((char *, u_int, int *, u_int[])); void fillin_extra_groups(char *, u_int, int *, u_int[]);
#ifdef USE_YP #ifdef USE_YP
char *find_entry __P((const char *, const char *)); char *find_entry(const char *, const char *);
#endif #endif
void free_pr_list_item __P((pr_list)); void free_pr_list_item(pr_list);
void free_pr_queue_item __P((pr_queue)); void free_pr_queue_item(pr_queue);
struct passwd *get_password __P((char *)); struct passwd *get_password(char *);
pirstat get_pr_status __P((printername, bool_t *, bool_t *, int *, pirstat get_pr_status(printername, bool_t *, bool_t *, int *,
bool_t *, char *, size_t)); bool_t *, char *, size_t);
void *grab __P((int)); void *grab(int);
pcrstat pr_cancel __P((char *, char *, char *)); pcrstat pr_cancel(char *, char *, char *);
pirstat pr_init __P((char *, char *, char **)); pirstat pr_init(char *, char *, char **);
psrstat pr_start __P((void)); psrstat pr_start(void);
psrstat pr_start2 __P((char *, char *, char *, char *, char *, psrstat pr_start2(char *, char *, char *, char *, char *,
char **)); char **);
void run_ps630 __P((char *, char *)); void run_ps630(char *, char *);
void scramble __P((char *, char *)); void scramble(char *, char *);
int strembedded __P((const char *, const char *)); int strembedded(const char *, const char *);
FILE *su_popen __P((char *, char *, int)); FILE *su_popen(char *, char *, int);
int su_pclose __P((FILE *)); int su_pclose(FILE *);
#ifdef WTMP #ifdef WTMP
void wlogin __P((char *, struct svc_req *)); void wlogin(char *, struct svc_req *);
#endif #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 */ /* 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 int
check_cache(name, pw, p_uid, p_gid) check_cache(char *name, char *pw, int *p_uid, int *p_gid)
char *name;
char *pw;
int *p_uid;
int *p_gid;
{ {
int i; int i;
int c1, c2; int c1, c2;
@ -80,8 +76,7 @@ check_cache(name, pw, p_uid, p_gid)
} }
void void
add_cache_entry(p) add_cache_entry(struct passwd *p)
struct passwd *p;
{ {
int i; 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 */ /* 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 tempstr[256];
char *mapfont __P((char, char, char)); char *mapfont(char, char, char);
void myhandler __P((int)); void myhandler(int);
void start_watchdog __P((int)); void start_watchdog(int);
void stop_watchdog __P((void)); void stop_watchdog(void);
/* /*
**===================================================================== **=====================================================================
@ -85,9 +85,7 @@ void stop_watchdog __P((void));
void void
scramble(s1, s2) scramble(char *s1, char *s2)
char *s1;
char *s2;
{ {
while (*s1) { while (*s1) {
*s2++ = (*s1 ^ zchar) & 0x7f; *s2++ = (*s1 ^ zchar) & 0x7f;
@ -99,8 +97,7 @@ scramble(s1, s2)
struct passwd * struct passwd *
get_password(usrnam) get_password(char *usrnam)
char *usrnam;
{ {
struct passwd *p; struct passwd *p;
static struct passwd localp; static struct passwd localp;
@ -238,9 +235,7 @@ finis: return (&fontname[0]);
/* #define PS630_IS_BROKEN 1 */ /* #define PS630_IS_BROKEN 1 */
void void
run_ps630(f, opts) run_ps630(char *f, char *opts)
char *f;
char *opts;
{ {
char temp_file[256]; char temp_file[256];
char commbuf[256]; char commbuf[256];
@ -298,9 +293,7 @@ run_ps630(f, opts)
#ifdef WTMP #ifdef WTMP
void void
wlogin(name, req) wlogin(char *name, struct svc_req *req)
char *name;
struct svc_req *req;
{ {
struct sockaddr_in *who; struct sockaddr_in *who;
struct hostent *hp; struct hostent *hp;
@ -357,8 +350,7 @@ int interrupted = 0;
static FILE *pipe_handle; static FILE *pipe_handle;
void void
myhandler(dummy) myhandler(int dummy)
int dummy;
{ {
interrupted = 1; interrupted = 1;
fclose(pipe_handle); fclose(pipe_handle);
@ -367,8 +359,7 @@ myhandler(dummy)
} }
void void
start_watchdog(n) start_watchdog(int n)
int n;
{ {
/* /*
* Setup SIGALRM handler, force interrupt of ongoing syscall * Setup SIGALRM handler, force interrupt of ongoing syscall
@ -414,10 +405,7 @@ stop_watchdog()
} }
FILE * FILE *
su_popen(user, cmd, maxtime) su_popen(char *user, char *cmd, int maxtime)
char *user;
char *cmd;
int maxtime;
{ {
int p[2]; int p[2];
int parent_fd, child_fd, pid; int parent_fd, child_fd, pid;
@ -475,8 +463,7 @@ su_popen(user, cmd, maxtime)
} }
int int
su_pclose(ptr) su_pclose(FILE *ptr)
FILE *ptr;
{ {
int pid, status; int pid, status;
@ -579,9 +566,7 @@ main(int argc, char *argv[])
*/ */
int int
strembedded(s1, s2) strembedded(const char *s1, const char *s2)
const char *s1;
const char *s2;
{ {
while (*s2) { while (*s2) {
if (!strcasecmp(s1, 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 */ /* 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 SIZECOL 62
#define FILECOL 24 #define FILECOL 24
char *expand_alias __P((char *, char *, char *, char *)); char *expand_alias(char *, char *, char *, char *);
pr_list list_virtual_printers __P((void)); pr_list list_virtual_printers(void);
char *map_printer_name __P((char *)); char *map_printer_name(char *);
void substitute __P((char *, const char *, const char *)); void substitute(char *, const char *, const char *);
int suspicious __P((char *)); int suspicious(char *);
int valid_pr __P((char *)); int valid_pr(char *);
/* /*
**--------------------------------------------------------------------- **---------------------------------------------------------------------
@ -114,8 +114,7 @@ pr_queue queue = NULL;
*/ */
int int
suspicious(s) suspicious(char *s)
char *s;
{ {
if (strpbrk(s, ";|&<>`'#!?*()[]^/${}\n\r\"\\:") != NULL) if (strpbrk(s, ";|&<>`'#!?*()[]^/${}\n\r\"\\:") != NULL)
return 1; return 1;
@ -124,8 +123,7 @@ suspicious(s)
int int
valid_pr(pr) valid_pr(char *pr)
char *pr;
{ {
char *p; char *p;
pr_list curr; pr_list curr;
@ -155,10 +153,7 @@ valid_pr(pr)
* doing a chmod on something that could be a symlink... * doing a chmod on something that could be a symlink...
*/ */
pirstat pirstat
pr_init(sys, pr, sp) pr_init(char *sys, char *pr, char **sp)
char *sys;
char *pr;
char **sp;
{ {
int dir_mode = 0777; int dir_mode = 0777;
int rc; int rc;
@ -208,13 +203,7 @@ badspool:
return (PI_RES_OK); return (PI_RES_OK);
} }
psrstat psrstat
pr_start2(sys, pr, user, fname, opts, id) pr_start2(char *sys, char *pr, char *user, char *fname, char *opts, char **id)
char *sys;
char *pr;
char *user;
char *fname;
char *opts;
char **id;
{ {
char snum[20]; char snum[20];
static char req_id[256]; static char req_id[256];
@ -588,8 +577,7 @@ build_pr_list()
#endif /* SVR4 */ #endif /* SVR4 */
void * void *
grab(n) grab(int n)
int n;
{ {
void *p; void *p;
@ -602,8 +590,7 @@ grab(n)
} }
void void
free_pr_list_item(curr) free_pr_list_item(pr_list curr)
pr_list curr;
{ {
if (curr->pn) if (curr->pn)
free(curr->pn); free(curr->pn);
@ -649,12 +636,7 @@ free_pr_list_item(curr)
**/ **/
pirstat pirstat
build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) build_pr_queue(printername pn, username user, int just_mine, int p_qlen, int p_qshown)
printername pn;
username user;
int just_mine;
int *p_qlen;
int *p_qshown;
{ {
pr_queue last = NULL; pr_queue last = NULL;
pr_queue curr = NULL; pr_queue curr = NULL;
@ -730,12 +712,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
#else /* SVR4 */ #else /* SVR4 */
pirstat pirstat
build_pr_queue(pn, user, just_mine, p_qlen, p_qshown) build_pr_queue(printername pn, username user, int just_mine, int *p_qlen, int *p_qshown)
printername pn;
username user;
int just_mine;
int *p_qlen;
int *p_qshown;
{ {
pr_queue last = NULL; pr_queue last = NULL;
pr_queue curr = NULL; pr_queue curr = NULL;
@ -834,8 +811,7 @@ build_pr_queue(pn, user, just_mine, p_qlen, p_qshown)
#endif /* SVR4 */ #endif /* SVR4 */
void void
free_pr_queue_item(curr) free_pr_queue_item(pr_queue curr)
pr_queue curr;
{ {
if (curr->id) if (curr->id)
free(curr->id); free(curr->id);
@ -904,14 +880,7 @@ free_pr_queue_item(curr)
*/ */
pirstat pirstat
get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen)
printername pn;
bool_t *avail;
bool_t *printing;
int *qlen;
bool_t *needs_operator;
char *status;
size_t statuslen;
{ {
char buff[256]; char buff[256];
char cmd[64]; char cmd[64];
@ -969,14 +938,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
* BSD way: lpc status * BSD way: lpc status
*/ */
pirstat pirstat
get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen) get_pr_status(printername pn, bool_t *avail, bool_t *printing, int *qlen, bool_t *needs_operator, char *status, size_t statuslen)
printername pn;
bool_t *avail;
bool_t *printing;
int *qlen;
bool_t *needs_operator;
char *status;
size_t statuslen;
{ {
char cmd[128]; char cmd[128];
char buff[256]; char buff[256];
@ -1106,10 +1068,7 @@ get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
** messages are localized..... :-( ** messages are localized..... :-(
*/ */
pcrstat pcrstat
pr_cancel(pr, user, id) pr_cancel(char *pr, char *user, char *id)
char *pr;
char *user;
char *id;
{ {
char cmdbuf[256]; char cmdbuf[256];
char resbuf[256]; char resbuf[256];
@ -1154,10 +1113,7 @@ pr_cancel(pr, user, id)
* BSD way: lprm * BSD way: lprm
*/ */
pcrstat pcrstat
pr_cancel(pr, user, id) pr_cancel(char *pr, char *user, char *id)
char *pr;
char *user;
char *id;
{ {
char cmdbuf[256]; char cmdbuf[256];
char resbuf[256]; char resbuf[256];
@ -1246,10 +1202,7 @@ struct {
} alias[NPRINTERDEFS]; } alias[NPRINTERDEFS];
void void
add_printer_alias(printer, alias_for, command) add_printer_alias(char *printer, char *alias_for, char *command)
char *printer;
char *alias_for;
char *command;
{ {
size_t l; size_t l;
@ -1305,8 +1258,7 @@ list_virtual_printers()
char * char *
map_printer_name(printer) map_printer_name(char *printer)
char *printer;
{ {
int i; int i;
for (i = 0; i < num_aliases; i++) { for (i = 0; i < num_aliases; i++) {
@ -1317,10 +1269,7 @@ map_printer_name(printer)
} }
void void
substitute(string, token, data) substitute(char *string, const char *token, const char *data)
char *string;
const char *token;
const char *data;
{ {
char temp[512]; char temp[512];
char *c; char *c;
@ -1336,11 +1285,7 @@ substitute(string, token, data)
} }
char * char *
expand_alias(printer, file, user, host) expand_alias(char *printer, char *file, char *user, char *host)
char *printer;
char *file;
char *user;
char *host;
{ {
static char expansion[512]; static char expansion[512];
int i; 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 */ /* 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> #include <stdio.h>
@ -18,10 +18,8 @@ void free_pr_queue_item();
void good(); void good();
void bad(); void bad();
int
main(argc, argv) main(int argc, char *argv[])
int argc;
char *argv[];
{ {
char *host_name; char *host_name;
@ -99,9 +97,7 @@ char *transport = "udp";
#define zchar 0x5b #define zchar 0x5b
void void
scramble(s1, s2) scramble(char *s1, char *s2)
char *s1;
char *s2;
{ {
while (*s1) while (*s1)
{ {
@ -151,10 +147,7 @@ int i;
return(0); return(0);
} }
test_v2_auth(host_name, user_name , pwrd) test_v2_auth(char *host_name, char *user_name , char *pwrd)
char *host_name;
char *user_name;
char *pwrd;
{ {
v2_auth_args a; v2_auth_args a;
v2_auth_results *rp; v2_auth_results *rp;
@ -202,9 +195,7 @@ int i;
return(0); return(0);
} }
test_v2_init(host_name, printer) test_v2_init(char *host_name, char *printer)
char *host_name;
char *printer;
{ {
v2_pr_init_args a; v2_pr_init_args a;
v2_pr_init_results *rp; v2_pr_init_results *rp;
@ -232,12 +223,7 @@ v2_pr_init_results *rp;
} }
test_v2_start(host_name, printer, user_name, tag1, tag2) test_v2_start(char *host_name, char *printer, char *user_name, char *tag1, char *tag2)
char *host_name;
char *printer;
char *user_name;
char *tag1;
char *tag2;
{ {
v2_pr_start_args a; v2_pr_start_args a;
v2_pr_start_results *rp; v2_pr_start_results *rp;
@ -289,11 +275,7 @@ FILE *fp;
} }
test_v2_cancel(host_name, printer, user_name, id) test_v2_cancel(char *host_name, char *printer, char *user_name, char *id)
char *host_name;
char *printer;
char *user_name;
char *id;
{ {
v2_pr_cancel_args a; v2_pr_cancel_args a;
v2_pr_cancel_results *rp; v2_pr_cancel_results *rp;
@ -362,8 +344,7 @@ pr_list curr;
void void
free_pr_list_item(curr) free_pr_list_item(pr_list curr)
pr_list curr;
{ {
if(curr->pn) if(curr->pn)
free(curr->pn); free(curr->pn);
@ -380,10 +361,7 @@ pr_list curr;
test_v2_queue(printer, user_name, private) test_v2_queue(char *printer, char *user_name, int private)
char *printer;
char *user_name;
int private;
{ {
struct v2_pr_queue_args a; struct v2_pr_queue_args a;
v2_pr_queue_results *rp; v2_pr_queue_results *rp;
@ -432,8 +410,7 @@ pr_queue curr;
void void
free_pr_queue_item(curr) free_pr_queue_item(pr_queue curr)
pr_queue curr;
{ {
if(curr->id) if(curr->id)
free(curr->id); free(curr->id);
@ -456,8 +433,7 @@ pr_queue curr;
test_v2_stat(printer) test_v2_stat(char *printer)
char *printer;
{ {
v2_pr_status_args a; v2_pr_status_args a;
v2_pr_status_results *rp; v2_pr_status_results *rp;
@ -491,11 +467,7 @@ v2_pr_status_results *rp;
return(0); return(0);
} }
struct mapreq_arg_item * make_mapreq_entry(t, i, n, next) struct mapreq_arg_item * make_mapreq_entry(mapreq t, int i, char *n, struct mapreq_arg_item *next)
mapreq t;
int i;
char *n;
struct mapreq_arg_item *next;
{ {
struct mapreq_arg_item *x; struct mapreq_arg_item *x;
x = (struct mapreq_arg_item *)malloc(sizeof(struct mapreq_arg_item)); x = (struct mapreq_arg_item *)malloc(sizeof(struct mapreq_arg_item));
@ -559,8 +531,7 @@ printf("********************************************************\n");
} }
void void
bad(reason) bad(char *reason)
char *reason;
{ {
printf("\n"); printf("\n");
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 */ /* 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*/ /*ARGSUSED*/
void * void *
pcnfsd_null_1_svc(arg, req) pcnfsd_null_1_svc(void *arg, struct svc_req *req)
void *arg;
struct svc_req *req;
{ {
static char dummy; static char dummy;
return ((void *) &dummy); return ((void *) &dummy);
} }
auth_results * auth_results *
pcnfsd_auth_1_svc(arg, req) pcnfsd_auth_1_svc(auth_args *arg, struct svc_req *req)
auth_args *arg;
struct svc_req *req;
{ {
static auth_results r; static auth_results r;
@ -124,9 +120,7 @@ pcnfsd_auth_1_svc(arg, req)
} }
pr_init_results * pr_init_results *
pcnfsd_pr_init_1_svc(pi_arg, req) pcnfsd_pr_init_1_svc(pr_init_args *pi_arg, struct svc_req *req)
pr_init_args *pi_arg;
struct svc_req *req;
{ {
static pr_init_results pi_res; static pr_init_results pi_res;
@ -137,9 +131,7 @@ pcnfsd_pr_init_1_svc(pi_arg, req)
} }
pr_start_results * pr_start_results *
pcnfsd_pr_start_1_svc(ps_arg, req) pcnfsd_pr_start_1_svc(pr_start_args *ps_arg, struct svc_req *req)
pr_start_args *ps_arg;
struct svc_req *req;
{ {
static pr_start_results ps_res; static pr_start_results ps_res;
char *dummyptr; 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 */ /* 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*/ /*ARGSUSED*/
void * void *
pcnfsd2_null_2_svc(arg, req) pcnfsd2_null_2_svc(void *arg, struct svc_req *req)
void *arg;
struct svc_req *req;
{ {
static char dummy; static char dummy;
return ((void *) &dummy); return ((void *) &dummy);
} }
v2_auth_results * v2_auth_results *
pcnfsd2_auth_2_svc(arg, req) pcnfsd2_auth_2_svc(v2_auth_args *arg, struct svc_req *req)
v2_auth_args *arg;
struct svc_req *req;
{ {
static v2_auth_results r; static v2_auth_results r;
@ -168,9 +164,7 @@ pcnfsd2_auth_2_svc(arg, req)
} }
v2_pr_init_results * v2_pr_init_results *
pcnfsd2_pr_init_2_svc(arg, req) pcnfsd2_pr_init_2_svc(v2_pr_init_args *arg, struct svc_req *req)
v2_pr_init_args *arg;
struct svc_req *req;
{ {
static v2_pr_init_results res; static v2_pr_init_results res;
@ -183,9 +177,7 @@ pcnfsd2_pr_init_2_svc(arg, req)
} }
v2_pr_start_results * v2_pr_start_results *
pcnfsd2_pr_start_2_svc(arg, req) pcnfsd2_pr_start_2_svc(v2_pr_start_args *arg, struct svc_req *req)
v2_pr_start_args *arg;
struct svc_req *req;
{ {
static v2_pr_start_results res; static v2_pr_start_results res;
@ -198,9 +190,7 @@ pcnfsd2_pr_start_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_pr_list_results * v2_pr_list_results *
pcnfsd2_pr_list_2_svc(arg, req) pcnfsd2_pr_list_2_svc(void *arg, struct svc_req *req)
void *arg;
struct svc_req *req;
{ {
static v2_pr_list_results res; static v2_pr_list_results res;
@ -213,9 +203,7 @@ pcnfsd2_pr_list_2_svc(arg, req)
} }
v2_pr_queue_results * v2_pr_queue_results *
pcnfsd2_pr_queue_2_svc(arg, req) pcnfsd2_pr_queue_2_svc(v2_pr_queue_args *arg, struct svc_req *req)
v2_pr_queue_args *arg;
struct svc_req *req;
{ {
static v2_pr_queue_results res; static v2_pr_queue_results res;
@ -230,9 +218,7 @@ pcnfsd2_pr_queue_2_svc(arg, req)
} }
v2_pr_status_results * v2_pr_status_results *
pcnfsd2_pr_status_2_svc(arg, req) pcnfsd2_pr_status_2_svc(v2_pr_status_args *arg, struct svc_req *req)
v2_pr_status_args *arg;
struct svc_req *req;
{ {
static v2_pr_status_results res; static v2_pr_status_results res;
static char status[128]; static char status[128];
@ -246,9 +232,7 @@ pcnfsd2_pr_status_2_svc(arg, req)
} }
v2_pr_cancel_results * v2_pr_cancel_results *
pcnfsd2_pr_cancel_2_svc(arg, req) pcnfsd2_pr_cancel_2_svc(v2_pr_cancel_args *arg, struct svc_req *req)
v2_pr_cancel_args *arg;
struct svc_req *req;
{ {
static v2_pr_cancel_results res; static v2_pr_cancel_results res;
@ -259,9 +243,7 @@ pcnfsd2_pr_cancel_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_pr_requeue_results * v2_pr_requeue_results *
pcnfsd2_pr_requeue_2_svc(arg, req) pcnfsd2_pr_requeue_2_svc(v2_pr_requeue_args *arg, struct svc_req *req)
v2_pr_requeue_args *arg;
struct svc_req *req;
{ {
static v2_pr_requeue_results res; static v2_pr_requeue_results res;
res.stat = PC_RES_FAIL; res.stat = PC_RES_FAIL;
@ -271,9 +253,7 @@ pcnfsd2_pr_requeue_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_pr_hold_results * v2_pr_hold_results *
pcnfsd2_pr_hold_2_svc(arg, req) pcnfsd2_pr_hold_2_svc(v2_pr_hold_args *arg, struct svc_req *req)
v2_pr_hold_args *arg;
struct svc_req *req;
{ {
static v2_pr_hold_results res; static v2_pr_hold_results res;
@ -284,9 +264,7 @@ pcnfsd2_pr_hold_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_pr_release_results * v2_pr_release_results *
pcnfsd2_pr_release_2_svc(arg, req) pcnfsd2_pr_release_2_svc(v2_pr_release_args *arg, struct svc_req *req)
v2_pr_release_args *arg;
struct svc_req *req;
{ {
static v2_pr_release_results res; static v2_pr_release_results res;
@ -297,9 +275,7 @@ pcnfsd2_pr_release_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_pr_admin_results * v2_pr_admin_results *
pcnfsd2_pr_admin_2_svc(arg, req) pcnfsd2_pr_admin_2_svc(v2_pr_admin_args *arg, struct svc_req *req)
v2_pr_admin_args *arg;
struct svc_req *req;
{ {
static v2_pr_admin_results res; static v2_pr_admin_results res;
/* /*
@ -316,8 +292,7 @@ pcnfsd2_pr_admin_2_svc(arg, req)
} }
void void
free_mapreq_results(p) free_mapreq_results(mapreq_res p)
mapreq_res p;
{ {
if (p->mapreq_next) if (p->mapreq_next)
free_mapreq_results(p->mapreq_next); /* recurse */ free_mapreq_results(p->mapreq_next); /* recurse */
@ -327,11 +302,10 @@ free_mapreq_results(p)
return; return;
} }
static char *my_strdup __P((const char *)); static char *my_strdup(const char *);
static char * static char *
my_strdup(s) my_strdup(const char *s)
const char *s;
{ {
size_t len; size_t len;
char *r; char *r;
@ -342,9 +316,7 @@ my_strdup(s)
} }
v2_mapid_results * v2_mapid_results *
pcnfsd2_mapid_2_svc(arg, req) pcnfsd2_mapid_2_svc(v2_mapid_args *arg, struct svc_req *req)
v2_mapid_args *arg;
struct svc_req *req;
{ {
static v2_mapid_results res; static v2_mapid_results res;
struct passwd *p_passwd; struct passwd *p_passwd;
@ -419,9 +391,7 @@ pcnfsd2_mapid_2_svc(arg, req)
/*ARGSUSED*/ /*ARGSUSED*/
v2_alert_results * v2_alert_results *
pcnfsd2_alert_2_svc(arg, req) pcnfsd2_alert_2_svc(v2_alert_args *arg, struct svc_req *req)
v2_alert_args *arg;
struct svc_req *req;
{ {
static v2_alert_results res; static v2_alert_results res;
@ -432,9 +402,7 @@ pcnfsd2_alert_2_svc(arg, req)
} }
/*ARGSUSED*/ /*ARGSUSED*/
v2_info_results * v2_info_results *
pcnfsd2_info_2_svc(arg, req) pcnfsd2_info_2_svc(v2_info_args *arg, struct svc_req *req)
v2_info_args *arg;
struct svc_req *req;
{ {
static v2_info_results res; static v2_info_results res;
static int facilities[FACILITIESMAX]; static int facilities[FACILITIESMAX];
@ -474,11 +442,7 @@ pcnfsd2_info_2_svc(arg, req)
void void
fillin_extra_groups(uname, main_gid, len, extra_gids) fillin_extra_groups(char *uname, gid_t main_gid, int *len, gid_t extra_gids[EXTRAGIDLEN])
char *uname;
gid_t main_gid;
int *len;
gid_t extra_gids[EXTRAGIDLEN];
{ {
struct group *grp; struct group *grp;
__aconst char *__aconst *members; __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. * is responsible for free()ing the result string.
*/ */
char * char *
find_entry(key, map) find_entry(const char *key, const char *map)
const char *key;
const char *map;
{ {
int err; int err;
char *val = NULL; 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 * Copyright (c) 1995
@ -35,7 +35,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #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 #endif
#include <errno.h> #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. * an address.
*/ */
struct sm_stat_res * struct sm_stat_res *
sm_stat_1_svc(arg, req) sm_stat_1_svc(sm_name *arg, struct svc_req *req)
sm_name *arg;
struct svc_req *req;
{ {
static sm_stat_res smres; static sm_stat_res smres;
struct addrinfo *ai; struct addrinfo *ai;
@ -92,9 +90,7 @@ sm_stat_1_svc(arg, req)
* valid (as judged by gethostbyname()) * valid (as judged by gethostbyname())
*/ */
struct sm_stat_res * struct sm_stat_res *
sm_mon_1_svc(arg, req) sm_mon_1_svc(mon *arg, struct svc_req *req)
mon *arg;
struct svc_req *req;
{ {
static sm_stat_res smres; static sm_stat_res smres;
struct addrinfo *ai; struct addrinfo *ai;
@ -158,10 +154,7 @@ sm_mon_1_svc(arg, req)
* request, all are removed. * request, all are removed.
*/ */
int int
do_unmon(name, hp, ptr) do_unmon(char *name, HostInfo *hp, void *ptr)
char *name;
HostInfo *hp;
void *ptr;
{ {
my_id *idp = ptr; my_id *idp = ptr;
MonList *lp, *next; MonList *lp, *next;
@ -199,9 +192,7 @@ do_unmon(name, hp, ptr)
* earlier call to sm_mon_1 * earlier call to sm_mon_1
*/ */
struct sm_stat * struct sm_stat *
sm_unmon_1_svc(arg, req) sm_unmon_1_svc(mon_id *arg, struct svc_req *req)
mon_id *arg;
struct svc_req *req;
{ {
static sm_stat smres; static sm_stat smres;
HostInfo *hp, h; HostInfo *hp, h;
@ -241,9 +232,7 @@ sm_unmon_1_svc(arg, req)
* host and program number. * host and program number.
*/ */
struct sm_stat * struct sm_stat *
sm_unmon_all_1_svc(arg, req) sm_unmon_all_1_svc(my_id *arg, struct svc_req *req)
my_id *arg;
struct svc_req *req;
{ {
static sm_stat smres; static sm_stat smres;
@ -277,9 +266,7 @@ sm_unmon_all_1_svc(arg, req)
* and inform all hosts on the monitor list. * and inform all hosts on the monitor list.
*/ */
void * void *
sm_simu_crash_1_svc(v, req) sm_simu_crash_1_svc(void *v, struct svc_req *req)
void *v;
struct svc_req *req;
{ {
static char dummy; static char dummy;
@ -310,9 +297,7 @@ sm_simu_crash_1_svc(v, req)
* that modify the list. * that modify the list.
*/ */
void * void *
sm_notify_1_svc(arg, req) sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
stat_chge *arg;
struct svc_req *req;
{ {
struct timeval timeout = {20, 0}; /* 20 secs timeout */ struct timeval timeout = {20, 0}; /* 20 secs timeout */
CLIENT *cli; 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 * Copyright (c) 1995
@ -36,7 +36,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #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 #endif
/* main() function for status monitor daemon. Some of the code in this */ /* main() function for status monitor daemon. Some of the code in this */
@ -79,22 +79,18 @@ static DBT undefkey = {
/* statd.c */ /* statd.c */
static int walk_one __P((int (*fun )__P ((DBT *, HostInfo *, void *)), DBT *, DBT *, void *)); static int walk_one(int (*fun )(DBT *, HostInfo *, void *), DBT *, DBT *, void *);
static int walk_db __P((int (*fun )__P ((DBT *, HostInfo *, void *)), void *)); static int walk_db(int (*fun )(DBT *, HostInfo *, void *), void *);
static int reset_host __P((DBT *, HostInfo *, void *)); static int reset_host(DBT *, HostInfo *, void *);
static int check_work __P((DBT *, HostInfo *, void *)); static int check_work(DBT *, HostInfo *, void *);
static int unmon_host __P((DBT *, HostInfo *, void *)); static int unmon_host(DBT *, HostInfo *, void *);
static int notify_one __P((DBT *, HostInfo *, void *)); static int notify_one(DBT *, HostInfo *, void *);
static void init_file __P((const char *)); static void init_file(const char *);
static int notify_one_host __P((const char *)); static int notify_one_host(const char *);
static void die __P((int)) __dead; static void die(int) __dead;
int main __P((int, char **));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
int ch; int ch;
struct sigaction nsa; struct sigaction nsa;
@ -181,8 +177,7 @@ main(argc, argv)
* children to exit when they have done their work. * children to exit when they have done their work.
*/ */
void void
notify_handler(sig) notify_handler(int sig)
int sig;
{ {
time_t now; time_t now;
@ -241,9 +236,7 @@ bad:
* *
*/ */
void void
change_host(hostnamep, hp) change_host(char *hostnamep, HostInfo *hp)
char *hostnamep;
HostInfo *hp;
{ {
DBT key, data; DBT key, data;
char *ptr; char *ptr;
@ -282,9 +275,7 @@ change_host(hostnamep, hp)
* *
*/ */
HostInfo * HostInfo *
find_host(hostname, hp) find_host(char *hostname, HostInfo *hp)
char *hostname;
HostInfo *hp;
{ {
DBT key, data; DBT key, data;
char *ptr; char *ptr;
@ -320,10 +311,7 @@ bad:
* Notes: * Notes:
*/ */
static int static int
walk_one(fun, key, data, ptr) walk_one(int (*fun)(DBT *, HostInfo *, void *), DBT *key, DBT *data, void *ptr)
int (*fun) __P((DBT *, HostInfo *, void *));
DBT *key, *data;
void *ptr;
{ {
HostInfo h; HostInfo h;
if (key->size == undefkey.size && if (key->size == undefkey.size &&
@ -344,9 +332,7 @@ walk_one(fun, key, data, ptr)
* Notes: * Notes:
*/ */
static int static int
walk_db(fun, ptr) walk_db(int (*fun)(DBT *, HostInfo *, void *), void *ptr)
int (*fun) __P((DBT *, HostInfo *, void *));
void *ptr;
{ {
DBT key, data; DBT key, data;
@ -400,10 +386,7 @@ bad:
* notify them before the second crash occurred. * notify them before the second crash occurred.
*/ */
static int static int
reset_host(key, hi, ptr) reset_host(DBT *key, HostInfo *hi, void *ptr)
DBT *key;
HostInfo *hi;
void *ptr;
{ {
if (hi->monList) { if (hi->monList) {
@ -422,10 +405,7 @@ reset_host(key, hi, ptr)
* Notes: * Notes:
*/ */
static int static int
check_work(key, hi, ptr) check_work(DBT *key, HostInfo *hi, void *ptr)
DBT *key;
HostInfo *hi;
void *ptr;
{ {
return hi->notifyReqd ? -1 : 0; return hi->notifyReqd ? -1 : 0;
} }
@ -437,10 +417,7 @@ check_work(key, hi, ptr)
* Notes: * Notes:
*/ */
static int static int
unmon_host(key, hi, ptr) unmon_host(DBT *key, HostInfo *hi, void *ptr)
DBT *key;
HostInfo *hi;
void *ptr;
{ {
char *name = key->data; char *name = key->data;
@ -456,10 +433,7 @@ unmon_host(key, hi, ptr)
* Notes: * Notes:
*/ */
static int static int
notify_one(key, hi, ptr) notify_one(DBT *key, HostInfo *hi, void *ptr)
DBT *key;
HostInfo *hi;
void *ptr;
{ {
time_t now = *(time_t *) ptr; time_t now = *(time_t *) ptr;
char *name = key->data; char *name = key->data;
@ -516,8 +490,7 @@ notify_one(key, hi, ptr)
* the state number to the next even value. * the state number to the next even value.
*/ */
static void static void
init_file(filename) init_file(const char *filename)
const char *filename;
{ {
DBT data; DBT data;
@ -584,8 +557,7 @@ unmon_hosts()
} }
static int static int
notify_one_host(hostname) notify_one_host(const char *hostname)
const char *hostname;
{ {
struct timeval timeout = {20, 0}; /* 20 secs timeout */ struct timeval timeout = {20, 0}; /* 20 secs timeout */
CLIENT *cli; CLIENT *cli;
@ -621,8 +593,7 @@ notify_one_host(hostname)
static void static void
die(n) die(int n)
int n;
{ {
(*db->close)(db); (*db->close)(db);
exit(n); 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 * Copyright (c) 1995
@ -97,23 +97,23 @@ extern Header status_info;
/* Function prototypes */ /* Function prototypes */
/* stat_proc.c */ /* stat_proc.c */
struct sm_stat_res *sm_stat_1_svc __P((sm_name *, struct svc_req *)); struct sm_stat_res *sm_stat_1_svc(sm_name *, struct svc_req *);
struct sm_stat_res *sm_mon_1_svc __P((mon *, struct svc_req *)); struct sm_stat_res *sm_mon_1_svc(mon *, struct svc_req *);
struct sm_stat *sm_unmon_1_svc __P((mon_id *, struct svc_req *)); struct sm_stat *sm_unmon_1_svc(mon_id *, struct svc_req *);
struct sm_stat *sm_unmon_all_1_svc __P((my_id *, struct svc_req *)); struct sm_stat *sm_unmon_all_1_svc(my_id *, struct svc_req *);
void *sm_simu_crash_1_svc __P((void *, struct svc_req *)); void *sm_simu_crash_1_svc(void *, struct svc_req *);
void *sm_notify_1_svc __P((stat_chge *, struct svc_req *)); void *sm_notify_1_svc(stat_chge *, struct svc_req *);
int do_unmon __P((char *, HostInfo *, void *)); int do_unmon(char *, HostInfo *, void *);
/* statd.c */ /* statd.c */
void notify_handler __P((int)); void notify_handler(int);
void sync_file __P((void)); void sync_file(void);
void unmon_hosts __P((void)); void unmon_hosts(void);
void change_host __P((char *, HostInfo *)); void change_host(char *, HostInfo *);
HostInfo *find_host __P((char *, HostInfo *)); HostInfo *find_host(char *, HostInfo *);
void reset_database __P((void)); 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 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)) #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> #include <sys/cdefs.h>
#ifndef lint #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 #endif
#include <stdio.h> #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}; static struct timeval TIMEOUT = {25, 0};
struct sm_stat_res * struct sm_stat_res *
sm_stat_1(argp, clnt) sm_stat_1(struct sm_name *argp, CLIENT *clnt)
struct sm_name *argp;
CLIENT *clnt;
{ {
static struct sm_stat_res res; static struct sm_stat_res res;
@ -29,9 +27,7 @@ sm_stat_1(argp, clnt)
struct sm_stat_res * struct sm_stat_res *
sm_mon_1(argp, clnt) sm_mon_1(struct mon *argp, CLIENT *clnt)
struct mon *argp;
CLIENT *clnt;
{ {
static struct sm_stat_res res; static struct sm_stat_res res;
@ -44,9 +40,7 @@ sm_mon_1(argp, clnt)
struct sm_stat * struct sm_stat *
sm_unmon_1(argp, clnt) sm_unmon_1(struct mon_id *argp, CLIENT *clnt)
struct mon_id *argp;
CLIENT *clnt;
{ {
static struct sm_stat res; static struct sm_stat res;
@ -59,9 +53,7 @@ sm_unmon_1(argp, clnt)
struct sm_stat * struct sm_stat *
sm_unmon_all_1(argp, clnt) sm_unmon_all_1(struct my_id *argp, CLIENT *clnt)
struct my_id *argp;
CLIENT *clnt;
{ {
static struct sm_stat res; static struct sm_stat res;
@ -74,9 +66,7 @@ sm_unmon_all_1(argp, clnt)
void * void *
sm_simu_crash_1(argp, clnt) sm_simu_crash_1(void *argp, CLIENT *clnt)
void *argp;
CLIENT *clnt;
{ {
static char res; static char res;
@ -89,9 +79,7 @@ sm_simu_crash_1(argp, clnt)
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
CLIENT *cli; CLIENT *cli;
char dummy; 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 $ */ /* $FreeBSD: src/share/examples/ses/chpmon.c,v 1.1 2000/01/15 22:47:16 mjacob Exp $ */
/* /*
* Copyright (c) 2000 by Matthew Jacob * Copyright (c) 2000 by Matthew Jacob
@ -48,12 +48,8 @@
#define BADSTAT \ #define BADSTAT \
(SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL) (SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL)
int main __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
int fd, delay, dev; int fd, delay, dev;
ses_encstat stat, *carray; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -40,13 +40,12 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
char *geteltnm __P((int)); char *geteltnm(int);
static char *scode2ascii __P((u_char)); static char *scode2ascii(u_char);
char *stat2ascii __P((int, u_char *)); char *stat2ascii(int, u_char *);
char * char *
geteltnm(type) geteltnm(int type)
int type;
{ {
static char rbuf[132]; static char rbuf[132];
@ -159,9 +158,7 @@ scode2ascii(u_char code)
char * char *
stat2ascii(eletype, cstat) stat2ascii(int eletype, u_char *cstat)
int eletype;
u_char *cstat;
{ {
static char ebuf[256], *scode; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -42,14 +42,11 @@
#include <fcntl.h> #include <fcntl.h>
#include SESINC #include SESINC
extern char *geteltnm __P((int)); extern char *geteltnm(int);
extern char *stat2ascii __P((int, u_char *)); extern char *stat2ascii(int, u_char *);
int main __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
ses_object *objp; ses_object *objp;
ses_objstat ob; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -41,12 +41,8 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int main __P((int, char **));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char **argv;
{ {
unsigned int nobj; unsigned int nobj;
int fd; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -41,13 +41,10 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int main __P((int, char **)); extern char *geteltnm(int);
extern char *geteltnm __P((int));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
ses_object *objp; ses_object *objp;
int nobj, fd, i; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -40,12 +40,8 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int main __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
int fd; int fd;
int i; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -41,12 +41,8 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
int fd; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -45,16 +45,13 @@
#define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \ #define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \
SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO) SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO)
int main __P((int, char **));
/* /*
* Monitor named SES devices and note (via syslog) any changes in status. * Monitor named SES devices and note (via syslog) any changes in status.
*/ */
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
static const char usage[] = static const char usage[] =
"usage: %s [-d] [-t pollinterval] device [device ...]\n"; "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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -41,12 +41,8 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int main __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
int fd; int fd;
long val; 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: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -41,12 +41,8 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include SESINC #include SESINC
int main __P((int, char **));
int int
main(a, v) main(int a, char *v[])
int a;
char **v;
{ {
int fd; int fd;
int i; 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 * This module intercepts syslog() library calls and redirects their output
@ -12,7 +12,7 @@
#if 0 #if 0
static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21"; static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
#else #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
#endif #endif
@ -27,10 +27,7 @@ __RCSID("$NetBSD: fakelog.c,v 1.6 2011/07/17 20:54:55 joerg Exp $");
/* ARGSUSED */ /* ARGSUSED */
void void
openlog(name, logopt, facility) openlog(const char *name, int logopt, int facility)
const char *name;
int logopt;
int facility;
{ {
/* void */ /* 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 * Routines to parse an inetd.conf or tlid.conf file. This would be a great
@ -12,7 +12,7 @@
#if 0 #if 0
static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
#else #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
#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 "percent_m.h"
#include "scaffold.h" #include "scaffold.h"
static void inet_chk __P((char *, char *, char *, char *)); static void inet_chk(char *, char *, char *, char *);
static char *base_name __P((char *)); static char *base_name(char *);
/* /*
* Programs that use libwrap directly are not in inetd.conf, and so must * 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 */ /* inet_chk - examine one inetd.conf (tlid.conf?) entry */
static void inet_chk(protocol, path, arg0, arg1) static void inet_chk(char *protocol, char *path, char *arg0, char *arg1)
char *protocol;
char *path;
char *arg0;
char *arg1;
{ {
char daemon[BUFSIZ]; char daemon[BUFSIZ];
struct stat st; struct stat st;
@ -306,9 +302,7 @@ char *arg1;
/* inet_set - remember service status */ /* inet_set - remember service status */
void inet_set(name, type) void inet_set(char *name, int type)
char *name;
int type;
{ {
struct inet_ent *ip = struct inet_ent *ip =
(struct inet_ent *) malloc(sizeof(struct inet_ent) + strlen(name)); (struct inet_ent *) malloc(sizeof(struct inet_ent) + strlen(name));
@ -325,8 +319,7 @@ int type;
/* inet_get - look up service status */ /* inet_get - look up service status */
int inet_get(name) int inet_get(char *name)
char *name;
{ {
struct inet_ent *ip; struct inet_ent *ip;
@ -342,8 +335,7 @@ char *name;
/* base_name - compute last pathname component */ /* base_name - compute last pathname component */
static char *base_name(path) static char *base_name(char *path)
char *path;
{ {
char *cp; 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 * @(#) inetcf.h 1.1 94/12/28 17:42:30
@ -6,9 +6,9 @@
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/ */
char *inet_cfg __P((char *)); /* read inetd.conf file */ char *inet_cfg(char *); /* read inetd.conf file */
void inet_set __P((char *, int)); /* remember internet service */ void inet_set(char *, int); /* remember internet service */
int inet_get __P((char *)); /* look up internet service */ int inet_get(char *); /* look up internet service */
#define WR_UNKNOWN (-1) /* service unknown */ #define WR_UNKNOWN (-1) /* service unknown */
#define WR_NOT 1 /* may not be wrapped */ #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. * Replace %m by system error message.
@ -11,7 +11,7 @@
#if 0 #if 0
static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37"; static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
#else #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
#endif #endif
@ -27,9 +27,7 @@ extern int sys_nerr;
#include "mystdarg.h" #include "mystdarg.h"
#include "percent_m.h" #include "percent_m.h"
char *percent_m(obuf, ibuf) char *percent_m(char *obuf, const char *ibuf)
char *obuf;
const char *ibuf;
{ {
char *bp = obuf; char *bp = obuf;
const char *cp = ibuf; 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))); __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. * Routines for testing only. Not really industrial strength.
@ -11,7 +11,7 @@
#if 0 #if 0
static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24"; static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
#else #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
#endif #endif
@ -47,9 +47,7 @@ extern int rfc931_timeout; /* = RFC931_TIMEOUT; */
/* find_inet_addr - find all addresses for this host, result to free() */ /* find_inet_addr - find all addresses for this host, result to free() */
struct addrinfo *find_inet_addr(host, flags) struct addrinfo *find_inet_addr(char *host, int flags)
char *host;
int flags;
{ {
struct addrinfo hints, *res; struct addrinfo hints, *res;
int error; int error;
@ -72,8 +70,7 @@ int flags;
/* check_dns - give each address thorough workout, return address count */ /* check_dns - give each address thorough workout, return address count */
int check_dns(host) int check_dns(char *host)
char *host;
{ {
struct request_info request; struct request_info request;
struct sockaddr_storage ss; struct sockaddr_storage ss;
@ -112,8 +109,7 @@ char *host;
/* ARGSUSED */ /* ARGSUSED */
void shell_cmd(command) void shell_cmd(char *command)
char *command;
{ {
if (hosts_access_verbose) if (hosts_access_verbose)
printf("command: %s", command); printf("command: %s", command);
@ -123,8 +119,7 @@ char *command;
/* ARGSUSED */ /* ARGSUSED */
void clean_exit(request) void clean_exit(struct request_info *request)
struct request_info *request;
{ {
exit(0); 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 * tcpdchk - examine all tcpd access control rules and inetd.conf entries
@ -21,7 +21,7 @@
#if 0 #if 0
static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25"; static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
#else #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
#endif #endif
@ -91,8 +91,6 @@ static int check_inet_addr(char *);
static int check_host(char *); static int check_host(char *);
static int reserved_name(char *); static int reserved_name(char *);
int main(int, char **);
#define PERMIT 1 #define PERMIT 1
#define DENY 0 #define DENY 0
@ -281,9 +279,7 @@ parse_table(const char *table, struct request_info *request)
/* print_list - pretty-print a list */ /* print_list - pretty-print a list */
static void print_list(title, list) static void print_list(char *title, char *list)
char *title;
char *list;
{ {
char buf[BUFLEN]; char buf[BUFLEN];
char *cp; char *cp;
@ -303,8 +299,7 @@ char *list;
/* check_daemon_list - criticize daemon list */ /* check_daemon_list - criticize daemon list */
static void check_daemon_list(list) static void check_daemon_list(char *list)
char *list;
{ {
char buf[BUFLEN]; char buf[BUFLEN];
char *cp; char *cp;
@ -331,8 +326,7 @@ char *list;
/* check_client_list - criticize client list */ /* check_client_list - criticize client list */
static void check_client_list(list) static void check_client_list(char *list)
char *list;
{ {
char buf[BUFLEN]; char buf[BUFLEN];
char *cp; char *cp;
@ -370,8 +364,7 @@ char *list;
/* check_daemon - criticize daemon pattern */ /* check_daemon - criticize daemon pattern */
static void check_daemon(pat) static void check_daemon(char *pat)
char *pat;
{ {
if (pat[0] == '@') { if (pat[0] == '@') {
tcpd_warn("%s: daemon name begins with \"@\"", pat); tcpd_warn("%s: daemon name begins with \"@\"", pat);
@ -402,8 +395,7 @@ char *pat;
/* check_user - criticize user pattern */ /* check_user - criticize user pattern */
static void check_user(pat) static void check_user(char *pat)
char *pat;
{ {
if (pat[0] == '@') { /* @netgroup */ if (pat[0] == '@') { /* @netgroup */
tcpd_warn("%s: user name begins with \"@\"", pat); tcpd_warn("%s: user name begins with \"@\"", pat);
@ -423,8 +415,7 @@ char *pat;
} }
#ifdef INET6 #ifdef INET6
static int check_inet_addr(pat) static int check_inet_addr(char *pat)
char *pat;
{ {
struct addrinfo *res; struct addrinfo *res;
@ -438,8 +429,7 @@ char *pat;
#endif #endif
/* check_host - criticize host pattern */ /* check_host - criticize host pattern */
static int check_host(pat) static int check_host(char *pat)
char *pat;
{ {
char *mask; char *mask;
int addr_count = 1; int addr_count = 1;
@ -502,8 +492,7 @@ char *pat;
/* reserved_name - determine if name is reserved */ /* reserved_name - determine if name is reserved */
static int reserved_name(pat) static int reserved_name(char *pat)
char *pat;
{ {
return (STR_EQ(pat, unknown) return (STR_EQ(pat, unknown)
|| STR_EQ(pat, "KNOWN") || 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 * tcpdmatch - explain what tcpd would do in a specific case
@ -20,7 +20,7 @@
#if 0 #if 0
static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36"; static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
#else #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
#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 "inetcf.h"
#include "scaffold.h" #include "scaffold.h"
static void usage __P((char *)); static void usage(char *);
static void expand __P((char *, char *, struct request_info *)); static void expand(char *, char *, struct request_info *);
static void tcpdmatch __P((struct request_info *)); static void tcpdmatch(struct request_info *);
int main __P((int, char **));
/* The main program */ /* The main program */
int main(argc, argv) int main(int argc, char *argv[])
int argc;
char **argv;
{ {
struct addrinfo *res, *res0; struct addrinfo *res, *res0;
char *myname = argv[0]; char *myname = argv[0];
@ -269,8 +266,7 @@ char **argv;
/* Explain how to use this program */ /* Explain how to use this program */
static void usage(myname) static void usage(char *myname)
char *myname;
{ {
fprintf(stderr, "usage: %s [-d] [-i inet_conf] daemon[@host] [user@]host\n", fprintf(stderr, "usage: %s [-d] [-i inet_conf] daemon[@host] [user@]host\n",
myname); myname);
@ -281,10 +277,7 @@ char *myname;
/* Print interesting expansions */ /* Print interesting expansions */
static void expand(text, pattern, request) static void expand(char *text, char *pattern, struct request_info *request)
char *text;
char *pattern;
struct request_info *request;
{ {
char buf[BUFSIZ]; char buf[BUFSIZ];
@ -294,8 +287,7 @@ struct request_info *request;
/* Try out a (server,client) pair */ /* Try out a (server,client) pair */
static void tcpdmatch(request) static void tcpdmatch(struct request_info *request)
struct request_info *request;
{ {
int verdict; 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 * Copyright (c) 1995 Christian E. Hopps
@ -45,17 +45,14 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
void dump_mode __P((int)); void dump_mode(int);
void dump_vm __P((struct grfvideo_mode *)); void dump_vm(struct grfvideo_mode *);
int get_grf __P((void)); int get_grf(void);
int main __P((int, char **)); void set_mode(int);
void set_mode __P((int)); void usage(void) __dead;
void usage __P((void));
int int
main(argc, argv) main(int argc, char *argv[])
int argc;
char *argv[];
{ {
int m; int m;
int c; int c;
@ -112,8 +109,7 @@ get_grf()
} }
void void
dump_mode(m) dump_mode(int m)
int m;
{ {
struct grfvideo_mode vm; struct grfvideo_mode vm;
int num_vm; int num_vm;
@ -146,8 +142,7 @@ dump_mode(m)
} }
void void
set_mode(m) set_mode(int m)
int m;
{ {
int grffd; int grffd;
@ -157,8 +152,7 @@ set_mode(m)
} }
void void
dump_vm(vm) dump_vm(struct grfvideo_mode *vm)
struct grfvideo_mode *vm;
{ {
(void)printf("%d: %s\n", vm->mode_num, vm->mode_descr); (void)printf("%d: %s\n", vm->mode_num, vm->mode_descr);
(void)printf( (void)printf(