mirror of
https://github.com/openbsd/src.git
synced 2025-01-09 22:38:01 -08:00
protos
This commit is contained in:
parent
a83f895f5a
commit
74637cb20a
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: csh.h,v 1.14 2003/06/11 21:09:50 deraadt Exp $ */
|
||||
/* $OpenBSD: csh.h,v 1.15 2003/06/25 21:12:39 deraadt Exp $ */
|
||||
/* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
@ -419,7 +419,7 @@ struct varent {
|
||||
#define v_right v_link[1]
|
||||
#define v_parent v_link[2]
|
||||
|
||||
struct varent *adrof1();
|
||||
struct varent *adrof1(Char *, struct varent *);
|
||||
|
||||
#define adrof(v) adrof1(v, &shvhed)
|
||||
#define value(v) value1(v, &shvhed)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: extern.h,v 1.13 2003/06/23 16:42:15 deraadt Exp $ */
|
||||
/* $OpenBSD: extern.h,v 1.14 2003/06/25 21:12:39 deraadt Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */
|
||||
|
||||
/*-
|
||||
@ -158,7 +158,7 @@ Char *globone(Char *, int);
|
||||
int Gmatch(Char *, Char *);
|
||||
void ginit(void);
|
||||
Char **globall(Char **);
|
||||
void rscan(Char **, void (*)());
|
||||
void rscan(Char **, void (*)(int));
|
||||
void tglob(Char **);
|
||||
void trim(Char **);
|
||||
#ifdef FILEC
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: func.c,v 1.19 2003/06/23 16:42:15 deraadt Exp $ */
|
||||
/* $OpenBSD: func.c,v 1.20 2003/06/25 21:12:39 deraadt Exp $ */
|
||||
/* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$OpenBSD: func.c,v 1.19 2003/06/23 16:42:15 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: func.c,v 1.20 2003/06/25 21:12:39 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -1148,7 +1148,6 @@ static RLIM_TYPE
|
||||
getval(struct limits *lp, Char **v)
|
||||
{
|
||||
float f;
|
||||
double atof();
|
||||
Char *cp = *v++;
|
||||
|
||||
f = atof(short2str(cp));
|
||||
@ -1301,7 +1300,7 @@ dosuspend(Char **v, struct command *t)
|
||||
{
|
||||
int ctpgrp;
|
||||
|
||||
void (*old) ();
|
||||
void (*old) (int);
|
||||
|
||||
if (loginsh)
|
||||
stderror(ERR_SUSPLOG);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: glob.c,v 1.11 2003/06/11 21:09:50 deraadt Exp $ */
|
||||
/* $OpenBSD: glob.c,v 1.12 2003/06/25 21:12:39 deraadt Exp $ */
|
||||
/* $NetBSD: glob.c,v 1.10 1995/03/21 09:03:01 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$OpenBSD: glob.c,v 1.11 2003/06/11 21:09:50 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: glob.c,v 1.12 2003/06/25 21:12:39 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -522,7 +522,7 @@ ginit(void)
|
||||
}
|
||||
|
||||
void
|
||||
rscan(Char **t, void (*f)())
|
||||
rscan(Char **t, void (*f)(int))
|
||||
{
|
||||
Char *p;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: keyword.c,v 1.18 2003/06/11 23:42:12 deraadt Exp $ */
|
||||
/* $OpenBSD: keyword.c,v 1.19 2003/06/25 21:12:45 deraadt Exp $ */
|
||||
/* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
|
||||
#else
|
||||
static char rcsid[] = "$OpenBSD: keyword.c,v 1.18 2003/06/11 23:42:12 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: keyword.c,v 1.19 2003/06/25 21:12:45 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -245,7 +245,7 @@ findvar(char *p)
|
||||
{
|
||||
VAR *v, key;
|
||||
char *hp;
|
||||
int vcmp();
|
||||
int vcmp(const void *, const void *);
|
||||
|
||||
key.name = p;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: test.c,v 1.7 2002/07/04 04:26:40 deraadt Exp $ */
|
||||
/* $OpenBSD: test.c,v 1.8 2003/06/25 21:12:50 deraadt Exp $ */
|
||||
/* $NetBSD: test.c,v 1.15 1995/03/21 07:04:06 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$OpenBSD: test.c,v 1.7 2002/07/04 04:26:40 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: test.c,v 1.8 2003/06/25 21:12:50 deraadt Exp $";
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -142,7 +142,7 @@ struct t_op {
|
||||
char **t_wp;
|
||||
struct t_op const *t_wp_op;
|
||||
|
||||
static enum token t_lex();
|
||||
static enum token t_lex(char *);
|
||||
static int oexpr(enum token n);
|
||||
static int aexpr(enum token n);
|
||||
static int nexpr(enum token n);
|
||||
@ -150,9 +150,9 @@ static int binop(void);
|
||||
static int primary(enum token n);
|
||||
static int filstat(char *nm, enum token mode);
|
||||
static int getn(const char *s);
|
||||
static int newerf();
|
||||
static int olderf();
|
||||
static int equalf();
|
||||
static int newerf(const char *, const char *);
|
||||
static int olderf(const char *, const char *);
|
||||
static int equalf(const char *, const char *);
|
||||
static void syntax(const char *op, char *msg);
|
||||
|
||||
int
|
||||
@ -450,7 +450,7 @@ getn(const char *s)
|
||||
}
|
||||
|
||||
static int
|
||||
newerf(char *f1, char *f2)
|
||||
newerf(const char *f1, const char *f2)
|
||||
{
|
||||
struct stat b1, b2;
|
||||
|
||||
@ -460,7 +460,7 @@ newerf(char *f1, char *f2)
|
||||
}
|
||||
|
||||
static int
|
||||
olderf(char *f1, char *f2)
|
||||
olderf(const char *f1, const char *f2)
|
||||
{
|
||||
struct stat b1, b2;
|
||||
|
||||
@ -470,7 +470,7 @@ olderf(char *f1, char *f2)
|
||||
}
|
||||
|
||||
static int
|
||||
equalf(char *f1, char *f2)
|
||||
equalf(const char *f1, const char *f2)
|
||||
{
|
||||
struct stat b1, b2;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */
|
||||
/* $OpenBSD: bcrypt.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
|
||||
@ -172,6 +172,8 @@ bcrypt_gensalt(u_int8_t log_rounds)
|
||||
/* We handle $Vers$log2(NumRounds)$salt+passwd$
|
||||
i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
|
||||
|
||||
char *bcrypt(const char *key, const char *salt);
|
||||
|
||||
char *
|
||||
bcrypt(key, salt)
|
||||
const char *key;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: md5crypt.c,v 1.11 2003/04/02 20:35:29 millert Exp $ */
|
||||
/* $OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.11 2003/04/02 20:35:29 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <unistd.h>
|
||||
@ -45,6 +45,8 @@ to64(s, v, n)
|
||||
* Use MD5 for what it is best at...
|
||||
*/
|
||||
|
||||
char *md5crypt(const char *pw, const char *salt);
|
||||
|
||||
char *
|
||||
md5crypt(pw, salt)
|
||||
register const char *pw;
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.8 2003/06/02 20:18:34 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
@ -36,6 +36,7 @@ static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.8 2003/06/02 20:18:34 miller
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <grp.h>
|
||||
|
||||
int
|
||||
|
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: getpwent.c,v 1.30 2003/06/02 20:18:34 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: getpwent.c,v 1.31 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -79,6 +79,7 @@ static int __ypexclude_add(const char *);
|
||||
static int __ypexclude_is(const char *);
|
||||
static void __ypexclude_free(void);
|
||||
static void __ypproto_set(void);
|
||||
static int __ypparse(struct passwd *pw, char *s);
|
||||
|
||||
/* macro for deciding which YP maps to use. */
|
||||
#define PASSWD_BYNAME \
|
||||
|
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
|
||||
#else
|
||||
static char rcsid[] = "$OpenBSD: glob.c,v 1.21 2003/06/02 20:18:34 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: glob.c,v 1.22 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -601,7 +601,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
|
||||
* and dirent.h as taking pointers to differently typed opaque
|
||||
* structures.
|
||||
*/
|
||||
struct dirent *(*readdirfunc)();
|
||||
struct dirent *(*readdirfunc)(void *);
|
||||
|
||||
if (pathend > pathend_last)
|
||||
return (1);
|
||||
@ -626,7 +626,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
|
||||
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
|
||||
readdirfunc = pglob->gl_readdir;
|
||||
else
|
||||
readdirfunc = readdir;
|
||||
readdirfunc = (struct dirent *(*)(void *))readdir;
|
||||
while ((dp = (*readdirfunc)(dirp))) {
|
||||
register u_char *sc;
|
||||
register Char *dc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: login_cap.c,v 1.16 2003/03/31 15:47:03 millert Exp $ */
|
||||
/* $OpenBSD: login_cap.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
|
||||
@ -57,6 +57,7 @@ static int setuserpath(login_cap_t *, char *);
|
||||
static u_quad_t multiply(u_quad_t, u_quad_t);
|
||||
static u_quad_t strtolimit(char *, char **, int);
|
||||
static u_quad_t strtosize(char *, char **, int);
|
||||
static int gsetrl(login_cap_t *lc, int what, char *name, int type);
|
||||
|
||||
login_cap_t *
|
||||
login_getclass(class)
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: nlist.c,v 1.44 2003/06/02 20:18:34 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: nlist.c,v 1.45 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -53,6 +53,14 @@ static char rcsid[] = "$OpenBSD: nlist.c,v 1.44 2003/06/02 20:18:34 millert Exp
|
||||
#include <sys/exec_ecoff.h>
|
||||
#endif
|
||||
|
||||
int __fdnlist(int, struct nlist *);
|
||||
int __aout_fdnlist(int, struct nlist *);
|
||||
int __ecoff_fdnlist(int, struct nlist *);
|
||||
int __elf_fdnlist(int, struct nlist *);
|
||||
#ifdef _NLIST_DO_ELF
|
||||
int __elf_is_okay__(register Elf_Ehdr *ehdr);
|
||||
#endif
|
||||
|
||||
#define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0)
|
||||
|
||||
#ifdef _NLIST_DO_AOUT
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: telldir.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: telldir.c,v 1.4 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -62,6 +62,8 @@ struct ddloc {
|
||||
static long dd_loccnt; /* Index of entry for sequential readdir's */
|
||||
static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
|
||||
|
||||
void __seekdir(DIR *, long);
|
||||
|
||||
/*
|
||||
* return a pointer into a directory
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: timezone.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: timezone.c,v 1.7 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -38,7 +38,7 @@ static char rcsid[] = "$OpenBSD: timezone.c,v 1.6 2003/06/02 20:18:35 millert Ex
|
||||
#include <string.h>
|
||||
#include <tzfile.h>
|
||||
|
||||
char *_tztab();
|
||||
char *_tztab(int, int);
|
||||
|
||||
/*
|
||||
* timezone --
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(lint) && defined(LIBC_SCCS)
|
||||
static char rcsid[] = "$OpenBSD: gmon.c,v 1.15 2003/06/02 20:18:35 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: gmon.c,v 1.16 2003/06/25 21:16:47 deraadt Exp $";
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -55,6 +55,8 @@ static int s_scale;
|
||||
|
||||
void moncontrol(int);
|
||||
static int hertz(void);
|
||||
void monstartup(u_long lowpc, u_long highpc);
|
||||
void _mcleanup(void);
|
||||
|
||||
void
|
||||
monstartup(lowpc, highpc)
|
||||
@ -122,7 +124,7 @@ monstartup(lowpc, highpc)
|
||||
}
|
||||
|
||||
void
|
||||
_mcleanup()
|
||||
_mcleanup(void)
|
||||
{
|
||||
int fd;
|
||||
int fromindex;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: main.c,v 1.25 2003/06/02 19:38:24 millert Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.26 2003/06/25 21:11:10 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -37,7 +37,7 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
|
||||
static char rcsid[] = "$OpenBSD: main.c,v 1.25 2003/06/02 19:38:24 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: main.c,v 1.26 2003/06/25 21:11:10 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -89,8 +89,7 @@ struct utsname kerninfo;
|
||||
char name[MAXLOGNAME];
|
||||
char dev[] = _PATH_DEV;
|
||||
char ttyn[32];
|
||||
char *portselector();
|
||||
char *ttyname();
|
||||
char *portselector(void);
|
||||
|
||||
#define OBUFSIZ 128
|
||||
#define TABBUFSIZ 512
|
||||
@ -265,8 +264,6 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
if (AB) {
|
||||
extern char *autobaud();
|
||||
|
||||
tname = autobaud();
|
||||
continue;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tftpd.c,v 1.27 2003/06/02 19:38:25 millert Exp $ */
|
||||
/* $OpenBSD: tftpd.c,v 1.28 2003/06/25 21:11:25 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
@ -37,7 +37,7 @@ char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/
|
||||
static char rcsid[] = "$OpenBSD: tftpd.c,v 1.27 2003/06/02 19:38:25 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: tftpd.c,v 1.28 2003/06/25 21:11:25 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -95,9 +95,9 @@ int sendfile(struct formats *pf);
|
||||
|
||||
struct formats {
|
||||
char *f_mode;
|
||||
int (*f_validate)();
|
||||
int (*f_send)();
|
||||
int (*f_recv)();
|
||||
int (*f_validate)(char *, int);
|
||||
int (*f_send)(struct formats *);
|
||||
int (*f_recv)(struct formats *);
|
||||
int f_convert;
|
||||
} formats[] = {
|
||||
{ "netascii", validate_access, sendfile, recvfile, 1 },
|
||||
@ -420,7 +420,7 @@ timer(int signo)
|
||||
int
|
||||
sendfile(struct formats *pf)
|
||||
{
|
||||
struct tftphdr *dp, *r_init();
|
||||
struct tftphdr *dp, *r_init(void);
|
||||
struct tftphdr *ap; /* ack packet */
|
||||
volatile unsigned short block = 1;
|
||||
int size, n;
|
||||
@ -491,7 +491,7 @@ justquit(int signo)
|
||||
int
|
||||
recvfile(struct formats *pf)
|
||||
{
|
||||
struct tftphdr *dp, *w_init();
|
||||
struct tftphdr *dp, *w_init(void);
|
||||
struct tftphdr *ap; /* ack buffer */
|
||||
volatile unsigned short block = 0;
|
||||
int n, size;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: asa.c,v 1.4 2003/06/10 22:20:44 deraadt Exp $ */
|
||||
/* $OpenBSD: asa.c,v 1.5 2003/06/25 21:08:59 deraadt Exp $ */
|
||||
/* $NetBSD: asa.c,v 1.10 1995/04/21 03:01:41 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -32,14 +32,14 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$OpenBSD: asa.c,v 1.4 2003/06/10 22:20:44 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: asa.c,v 1.5 2003/06/25 21:08:59 deraadt Exp $";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <err.h>
|
||||
|
||||
static void asa();
|
||||
static void asa(FILE *);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $ */
|
||||
/* $OpenBSD: checknr.c,v 1.11 2003/06/25 21:09:09 deraadt Exp $ */
|
||||
/* $NetBSD: checknr.c,v 1.4 1995/03/26 04:10:19 glass Exp $ */
|
||||
|
||||
/*
|
||||
@ -40,7 +40,7 @@ static char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
static char rcsid[] = "$OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: checknr.c,v 1.11 2003/06/25 21:09:09 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -53,6 +53,8 @@ static char rcsid[] = "$OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Ex
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define MAXSTK 100 /* Stack size */
|
||||
@ -188,8 +190,6 @@ int sflag; /* -s: ignore \s */
|
||||
int ncmds; /* size of knowncmds */
|
||||
int slot; /* slot in knowncmds found by binsrch */
|
||||
|
||||
char *malloc();
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $ */
|
||||
/* $OpenBSD: fold.c,v 1.9 2003/06/25 21:19:19 deraadt Exp $ */
|
||||
/* $NetBSD: fold.c,v 1.6 1995/09/01 01:42:44 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
@ -43,7 +43,7 @@ static char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static char rcsid[] = "$OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: fold.c,v 1.9 2003/06/25 21:19:19 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
@ -54,8 +54,8 @@ static char rcsid[] = "$OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $"
|
||||
|
||||
#define DEFLINEWIDTH 80
|
||||
|
||||
static void fold ();
|
||||
static int new_column_position ();
|
||||
static void fold(int);
|
||||
static int new_column_position(int, int);
|
||||
int count_bytes = 0;
|
||||
int split_words = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fsplit.c,v 1.13 2003/06/10 22:20:46 deraadt Exp $ */
|
||||
/* $OpenBSD: fsplit.c,v 1.14 2003/06/25 21:19:19 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -40,7 +40,7 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)fsplit.c 8.1 (Berkeley) 6/6/93";*/
|
||||
static char rcsid[] = "$OpenBSD: fsplit.c,v 1.13 2003/06/10 22:20:46 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: fsplit.c,v 1.14 2003/06/25 21:19:19 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
@ -90,7 +90,7 @@ int saveit(char *);
|
||||
char buf[BSZ];
|
||||
FILE *ifp;
|
||||
char x[] = "zzz000.f", mainp[] = "main000.f", blkp[] = "blkdta000.f";
|
||||
char *look(), *skiplab(), *functs();
|
||||
char *look(char *, char *), *skiplab(char *), *functs(char *);
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
@ -282,6 +282,7 @@ getline(void)
|
||||
warnx("line truncated to %d characters", BSZ);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* return 1 for 'end' alone on card (up to col. 72), 0 otherwise */
|
||||
int
|
||||
lend(void)
|
||||
@ -307,10 +308,12 @@ lend(void)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* check for keywords for subprograms
|
||||
return 0 if comment card, 1 if found
|
||||
name and put in arg string. invent name for unnamed
|
||||
block datas and main programs. */
|
||||
* return 0 if comment card, 1 if found
|
||||
* name and put in arg string. invent name for unnamed
|
||||
* block datas and main programs.
|
||||
*/
|
||||
int
|
||||
lname(char *s, size_t len)
|
||||
{
|
||||
@ -416,9 +419,12 @@ functs(char *p)
|
||||
} else
|
||||
return (0);
|
||||
}
|
||||
/* if first 6 col. blank, return ptr to col. 7,
|
||||
if blanks and then tab, return ptr after tab,
|
||||
else return 0 (labelled statement, comment or continuation */
|
||||
|
||||
/*
|
||||
* if first 6 col. blank, return ptr to col. 7,
|
||||
* if blanks and then tab, return ptr after tab,
|
||||
* else return 0 (labelled statement, comment or continuation
|
||||
*/
|
||||
char *
|
||||
skiplab(char *p)
|
||||
{
|
||||
@ -435,8 +441,11 @@ skiplab(char *p)
|
||||
}
|
||||
return (ptr);
|
||||
}
|
||||
/* return 0 if m doesn't match initial part of s;
|
||||
otherwise return ptr to next char after m in s */
|
||||
|
||||
/*
|
||||
* return 0 if m doesn't match initial part of s;
|
||||
* otherwise return ptr to next char after m in s
|
||||
*/
|
||||
char *
|
||||
look(char *s, char *m)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fstat.c,v 1.44 2003/06/10 22:20:46 deraadt Exp $ */
|
||||
/* $OpenBSD: fstat.c,v 1.45 2003/06/25 21:19:19 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -37,7 +37,7 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/
|
||||
static char *rcsid = "$OpenBSD: fstat.c,v 1.44 2003/06/10 22:20:46 deraadt Exp $";
|
||||
static char *rcsid = "$OpenBSD: fstat.c,v 1.45 2003/06/25 21:19:19 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -313,7 +313,6 @@ dofiles(struct kinfo_proc *kp)
|
||||
#define filed filed0.fd_fd
|
||||
struct proc *p = &kp->kp_proc;
|
||||
struct eproc *ep = &kp->kp_eproc;
|
||||
extern char *user_from_uid();
|
||||
|
||||
Uname = user_from_uid(ep->e_ucred.cr_uid, 0);
|
||||
Pid = p->p_pid;
|
||||
@ -399,7 +398,7 @@ vtrans(struct vnode *vp, int i, int flag, off_t offset)
|
||||
struct vnode vn;
|
||||
struct filestat fst;
|
||||
char rw[3], mode[17];
|
||||
char *badtype = NULL, *filename, *getmnton();
|
||||
char *badtype = NULL, *filename, *getmnton(struct mount *);
|
||||
|
||||
filename = badtype = NULL;
|
||||
if (!KVM_READ(vp, &vn, sizeof (struct vnode))) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rpc_parse.c,v 1.12 2003/04/26 18:29:51 pvalchev Exp $ */
|
||||
/* $OpenBSD: rpc_parse.c,v 1.13 2003/06/25 21:09:26 deraadt Exp $ */
|
||||
/* $NetBSD: rpc_parse.c,v 1.5 1995/08/29 23:05:55 cgd Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -64,7 +64,7 @@ static void unsigned_dec(char **);
|
||||
* return the next definition you see
|
||||
*/
|
||||
definition *
|
||||
get_definition()
|
||||
get_definition(void)
|
||||
{
|
||||
definition *defp;
|
||||
token tok;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rpc_parse.h,v 1.6 2002/07/05 05:39:42 deraadt Exp $ */
|
||||
/* $OpenBSD: rpc_parse.h,v 1.7 2003/06/25 21:09:26 deraadt Exp $ */
|
||||
/* $NetBSD: rpc_parse.h,v 1.3 1995/06/11 21:50:00 pk Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -157,7 +157,7 @@ struct definition {
|
||||
};
|
||||
typedef struct definition definition;
|
||||
|
||||
definition *get_definition();
|
||||
definition *get_definition(void);
|
||||
|
||||
struct bas_type {
|
||||
char *name;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rpc_util.c,v 1.10 2002/07/05 05:39:42 deraadt Exp $ */
|
||||
/* $OpenBSD: rpc_util.c,v 1.11 2003/06/25 21:09:26 deraadt Exp $ */
|
||||
/* $NetBSD: rpc_util.c,v 1.6 1995/08/29 23:05:57 cgd Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -96,8 +96,7 @@ definition *
|
||||
findval(lst, val, cmp)
|
||||
list *lst;
|
||||
char *val;
|
||||
int (*cmp) ();
|
||||
|
||||
int (*cmp) (definition *, char *);
|
||||
{
|
||||
|
||||
for (; lst != NULL; lst = lst->next) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rpc_util.h,v 1.11 2002/07/05 05:39:42 deraadt Exp $ */
|
||||
/* $OpenBSD: rpc_util.h,v 1.12 2003/06/25 21:09:26 deraadt Exp $ */
|
||||
/* $NetBSD: rpc_util.h,v 1.3 1995/06/11 21:50:10 pk Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -91,12 +91,12 @@ extern int nonfatalerrors;
|
||||
/*
|
||||
* rpc_util routines
|
||||
*/
|
||||
void storeval();
|
||||
void storeval(list **, definition *);
|
||||
|
||||
#define STOREVAL(list,item) \
|
||||
storeval(list,item)
|
||||
|
||||
definition *findval();
|
||||
definition *findval(list *, char *, int (*)(definition *, char *));
|
||||
|
||||
#define FINDVAL(list,item,finder) \
|
||||
findval(list, item, finder)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ruptime.c,v 1.10 2003/06/10 22:20:50 deraadt Exp $ */
|
||||
/* $OpenBSD: ruptime.c,v 1.11 2003/06/25 21:18:47 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983 The Regents of the University of California.
|
||||
@ -37,7 +37,7 @@ char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)ruptime.c 5.8 (Berkeley) 7/21/90";*/
|
||||
static char rcsid[] = "$OpenBSD: ruptime.c,v 1.10 2003/06/10 22:20:50 deraadt Exp $";
|
||||
static char rcsid[] = "$OpenBSD: ruptime.c,v 1.11 2003/06/25 21:18:47 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -62,7 +62,10 @@ struct whod awhod;
|
||||
|
||||
time_t now;
|
||||
int rflg = 1;
|
||||
int hscmp(), ucmp(), lcmp(), tcmp();
|
||||
int hscmp(const void *, const void *);
|
||||
int ucmp(const void *, const void *);
|
||||
int lcmp(const void *, const void *);
|
||||
int tcmp(const void *, const void *);
|
||||
|
||||
void morehosts(void);
|
||||
|
||||
@ -78,9 +81,8 @@ main(int argc, char *argv[])
|
||||
struct dirent *dp;
|
||||
int aflg, cc, ch, f, i, maxloadav;
|
||||
char buf[sizeof(struct whod)];
|
||||
int (*cmp)() = hscmp;
|
||||
time_t time();
|
||||
char *interval();
|
||||
int (*cmp)(const void *, const void *) = hscmp;
|
||||
char *interval(time_t, char *);
|
||||
|
||||
aflg = 0;
|
||||
while ((ch = getopt(argc, argv, "alrut")) != -1)
|
||||
@ -199,18 +201,18 @@ interval(time_t tval, char *updown)
|
||||
|
||||
/* alphabetical comparison */
|
||||
int
|
||||
hscmp(void *a1, void *a2)
|
||||
hscmp(const void *a1, const void *a2)
|
||||
{
|
||||
struct hs *h1 = a1, *h2 = a2;
|
||||
const struct hs *h1 = a1, *h2 = a2;
|
||||
|
||||
return(rflg * strcmp(h1->hs_wd->wd_hostname, h2->hs_wd->wd_hostname));
|
||||
}
|
||||
|
||||
/* load average comparison */
|
||||
int
|
||||
lcmp(void *a1, void *a2)
|
||||
lcmp(const void *a1, const void *a2)
|
||||
{
|
||||
struct hs *h1 = a1, *h2 = a2;
|
||||
const struct hs *h1 = a1, *h2 = a2;
|
||||
|
||||
if (ISDOWN(h1))
|
||||
if (ISDOWN(h2))
|
||||
@ -226,9 +228,9 @@ lcmp(void *a1, void *a2)
|
||||
|
||||
/* number of users comparison */
|
||||
int
|
||||
ucmp(void *a1, void *a2)
|
||||
ucmp(const void *a1, const void *a2)
|
||||
{
|
||||
struct hs *h1 = a1, *h2 = a2;
|
||||
const struct hs *h1 = a1, *h2 = a2;
|
||||
|
||||
if (ISDOWN(h1))
|
||||
if (ISDOWN(h2))
|
||||
@ -243,9 +245,9 @@ ucmp(void *a1, void *a2)
|
||||
|
||||
/* uptime comparison */
|
||||
int
|
||||
tcmp(void *a1, void *a2)
|
||||
tcmp(const void *a1, const void *a2)
|
||||
{
|
||||
struct hs *h1 = a1, *h2 = a2;
|
||||
const struct hs *h1 = a1, *h2 = a2;
|
||||
|
||||
return(rflg * (
|
||||
(ISDOWN(h2) ? h2->hs_wd->wd_recvtime - now
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: main.c,v 1.15 2003/06/25 15:45:10 deraadt Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $ */
|
||||
/* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
@ -40,7 +40,7 @@ static const char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] = "$OpenBSD: main.c,v 1.15 2003/06/25 15:45:10 deraadt Exp $";
|
||||
static const char rcsid[] = "$OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/* Many bug fixes are from Jim Guyton <guyton@rand-unix> */
|
||||
@ -85,7 +85,7 @@ int margc;
|
||||
char *margv[MAXARGV+1];
|
||||
char *prompt = "tftp";
|
||||
jmp_buf toplevel;
|
||||
void intr();
|
||||
void intr(int);
|
||||
struct servent *sp;
|
||||
|
||||
void get(int, char **);
|
||||
@ -539,7 +539,7 @@ status(int argc, char *argv[])
|
||||
}
|
||||
|
||||
void
|
||||
intr(void)
|
||||
intr(int signo)
|
||||
{
|
||||
|
||||
signal(SIGALRM, SIG_IGN);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
|
||||
/* $OpenBSD: vmstat.c,v 1.77 2003/06/03 02:56:22 millert Exp $ */
|
||||
/* $OpenBSD: vmstat.c,v 1.78 2003/06/25 21:18:08 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1991, 1993
|
||||
@ -363,7 +363,7 @@ dovmstat(u_int interval, int reps)
|
||||
{
|
||||
struct vmtotal total;
|
||||
time_t uptime, halfuptime;
|
||||
void needhdr();
|
||||
void needhdr(int);
|
||||
int mib[2];
|
||||
struct clockinfo clkinfo;
|
||||
size_t size;
|
||||
@ -465,7 +465,7 @@ printhdr(void)
|
||||
* Force a header to be prepended to the next output.
|
||||
*/
|
||||
void
|
||||
needhdr(void)
|
||||
needhdr(int signo)
|
||||
{
|
||||
|
||||
hdrcnt = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ukc.h,v 1.10 2003/06/02 21:19:03 maja Exp $ */
|
||||
/* $OpenBSD: ukc.h,v 1.11 2003/06/25 21:10:12 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
|
||||
@ -134,7 +134,7 @@ int *get_extraloc(int);
|
||||
char *get_pdevnames(int);
|
||||
struct pdevinit *get_pdevinit(int);
|
||||
|
||||
int more();
|
||||
int more(void);
|
||||
void pnum(int);
|
||||
void pdevnam(short);
|
||||
void pdev(short);
|
||||
@ -153,7 +153,7 @@ void common_attr(char *, int, char);
|
||||
void add_read(char *, char, char *, int, int *);
|
||||
void add(char *, int, short, short);
|
||||
|
||||
int config();
|
||||
int config(void);
|
||||
void process_history(int, char *);
|
||||
|
||||
#define UC_CHANGE 'c'
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rtsold.c,v 1.29 2003/05/15 14:40:53 itojun Exp $ */
|
||||
/* $OpenBSD: rtsold.c,v 1.30 2003/06/25 21:10:33 deraadt Exp $ */
|
||||
/* $KAME: rtsold.c,v 1.57 2002/09/20 21:59:55 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -104,9 +104,7 @@ static void rtsold_set_dump_file(int);
|
||||
static void usage(char *);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int s, ch, once = 0;
|
||||
struct timeval *timeout;
|
||||
@ -437,7 +435,7 @@ bad:
|
||||
}
|
||||
|
||||
void
|
||||
iflist_init()
|
||||
iflist_init(void)
|
||||
{
|
||||
struct ifinfo *ifi, *next;
|
||||
|
||||
@ -528,7 +526,7 @@ make_packet(struct ifinfo *ifinfo)
|
||||
}
|
||||
|
||||
static struct timeval *
|
||||
rtsol_check_timer()
|
||||
rtsol_check_timer(void)
|
||||
{
|
||||
static struct timeval returnval;
|
||||
struct timeval now, rtsol_timer;
|
||||
@ -781,7 +779,7 @@ warnmsg(int priority, const char *func, const char *msg, ...)
|
||||
* return a list of interfaces which is suitable to sending an RS.
|
||||
*/
|
||||
char **
|
||||
autoifprobe()
|
||||
autoifprobe(void)
|
||||
{
|
||||
static char **argv = NULL;
|
||||
static int n = 0;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: spray.c,v 1.3 2002/06/02 06:42:29 deraadt Exp $
|
||||
* $Id: spray.c,v 1.4 2003/06/25 21:10:19 deraadt Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -41,8 +41,8 @@
|
||||
#define SPRAYOVERHEAD 86
|
||||
#endif
|
||||
|
||||
void usage ();
|
||||
void print_xferstats ();
|
||||
void usage();
|
||||
void print_xferstats(int, int, double);
|
||||
|
||||
/* spray buffer */
|
||||
char spray_buffer[SPRAYMAX];
|
||||
@ -53,9 +53,7 @@ struct timeval ONE_WAY = { 0, 0 };
|
||||
struct timeval TIMEOUT = { 25, 0 };
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
char *progname;
|
||||
spraycumul host_stats;
|
||||
@ -190,10 +188,7 @@ main(argc, argv)
|
||||
|
||||
|
||||
void
|
||||
print_xferstats(packets, packetlen, xfertime)
|
||||
int packets;
|
||||
int packetlen;
|
||||
double xfertime;
|
||||
print_xferstats(int packets, int packetlen, double xfertime)
|
||||
{
|
||||
int datalen;
|
||||
double pps; /* packets per second */
|
||||
@ -215,7 +210,7 @@ print_xferstats(packets, packetlen, xfertime)
|
||||
|
||||
|
||||
void
|
||||
usage ()
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: spray [-c count] [-l length] [-d delay] host\n");
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user