Use C89 function definitions
This commit is contained in:
parent
cf7ed4c9cc
commit
d34c2845b8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lint.c,v 1.13 2012/03/12 03:04:56 dholland Exp $ */
|
||||
/* $NetBSD: lint.c,v 1.14 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 The NetBSD Foundation.
|
||||
@ -36,7 +36,7 @@
|
||||
#include "defs.h"
|
||||
|
||||
void
|
||||
emit_params()
|
||||
emit_params(void)
|
||||
{
|
||||
|
||||
printf("version\t%d\n", CONFIG_VERSION);
|
||||
@ -196,7 +196,7 @@ emit_pseudo_instance(const char *name, void *value, void *v)
|
||||
}
|
||||
|
||||
void
|
||||
emit_instances()
|
||||
emit_instances(void)
|
||||
{
|
||||
|
||||
(void)ht_enumerate(devroottab, emit_root_instance, NULL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
%{
|
||||
/* $NetBSD: scan.l,v 1.16 2010/04/30 20:47:18 pooka Exp $ */
|
||||
/* $NetBSD: scan.l,v 1.17 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -541,7 +541,7 @@ include(const char *fname, int ateof, int conditional, int direct)
|
||||
* Extract the pathname from a include/cinclude/package into curinclpath
|
||||
*/
|
||||
static int
|
||||
getincludepath()
|
||||
getincludepath(void)
|
||||
{
|
||||
const char *p = yytext;
|
||||
ptrdiff_t len;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: find.c,v 1.28 2012/03/18 17:09:46 dholland Exp $ */
|
||||
/* $NetBSD: find.c,v 1.29 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)find.c 8.5 (Berkeley) 8/5/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: find.c,v 1.28 2012/03/18 17:09:46 dholland Exp $");
|
||||
__RCSID("$NetBSD: find.c,v 1.29 2012/03/20 20:34:57 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -282,10 +282,7 @@ find_execute(PLAN *plan, char **paths)
|
||||
* If any func() returns non-zero, then so will find_traverse().
|
||||
*/
|
||||
int
|
||||
find_traverse(plan, func, arg)
|
||||
PLAN *plan;
|
||||
int (*func)(PLAN *, void *);
|
||||
void *arg;
|
||||
find_traverse(PLAN *plan, int (*func)(PLAN *, void *), void *arg)
|
||||
{
|
||||
PLAN *p;
|
||||
int r, rval;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: function.c,v 1.67 2011/09/22 12:49:57 christos Exp $ */
|
||||
/* $NetBSD: function.c,v 1.68 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: function.c,v 1.67 2011/09/22 12:49:57 christos Exp $");
|
||||
__RCSID("$NetBSD: function.c,v 1.68 2012/03/20 20:34:57 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -215,9 +215,7 @@ c_amin(char ***argvp, int isok)
|
||||
* file.
|
||||
*/
|
||||
int
|
||||
f_anewer(plan, entry)
|
||||
PLAN *plan;
|
||||
FTSENT *entry;
|
||||
f_anewer(PLAN *plan, FTSENT *entry)
|
||||
{
|
||||
|
||||
return (entry->fts_statp->st_atime > plan->t_data);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hesinfo.c,v 1.3 2004/01/05 23:23:34 jmmv Exp $ */
|
||||
/* $NetBSD: hesinfo.c,v 1.4 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/* Copyright 1988, 1996 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
@ -23,7 +23,7 @@
|
||||
#if 0
|
||||
static char rcsid[] = "#Id: hesinfo.c,v 1.8 1996/12/08 21:29:54 ghudson Exp #";
|
||||
#else
|
||||
__RCSID("$NetBSD: hesinfo.c,v 1.3 2004/01/05 23:23:34 jmmv Exp $");
|
||||
__RCSID("$NetBSD: hesinfo.c,v 1.4 2012/03/20 20:34:57 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -35,12 +35,10 @@ __RCSID("$NetBSD: hesinfo.c,v 1.3 2004/01/05 23:23:34 jmmv Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main __P((int, char **));
|
||||
int main(int, char **);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char **list, **p, *bindname, *name, *type;
|
||||
int lflag = 0, errflg = 0, bflag = 0, c;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: innetgr.c,v 1.7 2008/04/28 20:24:13 martin Exp $ */
|
||||
/* $NetBSD: innetgr.c,v 1.8 2012/03/20 20:34:57 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: innetgr.c,v 1.7 2008/04/28 20:24:13 martin Exp $");
|
||||
__RCSID("$NetBSD: innetgr.c,v 1.8 2012/03/20 20:34:57 matt Exp $");
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -41,7 +41,7 @@ static void usage __P((void)) __dead;
|
||||
int main __P((int, char *[]));
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr,
|
||||
@ -51,9 +51,7 @@ usage()
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int c, ok, verbose = 0;
|
||||
char *user = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lock.c,v 1.31 2008/12/29 01:26:46 christos Exp $ */
|
||||
/* $NetBSD: lock.c,v 1.32 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1987, 1993
|
||||
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: lock.c,v 1.31 2008/12/29 01:26:46 christos Exp $");
|
||||
__RCSID("$NetBSD: lock.c,v 1.32 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -326,8 +326,7 @@ skey_auth(const char *user)
|
||||
#endif
|
||||
|
||||
static void
|
||||
hi(dummy)
|
||||
int dummy;
|
||||
hi(int dummy)
|
||||
{
|
||||
struct timeval timval;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gnum4.c,v 1.8 2011/09/06 18:16:01 joerg Exp $ */
|
||||
/* $NetBSD: gnum4.c,v 1.9 2012/03/20 20:34:58 matt Exp $ */
|
||||
/* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: gnum4.c,v 1.8 2011/09/06 18:16:01 joerg Exp $");
|
||||
__RCSID("$NetBSD: gnum4.c,v 1.9 2012/03/20 20:34:58 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@ -106,7 +106,7 @@ addtoincludepath(const char *dirname)
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_m4path()
|
||||
ensure_m4path(void)
|
||||
{
|
||||
static int envpathdone = 0;
|
||||
char *envpath;
|
||||
@ -241,7 +241,7 @@ addchar(int c)
|
||||
}
|
||||
|
||||
static char *
|
||||
getstring()
|
||||
getstring(void)
|
||||
{
|
||||
addchar('\0');
|
||||
current = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: look.c,v 1.11 2009/10/26 21:11:28 christos Exp $ */
|
||||
/* $NetBSD: look.c,v 1.12 2012/03/20 20:34:58 matt Exp $ */
|
||||
/* $OpenBSD: look.c,v 1.21 2009/10/14 17:23:17 sthen Exp $ */
|
||||
|
||||
/*
|
||||
@ -42,7 +42,7 @@
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: look.c,v 1.11 2009/10/26 21:11:28 christos Exp $");
|
||||
__RCSID("$NetBSD: look.c,v 1.12 2012/03/20 20:34:58 matt Exp $");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
@ -67,9 +67,7 @@ struct ohash macros;
|
||||
|
||||
/* Support routines for hash tables. */
|
||||
void *
|
||||
hash_alloc(s, u)
|
||||
size_t s;
|
||||
void *u UNUSED;
|
||||
hash_alloc(size_t s, void *u UNUSED)
|
||||
{
|
||||
void *storage = xalloc(s, "hash alloc");
|
||||
if (storage)
|
||||
@ -78,24 +76,19 @@ hash_alloc(s, u)
|
||||
}
|
||||
|
||||
void
|
||||
hash_free(p, s, u)
|
||||
void *p;
|
||||
size_t s UNUSED;
|
||||
void *u UNUSED;
|
||||
hash_free(void *p, size_t s UNUSED, void *u UNUSED)
|
||||
{
|
||||
free(p);
|
||||
}
|
||||
|
||||
void *
|
||||
element_alloc(s, u)
|
||||
size_t s;
|
||||
void *u UNUSED;
|
||||
element_alloc(size_t s, void *u UNUSED)
|
||||
{
|
||||
return xalloc(s, "element alloc");
|
||||
}
|
||||
|
||||
void
|
||||
init_macros()
|
||||
init_macros(void)
|
||||
{
|
||||
ohash_init(¯os, 10, ¯o_info);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $OpenBSD: misc.c,v 1.41 2009/10/14 17:19:47 sthen Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.22 2011/09/06 18:16:01 joerg Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.23 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: misc.c,v 1.22 2011/09/06 18:16:01 joerg Exp $");
|
||||
__RCSID("$NetBSD: misc.c,v 1.23 2012/03/20 20:34:58 matt Exp $");
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
@ -160,7 +160,7 @@ pbunsigned(unsigned long n)
|
||||
}
|
||||
|
||||
void
|
||||
initspaces()
|
||||
initspaces(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -176,7 +176,7 @@ initspaces()
|
||||
}
|
||||
|
||||
void
|
||||
enlarge_strspace()
|
||||
enlarge_strspace(void)
|
||||
{
|
||||
char *newstrspace;
|
||||
int i;
|
||||
@ -197,7 +197,7 @@ enlarge_strspace()
|
||||
}
|
||||
|
||||
void
|
||||
enlarge_bufspace()
|
||||
enlarge_bufspace(void)
|
||||
{
|
||||
unsigned char *newbuf;
|
||||
int i;
|
||||
@ -356,7 +356,7 @@ set_input(struct input_file *f, FILE *real, const char *name)
|
||||
}
|
||||
|
||||
void
|
||||
do_emit_synchline()
|
||||
do_emit_synchline(void)
|
||||
{
|
||||
fprintf(active, "#line %lu \"%s\"\n",
|
||||
infile[ilevel].lineno, infile[ilevel].name);
|
||||
@ -394,7 +394,7 @@ doprintfilename(struct input_file *f)
|
||||
* and later dump everything that was added since then to a file.
|
||||
*/
|
||||
size_t
|
||||
buffer_mark()
|
||||
buffer_mark(void)
|
||||
{
|
||||
return bp - buf;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
%{
|
||||
/* $NetBSD: tokenizer.l,v 1.5 2011/05/24 12:32:36 joerg Exp $ */
|
||||
/* $NetBSD: tokenizer.l,v 1.6 2012/03/20 20:34:58 matt Exp $ */
|
||||
/* $OpenBSD: tokenizer.l,v 1.6 2008/08/21 21:00:14 espie Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org>
|
||||
@ -20,7 +20,7 @@
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include "parser.h"
|
||||
__RCSID("$NetBSD: tokenizer.l,v 1.5 2011/05/24 12:32:36 joerg Exp $");
|
||||
__RCSID("$NetBSD: tokenizer.l,v 1.6 2012/03/20 20:34:58 matt Exp $");
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
@ -67,7 +67,7 @@ radix 0[rR][0-9]+:[0-9a-zA-Z]+
|
||||
%%
|
||||
|
||||
int32_t
|
||||
number()
|
||||
number(void)
|
||||
{
|
||||
long l;
|
||||
|
||||
@ -81,7 +81,7 @@ number()
|
||||
}
|
||||
|
||||
int32_t
|
||||
parse_radix()
|
||||
parse_radix(void)
|
||||
{
|
||||
long base;
|
||||
char *next;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trace.c,v 1.7 2011/03/05 16:37:50 christos Exp $ */
|
||||
/* $NetBSD: trace.c,v 1.8 2012/03/20 20:34:58 matt Exp $ */
|
||||
/* $OpenBSD: trace.c,v 1.15 2006/03/24 08:03:44 espie Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Marc Espie.
|
||||
@ -28,7 +28,7 @@
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: trace.c,v 1.7 2011/03/05 16:37:50 christos Exp $");
|
||||
__RCSID("$NetBSD: trace.c,v 1.8 2012/03/20 20:34:58 matt Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <err.h>
|
||||
@ -125,7 +125,7 @@ set_trace_flags(const char *s)
|
||||
}
|
||||
|
||||
static int
|
||||
frame_level()
|
||||
frame_level(void)
|
||||
{
|
||||
int level;
|
||||
int framep;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mkstr.c,v 1.15 2009/11/17 18:31:13 drochner Exp $ */
|
||||
/* $NetBSD: mkstr.c,v 1.16 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mkstr.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mkstr.c,v 1.15 2009/11/17 18:31:13 drochner Exp $");
|
||||
__RCSID("$NetBSD: mkstr.c,v 1.16 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -124,7 +124,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
void
|
||||
process()
|
||||
process(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@ -166,7 +166,7 @@ match(const char *ocp)
|
||||
}
|
||||
|
||||
void
|
||||
copystr()
|
||||
copystr(void)
|
||||
{
|
||||
int c, ch;
|
||||
char buf[512];
|
||||
@ -237,7 +237,7 @@ octdigit(char c)
|
||||
}
|
||||
|
||||
void
|
||||
inithash()
|
||||
inithash(void)
|
||||
{
|
||||
char buf[512];
|
||||
long mesgpt = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msgs.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */
|
||||
/* $NetBSD: msgs.c,v 1.22 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: msgs.c,v 1.21 2011/08/31 16:24:57 plunky Exp $");
|
||||
__RCSID("$NetBSD: msgs.c,v 1.22 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -139,15 +139,15 @@ int Lpp = 0;
|
||||
time_t t;
|
||||
time_t keep;
|
||||
|
||||
void ask __P((const char *));
|
||||
void gfrsub __P((FILE *));
|
||||
int linecnt __P((FILE *));
|
||||
int main __P((int, char *[]));
|
||||
int next __P((char *));
|
||||
char *nxtfld __P((char *));
|
||||
void onintr __P((int));
|
||||
void onsusp __P((int));
|
||||
void prmesg __P((int));
|
||||
void ask(const char *);
|
||||
void gfrsub(FILE *);
|
||||
int linecnt(FILE *);
|
||||
int main(int, char *[]);
|
||||
int next(char *);
|
||||
char *nxtfld(char *);
|
||||
void onintr(int);
|
||||
void onsusp(int);
|
||||
void prmesg(int);
|
||||
|
||||
/* option initialization */
|
||||
bool hdrs = NO;
|
||||
@ -161,8 +161,7 @@ bool lastcmd = NO;
|
||||
jmp_buf tstpbuf;
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc; char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
bool newrc, already;
|
||||
int rcfirst = 0; /* first message to print (from .rc) */
|
||||
@ -627,8 +626,7 @@ cmnd:
|
||||
}
|
||||
|
||||
void
|
||||
prmesg(length)
|
||||
int length;
|
||||
prmesg(int length)
|
||||
{
|
||||
FILE *outf;
|
||||
char *env_pager;
|
||||
@ -677,8 +675,7 @@ prmesg(length)
|
||||
}
|
||||
|
||||
void
|
||||
onintr(dummy)
|
||||
int dummy;
|
||||
onintr(int dummy)
|
||||
{
|
||||
signal(SIGINT, onintr);
|
||||
if (mailing)
|
||||
@ -703,8 +700,7 @@ onintr(dummy)
|
||||
* We have just gotten a susp. Suspend and prepare to resume.
|
||||
*/
|
||||
void
|
||||
onsusp(dummy)
|
||||
int dummy;
|
||||
onsusp(int dummy)
|
||||
{
|
||||
|
||||
signal(SIGTSTP, SIG_DFL);
|
||||
@ -716,8 +712,7 @@ onsusp(dummy)
|
||||
}
|
||||
|
||||
int
|
||||
linecnt(f)
|
||||
FILE *f;
|
||||
linecnt(FILE *f)
|
||||
{
|
||||
off_t oldpos = ftell(f);
|
||||
int l = 0;
|
||||
@ -731,8 +726,7 @@ linecnt(f)
|
||||
}
|
||||
|
||||
int
|
||||
next(buf)
|
||||
char *buf;
|
||||
next(char *buf)
|
||||
{
|
||||
int i;
|
||||
sscanf(buf, "%d", &i);
|
||||
@ -741,8 +735,7 @@ next(buf)
|
||||
}
|
||||
|
||||
void
|
||||
ask(prompt)
|
||||
const char *prompt;
|
||||
ask(const char *prompt)
|
||||
{
|
||||
char inch;
|
||||
int n, cmsg;
|
||||
@ -828,8 +821,7 @@ ask(prompt)
|
||||
}
|
||||
|
||||
void
|
||||
gfrsub(infile)
|
||||
FILE *infile;
|
||||
gfrsub(FILE *infile)
|
||||
{
|
||||
off_t frompos;
|
||||
|
||||
@ -905,8 +897,7 @@ gfrsub(infile)
|
||||
}
|
||||
|
||||
char *
|
||||
nxtfld(s)
|
||||
char *s;
|
||||
nxtfld(char *s)
|
||||
{
|
||||
if (*s) while (*s && *s > ' ') s++; /* skip over this field */
|
||||
if (*s) while (*s && *s <= ' ') s++; /* find start of next field */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netgroup.c,v 1.6 2008/04/28 20:24:14 martin Exp $ */
|
||||
/* $NetBSD: netgroup.c,v 1.7 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: netgroup.c,v 1.6 2008/04/28 20:24:14 martin Exp $");
|
||||
__RCSID("$NetBSD: netgroup.c,v 1.7 2012/03/20 20:34:58 matt Exp $");
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -41,7 +41,7 @@ static void usage __P((void)) __dead;
|
||||
int main __P((int, char *[]));
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: %s [-hud] <netgroup>\n", getprogname());
|
||||
@ -49,9 +49,7 @@ usage()
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int c, i = 0;
|
||||
const char *p[3];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if.c,v 1.73 2012/02/12 19:11:33 christos Exp $ */
|
||||
/* $NetBSD: if.c,v 1.74 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: if.c,v 1.73 2012/02/12 19:11:33 christos Exp $");
|
||||
__RCSID("$NetBSD: if.c,v 1.74 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -107,10 +107,7 @@ bool signalled; /* set if alarm goes off "early" */
|
||||
* which is a TAILQ_HEAD.
|
||||
*/
|
||||
void
|
||||
intpr(interval, ifnetaddr, pfunc)
|
||||
int interval;
|
||||
u_long ifnetaddr;
|
||||
void (*pfunc)(const char *);
|
||||
intpr(int interval, u_long ifnetaddr, void (*pfunc)(const char *))
|
||||
{
|
||||
|
||||
if (interval) {
|
||||
@ -926,9 +923,7 @@ loop:
|
||||
* First line printed at top of screen is always cumulative.
|
||||
*/
|
||||
static void
|
||||
sidewaysintpr(interval, off)
|
||||
unsigned interval;
|
||||
u_long off;
|
||||
sidewaysintpr(unsigned int interval, u_long off)
|
||||
{
|
||||
|
||||
if (use_sysctl) {
|
||||
@ -943,8 +938,7 @@ sidewaysintpr(interval, off)
|
||||
* Sets a flag to not wait for the alarm.
|
||||
*/
|
||||
static void
|
||||
catchalarm(signo)
|
||||
int signo;
|
||||
catchalarm(int signo)
|
||||
{
|
||||
|
||||
signalled = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iso.c,v 1.32 2009/04/12 16:08:37 lukem Exp $ */
|
||||
/* $NetBSD: iso.c,v 1.33 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)iso.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: iso.c,v 1.32 2009/04/12 16:08:37 lukem Exp $");
|
||||
__RCSID("$NetBSD: iso.c,v 1.33 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -113,9 +113,7 @@ extern void inetprint __P((struct in_addr *, u_int16_t, const char *, int));
|
||||
* Dump esis stats
|
||||
*/
|
||||
void
|
||||
esis_stats(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
esis_stats(u_long off, const char *name)
|
||||
{
|
||||
struct esis_stat esis_stat;
|
||||
|
||||
@ -146,9 +144,7 @@ esis_stats(off, name)
|
||||
* Dump clnp statistics structure.
|
||||
*/
|
||||
void
|
||||
clnp_stats(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
clnp_stats(u_long off, const char *name)
|
||||
{
|
||||
struct clnp_stat clnp_stat;
|
||||
|
||||
@ -186,9 +182,7 @@ clnp_stats(off, name)
|
||||
* Dump CLTP statistics structure.
|
||||
*/
|
||||
void
|
||||
cltp_stats(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
cltp_stats(u_long off, const char *name)
|
||||
{
|
||||
struct cltpstat cltpstat;
|
||||
|
||||
@ -228,9 +222,7 @@ static int first = 1;
|
||||
* -a (all) flag is specified.
|
||||
*/
|
||||
void
|
||||
iso_protopr(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
iso_protopr(u_long off, const char *name)
|
||||
{
|
||||
struct isopcb cb;
|
||||
struct isopcb *prev, *next;
|
||||
@ -264,9 +256,7 @@ iso_protopr(off, name)
|
||||
}
|
||||
|
||||
void
|
||||
iso_protopr1(kern_addr, istp)
|
||||
u_long kern_addr;
|
||||
int istp;
|
||||
iso_protopr1(u_long kern_addr, int istp)
|
||||
{
|
||||
int width = 22;
|
||||
if (first) {
|
||||
@ -319,9 +309,7 @@ iso_protopr1(kern_addr, istp)
|
||||
}
|
||||
|
||||
void
|
||||
tp_protopr(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
tp_protopr(u_long off, const char *name)
|
||||
{
|
||||
extern const char * const tp_sstring[]; /* from sys/netiso/tp_astring.c */
|
||||
struct tp_ref *tpr, *tpr_base;
|
||||
@ -366,8 +354,7 @@ tp_protopr(off, name)
|
||||
}
|
||||
|
||||
void
|
||||
tp_inproto(pcb)
|
||||
u_long pcb;
|
||||
tp_inproto(u_long pcb)
|
||||
{
|
||||
struct inpcb inpcb;
|
||||
|
||||
@ -390,8 +377,7 @@ tp_inproto(pcb)
|
||||
|
||||
#ifdef notdef
|
||||
char *
|
||||
isonetname(iso)
|
||||
struct iso_addr *iso;
|
||||
isonetname(struct iso_addr *iso)
|
||||
{
|
||||
struct sockaddr_iso sa;
|
||||
struct iso_hostent *ihe = 0;
|
||||
@ -422,11 +408,7 @@ isonetname(iso)
|
||||
}
|
||||
|
||||
static void
|
||||
isonetprint(iso, sufx, sufxlen, islocal)
|
||||
struct iso_addr *iso;
|
||||
char *sufx;
|
||||
u_short sufxlen;
|
||||
int islocal;
|
||||
isonetprint(struct iso_addr *iso, char *sufx, u_short sufxlen, int islocal)
|
||||
{
|
||||
struct iso_hostent *iso_getserventrybytsel(), *ihe;
|
||||
struct iso_hostent Ihe;
|
||||
@ -481,11 +463,9 @@ isonetprint(iso, sufx, sufxlen, islocal)
|
||||
|
||||
#ifdef notdef
|
||||
static void
|
||||
x25_protopr(off, name)
|
||||
u_long off;
|
||||
char *name;
|
||||
x25_protopr(u_long off, char *name)
|
||||
{
|
||||
static char *xpcb_states[] = {
|
||||
static char * const xpcb_states[] = {
|
||||
"CLOSED",
|
||||
"LISTENING",
|
||||
"CLOSING",
|
||||
@ -551,9 +531,7 @@ x25_protopr(off, name)
|
||||
struct tp_stat tp_stat;
|
||||
|
||||
void
|
||||
tp_stats(off, name)
|
||||
u_long off;
|
||||
const char *name;
|
||||
tp_stats(u_long off, const char *name)
|
||||
{
|
||||
|
||||
if (off == 0) {
|
||||
@ -643,13 +621,11 @@ static struct tpstatpr tpstatpr_A[] = {
|
||||
#undef o
|
||||
|
||||
static void
|
||||
tprintstat(s, indent)
|
||||
struct tp_stat *s;
|
||||
int indent;
|
||||
tprintstat(struct tp_stat *s, int indent)
|
||||
{
|
||||
int j, tpfirst, tpfirst2;
|
||||
|
||||
static const char *rttname[]= {
|
||||
static const char * const rttname[]= {
|
||||
"~LOCAL, PDN",
|
||||
"~LOCAL,~PDN",
|
||||
" LOCAL,~PDN",
|
||||
@ -831,9 +807,7 @@ for (j = 0, tpfirst=1; group[j].text; j++) \
|
||||
#endif
|
||||
|
||||
static void
|
||||
isonetprint(siso, islocal)
|
||||
struct sockaddr_iso *siso;
|
||||
int islocal;
|
||||
isonetprint(struct sockaddr_iso *siso, int islocal)
|
||||
{
|
||||
|
||||
hexprint(siso->siso_nlen, siso->siso_addr.isoa_genaddr, "{}");
|
||||
@ -846,13 +820,11 @@ isonetprint(siso, islocal)
|
||||
putchar(' ');
|
||||
}
|
||||
|
||||
static char hexlist[] = "0123456789abcdef", obuf[128];
|
||||
static const char hexlist[] = "0123456789abcdef";
|
||||
static char obuf[128];
|
||||
|
||||
static void
|
||||
hexprint(n, buf, delim)
|
||||
int n;
|
||||
const char *buf;
|
||||
const char *delim;
|
||||
hexprint(int n, const char *buf, const char *delim)
|
||||
{
|
||||
const u_char *in = (const u_char *)buf, *top = in + n;
|
||||
char *out = obuf;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.81 2011/09/16 15:39:27 joerg Exp $ */
|
||||
/* $NetBSD: main.c,v 1.82 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.81 2011/09/16 15:39:27 joerg Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.82 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -435,9 +435,7 @@ prepare(const char *nf, const char *mf, struct protox *tp)
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct protoent *p;
|
||||
struct protox *tp; /* for printing cblocks & stats */
|
||||
@ -749,9 +747,7 @@ main(argc, argv)
|
||||
* is not in the namelist, ignore this one.
|
||||
*/
|
||||
static void
|
||||
printproto(tp, name)
|
||||
struct protox *tp;
|
||||
const char *name;
|
||||
printproto(struct protox *tp, const char *name)
|
||||
{
|
||||
void (*pr) __P((u_long, const char *));
|
||||
u_long off;
|
||||
@ -780,7 +776,7 @@ printproto(tp, name)
|
||||
* Print softintrq status.
|
||||
*/
|
||||
void
|
||||
print_softintrq()
|
||||
print_softintrq(void)
|
||||
{
|
||||
struct ifqueue intrq, *ifq = &intrq;
|
||||
const struct softintrq *siq;
|
||||
@ -803,10 +799,7 @@ print_softintrq()
|
||||
* Read kernel memory, return 0 on success.
|
||||
*/
|
||||
int
|
||||
kread(addr, buf, size)
|
||||
u_long addr;
|
||||
char *buf;
|
||||
int size;
|
||||
kread(u_long addr, char *buf, int size)
|
||||
{
|
||||
|
||||
if (kvm_read(kvmd, addr, buf, size) != size) {
|
||||
@ -817,16 +810,14 @@ kread(addr, buf, size)
|
||||
}
|
||||
|
||||
const char *
|
||||
plural(n)
|
||||
int n;
|
||||
plural(int n)
|
||||
{
|
||||
|
||||
return (n != 1 ? "s" : "");
|
||||
}
|
||||
|
||||
const char *
|
||||
plurales(n)
|
||||
int n;
|
||||
plurales(int n)
|
||||
{
|
||||
|
||||
return (n != 1 ? "es" : "");
|
||||
@ -846,8 +837,7 @@ get_hardticks(void)
|
||||
* Find the protox for the given "well-known" name.
|
||||
*/
|
||||
static struct protox *
|
||||
knownname(name)
|
||||
const char *name;
|
||||
knownname(const char *name)
|
||||
{
|
||||
struct protox **tpp, *tp;
|
||||
|
||||
@ -862,8 +852,7 @@ knownname(name)
|
||||
* Find the protox corresponding to name.
|
||||
*/
|
||||
static struct protox *
|
||||
name2protox(name)
|
||||
const char *name;
|
||||
name2protox(const char *name)
|
||||
{
|
||||
struct protox *tp;
|
||||
char **alias; /* alias from p->aliases */
|
||||
@ -890,7 +879,7 @@ name2protox(name)
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
const char *progname = getprogname();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mbuf.c,v 1.30 2010/12/13 21:15:30 pooka Exp $ */
|
||||
/* $NetBSD: mbuf.c,v 1.31 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)mbuf.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mbuf.c,v 1.30 2010/12/13 21:15:30 pooka Exp $");
|
||||
__RCSID("$NetBSD: mbuf.c,v 1.31 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -87,10 +87,8 @@ int mowners_ctl[] = { CTL_KERN, KERN_MBUF, MBUF_MOWNERS };
|
||||
* Print mbuf statistics.
|
||||
*/
|
||||
void
|
||||
mbpr(mbaddr, msizeaddr, mclbaddr, mbpooladdr, mclpooladdr)
|
||||
u_long mbaddr;
|
||||
u_long msizeaddr, mclbaddr;
|
||||
u_long mbpooladdr, mclpooladdr;
|
||||
mbpr(u_long mbaddr, u_long msizeaddr, u_long mclbaddr, u_long mbpooladdr,
|
||||
u_long mclpooladdr)
|
||||
{
|
||||
u_long totmem, totused, totpct;
|
||||
u_int totmbufs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mroute.c,v 1.23 2009/04/12 16:08:37 lukem Exp $ */
|
||||
/* $NetBSD: mroute.c,v 1.24 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)mroute.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mroute.c,v 1.23 2009/04/12 16:08:37 lukem Exp $");
|
||||
__RCSID("$NetBSD: mroute.c,v 1.24 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -104,12 +104,11 @@ __RCSID("$NetBSD: mroute.c,v 1.23 2009/04/12 16:08:37 lukem Exp $");
|
||||
#include <kvm.h>
|
||||
#include "netstat.h"
|
||||
|
||||
static char *pktscale __P((u_long));
|
||||
static void print_bw_meter __P((struct bw_meter *, int *));
|
||||
static char *pktscale(u_long);
|
||||
static void print_bw_meter(struct bw_meter *, int *);
|
||||
|
||||
static char *
|
||||
pktscale(n)
|
||||
u_long n;
|
||||
pktscale(u_long n)
|
||||
{
|
||||
static char buf[20];
|
||||
char t;
|
||||
@ -129,8 +128,8 @@ pktscale(n)
|
||||
}
|
||||
|
||||
void
|
||||
mroutepr(mrpaddr, mfchashtbladdr, mfchashaddr, vifaddr)
|
||||
u_long mrpaddr, mfchashtbladdr, mfchashaddr, vifaddr;
|
||||
mroutepr(u_long mrpaddr, u_long mfchashtbladdr, u_long mfchashaddr,
|
||||
u_long vifaddr)
|
||||
{
|
||||
u_int mrtproto;
|
||||
LIST_HEAD(, mfc) *mfchashtbl;
|
||||
@ -267,9 +266,7 @@ mroutepr(mrpaddr, mfchashtbladdr, mfchashaddr, vifaddr)
|
||||
}
|
||||
|
||||
static void
|
||||
print_bw_meter(bw_meter, banner_printed)
|
||||
struct bw_meter *bw_meter;
|
||||
int *banner_printed;
|
||||
print_bw_meter(struct bw_meter *bw_meter, int *banner_printed)
|
||||
{
|
||||
char s0[256], s1[256], s2[256], s3[256];
|
||||
struct timeval now, end, delta;
|
||||
@ -343,8 +340,7 @@ print_bw_meter(bw_meter, banner_printed)
|
||||
}
|
||||
|
||||
void
|
||||
mrt_stats(mrpaddr, mstaddr)
|
||||
u_long mrpaddr, mstaddr;
|
||||
mrt_stats(u_long mrpaddr, u_long mstaddr)
|
||||
{
|
||||
u_int mrtproto;
|
||||
struct mrtstat mrtstat;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mroute6.c,v 1.12 2005/08/04 19:41:28 rpaulo Exp $ */
|
||||
/* $NetBSD: mroute6.c,v 1.13 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1998 WIDE Project.
|
||||
@ -124,8 +124,7 @@
|
||||
#define WID_GRP (lflag ? 18 : (numeric_addr ? 16 : 18)) /* width of group column */
|
||||
|
||||
void
|
||||
mroute6pr(mrpaddr, mfcaddr, mifaddr)
|
||||
u_long mrpaddr, mfcaddr, mifaddr;
|
||||
mroute6pr(u_long mrpaddr, u_long mfcaddr, u_long mifaddr)
|
||||
{
|
||||
u_int mrtproto;
|
||||
struct mf6c *mf6ctable[MF6CTBLSIZ], *mfcp;
|
||||
@ -248,8 +247,7 @@ mroute6pr(mrpaddr, mfcaddr, mifaddr)
|
||||
}
|
||||
|
||||
void
|
||||
mrt6_stats(mrpaddr, mstaddr)
|
||||
u_long mrpaddr, mstaddr;
|
||||
mrt6_stats(u_long mrpaddr, u_long mstaddr)
|
||||
{
|
||||
#define p(f, m) printf(m, (unsigned long long)mrtstat.f, plural(mrtstat.f))
|
||||
#define pes(f, m) printf(m, (unsigned long long)mrtstat.f, plurales(mrtstat.f))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: route.c,v 1.78 2011/06/21 19:42:45 kefren Exp $ */
|
||||
/* $NetBSD: route.c,v 1.79 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: route.c,v 1.78 2011/06/21 19:42:45 kefren Exp $");
|
||||
__RCSID("$NetBSD: route.c,v 1.79 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -99,8 +99,7 @@ static void p_krtentry(struct rtentry *);
|
||||
* Print routing tables.
|
||||
*/
|
||||
void
|
||||
routepr(rtree)
|
||||
u_long rtree;
|
||||
routepr(u_long rtree)
|
||||
{
|
||||
struct radix_node_head *rnh, head;
|
||||
struct radix_node_head *rt_nodes[AF_MAX+1];
|
||||
@ -143,8 +142,7 @@ kgetsa(const struct sockaddr *dst)
|
||||
}
|
||||
|
||||
static void
|
||||
p_tree(rn)
|
||||
struct radix_node *rn;
|
||||
p_tree(struct radix_node *rn)
|
||||
{
|
||||
|
||||
again:
|
||||
@ -180,7 +178,7 @@ again:
|
||||
}
|
||||
|
||||
static void
|
||||
p_rtnode()
|
||||
p_rtnode(void)
|
||||
{
|
||||
struct radix_mask *rm = rnode.rn_mklist;
|
||||
char nbuf[20];
|
||||
@ -218,17 +216,14 @@ p_rtnode()
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
static struct sockaddr *sockcopy __P((struct sockaddr *,
|
||||
union sockaddr_union *));
|
||||
static struct sockaddr *sockcopy(struct sockaddr *, union sockaddr_union *);
|
||||
|
||||
/*
|
||||
* copy a sockaddr into an allocated region, allocate at least sockaddr
|
||||
* bytes and zero unused
|
||||
*/
|
||||
static struct sockaddr *
|
||||
sockcopy(sp, dp)
|
||||
struct sockaddr *sp;
|
||||
union sockaddr_union *dp;
|
||||
sockcopy(struct sockaddr *sp, union sockaddr_union *dp)
|
||||
{
|
||||
int len;
|
||||
|
||||
@ -242,8 +237,7 @@ sockcopy(sp, dp)
|
||||
}
|
||||
|
||||
static void
|
||||
p_krtentry(rt)
|
||||
struct rtentry *rt;
|
||||
p_krtentry(struct rtentry *rt)
|
||||
{
|
||||
static struct ifnet ifnet, *lastif;
|
||||
union sockaddr_union addr_un, mask_un;
|
||||
@ -321,8 +315,7 @@ p_krtentry(rt)
|
||||
* Print routing statistics
|
||||
*/
|
||||
void
|
||||
rt_stats(off)
|
||||
u_long off;
|
||||
rt_stats(u_long off)
|
||||
{
|
||||
struct rtstat rtstats;
|
||||
|
||||
@ -357,8 +350,7 @@ rt_stats(off)
|
||||
}
|
||||
|
||||
void
|
||||
upHex(p0)
|
||||
char *p0;
|
||||
upHex(char *p0)
|
||||
{
|
||||
char *p = p0;
|
||||
|
||||
@ -373,5 +365,3 @@ upHex(p0)
|
||||
*p += ('A' - 'a');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unix.c,v 1.33 2011/05/29 04:45:08 manu Exp $ */
|
||||
/* $NetBSD: unix.c,v 1.34 2012/03/20 20:34:58 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)unix.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: unix.c,v 1.33 2011/05/29 04:45:08 manu Exp $");
|
||||
__RCSID("$NetBSD: unix.c,v 1.34 2012/03/20 20:34:58 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -83,7 +83,7 @@ unixdomainprhdr(void)
|
||||
"Nextref");
|
||||
}
|
||||
|
||||
static const char *socktype[] =
|
||||
static const char * const socktype[] =
|
||||
{ "#0", "stream", "dgram", "raw", "rdm", "seqpacket" };
|
||||
|
||||
static void
|
||||
@ -102,9 +102,7 @@ unixdomainpr0(u_long so_pcb, u_long so_type, u_long rcvq, u_long sndq,
|
||||
}
|
||||
|
||||
static void
|
||||
unixdomainpr(so, soaddr)
|
||||
struct socket *so;
|
||||
void *soaddr;
|
||||
unixdomainpr(struct socket *so, void *soaddr)
|
||||
{
|
||||
struct unpcb unp, runp;
|
||||
struct sockaddr_un sun, rsun;
|
||||
@ -140,8 +138,7 @@ unixdomainpr(so, soaddr)
|
||||
}
|
||||
|
||||
void
|
||||
unixpr(off)
|
||||
u_long off;
|
||||
unixpr(u_long off)
|
||||
{
|
||||
struct file *fp;
|
||||
struct socket sock, *so = &sock;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */
|
||||
/* $NetBSD: ctl.c,v 1.10 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ctl.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $");
|
||||
__RCSID("$NetBSD: ctl.c,v 1.10 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -88,7 +88,7 @@ open_sockt(void)
|
||||
|
||||
/* open the ctl socket */
|
||||
void
|
||||
open_ctl()
|
||||
open_ctl(void)
|
||||
{
|
||||
socklen_t length;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: look_up.c,v 1.7 2005/09/24 16:40:01 christos Exp $ */
|
||||
/* $NetBSD: look_up.c,v 1.8 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)look_up.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: look_up.c,v 1.7 2005/09/24 16:40:01 christos Exp $");
|
||||
__RCSID("$NetBSD: look_up.c,v 1.8 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "talk.h"
|
||||
@ -46,7 +46,7 @@ __RCSID("$NetBSD: look_up.c,v 1.7 2005/09/24 16:40:01 christos Exp $");
|
||||
* See if the local daemon has an invitation for us.
|
||||
*/
|
||||
int
|
||||
check_local()
|
||||
check_local(void)
|
||||
{
|
||||
CTL_RESPONSE response;
|
||||
CTL_RESPONSE *rp = &response;
|
||||
@ -101,8 +101,7 @@ check_local()
|
||||
* Look for an invitation on 'machine'
|
||||
*/
|
||||
int
|
||||
look_for_invite(rp)
|
||||
CTL_RESPONSE *rp;
|
||||
look_for_invite(CTL_RESPONSE *rp)
|
||||
{
|
||||
current_state = "Checking for invitation on caller's machine";
|
||||
ctl_transact(his_machine_addr, msg, LOOK_UP, rp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tee.c,v 1.9 2009/04/13 23:45:50 lukem Exp $ */
|
||||
/* $NetBSD: tee.c,v 1.10 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tee.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: tee.c,v 1.9 2009/04/13 23:45:50 lukem Exp $");
|
||||
__RCSID("$NetBSD: tee.c,v 1.10 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -61,13 +61,11 @@ typedef struct _list {
|
||||
} LIST;
|
||||
LIST *head;
|
||||
|
||||
void add __P((int, const char *));
|
||||
int main __P((int, char **));
|
||||
void add(int, const char *);
|
||||
int main(int, char **);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
LIST *p;
|
||||
int n, fd, rval, wval;
|
||||
@ -137,9 +135,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
void
|
||||
add(fd, name)
|
||||
int fd;
|
||||
const char *name;
|
||||
add(int fd, const char *name)
|
||||
{
|
||||
LIST *p;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.28 2012/01/09 16:08:55 christos Exp $ */
|
||||
/* $NetBSD: main.c,v 1.29 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1990, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1990, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.28 2012/01/09 16:08:55 christos Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.29 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -92,7 +92,7 @@ tninit(void)
|
||||
}
|
||||
|
||||
void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: %s %s%s%s%s\n",
|
||||
prompt,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $ */
|
||||
/* $NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -540,17 +540,14 @@ get(int argc, char *argv[])
|
||||
}
|
||||
|
||||
static void
|
||||
getUsage(s)
|
||||
char *s;
|
||||
getUsage(char *s)
|
||||
{
|
||||
(void)printf("Usage: %s host:file host:file ... file, or\n", s);
|
||||
(void)printf(" %s file file ... file if connected\n", s);
|
||||
}
|
||||
|
||||
void
|
||||
setblksize(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
setblksize(int argc, char *argv[])
|
||||
{
|
||||
int t;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tftp.c,v 1.32 2011/09/17 15:15:46 christos Exp $ */
|
||||
/* $NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tftp.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tftp.c,v 1.32 2011/09/17 15:15:46 christos Exp $");
|
||||
__RCSID("$NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -531,12 +531,8 @@ abort: /* ok to ack, since user */
|
||||
}
|
||||
|
||||
static int
|
||||
makerequest(request, name, tp, mode, filesize)
|
||||
int request;
|
||||
const char *name;
|
||||
struct tftphdr *tp;
|
||||
const char *mode;
|
||||
off_t filesize;
|
||||
makerequest(int request, const char *name, struct tftphdr *tp, const char *mode,
|
||||
off_t filesize)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
@ -602,9 +598,7 @@ const struct errmsg {
|
||||
* offset by 100.
|
||||
*/
|
||||
static void
|
||||
nak(error, peer)
|
||||
int error;
|
||||
struct sockaddr *peer;
|
||||
nak(int error, struct sockaddr *peer)
|
||||
{
|
||||
const struct errmsg *pe;
|
||||
struct tftphdr *tp;
|
||||
@ -633,10 +627,7 @@ nak(error, peer)
|
||||
}
|
||||
|
||||
static void
|
||||
tpacket(s, tp, n)
|
||||
const char *s;
|
||||
struct tftphdr *tp;
|
||||
int n;
|
||||
tpacket(const char *s, struct tftphdr *tp, int n)
|
||||
{
|
||||
static const char *opcodes[] =
|
||||
{ "#0", "RRQ", "WRQ", "DATA", "ACK", "ERROR", "OACK" };
|
||||
@ -723,23 +714,21 @@ struct timeval tstart;
|
||||
struct timeval tstop;
|
||||
|
||||
static void
|
||||
startclock()
|
||||
startclock(void)
|
||||
{
|
||||
|
||||
(void)gettimeofday(&tstart, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
stopclock()
|
||||
stopclock(void)
|
||||
{
|
||||
|
||||
(void)gettimeofday(&tstop, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
printstats(direction, amount)
|
||||
const char *direction;
|
||||
unsigned long amount;
|
||||
printstats(const char *direction, unsigned long amount)
|
||||
{
|
||||
double delta;
|
||||
|
||||
@ -755,8 +744,7 @@ printstats(direction, amount)
|
||||
|
||||
static void
|
||||
/*ARGSUSED*/
|
||||
timer(sig)
|
||||
int sig;
|
||||
timer(int sig)
|
||||
{
|
||||
|
||||
timeout += rexmtval;
|
||||
@ -768,9 +756,7 @@ timer(sig)
|
||||
}
|
||||
|
||||
static int
|
||||
cmpport(sa, sb)
|
||||
struct sockaddr *sa;
|
||||
struct sockaddr *sb;
|
||||
cmpport(struct sockaddr *sa, struct sockaddr *sb)
|
||||
{
|
||||
char a[NI_MAXSERV], b[NI_MAXSERV];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ul.c,v 1.15 2010/02/03 15:34:46 roy Exp $ */
|
||||
/* $NetBSD: ul.c,v 1.16 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ul.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: ul.c,v 1.15 2010/02/03 15:34:46 roy Exp $");
|
||||
__RCSID("$NetBSD: ul.c,v 1.16 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
@ -98,9 +98,7 @@ void setulmode __P((int));
|
||||
#define PRINT(s) if (s == NULL) /* void */; else tputs(s, 1, outchar)
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
const char *termtype;
|
||||
@ -148,8 +146,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
void
|
||||
filter(f)
|
||||
FILE *f;
|
||||
filter(FILE *f)
|
||||
{
|
||||
int c;
|
||||
|
||||
@ -262,7 +259,7 @@ filter(f)
|
||||
}
|
||||
|
||||
void
|
||||
flushln()
|
||||
flushln(void)
|
||||
{
|
||||
int lastmode;
|
||||
int i;
|
||||
@ -304,7 +301,7 @@ flushln()
|
||||
* We don't do anything with halfline ups and downs, or Greek.
|
||||
*/
|
||||
void
|
||||
overstrike()
|
||||
overstrike(void)
|
||||
{
|
||||
int i;
|
||||
char lbuf[256];
|
||||
@ -342,7 +339,7 @@ overstrike()
|
||||
}
|
||||
|
||||
void
|
||||
iattr()
|
||||
iattr(void)
|
||||
{
|
||||
int i;
|
||||
char lbuf[256];
|
||||
@ -366,7 +363,7 @@ iattr()
|
||||
}
|
||||
|
||||
void
|
||||
initbuf()
|
||||
initbuf(void)
|
||||
{
|
||||
|
||||
memset((char *)obuf, 0, sizeof (obuf)); /* depends on NORMAL == 0 */
|
||||
@ -376,7 +373,7 @@ initbuf()
|
||||
}
|
||||
|
||||
void
|
||||
fwd()
|
||||
fwd(void)
|
||||
{
|
||||
int oldcol, oldmax;
|
||||
|
||||
@ -388,7 +385,7 @@ fwd()
|
||||
}
|
||||
|
||||
void
|
||||
reverse()
|
||||
reverse(void)
|
||||
{
|
||||
upln++;
|
||||
fwd();
|
||||
@ -398,8 +395,7 @@ reverse()
|
||||
}
|
||||
|
||||
int
|
||||
outchar(c)
|
||||
int c;
|
||||
outchar(int c)
|
||||
{
|
||||
return (putchar(c & 0177));
|
||||
}
|
||||
@ -407,8 +403,7 @@ outchar(c)
|
||||
static int curmode = 0;
|
||||
|
||||
void
|
||||
outc(c)
|
||||
int c;
|
||||
outc(int c)
|
||||
{
|
||||
putchar(c);
|
||||
if (underline_char && !enter_underline_mode && (curmode & UNDERL)) {
|
||||
@ -421,8 +416,7 @@ outc(c)
|
||||
}
|
||||
|
||||
void
|
||||
setulmode(newmode)
|
||||
int newmode;
|
||||
setulmode(int newmode)
|
||||
{
|
||||
if (!iflag) {
|
||||
if (curmode != NORMAL && newmode != NORMAL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: units.c,v 1.17 2011/09/06 18:35:41 joerg Exp $ */
|
||||
/* $NetBSD: units.c,v 1.18 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* units.c Copyright (c) 1993 by Adrian Mariano (adrian@cam.cornell.edu)
|
||||
@ -288,7 +288,7 @@ showunit(struct unittype * theunit)
|
||||
}
|
||||
|
||||
static void
|
||||
zeroerror()
|
||||
zeroerror(void)
|
||||
{
|
||||
warnx("Unit reduces to zero");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: users.c,v 1.15 2008/07/21 14:19:27 lukem Exp $ */
|
||||
/* $NetBSD: users.c,v 1.16 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1987, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)users.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: users.c,v 1.15 2008/07/21 14:19:27 lukem Exp $");
|
||||
__RCSID("$NetBSD: users.c,v 1.16 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -53,12 +53,10 @@ __RCSID("$NetBSD: users.c,v 1.15 2008/07/21 14:19:27 lukem Exp $");
|
||||
|
||||
#include "utmpentry.h"
|
||||
|
||||
int main __P((int, char **));
|
||||
int main(int, char **);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int ncnt = 0;
|
||||
int ch;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: regexp.c,v 1.11 2008/07/21 14:19:27 lukem Exp $ */
|
||||
/* $NetBSD: regexp.c,v 1.12 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: regexp.c,v 1.11 2008/07/21 14:19:27 lukem Exp $");
|
||||
__RCSID("$NetBSD: regexp.c,v 1.12 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <assert.h>
|
||||
@ -67,9 +67,7 @@ boolean l_onecase; /* true if upper and lower equivalent */
|
||||
*/
|
||||
|
||||
int
|
||||
STRNCMP(s1, s2, len)
|
||||
char *s1,*s2;
|
||||
int len;
|
||||
STRNCMP(char *s1, char *s2, int len)
|
||||
{
|
||||
if (l_onecase) {
|
||||
do
|
||||
@ -149,8 +147,7 @@ static char *ccre; /* pointer to current position in converted exp*/
|
||||
static char *ure; /* pointer current position in unconverted exp */
|
||||
|
||||
char *
|
||||
convexp(re)
|
||||
char *re; /* unconverted irregular expression */
|
||||
convexp(char *re) /* unconverted irregular expression */
|
||||
{
|
||||
char *cre; /* pointer to converted regular expression */
|
||||
|
||||
@ -175,7 +172,7 @@ convexp(re)
|
||||
}
|
||||
|
||||
static void
|
||||
expconv()
|
||||
expconv(void)
|
||||
{
|
||||
char *cs; /* pointer to current symbol in converted exp */
|
||||
char c; /* character being processed */
|
||||
@ -347,10 +344,10 @@ expconv()
|
||||
*/
|
||||
|
||||
char *
|
||||
expmatch(s, re, mstring)
|
||||
char *s; /* string to check for a match in */
|
||||
char *re; /* a converted irregular expression */
|
||||
char *mstring; /* where to put whatever matches a \p */
|
||||
expmatch(
|
||||
char *s, /* string to check for a match in */
|
||||
char *re, /* a converted irregular expression */
|
||||
char *mstring) /* where to put whatever matches a \p */
|
||||
{
|
||||
char *cs; /* the current symbol */
|
||||
char *ptr,*s1; /* temporary pointer */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfontedpr.c,v 1.13 2008/07/21 14:19:27 lukem Exp $ */
|
||||
/* $NetBSD: vfontedpr.c,v 1.14 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: vfontedpr.c,v 1.13 2008/07/21 14:19:27 lukem Exp $");
|
||||
__RCSID("$NetBSD: vfontedpr.c,v 1.14 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -124,16 +124,14 @@ char *l_strend; /* delimiter for string constant */
|
||||
boolean l_toplex; /* procedures only defined at top lex level */
|
||||
const char *language = "c"; /* the language indicator */
|
||||
|
||||
int main __P((int, char **));
|
||||
int main(int, char **);
|
||||
|
||||
#define ps(x) printf("%s", x)
|
||||
static char minus[] = "-";
|
||||
static char minusn[] = "-n";
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *fname = "";
|
||||
struct stat stbuf;
|
||||
@ -352,8 +350,7 @@ main(argc, argv)
|
||||
#define isidchr(c) (isalnum((unsigned char)(c)) || (c) == '_')
|
||||
|
||||
static void
|
||||
putScp(os)
|
||||
char *os;
|
||||
putScp(char *os)
|
||||
{
|
||||
char *s = os; /* pointer to unmatched string */
|
||||
char dummy[BUFSIZ]; /* dummy to be used by expmatch */
|
||||
@ -532,10 +529,10 @@ skip:
|
||||
}
|
||||
|
||||
static void
|
||||
putKcp(start, end, force)
|
||||
char *start; /* start of string to write */
|
||||
char *end; /* end of string to write */
|
||||
boolean force; /* true if we should force nokeyw */
|
||||
putKcp(
|
||||
char *start, /* start of string to write */
|
||||
char *end, /* end of string to write */
|
||||
boolean force) /* true if we should force nokeyw */
|
||||
{
|
||||
int i;
|
||||
int xfld = 0;
|
||||
@ -582,16 +579,14 @@ putKcp(start, end, force)
|
||||
|
||||
|
||||
static int
|
||||
tabs(s, os)
|
||||
char *s, *os;
|
||||
tabs(char *s, char *os)
|
||||
{
|
||||
|
||||
return (width(s, os) / 8);
|
||||
}
|
||||
|
||||
static int
|
||||
width(s, os)
|
||||
char *s, *os;
|
||||
width(char *s, char *os)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -611,8 +606,7 @@ width(s, os)
|
||||
}
|
||||
|
||||
static void
|
||||
putcp(c)
|
||||
int c;
|
||||
putcp(int c)
|
||||
{
|
||||
|
||||
switch(c) {
|
||||
@ -676,8 +670,7 @@ putcp(c)
|
||||
* look for a process beginning on this line
|
||||
*/
|
||||
static boolean
|
||||
isproc(s)
|
||||
char *s;
|
||||
isproc(char *s)
|
||||
{
|
||||
pname[0] = '\0';
|
||||
if (!l_toplex || blklevel == 0)
|
||||
@ -692,8 +685,7 @@ isproc(s)
|
||||
*/
|
||||
|
||||
static int
|
||||
iskw(s)
|
||||
char *s;
|
||||
iskw(char *s)
|
||||
{
|
||||
char **ss = l_keywds;
|
||||
int i = 1;
|
||||
@ -706,4 +698,3 @@ iskw(s)
|
||||
return (i);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmstat.c,v 1.186 2011/10/15 21:59:48 christos Exp $ */
|
||||
/* $NetBSD: vmstat.c,v 1.187 2012/03/20 20:34:59 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
|
||||
@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1991, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.186 2011/10/15 21:59:48 christos Exp $");
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.187 2012/03/20 20:34:59 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -665,7 +665,7 @@ getuptime(void)
|
||||
int hz, hdrcnt;
|
||||
|
||||
void
|
||||
print_total_hdr()
|
||||
print_total_hdr(void)
|
||||
{
|
||||
|
||||
(void)printf("procs memory\n");
|
||||
|
Loading…
Reference in New Issue
Block a user