From 1fbcea4a9056395c404a792ff80bd8dcc0f6039b Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 10 Oct 2015 07:35:16 +0000 Subject: [PATCH] Move more declarations out of proto.h into better headers, from Michael McConville. No binary change. --- bin/ksh/lex.h | 9 ++++++++- bin/ksh/proto.h | 18 +----------------- bin/ksh/table.h | 11 ++++++++++- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bin/ksh/lex.h b/bin/ksh/lex.h index 024e1d99d57..0b006d0d433 100644 --- a/bin/ksh/lex.h +++ b/bin/ksh/lex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.h,v 1.15 2015/10/09 19:49:08 millert Exp $ */ +/* $OpenBSD: lex.h,v 1.16 2015/10/10 07:35:16 nicm Exp $ */ /* * Source input, lexer and parser @@ -113,3 +113,10 @@ extern char **histptr; /* last history item */ extern int histsize; /* history size */ #endif /* HISTORY */ + +int yylex(int); +void yyerror(const char *, ...) + __attribute__((__noreturn__, __format__ (printf, 1, 2))); +Source * pushs(int, Area *); +void set_prompt(int, Source *); +void pprompt(const char *, int); diff --git a/bin/ksh/proto.h b/bin/ksh/proto.h index a00f33f12d8..db865773a3d 100644 --- a/bin/ksh/proto.h +++ b/bin/ksh/proto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.h,v 1.37 2015/10/06 21:19:06 nicm Exp $ */ +/* $OpenBSD: proto.h,v 1.38 2015/10/10 07:35:16 nicm Exp $ */ /* * prototypes for PD-KSH @@ -146,13 +146,6 @@ int j_njobs(void); void j_notify(void); pid_t j_async(void); int j_stopped_running(void); -/* lex.c */ -int yylex(int); -void yyerror(const char *, ...) - __attribute__((__noreturn__, __format__ (printf, 1, 2))); -Source * pushs(int, Area *); -void set_prompt(int, Source *); -void pprompt(const char *, int); /* mail.c */ void mcheck(void); void mcset(long); @@ -205,15 +198,6 @@ void set_current_wd(char *); /* syn.c */ void initkeywords(void); struct op * compile(Source *); -/* table.c */ -unsigned int hash(const char *); -void ktinit(struct table *, Area *, int); -struct tbl * ktsearch(struct table *, const char *, unsigned int); -struct tbl * ktenter(struct table *, const char *, unsigned int); -void ktdelete(struct tbl *); -void ktwalk(struct tstate *, struct table *); -struct tbl * ktnext(struct tstate *); -struct tbl ** ktsort(struct table *); /* trace.c */ /* trap.c */ void inittraps(void); diff --git a/bin/ksh/table.h b/bin/ksh/table.h index 5336775c9d9..71cc3d17526 100644 --- a/bin/ksh/table.h +++ b/bin/ksh/table.h @@ -1,4 +1,4 @@ -/* $OpenBSD: table.h,v 1.10 2015/10/05 23:26:58 nicm Exp $ */ +/* $OpenBSD: table.h,v 1.11 2015/10/10 07:35:16 nicm Exp $ */ /* $From: table.h,v 1.3 1994/05/31 13:34:34 michael Exp $ */ @@ -180,3 +180,12 @@ extern char *tmpdir; /* TMPDIR value */ extern const char *prompt; extern int cur_prompt; /* PS1 or PS2 */ extern int current_lineno; /* LINENO value */ + +unsigned int hash(const char *); +void ktinit(struct table *, Area *, int); +struct tbl * ktsearch(struct table *, const char *, unsigned int); +struct tbl * ktenter(struct table *, const char *, unsigned int); +void ktdelete(struct tbl *); +void ktwalk(struct tstate *, struct table *); +struct tbl * ktnext(struct tstate *); +struct tbl ** ktsort(struct table *); -- 2.20.1