diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-16 21:28:12 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-16 21:28:12 +0000 |
commit | 6d57a1a176004a7d8fc009cdcf760098f86e3263 (patch) | |
tree | ee423c619fad03813234b9362694a17f3a638f0b /usr.bin/yacc | |
parent | c707cb295fc3cac8d8feb343e949e0dcf71b8476 (diff) |
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r-- | usr.bin/yacc/defs.h | 102 | ||||
-rw-r--r-- | usr.bin/yacc/lalr.c | 34 | ||||
-rw-r--r-- | usr.bin/yacc/lr0.c | 46 | ||||
-rw-r--r-- | usr.bin/yacc/main.c | 16 | ||||
-rw-r--r-- | usr.bin/yacc/mkpar.c | 16 | ||||
-rw-r--r-- | usr.bin/yacc/output.c | 54 | ||||
-rw-r--r-- | usr.bin/yacc/reader.c | 76 | ||||
-rw-r--r-- | usr.bin/yacc/symtab.c | 6 | ||||
-rw-r--r-- | usr.bin/yacc/verbose.c | 24 | ||||
-rw-r--r-- | usr.bin/yacc/warshall.c | 6 |
10 files changed, 190 insertions, 190 deletions
diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h index 475e090c719..2c2813bb92d 100644 --- a/usr.bin/yacc/defs.h +++ b/usr.bin/yacc/defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: defs.h,v 1.8 2001/12/10 00:22:00 deraadt Exp $ */ +/* $OpenBSD: defs.h,v 1.9 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: defs.h,v 1.6 1996/03/19 03:21:30 jtc Exp $ */ /* @@ -316,60 +316,60 @@ extern short final_state; extern char *allocate(); extern bucket *lookup(); extern bucket *make_bucket(); -extern void set_first_derives __P((void)); -extern void closure __P((short *, int)); -extern void finalize_closure __P((void)); +extern void set_first_derives(void); +extern void closure(short *, int); +extern void finalize_closure(void); -extern void fatal __P((char *)); +extern void fatal(char *); -extern void reflexive_transitive_closure __P((unsigned *, int)); -extern void done __P((int)); +extern void reflexive_transitive_closure(unsigned *, int); +extern void done(int); -extern void no_space __P((void)); +extern void no_space(void); extern void open_error(char *); -extern void unexpected_EOF __P((void)); -extern void print_pos __P((char *, char *)); -extern void syntax_error __P((int, char *, char *)); -extern void unterminated_comment __P((int, char *, char *)); -extern void unterminated_string __P((int, char *, char *)); -extern void unterminated_text __P((int, char *, char *)); -extern void unterminated_union __P((int, char *, char *)); -extern void over_unionized __P((char *)); -extern void illegal_tag __P((int, char *, char *)); -extern void illegal_character __P((char *)); -extern void used_reserved __P((char *)); -extern void tokenized_start __P((char *)); -extern void retyped_warning __P((char *)); -extern void reprec_warning __P((char *)); -extern void revalued_warning __P((char *)); -extern void terminal_start __P((char *)); -extern void restarted_warning __P((void)); -extern void no_grammar __P((void)); -extern void terminal_lhs __P((int)); -extern void prec_redeclared __P((void)); -extern void unterminated_action __P((int, char *, char *)); -extern void dollar_warning __P((int, int)); -extern void dollar_error __P((int, char *, char *)); -extern void untyped_lhs __P((void)); -extern void untyped_rhs __P((int, char *)); -extern void unknown_rhs __P((int)); -extern void default_action_warning __P((void)); -extern void undefined_goal __P((char *)); -extern void undefined_symbol_warning __P((char *)); - -extern void lalr __P((void)); - -extern void reader __P((void)); -extern void lr0 __P((void)); -extern void make_parser __P((void)); -extern void verbose __P((void)); -extern void output __P((void)); -extern void free_parser __P((void)); -extern void write_section __P((char *[])); - -extern void create_symbol_table __P((void)); -extern void free_symbol_table __P((void)); -extern void free_symbols __P((void)); +extern void unexpected_EOF(void); +extern void print_pos(char *, char *); +extern void syntax_error(int, char *, char *); +extern void unterminated_comment(int, char *, char *); +extern void unterminated_string(int, char *, char *); +extern void unterminated_text(int, char *, char *); +extern void unterminated_union(int, char *, char *); +extern void over_unionized(char *); +extern void illegal_tag(int, char *, char *); +extern void illegal_character(char *); +extern void used_reserved(char *); +extern void tokenized_start(char *); +extern void retyped_warning(char *); +extern void reprec_warning(char *); +extern void revalued_warning(char *); +extern void terminal_start(char *); +extern void restarted_warning(void); +extern void no_grammar(void); +extern void terminal_lhs(int); +extern void prec_redeclared(void); +extern void unterminated_action(int, char *, char *); +extern void dollar_warning(int, int); +extern void dollar_error(int, char *, char *); +extern void untyped_lhs(void); +extern void untyped_rhs(int, char *); +extern void unknown_rhs(int); +extern void default_action_warning(void); +extern void undefined_goal(char *); +extern void undefined_symbol_warning(char *); + +extern void lalr(void); + +extern void reader(void); +extern void lr0(void); +extern void make_parser(void); +extern void verbose(void); +extern void output(void); +extern void free_parser(void); +extern void write_section(char *[]); + +extern void create_symbol_table(void); +extern void free_symbol_table(void); +extern void free_symbols(void); /* system variables */ diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c index 20a9e4071cd..9d09b78a896 100644 --- a/usr.bin/yacc/lalr.c +++ b/usr.bin/yacc/lalr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lalr.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: lalr.c,v 1.6 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)lalr.c 5.3 (Berkeley) 6/1/90"; #else -static char rcsid[] = "$OpenBSD: lalr.c,v 1.5 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: lalr.c,v 1.6 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -68,21 +68,21 @@ short *from_state; short *to_state; short **transpose(); -void set_state_table __P((void)); -void set_accessing_symbol __P((void)); -void set_shift_table __P((void)); -void set_reduction_table __P((void)); -void set_maxrhs __P((void)); -void initialize_LA __P((void)); -void set_goto_map __P((void)); -void initialize_F __P((void)); -void build_relations __P((void)); -void compute_FOLLOWS __P((void)); -void compute_lookaheads __P((void)); -int map_goto __P((int, int)); -void digraph __P((short **)); -void add_lookback_edge __P((int, int, int)); -void traverse __P((int)); +void set_state_table(void); +void set_accessing_symbol(void); +void set_shift_table(void); +void set_reduction_table(void); +void set_maxrhs(void); +void initialize_LA(void); +void set_goto_map(void); +void initialize_F(void); +void build_relations(void); +void compute_FOLLOWS(void); +void compute_lookaheads(void); +int map_goto(int, int); +void digraph(short **); +void add_lookback_edge(int, int, int); +void traverse(int); static int infinity; static int maxrhs; diff --git a/usr.bin/yacc/lr0.c b/usr.bin/yacc/lr0.c index 4fbdb6f46b9..b411d6630b7 100644 --- a/usr.bin/yacc/lr0.c +++ b/usr.bin/yacc/lr0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lr0.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: lr0.c,v 1.6 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: lr0.c,v 1.4 1996/03/19 03:21:35 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)lr0.c 5.3 (Berkeley) 1/20/91"; #else -static char rcsid[] = "$OpenBSD: lr0.c,v 1.5 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: lr0.c,v 1.6 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -56,27 +56,27 @@ core *first_state; shifts *first_shift; reductions *first_reduction; -int get_state __P((int)); -core *new_state __P((int)); - -void allocate_itemsets __P((void)); -void allocate_storage __P((void)); -void append_states __P((void)); -void free_storage __P((void)); -void generate_states __P((void)); -void initialize_states __P((void)); -void new_itemsets __P((void)); -void show_cores __P((void)); -void show_ritems __P((void)); -void show_rrhs __P((void)); -void show_shifts __P((void)); -void save_shifts __P((void)); -void save_reductions __P((void)); -void set_derives __P((void)); -void print_derives __P((void)); -void set_nullable __P((void)); -void free_derives __P((void)); -void free_nullable __P((void)); +int get_state(int); +core *new_state(int); + +void allocate_itemsets(void); +void allocate_storage(void); +void append_states(void); +void free_storage(void); +void generate_states(void); +void initialize_states(void); +void new_itemsets(void); +void show_cores(void); +void show_ritems(void); +void show_rrhs(void); +void show_shifts(void); +void save_shifts(void); +void save_reductions(void); +void set_derives(void); +void print_derives(void); +void set_nullable(void); +void free_derives(void); +void free_nullable(void); static core **state_set; static core *this_state; diff --git a/usr.bin/yacc/main.c b/usr.bin/yacc/main.c index a5341fa95a7..d081d828691 100644 --- a/usr.bin/yacc/main.c +++ b/usr.bin/yacc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.14 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: main.c,v 1.15 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: main.c,v 1.5 1996/03/19 03:21:38 jtc Exp $ */ /* @@ -47,7 +47,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 5.5 (Berkeley) 5/24/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.14 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.15 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -116,12 +116,12 @@ char *rassoc; short **derives; char *nullable; -void onintr __P((int)); -void set_signals __P((void)); -void usage __P((void)); -void getargs __P((int, char *[])); -void create_file_names __P((void)); -void open_files __P((void)); +void onintr(int); +void set_signals(void); +void usage(void); +void getargs(int, char *[]); +void create_file_names(void); +void open_files(void); volatile sig_atomic_t sigdie; diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c index 64422e5d797..688bc646110 100644 --- a/usr.bin/yacc/mkpar.c +++ b/usr.bin/yacc/mkpar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkpar.c,v 1.7 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: mkpar.c,v 1.8 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: mkpar.c,v 1.4 1996/03/19 03:21:39 jtc Exp $ */ @@ -67,14 +67,14 @@ extern action *get_shifts(); extern action *add_reductions(); extern action *add_reduce(); -int sole_reduction __P((int)); -void free_action_row __P((action *)); +int sole_reduction(int); +void free_action_row(action *); -void find_final_state __P((void)); -void unused_rules __P((void)); -void remove_conflicts __P((void)); -void total_conflicts __P((void)); -void defreds __P((void)); +void find_final_state(void); +void unused_rules(void); +void remove_conflicts(void); +void total_conflicts(void); +void defreds(void); void diff --git a/usr.bin/yacc/output.c b/usr.bin/yacc/output.c index f23db33a112..1b47b0f5baf 100644 --- a/usr.bin/yacc/output.c +++ b/usr.bin/yacc/output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output.c,v 1.7 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: output.c,v 1.8 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: output.c,v 1.4 1996/03/19 03:21:41 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)output.c 5.7 (Berkeley) 5/24/93"; #else -static char rcsid[] = "$OpenBSD: output.c,v 1.7 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: output.c,v 1.8 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -63,31 +63,31 @@ static short *check; static int lowzero; static int high; -void output_prefix __P((void)); -void output_rule_data __P((void)); -void output_yydefred __P((void)); -void output_actions __P((void)); -void token_actions __P((void)); -void goto_actions __P((void)); -int default_goto __P((int)); -void save_column __P((int, int)); -void sort_actions __P((void)); -void pack_table __P((void)); -int matching_vector __P((int)); -int pack_vector __P((int)); -void output_base __P((void)); -void output_table __P((void)); -void output_check __P((void)); -int is_C_identifier __P((char *)); -void output_defines __P((void)); -void output_stored_text __P((void)); -void output_debug __P((void)); -void output_stype __P((void)); -void output_trailing_text __P((void)); -void output_semantic_actions __P((void)); -void free_itemsets __P((void)); -void free_shifts __P((void)); -void free_reductions __P((void)); +void output_prefix(void); +void output_rule_data(void); +void output_yydefred(void); +void output_actions(void); +void token_actions(void); +void goto_actions(void); +int default_goto(int); +void save_column(int, int); +void sort_actions(void); +void pack_table(void); +int matching_vector(int); +int pack_vector(int); +void output_base(void); +void output_table(void); +void output_check(void); +int is_C_identifier(char *); +void output_defines(void); +void output_stored_text(void); +void output_debug(void); +void output_stype(void); +void output_trailing_text(void); +void output_semantic_actions(void); +void free_itemsets(void); +void free_shifts(void); +void free_reductions(void); void output() diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c index 67caf3ca5c9..a6f951f70bb 100644 --- a/usr.bin/yacc/reader.c +++ b/usr.bin/yacc/reader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reader.c,v 1.9 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: reader.c,v 1.10 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: reader.c,v 1.5 1996/03/19 03:21:43 jtc Exp $ */ @@ -79,43 +79,43 @@ bucket **plhs; int name_pool_size; char *name_pool; -void cachec __P((int)); -void get_line __P((void)); -char * dup_line __P((void)); -void skip_comment __P((void)); -int nextc __P((void)); -int keyword __P((void)); -void copy_ident __P((void)); -void copy_text __P((void)); -void copy_union __P((void)); -int hexval __P((int)); -bucket * get_literal __P((void)); -int is_reserved __P((char *)); -bucket * get_name __P((void)); -int get_number __P((void)); -char * get_tag __P((void)); -void declare_tokens __P((int)); -void declare_types __P((void)); -void declare_start __P((void)); -void handle_expect __P((void)); -void read_declarations __P((void)); -void initialize_grammar __P((void)); -void expand_items __P((void)); -void expand_rules __P((void)); -void advance_to_start __P((void)); -void start_rule __P((bucket *, int)); -void end_rule __P((void)); -void insert_empty_rule __P((void)); -void add_symbol __P((void)); -void copy_action __P((void)); -int mark_symbol __P((void)); -void read_grammar __P((void)); -void free_tags __P((void)); -void pack_names __P((void)); -void check_symbols __P((void)); -void pack_symbols __P((void)); -void pack_grammar __P((void)); -void print_grammar __P((void)); +void cachec(int); +void get_line(void); +char * dup_line(void); +void skip_comment(void); +int nextc(void); +int keyword(void); +void copy_ident(void); +void copy_text(void); +void copy_union(void); +int hexval(int); +bucket * get_literal(void); +int is_reserved(char *); +bucket * get_name(void); +int get_number(void); +char * get_tag(void); +void declare_tokens(int); +void declare_types(void); +void declare_start(void); +void handle_expect(void); +void read_declarations(void); +void initialize_grammar(void); +void expand_items(void); +void expand_rules(void); +void advance_to_start(void); +void start_rule(bucket *, int); +void end_rule(void); +void insert_empty_rule(void); +void add_symbol(void); +void copy_action(void); +int mark_symbol(void); +void read_grammar(void); +void free_tags(void); +void pack_names(void); +void check_symbols(void); +void pack_symbols(void); +void pack_grammar(void); +void print_grammar(void); char line_format[] = "#line %d \"%s\"\n"; diff --git a/usr.bin/yacc/symtab.c b/usr.bin/yacc/symtab.c index 55af445774a..9e500b81fe9 100644 --- a/usr.bin/yacc/symtab.c +++ b/usr.bin/yacc/symtab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: symtab.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: symtab.c,v 1.6 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: symtab.c,v 1.4 1996/03/19 03:21:48 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)symtab.c 5.3 (Berkeley) 6/1/90"; #else -static char rcsid[] = "$OpenBSD: symtab.c,v 1.5 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: symtab.c,v 1.6 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -57,7 +57,7 @@ bucket **symbol_table; bucket *first_symbol; bucket *last_symbol; -int hash __P((char *)); +int hash(char *); int diff --git a/usr.bin/yacc/verbose.c b/usr.bin/yacc/verbose.c index b839f841634..dc265c5e096 100644 --- a/usr.bin/yacc/verbose.c +++ b/usr.bin/yacc/verbose.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verbose.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: verbose.c,v 1.6 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: verbose.c,v 1.4 1996/03/19 03:21:50 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)verbose.c 5.3 (Berkeley) 1/20/91"; #else -static char rcsid[] = "$OpenBSD: verbose.c,v 1.5 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: verbose.c,v 1.6 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ @@ -49,16 +49,16 @@ static char rcsid[] = "$OpenBSD: verbose.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ static short *null_rules; -void log_unused __P((void)); -void log_conflicts __P((void)); -void print_state __P((int)); -void print_conflicts __P((int)); -void print_core __P((int)); -void print_nulls __P((int)); -void print_actions __P((int)); -void print_shifts __P((action *)); -void print_reductions __P((action *, int)); -void print_gotos __P((int)); +void log_unused(void); +void log_conflicts(void); +void print_state(int); +void print_conflicts(int); +void print_core(int); +void print_nulls(int); +void print_actions(int); +void print_shifts(action *); +void print_reductions(action *, int); +void print_gotos(int); void verbose() diff --git a/usr.bin/yacc/warshall.c b/usr.bin/yacc/warshall.c index 9677de917c4..a90abb605e5 100644 --- a/usr.bin/yacc/warshall.c +++ b/usr.bin/yacc/warshall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: warshall.c,v 1.5 2001/11/19 19:02:18 mpech Exp $ */ +/* $OpenBSD: warshall.c,v 1.6 2002/02/16 21:28:00 millert Exp $ */ /* $NetBSD: warshall.c,v 1.4 1996/03/19 03:21:51 jtc Exp $ */ /* @@ -41,13 +41,13 @@ #if 0 static char sccsid[] = "@(#)warshall.c 5.4 (Berkeley) 5/24/93"; #else -static char rcsid[] = "$OpenBSD: warshall.c,v 1.5 2001/11/19 19:02:18 mpech Exp $"; +static char rcsid[] = "$OpenBSD: warshall.c,v 1.6 2002/02/16 21:28:00 millert Exp $"; #endif #endif /* not lint */ #include "defs.h" -void transitive_closure __P((unsigned *, int)); +void transitive_closure(unsigned *, int); void transitive_closure(R, n) |