1.1 --- a/src/tools/gendec.c Wed Jan 07 04:39:04 2009 +0000
1.2 +++ b/src/tools/gendec.c Thu Jan 22 00:45:15 2009 +0000
1.4 int gen_mode = GEN_SOURCE;
1.5 struct option longopts[1] = { { NULL, 0, 0, 0 } };
1.8 +static void usage() {
1.9 printf( "gendec <instruction-file> <action-file> [ -o <output-file> ]\n" );
1.13 * Find a mask that can be used to split up the given rules
1.15 -uint32_t find_mask( struct ruleset *rules, int ruleidx[], int rule_count,
1.16 +static uint32_t find_mask( struct ruleset *rules, int ruleidx[], int rule_count,
1.17 uint32_t input_mask )
1.21 return mask & (~input_mask); /* but we don't want to see the input mask again */
1.24 -int get_option_count_for_mask( uint32_t mask ) {
1.25 +static int get_option_count_for_mask( uint32_t mask ) {
1.33 -void get_option_values_for_mask( uint32_t *options,
1.34 +static void get_option_values_for_mask( uint32_t *options,
1.37 /* This could be a lot smarter. But it's not */
1.42 -void fprint_indent( char *action, int depth, FILE *f )
1.43 +static void fprint_indent( char *action, int depth, FILE *f )
1.45 int spaces = 0, needed = depth*8, i;
1.46 char *text = action;
1.51 -void fprint_action( struct rule *rule, char *action, int depth, FILE *f )
1.52 +static void fprint_action( struct rule *rule, char *action, int depth, FILE *f )
1.55 if( action == NULL ) {
1.60 -void split_and_generate( struct ruleset *rules, char **actions,
1.61 +static void split_and_generate( struct ruleset *rules, char **actions,
1.62 int ruleidx[], int rule_count, int input_mask,
1.63 int depth, FILE *f ) {
1.69 -int generate_decoder( struct ruleset *rules, actionfile_t af, FILE *out )
1.70 +static int generate_decoder( struct ruleset *rules, actionfile_t af, FILE *out )
1.72 int ruleidx[rules->rule_count];
1.78 -int generate_template( struct ruleset *rules, actionfile_t af, FILE *out )
1.79 +static int generate_template( struct ruleset *rules, actionfile_t af, FILE *out )