aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-01-07 07:59:57 -0500
committerMichal Marek <mmarek@suse.cz>2010-02-02 08:33:55 -0500
commit851190c9304154b7d65596801415229c05994e91 (patch)
tree51bec33c76ca12dfaedcb45368f50f37d2a0e14f /scripts
parent692d97c380c6dce2c35a04c5dcbce4e831a42fa0 (diff)
nconfig: mark local functions as such
scripts/kconfig/nconf.gui.c:23: warning: no previous prototype for 'set_normal_colors' scripts/kconfig/nconf.gui.c:68: warning: no previous prototype for 'normal_color_theme' scripts/kconfig/nconf.gui.c:100: warning: no previous prototype for 'no_colors_theme' scripts/kconfig/nconf.c:455: warning: no previous prototype for 'process_special_keys' scripts/kconfig/nconf.c:487: warning: no previous prototype for 'get_next_hot' scripts/kconfig/nconf.c:506: warning: no previous prototype for 'canbhot' scripts/kconfig/nconf.c:514: warning: no previous prototype for 'is_hot' scripts/kconfig/nconf.c:522: warning: no previous prototype for 'make_hot' scripts/kconfig/nconf.c:582: warning: no previous prototype for 'item_make' scripts/kconfig/nconf.c:626: warning: no previous prototype for 'item_add_str' scripts/kconfig/nconf.c:656: warning: no previous prototype for 'item_tag' scripts/kconfig/nconf.c:668: warning: no previous prototype for 'curses_item_index' scripts/kconfig/nconf.c:673: warning: no previous prototype for 'item_data' scripts/kconfig/nconf.c:684: warning: no previous prototype for 'item_is_tag' scripts/kconfig/nconf.c:691: warning: no previous prototype for 'set_config_filename' Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/nconf.c24
-rw-r--r--scripts/kconfig/nconf.gui.c6
2 files changed, 15 insertions, 15 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 8c56150a757d..fb54c98874bc 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -452,7 +452,7 @@ static void handle_f8(int *key, struct menu *current_item)
452} 452}
453 453
454/* return != 0 to indicate the key was handles */ 454/* return != 0 to indicate the key was handles */
455int process_special_keys(int *key, struct menu *menu) 455static int process_special_keys(int *key, struct menu *menu)
456{ 456{
457 int i; 457 int i;
458 458
@@ -484,7 +484,7 @@ static void clean_items(void)
484} 484}
485 485
486/* return the index of the next hot item, or -1 if no such item exists */ 486/* return the index of the next hot item, or -1 if no such item exists */
487int get_next_hot(int c) 487static int get_next_hot(int c)
488{ 488{
489 static int hot_index; 489 static int hot_index;
490 static int hot_char; 490 static int hot_char;
@@ -503,7 +503,7 @@ int get_next_hot(int c)
503} 503}
504 504
505/* can the char c be a hot key? no, if c is a common shortcut used elsewhere */ 505/* can the char c be a hot key? no, if c is a common shortcut used elsewhere */
506int canbhot(char c) 506static int canbhot(char c)
507{ 507{
508 c = tolower(c); 508 c = tolower(c);
509 return isalnum(c) && c != 'y' && c != 'm' && c != 'h' && 509 return isalnum(c) && c != 'y' && c != 'm' && c != 'h' &&
@@ -511,7 +511,7 @@ int canbhot(char c)
511} 511}
512 512
513/* check if str already contains a hot key. */ 513/* check if str already contains a hot key. */
514int is_hot(int index) 514static int is_hot(int index)
515{ 515{
516 return k_menu_items[index].is_hot; 516 return k_menu_items[index].is_hot;
517} 517}
@@ -519,7 +519,7 @@ int is_hot(int index)
519/* find the first possible hot key, and mark it. 519/* find the first possible hot key, and mark it.
520 * index is the index of the item in the menu 520 * index is the index of the item in the menu
521 * return 0 on success*/ 521 * return 0 on success*/
522int make_hot(char *dest, int len, const char *org, int index) 522static int make_hot(char *dest, int len, const char *org, int index)
523{ 523{
524 int position = -1; 524 int position = -1;
525 int i; 525 int i;
@@ -579,7 +579,7 @@ int make_hot(char *dest, int len, const char *org, int index)
579/* Make a new item. Add a hotkey mark in the first possible letter. 579/* Make a new item. Add a hotkey mark in the first possible letter.
580 * As ncurses does not allow any attributes inside menue item, we mark the 580 * As ncurses does not allow any attributes inside menue item, we mark the
581 * hot key as the first capitalized letter in the string */ 581 * hot key as the first capitalized letter in the string */
582void item_make(struct menu *menu, char tag, const char *fmt, ...) 582static void item_make(struct menu *menu, char tag, const char *fmt, ...)
583{ 583{
584 va_list ap; 584 va_list ap;
585 char tmp_str[256]; 585 char tmp_str[256];
@@ -623,7 +623,7 @@ void item_make(struct menu *menu, char tag, const char *fmt, ...)
623} 623}
624 624
625/* very hackish. adds a string to the last item added */ 625/* very hackish. adds a string to the last item added */
626void item_add_str(const char *fmt, ...) 626static void item_add_str(const char *fmt, ...)
627{ 627{
628 va_list ap; 628 va_list ap;
629 int index = items_num-1; 629 int index = items_num-1;
@@ -653,7 +653,7 @@ void item_add_str(const char *fmt, ...)
653} 653}
654 654
655/* get the tag of the currently selected item */ 655/* get the tag of the currently selected item */
656char item_tag(void) 656static char item_tag(void)
657{ 657{
658 ITEM *cur; 658 ITEM *cur;
659 struct mitem *mcur; 659 struct mitem *mcur;
@@ -665,12 +665,12 @@ char item_tag(void)
665 return mcur->tag; 665 return mcur->tag;
666} 666}
667 667
668int curses_item_index(void) 668static int curses_item_index(void)
669{ 669{
670 return item_index(current_item(curses_menu)); 670 return item_index(current_item(curses_menu));
671} 671}
672 672
673void *item_data(void) 673static void *item_data(void)
674{ 674{
675 ITEM *cur; 675 ITEM *cur;
676 struct mitem *mcur; 676 struct mitem *mcur;
@@ -681,14 +681,14 @@ void *item_data(void)
681 681
682} 682}
683 683
684int item_is_tag(char tag) 684static int item_is_tag(char tag)
685{ 685{
686 return item_tag() == tag; 686 return item_tag() == tag;
687} 687}
688 688
689static char filename[PATH_MAX+1]; 689static char filename[PATH_MAX+1];
690static char menu_backtitle[PATH_MAX+128]; 690static char menu_backtitle[PATH_MAX+128];
691const char *set_config_filename(const char *config_filename) 691static const char *set_config_filename(const char *config_filename)
692{ 692{
693 int size; 693 int size;
694 struct symbol *sym; 694 struct symbol *sym;
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index 879ade6dd604..115edb437fb1 100644
--- a/scripts/kconfig/nconf.gui.c
+++ b/scripts/kconfig/nconf.gui.c
@@ -20,7 +20,7 @@ attributes_t attributes[ATTR_MAX+1] = {0};
20 COLOR_CYAN 6 20 COLOR_CYAN 6
21 COLOR_WHITE 7 21 COLOR_WHITE 7
22 */ 22 */
23void set_normal_colors(void) 23static void set_normal_colors(void)
24{ 24{
25 init_pair(NORMAL, -1, -1); 25 init_pair(NORMAL, -1, -1);
26 init_pair(MAIN_HEADING, COLOR_MAGENTA, -1); 26 init_pair(MAIN_HEADING, COLOR_MAGENTA, -1);
@@ -65,7 +65,7 @@ void set_normal_colors(void)
65 A_CHARTEXT Bit-mask to extract a character 65 A_CHARTEXT Bit-mask to extract a character
66 COLOR_PAIR(n) Color-pair number n 66 COLOR_PAIR(n) Color-pair number n
67 */ 67 */
68void normal_color_theme(void) 68static void normal_color_theme(void)
69{ 69{
70 /* automatically add color... */ 70 /* automatically add color... */
71#define mkattr(name, attr) do { \ 71#define mkattr(name, attr) do { \
@@ -97,7 +97,7 @@ attributes[name] = attr | COLOR_PAIR(name); } while (0)
97 mkattr(FUNCTION_TEXT, A_REVERSE); 97 mkattr(FUNCTION_TEXT, A_REVERSE);
98} 98}
99 99
100void no_colors_theme(void) 100static void no_colors_theme(void)
101{ 101{
102 /* automatically add highlight, no color */ 102 /* automatically add highlight, no color */
103#define mkattrn(name, attr) { attributes[name] = attr; } 103#define mkattrn(name, attr) { attributes[name] = attr; }