remove __P

This commit is contained in:
Warner Losh 2002-03-22 01:42:45 +00:00
parent d3cb5ded92
commit 3f330d7d1a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92922
87 changed files with 682 additions and 695 deletions

View File

@ -50,7 +50,7 @@ static const char rcsid[] =
#endif
#define FAIL -1
static void usage __P((void));
static void usage(void);
static void
usage()

View File

@ -71,12 +71,12 @@ int qflg;
struct termios tt;
void done __P((int)) __dead2;
void dooutput __P((void));
void doshell __P((char **));
void fail __P((void));
void finish __P((void));
static void usage __P((void));
void done(int) __dead2;
void dooutput(void);
void doshell(char **);
void fail(void);
void finish(void);
static void usage(void);
int
main(argc, argv)

View File

@ -66,22 +66,22 @@ static struct labhash {
int lh_ref;
} *labels[LHSZ];
static char *compile_addr __P((char *, struct s_addr *));
static char *compile_ccl __P((char **, char *));
static char *compile_delimited __P((char *, char *));
static char *compile_flags __P((char *, struct s_subst *));
static char *compile_re __P((char *, regex_t **));
static char *compile_subst __P((char *, struct s_subst *));
static char *compile_text __P((void));
static char *compile_tr __P((char *, char **));
static char *compile_addr(char *, struct s_addr *);
static char *compile_ccl(char **, char *);
static char *compile_delimited(char *, char *);
static char *compile_flags(char *, struct s_subst *);
static char *compile_re(char *, regex_t **);
static char *compile_subst(char *, struct s_subst *);
static char *compile_text(void);
static char *compile_tr(char *, char **);
static struct s_command
**compile_stream __P((struct s_command **));
static char *duptoeol __P((char *, const char *));
static void enterlabel __P((struct s_command *));
**compile_stream(struct s_command **);
static char *duptoeol(char *, const char *);
static void enterlabel(struct s_command *);
static struct s_command
*findlabel __P((char *));
static void fixuplabel __P((struct s_command *, struct s_command *));
static void uselabel __P((void));
*findlabel(char *);
static void fixuplabel(struct s_command *, struct s_command *);
static void uselabel(void);
/*
* Command specification. This is used to drive the command parser.

View File

@ -49,10 +49,10 @@ extern int aflag, eflag, nflag;
extern const char *fname;
extern int rflags; /* regex flags to use */
void cfclose __P((struct s_command *, struct s_command *));
void compile __P((void));
void cspace __P((SPACE *, char *, size_t, enum e_spflag));
char *cu_fgets __P((char *, int, int *));
int mf_fgets __P((SPACE *, enum e_spflag));
void process __P((void));
char *strregerror __P((int, regex_t *));
void cfclose(struct s_command *, struct s_command *);
void compile(void);
void cspace(SPACE *, char *, size_t, enum e_spflag);
char *cu_fgets(char *, int, int *);
int mf_fgets(SPACE *, enum e_spflag);
void process(void);
char *strregerror(int, regex_t *);

View File

@ -104,9 +104,9 @@ const char *fname; /* File name. */
u_long linenum;
int lastline; /* TRUE on the last line of the last file */
static void add_compunit __P((enum e_cut, char *));
static void add_file __P((char *));
static void usage __P((void));
static void add_compunit(enum e_cut, char *);
static void add_file(char *);
static void usage(void);
int
main(argc, argv)

View File

@ -68,12 +68,12 @@ static SPACE HS, PS, SS;
#define hs HS.space
#define hsl HS.len
static inline int applies __P((struct s_command *));
static void flush_appends __P((void));
static void lputs __P((char *));
static inline int regexec_e __P((regex_t *, const char *, int, int, size_t));
static void regsub __P((SPACE *, char *, char *));
static int substitute __P((struct s_command *));
static inline int applies(struct s_command *);
static void flush_appends(void);
static void lputs(char *);
static inline int regexec_e(regex_t *, const char *, int, int, size_t);
static void regsub(SPACE *, char *, char *);
static int substitute(struct s_command *);
struct s_appends *appends; /* Array of pointers to strings to append. */
static int appendx; /* Index into appends array. */

View File

@ -95,14 +95,12 @@ static struct mountlist *mntdump;
static struct exportslist *exports;
static int type = 0;
void print_dump __P((struct mountlist *));
static void usage __P((void));
int xdr_mntdump __P((XDR *, struct mountlist **));
int xdr_exports __P((XDR *, struct exportslist **));
int tcp_callrpc __P((const char *host,
int prognum, int versnum, int procnum,
xdrproc_t inproc, char *in,
xdrproc_t outproc, char *out));
void print_dump(struct mountlist *);
static void usage(void);
int xdr_mntdump(XDR *, struct mountlist **);
int xdr_exports(XDR *, struct exportslist **);
int tcp_callrpc(const char *host, int prognum, int versnum, int procnum,
xdrproc_t inproc, char *in, xdrproc_t outproc, char *out);
/*
* This command queries the NFS mount daemon for it's mount list and/or

View File

@ -54,8 +54,8 @@ static const char rcsid[] =
#include <stdio.h>
#include <string.h>
int show __P((int, const char *));
static void usage __P((void));
int show(int, const char *);
static void usage(void);
int
main(argc, argv)

View File

@ -67,7 +67,7 @@ static const char rcsid[] =
*/
#define STDIN_NAME "-"
int process __P((const char *));
int process(const char *);
int
main(argc, argv)

View File

@ -69,10 +69,10 @@ regex_t rgx;
int pflag;
long sufflen = 2; /* File name suffix length. */
void newfile __P((void));
void split1 __P((void));
void split2 __P((void));
static void usage __P((void));
void newfile(void);
void split1(void);
void split2(void);
static void usage(void);
int
main(argc, argv)

View File

@ -70,8 +70,8 @@ static int hcnt, /* head count */
read_len; /* length to read */
static u_char hbfr[sizeof(EXEC)]; /* buffer for struct exec */
int getch __P((void));
static void usage __P((void));
int getch(void);
static void usage(void);
int
main(argc, argv)

View File

@ -64,9 +64,9 @@ typedef struct nlist NLIST;
#define strx n_un.n_strx
void s_stab __P((const char *, int, EXEC *));
void s_sym __P((const char *, int, EXEC *));
static void usage __P((void));
void s_stab(const char *, int, EXEC *);
void s_sym(const char *, int, EXEC *);
static void usage(void);
int xflag = 0;
int err_val = 0;
@ -78,7 +78,7 @@ main(argc, argv)
{
register int fd, nb;
EXEC head;
void (*sfcn)__P((const char *, int, EXEC *));
void (*sfcn)(const char *, int, EXEC *);
int ch;
char *fn;

View File

@ -78,12 +78,12 @@ int strtabsize, symfound, symkept, small, missing, clean;
char *kfile, *newstrings, *strings, asym[BUFSIZ];
size_t nsym, nexclude;
static void badfmt __P((const char *));
static int excluded __P((struct nlist *));
static int inlist __P((struct nlist *));
static void reorder __P((struct nlist *, struct nlist *, int));
static int savesymb __P((struct nlist *));
static void usage __P((void));
static void badfmt(const char *);
static int excluded(struct nlist *);
static int inlist(struct nlist *);
static void reorder(struct nlist *, struct nlist *, int);
static int savesymb(struct nlist *);
static void usage(void);
int
main(argc, argv)

View File

@ -70,83 +70,83 @@ extern long select_generation;
extern struct nlist namelist[];
int checkhost __P((struct inpcb *));
int checkport __P((struct inpcb *));
void closeiostat __P((WINDOW *));
void closeicmp __P((WINDOW *));
void closeip __P((WINDOW *));
void closekre __P((WINDOW *));
void closembufs __P((WINDOW *));
void closenetstat __P((WINDOW *));
void closepigs __P((WINDOW *));
void closeswap __P((WINDOW *));
void closetcp __P((WINDOW *));
int cmdiostat __P((const char *, const char *));
int cmdkre __P((const char *, const char *));
int cmdnetstat __P((const char *, const char *));
struct cmdtab *lookup __P((const char *));
void command __P((const char *));
void die __P((int));
void display __P((int));
int dkinit __P((void));
int dkcmd __P((char *, char *));
void error __P((const char *fmt, ...)) __printflike(1, 2);
void fetchicmp __P((void));
void fetchip __P((void));
void fetchiostat __P((void));
void fetchkre __P((void));
void fetchmbufs __P((void));
void fetchnetstat __P((void));
void fetchpigs __P((void));
void fetchswap __P((void));
void fetchtcp __P((void));
void getsysctl __P((const char *, void *, size_t));
int initicmp __P((void));
int initip __P((void));
int initiostat __P((void));
int initkre __P((void));
int initmbufs __P((void));
int initnetstat __P((void));
int initpigs __P((void));
int initswap __P((void));
int inittcp __P((void));
int keyboard __P((void));
int kvm_ckread __P((void *, void *, int));
void labelicmp __P((void));
void labelip __P((void));
void labeliostat __P((void));
void labelkre __P((void));
void labelmbufs __P((void));
void labelnetstat __P((void));
void labelpigs __P((void));
void labels __P((void));
void labelswap __P((void));
void labeltcp __P((void));
void load __P((void));
int netcmd __P((const char *, const char *));
void nlisterr __P((struct nlist []));
WINDOW *openicmp __P((void));
WINDOW *openip __P((void));
WINDOW *openiostat __P((void));
WINDOW *openkre __P((void));
WINDOW *openmbufs __P((void));
WINDOW *opennetstat __P((void));
WINDOW *openpigs __P((void));
WINDOW *openswap __P((void));
WINDOW *opentcp __P((void));
int prefix __P((const char *, const char *));
void reseticmp __P((void));
void resetip __P((void));
void resettcp __P((void));
void showicmp __P((void));
void showip __P((void));
void showiostat __P((void));
void showkre __P((void));
void showmbufs __P((void));
void shownetstat __P((void));
void showpigs __P((void));
void showswap __P((void));
void showtcp __P((void));
void status __P((void));
void suspend __P((int));
char *sysctl_dynread __P((const char *, size_t *));
int checkhost(struct inpcb *);
int checkport(struct inpcb *);
void closeiostat(WINDOW *);
void closeicmp(WINDOW *);
void closeip(WINDOW *);
void closekre(WINDOW *);
void closembufs(WINDOW *);
void closenetstat(WINDOW *);
void closepigs(WINDOW *);
void closeswap(WINDOW *);
void closetcp(WINDOW *);
int cmdiostat(const char *, const char *);
int cmdkre(const char *, const char *);
int cmdnetstat(const char *, const char *);
struct cmdtab *lookup(const char *);
void command(const char *);
void die(int);
void display(int);
int dkinit(void);
int dkcmd(char *, char *);
void error(const char *fmt, ...) __printflike(1, 2);
void fetchicmp(void);
void fetchip(void);
void fetchiostat(void);
void fetchkre(void);
void fetchmbufs(void);
void fetchnetstat(void);
void fetchpigs(void);
void fetchswap(void);
void fetchtcp(void);
void getsysctl(const char *, void *, size_t);
int initicmp(void);
int initip(void);
int initiostat(void);
int initkre(void);
int initmbufs(void);
int initnetstat(void);
int initpigs(void);
int initswap(void);
int inittcp(void);
int keyboard(void);
int kvm_ckread(void *, void *, int);
void labelicmp(void);
void labelip(void);
void labeliostat(void);
void labelkre(void);
void labelmbufs(void);
void labelnetstat(void);
void labelpigs(void);
void labels(void);
void labelswap(void);
void labeltcp(void);
void load(void);
int netcmd(const char *, const char *);
void nlisterr(struct nlist []);
WINDOW *openicmp(void);
WINDOW *openip(void);
WINDOW *openiostat(void);
WINDOW *openkre(void);
WINDOW *openmbufs(void);
WINDOW *opennetstat(void);
WINDOW *openpigs(void);
WINDOW *openswap(void);
WINDOW *opentcp(void);
int prefix(const char *, const char *);
void reseticmp(void);
void resetip(void);
void resettcp(void);
void showicmp(void);
void showip(void);
void showiostat(void);
void showkre(void);
void showmbufs(void);
void shownetstat(void);
void showpigs(void);
void showswap(void);
void showtcp(void);
void status(void);
void suspend(int);
char *sysctl_dynread(const char *, size_t *);

View File

@ -88,11 +88,11 @@ static double etime;
static int numbers = 0; /* default display bar graphs */
static int kbpt = 0; /* default ms/seek shown */
static int barlabels __P((int));
static void histogram __P((long double, int, double));
static int numlabels __P((int));
static int devstats __P((int, int, int));
static void stat1 __P((int, int));
static int barlabels(int);
static void histogram(long double, int, double);
static int numlabels(int);
static int devstats(int, int, int);
static void stat1(int, int);
WINDOW *
openiostat()

View File

@ -72,13 +72,13 @@ static struct hitem {
int nports, nhosts, protos;
static void changeitems __P((const char *, int));
static int selectproto __P((const char *));
static void showprotos __P((void));
static int selectport __P((long, int));
static void showports __P((void));
static int selecthost __P((struct in_addr *, int));
static void showhosts __P((void));
static void changeitems(const char *, int);
static int selectproto(const char *);
static void showprotos(void);
static int selectport(long, int);
static void showports(void);
static int selecthost(struct in_addr *, int);
static void showhosts(void);
int
netcmd(cmd, args)

View File

@ -78,13 +78,13 @@ static const char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93";
#include "systat.h"
#include "extern.h"
static struct netinfo *enter __P((struct inpcb *, int, const char *));
static void enter_kvm __P((struct inpcb *, struct socket *, int, const char *));
static void enter_sysctl __P((struct inpcb *, struct xsocket *, int, const char *));
static void fetchnetstat_kvm __P((void));
static void fetchnetstat_sysctl __P((void));
static char *inetname __P((struct in_addr));
static void inetprint __P((struct in_addr *, int, const char *));
static struct netinfo *enter(struct inpcb *, int, const char *);
static void enter_kvm(struct inpcb *, struct socket *, int, const char *);
static void enter_sysctl(struct inpcb *, struct xsocket *, int, const char *);
static void fetchnetstat_kvm(void);
static void fetchnetstat_sysctl(void);
static char *inetname(struct in_addr);
static void inetprint(struct in_addr *, int, const char *);
#define streq(a,b) (strcmp(a,b)==0)
#define YMAX(w) ((w)->_maxy-1)

View File

@ -58,7 +58,7 @@ static const char sccsid[] = "@(#)pigs.c 8.2 (Berkeley) 9/23/93";
#include "extern.h"
#include "systat.h"
int compar __P((const void *, const void *));
int compar(const void *, const void *);
static int nproc;
static struct p_times {

View File

@ -58,8 +58,8 @@ static const char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95";
#include "systat.h"
#include "extern.h"
extern char *getbsize __P((int *headerlenp, long *blocksizep));
void showspace __P((char *header, int hlen, long blocksize));
extern char *getbsize(int *headerlenp, long *blocksizep);
void showspace(char *header, int hlen, long blocksize);
kvm_t *kd;

View File

@ -130,15 +130,15 @@ struct statinfo cur, last, run;
static enum state { BOOT, TIME, RUN } state = TIME;
static void allocinfo __P((struct Info *));
static void copyinfo __P((struct Info *, struct Info *));
static float cputime __P((int));
static void dinfo __P((int, int, struct statinfo *, struct statinfo *));
static void getinfo __P((struct Info *));
static void putint __P((int, int, int, int));
static void putfloat __P((double, int, int, int, int, int));
static void putlongdouble __P((long double, int, int, int, int, int));
static int ucount __P((void));
static void allocinfo(struct Info *);
static void copyinfo(struct Info *, struct Info *);
static float cputime(int);
static void dinfo(int, int, struct statinfo *, struct statinfo *);
static void getinfo(struct Info *);
static void putint(int, int, int, int);
static void putfloat(double, int, int, int, int, int);
static void putlongdouble(long double, int, int, int, int, int);
static int ucount(void);
static int ncpu;
static int ut;

View File

@ -52,16 +52,16 @@ struct mapinfo {
enum STYLE { NOTSET = 0, FBYTES, FLINES, RBYTES, RLINES, REVERSE };
void forward __P((FILE *, enum STYLE, off_t, struct stat *));
void reverse __P((FILE *, enum STYLE, off_t, struct stat *));
void forward(FILE *, enum STYLE, off_t, struct stat *);
void reverse(FILE *, enum STYLE, off_t, struct stat *);
int bytes __P((FILE *, off_t));
int lines __P((FILE *, off_t));
int bytes(FILE *, off_t);
int lines(FILE *, off_t);
void ierr __P((void));
void oerr __P((void));
int mapprint __P((struct mapinfo *, off_t, off_t));
int maparound __P((struct mapinfo *, off_t));
void ierr(void);
void oerr(void);
int mapprint(struct mapinfo *, off_t, off_t);
int maparound(struct mapinfo *, off_t);
extern int Fflag, fflag, rflag, rval;
extern const char *fname;

View File

@ -59,7 +59,7 @@ static const char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93";
#include "extern.h"
static void rlines __P((FILE *, off_t, struct stat *));
static void rlines(FILE *, off_t, struct stat *);
/* defines for inner loop actions */
#define USE_SLEEP 0

View File

@ -56,8 +56,8 @@ static const char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93";
#include "extern.h"
static void r_buf __P((FILE *));
static void r_reg __P((FILE *, enum STYLE, off_t, struct stat *));
static void r_buf(FILE *);
static void r_reg(FILE *, enum STYLE, off_t, struct stat *);
/*
* reverse -- display input in reverse order by line.

View File

@ -63,8 +63,8 @@ static const char sccsid[] = "@(#)tail.c 8.1 (Berkeley) 6/6/93";
int Fflag, fflag, rflag, rval;
const char *fname;
static void obsolete __P((char **));
static void usage __P((void));
static void obsolete(char **);
static void usage(void);
int
main(argc, argv)

View File

@ -64,7 +64,7 @@ static const char copyright[] =
* Fixed to not run with unwriteable terminals MRVM 28/12/94
*/
int main __P((int, char **));
int main(int, char **);
int
main(argc, argv)

View File

@ -66,30 +66,30 @@ extern xwin_t my_win;
extern xwin_t his_win;
extern WINDOW *line_win;
extern void announce_invite __P((void));
extern int check_local __P((void));
extern void check_writeable __P((void));
extern void ctl_transact __P((struct in_addr,CTL_MSG,int,CTL_RESPONSE *));
extern void disp_msg __P((int));
extern void display __P((xwin_t *, char *, int));
extern void end_msgs __P((void));
extern void get_addrs __P((char *, char *));
extern int get_iface __P((struct in_addr *, struct in_addr *));
extern void get_names __P((int, char **));
extern void init_display __P((void));
extern void invite_remote __P((void));
extern int look_for_invite __P((CTL_RESPONSE *));
extern int max __P((int, int));
extern void message __P((const char *));
extern void open_ctl __P((void));
extern void open_sockt __P((void));
extern void p_error __P((const char *));
extern void print_addr __P((struct sockaddr_in));
extern void quit __P((void));
extern int readwin __P((WINDOW *, int, int));
extern void re_invite __P((int));
extern void send_delete __P((void));
extern void set_edit_chars __P((void));
extern void sig_sent __P((int));
extern void start_msgs __P((void));
extern void talk __P((void));
extern void announce_invite(void);
extern int check_local(void);
extern void check_writeable(void);
extern void ctl_transact(struct in_addr,CTL_MSG,int,CTL_RESPONSE *);
extern void disp_msg(int);
extern void display(xwin_t *, char *, int);
extern void end_msgs(void);
extern void get_addrs(char *, char *);
extern int get_iface(struct in_addr *, struct in_addr *);
extern void get_names(int, char **);
extern void init_display(void);
extern void invite_remote(void);
extern int look_for_invite(CTL_RESPONSE *);
extern int max(int, int);
extern void message(const char *);
extern void open_ctl(void);
extern void open_sockt(void);
extern void p_error(const char *);
extern void print_addr(struct sockaddr_in);
extern void quit(void);
extern int readwin(WINDOW *, int, int);
extern void re_invite(int);
extern void send_delete(void);
extern void set_edit_chars(void);
extern void sig_sent(int);
extern void start_msgs(void);
extern void talk(void);

View File

@ -67,11 +67,11 @@ int filen, guesslen, maxblk = MAXREC;
u_int64_t lastrec, record, size, tsize;
FILE *msg;
void *getspace __P((int));
void intr __P((int));
static void usage __P((void));
void verify __P((int, int, char *));
void writeop __P((int, int));
void *getspace(int);
void intr(int);
static void usage(void);
void verify(int, int, char *);
void writeop(int, int);
void rewind_tape(int);
int

View File

@ -62,8 +62,8 @@ typedef struct _list {
} LIST;
LIST *head;
void add __P((int, const char *));
static void usage __P((void));
void add(int, const char *);
static void usage(void);
int
main(argc, argv)

View File

@ -31,7 +31,8 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.1 (Berkeley) 6/6/93
* $FreeBSD$
*/
void recvfile __P((int, char *, char *));
void xmitfile __P((int, char *, char *));
void recvfile(int, char *, char *);
void xmitfile(int, char *, char *);

View File

@ -90,38 +90,38 @@ char *margv[20];
jmp_buf toplevel;
struct servent *sp;
void get __P((int, char **));
void help __P((int, char **));
void intr __P((int));
void modecmd __P((int, char **));
void put __P((int, char **));
void quit __P((int, char **));
void setascii __P((int, char **));
void setbinary __P((int, char **));
void setpeer __P((int, char **));
void setrexmt __P((int, char **));
void settimeout __P((int, char **));
void settrace __P((int, char **));
void setverbose __P((int, char **));
void status __P((int, char **));
void get(int, char **);
void help(int, char **);
void intr(int);
void modecmd(int, char **);
void put(int, char **);
void quit(int, char **);
void setascii(int, char **);
void setbinary(int, char **);
void setpeer(int, char **);
void setrexmt(int, char **);
void settimeout(int, char **);
void settrace(int, char **);
void setverbose(int, char **);
void status(int, char **);
static void command __P((void)) __dead2;
static const char *command_prompt __P((void));
static void command(void) __dead2;
static const char *command_prompt(void);
static void getusage __P((char *));
static void makeargv __P((void));
static void putusage __P((char *));
static void settftpmode __P((const char *));
static void getusage(char *);
static void makeargv(void);
static void putusage(char *);
static void settftpmode(const char *);
char *tail __P((char *));
struct cmd *getcmd __P((char *));
char *tail(char *);
struct cmd *getcmd(char *);
#define HELPINDENT (sizeof("connect"))
struct cmd {
const char *name;
char *help;
void (*handler) __P((int, char **));
void (*handler)(int, char **);
};
char vhelp[] = "toggle verbose mode";

View File

@ -76,13 +76,13 @@ int timeout;
jmp_buf toplevel;
jmp_buf timeoutbuf;
static void nak __P((int));
static int makerequest __P((int, const char *, struct tftphdr *, const char *));
static void printstats __P((const char *, unsigned long));
static void startclock __P((void));
static void stopclock __P((void));
static void timer __P((int));
static void tpacket __P((const char *, struct tftphdr *, int));
static void nak(int);
static int makerequest(int, const char *, struct tftphdr *, const char *);
static void printstats(const char *, unsigned long);
static void startclock(void);
static void stopclock(void);
static void timer(int);
static void tpacket(const char *, struct tftphdr *, int);
/*
* Send the requested file.

View File

@ -31,18 +31,19 @@
* SUCH DAMAGE.
*
* @(#)tftpsubs.h 8.1 (Berkeley) 6/6/93
* $FreeBSD$
*/
/*
* Prototypes for read-ahead/write-behind subroutines for tftp user and
* server.
*/
struct tftphdr *r_init __P((void));
void read_ahead __P((FILE *, int));
int readit __P((FILE *, struct tftphdr **, int));
struct tftphdr *r_init(void);
void read_ahead(FILE *, int);
int readit(FILE *, struct tftphdr **, int);
int synchnet __P((int));
int synchnet(int);
struct tftphdr *w_init __P((void));
int write_behind __P((FILE *, int));
int writeit __P((FILE *, struct tftphdr **, int, int));
struct tftphdr *w_init(void);
int write_behind(FILE *, int);
int writeit(FILE *, struct tftphdr **, int, int);

View File

@ -61,9 +61,9 @@ static const char rcsid[] =
#include <unistd.h>
#include <signal.h>
static int getstathz __P((void));
static void humantime __P((FILE *, long, long));
static void usage __P((void));
static int getstathz(void);
static void humantime(FILE *, long, long);
static void usage(void);
static char decimal_point;

View File

@ -61,7 +61,7 @@ static jmp_buf timeoutbuf, intbuf;
static int coursync(), cour_connect(), cour_swallow();
void cour_nap();
void cour_disconnect __P((void));
void cour_disconnect(void);
int
cour_dialer(num, acu)

View File

@ -48,8 +48,8 @@ static char rcsid[] = "$OpenBSD: acu.c,v 1.7 2001/10/24 18:38:58 millert Exp $";
static acu_t *acu = NOACU;
static int conflag;
static void acuabort __P((int));
static acu_t *acutype __P((char *));
static void acuabort(int);
static acu_t *acutype(char *);
static jmp_buf jmpbuf;
/*
* Establish connection for tip

View File

@ -135,9 +135,9 @@ typedef
typedef
struct {
const char *acu_name;
int (*acu_dialer) __P((char *, char *));
void (*acu_disconnect) __P((void));
void (*acu_abort) __P((void));
int (*acu_dialer)(char *, char *);
void (*acu_disconnect)(void);
void (*acu_abort)(void);
}
acu_t;
@ -173,7 +173,7 @@ typedef
char e_char; /* char to match on */
char e_flags; /* experimental, priviledged */
const char *e_help; /* help string */
int (*e_func) __P((char)); /* command */
int (*e_func)(char); /* command */
}
esctable_t;
@ -271,62 +271,62 @@ extern int disc; /* current tty discpline */
extern char *__progname; /* program name */
extern char *ctrl __P((char));
extern char *vinterp __P((char *, char));
extern const char *connect __P((void));
extern char *ctrl(char);
extern char *vinterp(char *, char);
extern const char *connect(void);
char *sname __P((char *s));
int any __P((int cc, char *p));
int anyof __P((char *s1, char *s2));
int args __P((char *buf, char *a[], int num));
int escape __P((void));
int prompt __P((char *s, char *p, size_t sz));
int size __P((char *s));
int speed __P((int n));
int uu_lock __P((char *_ttyname));
int uu_unlock __P((char *_ttyname));
int vstring __P((char *s, char *v));
long hunt __P((char *name));
void cumain __P((int argc, char *argv[]));
void daemon_uid __P((void));
void disconnect __P((char *reason));
void execute __P((char *s));
void logent __P((char *group, const char *num, const char *acu, const char *message));
void loginit __P((void));
void prtime __P((char *s, time_t a));
void parwrite __P((int fd, char *buf, int n));
void raw __P((void));
void send __P((int c));
void setparity __P((char *defparity));
void setscript __P((void));
void shell_uid __P((void));
void tandem __P((char *option));
void tipabort __P((char *msg));
void tipin __P((void));
void tipout __P((void));
void transfer __P((char *buf, int fd, char *eofchars));
void transmit __P((FILE *fd, char *eofchars, char *command));
void ttysetup __P((int _speed));
void unraw __P((void));
void user_uid __P((void));
void vinit __P((void));
void vlex __P((char *s));
char *sname(char *s);
int any(int cc, char *p);
int anyof(char *s1, char *s2);
int args(char *buf, char *a[], int num);
int escape(void);
int prompt(char *s, char *p, size_t sz);
int size(char *s);
int speed(int n);
int uu_lock(char *_ttyname);
int uu_unlock(char *_ttyname);
int vstring(char *s, char *v);
long hunt(char *name);
void cumain(int argc, char *argv[]);
void daemon_uid(void);
void disconnect(char *reason);
void execute(char *s);
void logent(char *group, const char *num, const char *acu, const char *message);
void loginit(void);
void prtime(char *s, time_t a);
void parwrite(int fd, char *buf, int n);
void raw(void);
void send(int c);
void setparity(char *defparity);
void setscript(void);
void shell_uid(void);
void tandem(char *option);
void tipabort(char *msg);
void tipin(void);
void tipout(void);
void transfer(char *buf, int fd, char *eofchars);
void transmit(FILE *fd, char *eofchars, char *command);
void ttysetup(int _speed);
void unraw(void);
void user_uid(void);
void vinit(void);
void vlex(char *s);
int biz31f_dialer __P((char *, char *));
void biz31f_disconnect __P((void));
void biz31f_abort __P((void));
int ven_dialer __P((char *, char *));
void ven_disconnect __P((void));
void ven_abort __P((void));
int hay_dialer __P((char *, char *));
void hay_disconnect __P((void));
void hay_abort __P((void));
int cour_dialer __P((char *, char *));
void cour_disconnect __P((void));
void cour_abort __P((void));
int t3000_dialer __P((char *, char *));
void t3000_disconnect __P((void));
void t3000_abort __P((void));
int v831_dialer __P((char *, char *));
void v831_disconnect __P((void));
void v831_abort __P((void));
int biz31f_dialer(char *, char *);
void biz31f_disconnect(void);
void biz31f_abort(void);
int ven_dialer(char *, char *);
void ven_disconnect(void);
void ven_abort(void);
int hay_dialer(char *, char *);
void hay_disconnect(void);
void hay_abort(void);
int cour_dialer(char *, char *);
void cour_disconnect(void);
void cour_abort(void);
int t3000_dialer(char *, char *);
void t3000_disconnect(void);
void t3000_abort(void);
int v831_dialer(char *, char *);
void v831_disconnect(void);
void v831_abort(void);

View File

@ -57,18 +57,18 @@
#include "screen.h"
#include "utils.h"
static void getsysctl __P((char *, void *, size_t));
static void getsysctl(char *, void *, size_t);
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
extern char* printable __P((char *));
int swapmode __P((int *retavail, int *retfree));
extern char* printable(char *);
int swapmode(int *retavail, int *retfree);
static int smpmode;
static int namelength;
static int cmdlengthdelta;
/* Prototypes for top internals */
void quit __P((int));
void quit(int);
/* get_process_info passes back a handle. This is what it looks like: */

View File

@ -58,12 +58,12 @@ static const char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93";
#include <time.h>
#include <unistd.h>
int main __P((int, char *[]));
int rw __P((char *, struct stat *, int));
void stime_arg1 __P((char *, struct timeval *));
void stime_arg2 __P((char *, int, struct timeval *));
void stime_file __P((char *, struct timeval *));
void usage __P((void));
int main(int, char *[]);
int rw(char *, struct stat *, int);
void stime_arg1(char *, struct timeval *);
void stime_arg2(char *, int, struct timeval *);
void stime_file(char *, struct timeval *);
void usage(void);
int
main(argc, argv)

View File

@ -57,9 +57,9 @@ static const char sccsid[] = "@(#)tput.c 8.2 (Berkeley) 3/19/94";
#undef putchar
#define outc putchar
static void prlongname __P((char *));
static void usage __P((void));
static char **process __P((const char *, char *, char **));
static void prlongname(char *);
static void usage(void);
static char **process(const char *, char *, char **);
int
main(argc, argv)

View File

@ -31,6 +31,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.1 (Berkeley) 6/6/93
* $FreeBSD$
*/
typedef struct {
@ -47,4 +48,4 @@ typedef struct {
#define NCHARS (UCHAR_MAX + 1) /* Number of possible characters. */
#define OOBCH (UCHAR_MAX + 1) /* Out of band character value. */
int next __P((STR *));
int next(STR *);

View File

@ -51,13 +51,13 @@ static const char sccsid[] = "@(#)str.c 8.2 (Berkeley) 4/28/95";
#include "extern.h"
static int backslash __P((STR *));
static int bracket __P((STR *));
static int c_class __P((const void *, const void *));
static void genclass __P((STR *));
static void genequiv __P((STR *));
static int genrange __P((STR *));
static void genseq __P((STR *));
static int backslash(STR *);
static int bracket(STR *);
static int c_class(const void *, const void *);
static void genclass(STR *);
static void genequiv(STR *);
static int genrange(STR *);
static void genseq(STR *);
int
next(s)
@ -152,7 +152,7 @@ bracket(s)
typedef struct {
const char *name;
int (*func) __P((int));
int (*func)(int);
int *set;
} CLASS;
@ -187,7 +187,7 @@ static void
genclass(s)
STR *s;
{
int cnt, (*func) __P((int));
int cnt, (*func)(int);
CLASS *cp, tmp;
int *p;

View File

@ -94,8 +94,8 @@ static int string1[NCHARS] = {
STR s1 = { STRING1, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL };
STR s2 = { STRING2, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL };
static void setup __P((int *, char *, STR *, int));
static void usage __P((void));
static void setup(int *, char *, STR *, int);
static void usage(void);
int
main(argc, argv)

View File

@ -40,8 +40,8 @@ static const char rcsid[] =
#include <stdlib.h>
#include <unistd.h>
static off_t parselength __P((char *, off_t *));
static void usage __P((void));
static off_t parselength(char *, off_t *);
static void usage(void);
static int no_create;
static int do_relative;

View File

@ -40,13 +40,13 @@ extern struct termios mode, oldmode;
extern int Columns, isreset, Lines;
extern int erasech, intrchar, killch;
void add_mapping __P((const char *, char *));
void cat __P((char *));
const char *get_termcap_entry __P((char *, char **));
const char *mapped __P((const char *));
int outc __P((int));
void reset_mode __P((void));
void set_control_chars __P((void));
void set_conversions __P((int));
void set_init __P((void));
void wrtermcap __P((char *));
void add_mapping(const char *, char *);
void cat(char *);
const char *get_termcap_entry(char *, char **);
const char *mapped(const char *);
int outc(int);
void reset_mode(void);
void set_control_chars(void);
void set_conversions(int);
void set_init(void);
void wrtermcap(char *);

View File

@ -49,7 +49,7 @@ static const char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/9/93";
#include "extern.h"
extern speed_t Ospeed;
speed_t tset_baudrate __P((char *));
speed_t tset_baudrate(char *);
/* Baud rate conditionals for mapping. */
#define GT 0x01

View File

@ -47,7 +47,7 @@ static const char sccsid[] = "@(#)set.c 8.2 (Berkeley) 2/28/94";
#define CHK(val, dft) (val <= 0 ? dft : val)
int set_tabs __P((void));
int set_tabs(void);
/*
* Reset the terminal mode bits to a sensible state. Very useful after

View File

@ -51,8 +51,8 @@ static const char sccsid[] = "@(#)term.c 8.1 (Berkeley) 6/9/93";
char tbuf[1024]; /* Termcap entry. */
const char *askuser __P((const char *));
char *ttys __P((char *));
const char *askuser(const char *);
char *ttys(char *);
/*
* Figure out what kind of terminal we're dealing with, and then read in

View File

@ -58,9 +58,9 @@ static const char sccsid[] = "@(#)tset.c 8.1 (Berkeley) 6/9/93";
#include "extern.h"
void obsolete __P((char *[]));
void report __P((const char *, int, u_int));
void usage __P((void));
void obsolete(char *[]);
void report(const char *, int, u_int);
void usage(void);
struct termios mode, oldmode;

View File

@ -103,14 +103,14 @@ DB *db;
NODE *graph, **cycle_buf, **longest_cycle;
int debug, longest, quiet;
void add_arc __P((char *, char *));
int find_cycle __P((NODE *, NODE *, int, int));
NODE *get_node __P((char *));
void *grow_buf __P((void *, int));
void remove_node __P((NODE *));
void clear_cycle __P((void));
void tsort __P((void));
void usage __P((void));
void add_arc(char *, char *);
int find_cycle(NODE *, NODE *, int, int);
NODE *get_node(char *);
void *grow_buf(void *, int);
void remove_node(NODE *);
void clear_cycle(void);
void tsort(void);
void usage(void);
int
main(argc, argv)

View File

@ -49,7 +49,7 @@ static const char rcsid[] =
#include <stdlib.h>
#include <unistd.h>
static void usage __P((void));
static void usage(void);
int
main(argc, argv)

View File

@ -85,18 +85,18 @@ int halfpos;
int upln;
int iflag;
static void usage __P((void));
void setnewmode __P((int));
void initcap __P((void));
void reverse __P((void));
int outchar __P((int));
void fwd __P((void));
void initbuf __P((void));
void iattr __P((void));
void overstrike __P((void));
void flushln __P((void));
void filter __P((FILE *));
void outc __P((int));
static void usage(void);
void setnewmode(int);
void initcap(void);
void reverse(void);
int outchar(int);
void fwd(void);
void initbuf(void);
void iattr(void);
void overstrike(void);
void flushln(void);
void filter(FILE *);
void outc(int);
#define PRINT(s) if (s == NULL) /* void */; else tputs(s, 1, outchar)

View File

@ -53,7 +53,7 @@ static const char sccsid[] = "@(#)uname.c 8.2 (Berkeley) 5/4/95";
#include <stdlib.h>
#include <unistd.h>
void usage __P((void));
void usage(void);
int
main(argc, argv)

View File

@ -57,8 +57,8 @@ char genbuf[BUFSIZ];
char linebuf[BUFSIZ];
int all;
static void usage __P((void));
void tabify __P((char));
static void usage(void);
void tabify(char);
int
main(argc, argv)

View File

@ -101,16 +101,16 @@ char incomment BSS; /* inside C comment */
char inquote BSS; /* inside single or double quotes */
int exitstat BSS;
char *skipcomment __P((char *));
char *skipquote __P((char *, int));
static void usage __P((void));
void flushline __P((Bool));
int getlin __P((char *, int, FILE *, int));
int error __P((int, int, int));
void pfile __P((void));
int doif __P((int, int, Reject_level, int));
int findsym __P((char *));
Linetype checkline __P((int *));
char *skipcomment(char *);
char *skipquote(char *, int);
static void usage(void);
void flushline(Bool);
int getlin(char *, int, FILE *, int);
int error(int, int, int);
void pfile(void);
int doif(int, int, Reject_level, int);
int findsym(char *);
Linetype checkline(int *);
int
main (argc, argv)

View File

@ -62,12 +62,12 @@ static const char rcsid[] =
int cflag, dflag, uflag;
int numchars, numfields, repeats;
FILE *file __P((const char *, const char *));
void show __P((FILE *, char *));
char *skip __P((char *));
void obsolete __P((char *[]));
static void usage __P((void));
int stricoll __P((char *, char*));
FILE *file(const char *, const char *);
void show(FILE *, char *);
char *skip(char *);
void obsolete(char *[]);
static void usage(void);
int stricoll(char *, char*);
int
main (argc, argv)

View File

@ -51,8 +51,8 @@ static const char rcsid[] =
#include <unistd.h>
#include <vis.h>
void process __P((FILE *, const char *));
static void usage __P((void));
void process(FILE *, const char *);
static void usage(void);
int
main(argc, argv)

View File

@ -55,8 +55,8 @@ static const char rcsid[] =
typedef char namebuf[UT_NAMESIZE];
int scmp __P((const void *, const void *));
static void usage __P((void));
int scmp(const void *, const void *);
static void usage(void);
int
main(argc, argv)

View File

@ -69,10 +69,10 @@ const char *filename;
char *outfile;
int cflag, iflag, oflag, pflag, sflag;
static void usage __P((void));
int decode __P((void));
int decode2 __P((int));
void base64_decode __P((const char *));
static void usage(void);
int decode(void);
int decode2(int);
void base64_decode(const char *);
int
main(argc, argv)

View File

@ -63,9 +63,9 @@ static const char rcsid[] =
#include <string.h>
#include <unistd.h>
void encode __P((void));
void base64_encode __P((void));
static void usage __P((void));
void encode(void);
void base64_encode(void);
static void usage(void);
FILE *output;
int mode;

View File

@ -59,8 +59,8 @@ extern const char *language; /* the language indicator */
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int STRNCMP __P((char *, char *, int));
extern char *convexp __P((char *));
extern char *expmatch __P((char *, char *, char *));
extern int STRNCMP(char *, char *, int);
extern char *convexp(char *);
extern char *expmatch(char *, char *, char *);
__END_DECLS

View File

@ -56,7 +56,7 @@ static const char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93";
#define TRUE !(FALSE)
#define NIL 0
static void expconv __P((void));
static void expconv(void);
boolean _escaped; /* true if we are currently _escaped */
char *s_start; /* start of string */

View File

@ -73,13 +73,13 @@ static const char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
#define PNAMELEN 40 /* length of a function/procedure name */
#define PSMAX 20 /* size of procedure name stacking */
static int iskw __P((char *));
static boolean isproc __P((char *));
static void putKcp __P((char *, char *, boolean));
static void putScp __P((char *));
static void putcp __P((int));
static int tabs __P((char *, char *));
static int width __P((char *, char *));
static int iskw(char *);
static boolean isproc(char *);
static void putKcp(char *, char *, boolean);
static void putScp(char *);
static void putcp(int);
static int tabs(char *, char *);
static int width(char *, char *);
/*
* The state variables

View File

@ -1,5 +1,7 @@
/* @(#)port.h.in 8.13 (Berkeley) 6/12/96 */
/* $FreeBSD$ */
/*
* Declare the basic types, if they aren't already declared. Named and
* some system's db.h files protect them with __BIT_TYPES_DEFINED__.
@ -13,23 +15,6 @@
#endif
/*
* XXX
* Handle function prototypes. This steps on name space that vi doesn't
* control, but all of the other solutions are worse.
*/
#undef __P
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos /* ANSI C prototypes */
#else
#define __P(protos) () /* K&R C preprocessor */
#endif
/*
* XXX
* Some versions of System V changed the number of arguments to gettimeofday

View File

@ -33,4 +33,4 @@
* $FreeBSD$
*/
extern int foldit __P((char *, int, int));
extern int foldit(char *, int, int);

View File

@ -56,8 +56,8 @@ static const char sccsid[] = "@(#)vis.c 8.1 (Berkeley) 6/6/93";
int eflags, fold, foldwidth=80, none, markeol, debug;
void process __P((FILE *));
static void usage __P((void));
void process(FILE *);
static void usage(void);
int
main(argc, argv)

View File

@ -145,22 +145,22 @@ kvm_t *kd;
#define VMSTAT 0x20
#define ZMEMSTAT 0x40
static void cpustats __P((void));
static void devstats __P((void));
static void domem __P((void));
static void dointr __P((void));
static void dosum __P((void));
static void dovmstat __P((u_int, int));
static void dozmem __P((void));
static void kread __P((int, void *, size_t));
static void needhdr __P((int));
static void printhdr __P((void));
static void usage __P((void));
static void cpustats(void);
static void devstats(void);
static void domem(void);
static void dointr(void);
static void dosum(void);
static void dovmstat(u_int, int);
static void dozmem(void);
static void kread(int, void *, size_t);
static void needhdr(int);
static void printhdr(void);
static void usage(void);
static long pct __P((long, long));
static long getuptime __P((void));
static long pct(long, long);
static long getuptime(void);
char **getdrivedata __P((char **));
char **getdrivedata(char **);
int
main(argc, argv)

View File

@ -38,6 +38,6 @@
extern int use_ampm;
struct kinfo_proc;
void pr_attime __P((time_t *, time_t *));
int pr_idle __P((time_t));
int proc_compare __P((struct kinfo_proc *, struct kinfo_proc *));
void pr_attime(time_t *, time_t *);
int pr_idle(time_t);
int proc_compare(struct kinfo_proc *, struct kinfo_proc *);

View File

@ -121,12 +121,12 @@ struct entry {
/* W_DISPHOSTSIZE should not be greater than UT_HOSTSIZE */
#define W_DISPHOSTSIZE 16
static void pr_header __P((time_t *, int));
static struct stat *ttystat __P((char *, int));
static void usage __P((int));
static int this_is_uptime __P((const char *s));
static void pr_header(time_t *, int);
static struct stat *ttystat(char *, int);
static void usage(int);
static int this_is_uptime(const char *s);
char *fmt_argv __P((char **, char *, int)); /* ../../bin/ps/fmt.c */
char *fmt_argv(char **, char *, int); /* ../../bin/ps/fmt.c */
int
main(argc, argv)

View File

@ -62,8 +62,8 @@ __FBSDID("$FreeBSD$");
uintmax_t tlinect, twordct, tcharct;
int doline, doword, dochar;
static int cnt __P((const char *));
static void usage __P((void));
static int cnt(const char *);
static void usage(void);
int
main(argc, argv)

View File

@ -53,8 +53,8 @@ static const char sccsid[] = "@(#)what.c 8.1 (Berkeley) 6/6/93";
static int sflag;
static int found;
void search __P((void));
static void usage __P((void));
void search(void);
static void usage(void);
/*
* what

View File

@ -62,9 +62,9 @@ static const char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93";
#include <unistd.h>
#include <utmp.h>
static void usage __P((void));
static void output __P((struct utmp *));
static FILE *file __P((const char *));
static void usage(void);
static void output(struct utmp *);
static FILE *file(const char *);
int
main(argc, argv)

View File

@ -65,13 +65,13 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <utmp.h>
void done __P((int));
void do_write __P((char *, char *, uid_t));
static void usage __P((void));
int term_chk __P((char *, int *, time_t *, int));
void wr_fputs __P((unsigned char *s));
void search_utmp __P((char *, char *, char *, uid_t));
int utmp_chk __P((char *, char *));
void done(int);
void do_write(char *, char *, uid_t);
static void usage(void);
int term_chk(char *, int *, time_t *, int);
void wr_fputs(unsigned char *s);
void search_utmp(char *, char *, char *, uid_t);
int utmp_chk(char *, char *);
int
main(argc, argv)

View File

@ -89,16 +89,16 @@ int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose;
mode_t mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
const char *suffix = BACKUP_SUFFIX;
void copy __P((int, const char *, int, const char *, off_t));
int compare __P((int, const char *, size_t, int, const char *, size_t));
int create_newfile __P((const char *, int, struct stat *));
int create_tempfile __P((const char *, char *, size_t));
void install __P((const char *, const char *, u_long, u_int));
void install_dir __P((char *));
u_long numeric_id __P((const char *, const char *));
void strip __P((const char *));
int trymmap __P((int));
void usage __P((void));
void copy(int, const char *, int, const char *, off_t);
int compare(int, const char *, size_t, int, const char *, size_t);
int create_newfile(const char *, int, struct stat *);
int create_tempfile(const char *, char *, size_t);
void install(const char *, const char *, u_long, u_int);
void install_dir(char *);
u_long numeric_id(const char *, const char *);
void strip(const char *);
int trymmap(int);
void usage(void);
int
main(argc, argv)

View File

@ -29,6 +29,8 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef lint
@ -49,7 +51,7 @@ static FILE *lout;
/* output buffer data */
ob_t ob;
static void outxbuf __P((void));
static void outxbuf(void);
/*

View File

@ -76,25 +76,25 @@ int cflg;
int vflg;
int readstd;
char lastchr __P((char *));
char lastchr(char *);
int fgetNUL __P((char *, int, FILE *));
int istail __P((char *, char *));
int octdigit __P((char));
int xgetc __P((FILE *));
int fgetNUL(char *, int, FILE *);
int istail(char *, char *);
int octdigit(char);
int xgetc(FILE *);
off_t hashit __P((char *, int));
off_t yankstr __P((char **));
off_t hashit(char *, int);
off_t yankstr(char **);
static void usage __P((void));
static void usage(void);
void flushsh __P((void));
void found __P((int, off_t, char *));
void inithash __P((void));
void onintr __P((int));
void process __P((const char *));
void prstr __P((char *));
void xsdotc __P((void));
void flushsh(void);
void found(int, off_t, char *);
void inithash(void);
void onintr(int);
void process(const char *);
void prstr(char *);
void xsdotc(void);
int
main(argc, argv)

View File

@ -52,11 +52,11 @@ short *itemset;
short *itemsetend;
unsigned *ruleset;
static void set_EFF __P((void));
static void set_EFF(void);
#ifdef DEBUG
static void print_closure __P((int));
static void print_EFF __P(());
static void print_first_derives __P(());
static void print_closure(int);
static void print_EFF();
static void print_first_derives();
#endif
static unsigned *first_derives;

View File

@ -37,7 +37,6 @@
* $FreeBSD$
*/
#include <sys/cdefs.h> /* for __P macro */
#include <assert.h>
#include <ctype.h>
#include <err.h>
@ -312,53 +311,53 @@ extern short final_state;
/* global functions */
char *allocate __P((unsigned));
void closure __P((short *, int));
void create_symbol_table __P((void));
void default_action_warning __P((void));
void dollar_error __P((int, char *, char *));
void dollar_warning __P((int, int));
void done __P((int));
void fatal __P((const char *msg));
void finalize_closure __P((void));
void free_parser __P((void));
void free_symbols __P((void));
void free_symbol_table __P((void));
void illegal_character __P((char *));
void illegal_tag __P((int, char *, char *));
void lalr __P((void));
bucket *lookup __P((char *));
void lr0 __P((void));
bucket *make_bucket __P((const char *));
void make_parser __P((void));
void no_grammar __P((void));
void no_space __P((void));
void open_error __P((const char *));
void output __P((void));
void over_unionized __P((char *));
void prec_redeclared __P((void));
void reader __P((void));
void reflexive_transitive_closure __P((unsigned *, int));
void reprec_warning __P((char *));
void restarted_warning __P((void));
void retyped_warning __P((char *));
void revalued_warning __P((char *));
void set_first_derives __P((void));
void syntax_error __P((int, char *, char *));
void terminal_lhs __P((int));
void terminal_start __P((char *));
void tokenized_start __P((char *));
void undefined_goal __P((char *));
void undefined_symbol_warning __P((char *));
void unexpected_EOF __P((void));
void unknown_rhs __P((int));
void unterminated_action __P((int, char *, char *));
void unterminated_comment __P((int, char *, char *));
void unterminated_string __P((int, char *, char *));
void unterminated_text __P((int, char *, char *));
void unterminated_union __P((int, char *, char *));
void untyped_lhs __P((void));
void untyped_rhs __P((int, char *));
void used_reserved __P((char *));
void verbose __P((void));
void write_section __P((const char **));
char *allocate(unsigned);
void closure(short *, int);
void create_symbol_table(void);
void default_action_warning(void);
void dollar_error(int, char *, char *);
void dollar_warning(int, int);
void done(int);
void fatal(const char *msg);
void finalize_closure(void);
void free_parser(void);
void free_symbols(void);
void free_symbol_table(void);
void illegal_character(char *);
void illegal_tag(int, char *, char *);
void lalr(void);
bucket *lookup(char *);
void lr0(void);
bucket *make_bucket(const char *);
void make_parser(void);
void no_grammar(void);
void no_space(void);
void open_error(const char *);
void output(void);
void over_unionized(char *);
void prec_redeclared(void);
void reader(void);
void reflexive_transitive_closure(unsigned *, int);
void reprec_warning(char *);
void restarted_warning(void);
void retyped_warning(char *);
void revalued_warning(char *);
void set_first_derives(void);
void syntax_error(int, char *, char *);
void terminal_lhs(int);
void terminal_start(char *);
void tokenized_start(char *);
void undefined_goal(char *);
void undefined_symbol_warning(char *);
void unexpected_EOF(void);
void unknown_rhs(int);
void unterminated_action(int, char *, char *);
void unterminated_comment(int, char *, char *);
void unterminated_string(int, char *, char *);
void unterminated_text(int, char *, char *);
void unterminated_union(int, char *, char *);
void untyped_lhs(void);
void untyped_rhs(int, char *);
void used_reserved(char *);
void verbose(void);
void write_section(const char **);

View File

@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include "defs.h"
static void print_pos __P((char *, char *));
static void print_pos(char *, char *);
void
fatal(msg)

View File

@ -68,22 +68,22 @@ short *goto_map;
short *from_state;
short *to_state;
static void add_lookback_edge __P((int, int, int));
static void build_relations __P((void));
static void compute_FOLLOWS __P((void));
static void compute_lookaheads __P((void));
static void digraph __P((short **));
static void initialize_F __P((void));
static void initialize_LA __P((void));
static int map_goto __P((int, int));
static void set_accessing_symbol __P((void));
static void set_goto_map __P((void));
static void set_maxrhs __P((void));
static void set_reduction_table __P((void));
static void set_shift_table __P((void));
static void set_state_table __P((void));
static short **transpose __P((short **, int));
static void traverse __P((int));
static void add_lookback_edge(int, int, int);
static void build_relations(void);
static void compute_FOLLOWS(void);
static void compute_lookaheads(void);
static void digraph(short **);
static void initialize_F(void);
static void initialize_LA(void);
static int map_goto(int, int);
static void set_accessing_symbol(void);
static void set_goto_map(void);
static void set_maxrhs(void);
static void set_reduction_table(void);
static void set_shift_table(void);
static void set_state_table(void);
static short **transpose(short **, int);
static void traverse(int);
static int infinity;
static int maxrhs;

View File

@ -57,22 +57,22 @@ core *first_state;
shifts *first_shift;
reductions *first_reduction;
static void allocate_itemsets __P((void));
static void allocate_storage __P((void));
static void append_states __P((void));
static void free_storage __P((void));
static void generate_states __P((void));
static int get_state __P((int));
static void initialize_states __P((void));
static void new_itemsets __P((void));
static core *new_state __P((int));
static void allocate_itemsets(void);
static void allocate_storage(void);
static void append_states(void);
static void free_storage(void);
static void generate_states(void);
static int get_state(int);
static void initialize_states(void);
static void new_itemsets(void);
static core *new_state(int);
#ifdef DEBUG
static void print_derives __P((void));
static void print_derives(void);
#endif
static void save_reductions __P((void));
static void save_shifts __P((void));
static void set_derives __P((void));
static void set_nullable __P((void));
static void save_reductions(void);
static void save_shifts(void);
static void set_derives(void);
static void set_nullable(void);
static core **state_set;
static core *this_state;

View File

@ -106,12 +106,12 @@ char *rassoc;
short **derives;
char *nullable;
static void create_file_names __P((void));
static void getargs __P((int, char **));
static void onintr __P((int));
static void open_files __P((void));
static void set_signals __P((void));
static void usage __P((void));
static void create_file_names(void);
static void getargs(int, char **);
static void onintr(int);
static void open_files(void);
static void set_signals(void);
static void usage(void);
void

View File

@ -62,17 +62,17 @@ short final_state;
static int SRcount;
static int RRcount;
static action *add_reduce __P((action *, int, int));
static action *add_reductions __P((int, action *));
static void defreds __P((void));
static void find_final_state __P((void));
static void free_action_row __P((action *));
static action *get_shifts __P((int));
static action *parse_actions __P((int));
static void remove_conflicts __P((void));
static int sole_reduction __P((int));
static void total_conflicts __P((void));
static void unused_rules __P((void));
static action *add_reduce(action *, int, int);
static action *add_reductions(int, action *);
static void defreds(void);
static void find_final_state(void);
static void free_action_row(action *);
static action *get_shifts(int);
static action *parse_actions(int);
static void remove_conflicts(void);
static int sole_reduction(int);
static void total_conflicts(void);
static void unused_rules(void);
void

View File

@ -49,32 +49,32 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include "defs.h"
static int default_goto __P((int));
static void free_itemsets __P((void));
static void free_reductions __P((void));
static void free_shifts __P((void));
static void goto_actions __P((void));
static int is_C_identifier __P((char *));
static int matching_vector __P((int));
static void output_actions __P((void));
static void output_base __P((void));
static void output_check __P((void));
static void output_debug __P((void));
static void output_defines __P((void));
static void output_prefix __P((void));
static void output_rule_data __P((void));
static void output_semantic_actions __P((void));
static void output_stored_text __P((void));
static void output_stype __P((void));
static void output_table __P((void));
static void output_trailing_text __P((void));
static void output_yydefred __P((void));
static void pack_table __P((void));
static int pack_vector __P((int));
static void save_column __P((int, int));
static void sort_actions __P((void));
static void token_actions __P((void));
static int increase_maxtable __P((int));
static int default_goto(int);
static void free_itemsets(void);
static void free_reductions(void);
static void free_shifts(void);
static void goto_actions(void);
static int is_C_identifier(char *);
static int matching_vector(int);
static void output_actions(void);
static void output_base(void);
static void output_check(void);
static void output_debug(void);
static void output_defines(void);
static void output_prefix(void);
static void output_rule_data(void);
static void output_semantic_actions(void);
static void output_stored_text(void);
static void output_stype(void);
static void output_table(void);
static void output_trailing_text(void);
static void output_yydefred(void);
static void pack_table(void);
static int pack_vector(int);
static void save_column(int, int);
static void sort_actions(void);
static void token_actions(void);
static int increase_maxtable(int);
static const char line_format[] = "#line %d \"%s\"\n";
static int nvectors;

View File

@ -82,43 +82,43 @@ char *name_pool;
static const char line_format[] = "#line %d \"%s\"\n";
static void add_symbol __P((void));
static void advance_to_start __P((void));
static void cachec __P((int));
static void check_symbols __P((void));
static void copy_action __P((void));
static void copy_ident __P((void));
static void copy_text __P((void));
static void copy_union __P((void));
static void declare_expect __P((int));
static void declare_start __P((void));
static void declare_tokens __P((int));
static void declare_types __P((void));
static char *dup_line __P((void));
static void end_rule __P((void));
static void expand_items __P((void));
static void expand_rules __P((void));
static void free_tags __P((void));
static void get_line __P((void));
static bucket *get_literal __P((void));
static bucket *get_name __P((void));
static int get_number __P((void));
static char *get_tag __P((void));
static int hexval __P((int));
static void initialize_grammar __P((void));
static void insert_empty_rule __P((void));
static int is_reserved __P((char *));
static int keyword __P((void));
static int mark_symbol __P((void));
static int nextc __P((void));
static void pack_grammar __P((void));
static void pack_names __P((void));
static void pack_symbols __P((void));
static void print_grammar __P((void));
static void read_declarations __P((void));
static void read_grammar __P((void));
static void skip_comment __P((void));
static void start_rule __P((bucket *, int));
static void add_symbol(void);
static void advance_to_start(void);
static void cachec(int);
static void check_symbols(void);
static void copy_action(void);
static void copy_ident(void);
static void copy_text(void);
static void copy_union(void);
static void declare_expect(int);
static void declare_start(void);
static void declare_tokens(int);
static void declare_types(void);
static char *dup_line(void);
static void end_rule(void);
static void expand_items(void);
static void expand_rules(void);
static void free_tags(void);
static void get_line(void);
static bucket *get_literal(void);
static bucket *get_name(void);
static int get_number(void);
static char *get_tag(void);
static int hexval(int);
static void initialize_grammar(void);
static void insert_empty_rule(void);
static int is_reserved(char *);
static int keyword(void);
static int mark_symbol(void);
static int nextc(void);
static void pack_grammar(void);
static void pack_names(void);
static void pack_symbols(void);
static void print_grammar(void);
static void read_declarations(void);
static void read_grammar(void);
static void skip_comment(void);
static void start_rule(bucket *, int);
static void
cachec(c)

View File

@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
#define TABLE_SIZE 1024
static int hash __P((const char *));
static int hash(const char *);
bucket **symbol_table;
bucket *first_symbol;

View File

@ -48,16 +48,16 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include "defs.h"
static void log_unused __P((void));
static void log_conflicts __P((void));
static void print_actions __P((int));
static void print_conflicts __P((int));
static void print_core __P((int));
static void print_gotos __P((int));
static void print_nulls __P((int));
static void print_reductions __P((action *, register int));
static void print_shifts __P((action *));
static void print_state __P((int));
static void log_unused(void);
static void log_conflicts(void);
static void print_actions(int);
static void print_conflicts(int);
static void print_core(int);
static void print_gotos(int);
static void print_nulls(int);
static void print_reductions(action *, register int);
static void print_shifts(action *);
static void print_state(int);
static short *null_rules;

View File

@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include "defs.h"
static void transitive_closure __P((unsigned *, int));
static void transitive_closure(unsigned *, int);
static void
transitive_closure(R, n)