From 6374309c6d4d17ab1e4109133ab8aad55f77d51c Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 14 Oct 2002 21:54:04 +0000 Subject: Convert the source code to use ANSI C style function definitions and enable the automake ansi2knr capability. Right now this doesn't quite build using a K&R compiler because of a problem with the loadavg test program, but the rest of the code works. I'm asking the automake list about this problem. --- rule.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'rule.c') diff --git a/rule.c b/rule.c index e693c02..1d4a089 100644 --- a/rule.c +++ b/rule.c @@ -74,7 +74,7 @@ unsigned int maxsuffix; completely when appropriate. */ void -count_implicit_rule_limits () +count_implicit_rule_limits (void) { char *name; unsigned int namelen; @@ -182,9 +182,7 @@ count_implicit_rule_limits () If SOURCE is nil, it means there should be no deps. */ static void -convert_suffix_rule (target, source, cmds) - char *target, *source; - struct commands *cmds; +convert_suffix_rule (char *target, char *source, struct commands *cmds) { char *targname, *targpercent, *depname; char **names, **percents; @@ -241,7 +239,7 @@ convert_suffix_rule (target, source, cmds) are converted and added to the chain of pattern rules. */ void -convert_to_pattern () +convert_to_pattern (void) { register struct dep *d, *d2; register struct file *f; @@ -310,9 +308,7 @@ convert_to_pattern () list. Return nonzero if RULE is used; zero if not. */ int -new_pattern_rule (rule, override) - register struct rule *rule; - int override; +new_pattern_rule (struct rule *rule, int override) { register struct rule *r, *lastrule; register unsigned int i, j; @@ -387,9 +383,7 @@ new_pattern_rule (rule, override) TERMINAL specifies what the `terminal' field of the rule should be. */ void -install_pattern_rule (p, terminal) - struct pspec *p; - int terminal; +install_pattern_rule (struct pspec *p, int terminal) { register struct rule *r; char *ptr; @@ -439,8 +433,7 @@ install_pattern_rule (p, terminal) points to RULE. */ static void -freerule (rule, lastrule) - register struct rule *rule, *lastrule; +freerule (struct rule *rule, struct rule *lastrule) { struct rule *next = rule->next; register unsigned int i; @@ -501,13 +494,9 @@ freerule (rule, lastrule) it may be freed. */ void -create_pattern_rule (targets, target_percents, - terminal, deps, commands, override) - char **targets, **target_percents; - int terminal; - struct dep *deps; - struct commands *commands; - int override; +create_pattern_rule (char **targets, char **target_percents, + int terminal, struct dep *deps, + struct commands *commands, int override) { register struct rule *r = (struct rule *) xmalloc (sizeof (struct rule)); register unsigned int max_targets, i; @@ -551,8 +540,7 @@ create_pattern_rule (targets, target_percents, /* Create a new pattern-specific variable struct. */ struct pattern_var * -create_pattern_var (target, suffix) - char *target, *suffix; +create_pattern_var (char *target, char *suffix) { register struct pattern_var *p = 0; unsigned int len = strlen(target); @@ -583,8 +571,7 @@ create_pattern_var (target, suffix) /* Look up a target in the pattern-specific variable list. */ struct pattern_var * -lookup_pattern_var (target) - char *target; +lookup_pattern_var (char *target) { struct pattern_var *p; unsigned int targlen = strlen(target); @@ -623,8 +610,7 @@ lookup_pattern_var (target) /* Print the data base of rules. */ static void /* Useful to call from gdb. */ -print_rule (r) - struct rule *r; +print_rule (struct rule *r) { register unsigned int i; register struct dep *d; @@ -649,7 +635,7 @@ print_rule (r) } void -print_rule_data_base () +print_rule_data_base (void) { register unsigned int rules, terminal; register struct rule *r; -- cgit v1.2.3