revision 969:3f178ca1398c
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 969:3f178ca1398c |
parent | 968:6fb1481859a4 |
child | 970:44d62d0850c8 |
author | nkeynes |
date | Thu Jan 22 00:45:15 2009 +0000 (15 years ago) |
Make local functions static (to shut up icc warnings, plus not being a bad idea in general)
src/tools/actparse.c | view | annotate | diff | log | ||
src/tools/gendec.c | view | annotate | diff | log | ||
src/tools/gendec.h | view | annotate | diff | log |
1.1 --- a/src/tools/actparse.c Thu Jan 15 11:23:20 2009 +00001.2 +++ b/src/tools/actparse.c Thu Jan 22 00:45:15 2009 +00001.3 @@ -32,7 +32,7 @@1.4 return action;1.5 }1.7 -int add_action( char **actions, struct ruleset *rules, char *operation, char *action )1.8 +static int add_action( char **actions, struct ruleset *rules, char *operation, char *action )1.9 {1.10 char *act = g_strchomp(action);1.11 char opclean[strlen(operation)+1];
2.1 --- a/src/tools/gendec.c Thu Jan 15 11:23:20 2009 +00002.2 +++ b/src/tools/gendec.c Thu Jan 22 00:45:15 2009 +00002.3 @@ -42,14 +42,14 @@2.4 int gen_mode = GEN_SOURCE;2.5 struct option longopts[1] = { { NULL, 0, 0, 0 } };2.7 -void usage() {2.8 +static void usage() {2.9 printf( "gendec <instruction-file> <action-file> [ -o <output-file> ]\n" );2.10 }2.12 /**2.13 * Find a mask that can be used to split up the given rules2.14 */2.15 -uint32_t find_mask( struct ruleset *rules, int ruleidx[], int rule_count,2.16 +static uint32_t find_mask( struct ruleset *rules, int ruleidx[], int rule_count,2.17 uint32_t input_mask )2.18 {2.19 int i;2.20 @@ -64,7 +64,7 @@2.21 return mask & (~input_mask); /* but we don't want to see the input mask again */2.22 }2.24 -int get_option_count_for_mask( uint32_t mask ) {2.25 +static int get_option_count_for_mask( uint32_t mask ) {2.26 int count = 0;2.28 while( mask ) {2.29 @@ -84,7 +84,7 @@2.30 return shift;2.31 }2.33 -void get_option_values_for_mask( uint32_t *options,2.34 +static void get_option_values_for_mask( uint32_t *options,2.35 uint32_t mask )2.36 {2.37 /* This could be a lot smarter. But it's not */2.38 @@ -98,7 +98,7 @@2.39 }2.40 }2.42 -void fprint_indent( char *action, int depth, FILE *f )2.43 +static void fprint_indent( char *action, int depth, FILE *f )2.44 {2.45 int spaces = 0, needed = depth*8, i;2.46 char *text = action;2.47 @@ -126,7 +126,7 @@2.48 }2.49 }2.51 -void fprint_action( struct rule *rule, char *action, int depth, FILE *f )2.52 +static void fprint_action( struct rule *rule, char *action, int depth, FILE *f )2.53 {2.54 int i;2.55 if( action == NULL ) {2.56 @@ -161,7 +161,7 @@2.57 }2.58 }2.60 -void split_and_generate( struct ruleset *rules, char **actions,2.61 +static void split_and_generate( struct ruleset *rules, char **actions,2.62 int ruleidx[], int rule_count, int input_mask,2.63 int depth, FILE *f ) {2.64 uint32_t mask;2.65 @@ -223,7 +223,7 @@2.66 }2.67 }2.69 -int generate_decoder( struct ruleset *rules, actionfile_t af, FILE *out )2.70 +static int generate_decoder( struct ruleset *rules, actionfile_t af, FILE *out )2.71 {2.72 int ruleidx[rules->rule_count];2.73 int i;2.74 @@ -247,7 +247,7 @@2.75 return 0;2.76 }2.78 -int generate_template( struct ruleset *rules, actionfile_t af, FILE *out )2.79 +static int generate_template( struct ruleset *rules, actionfile_t af, FILE *out )2.80 {2.81 int i;
3.1 --- a/src/tools/gendec.h Thu Jan 15 11:23:20 2009 +00003.2 +++ b/src/tools/gendec.h Thu Jan 22 00:45:15 2009 +00003.3 @@ -87,8 +87,6 @@3.5 void action_file_close( actionfile_t af );3.7 -int generate_decoder( struct ruleset *rules, actionfile_t af, FILE *f );3.8 -3.9 #ifdef __cplusplus3.10 }3.11 #endif
.