Commit 851190c9304154b7d65596801415229c05994e91

Authored by Michal Marek
1 parent 692d97c380

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>

Showing 2 changed files with 15 additions and 15 deletions Side-by-side Diff

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