diff options
author | Michal Marek <mmarek@suse.cz> | 2015-01-27 11:11:42 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2015-02-25 09:00:16 -0500 |
commit | 70529b1a1784503169416df19ce3d68746401340 (patch) | |
tree | bc69dcebcf52b2cd07a5d0ac7d39d38e8abd34dc /scripts | |
parent | 4980bdf0213c9b5f876551b2ceb8ed8ece30deaf (diff) |
kconfig: Get rid of the P() macro in headers
This was originally meant for dlopen()ing a potential kconfig shared
library. The unused dlopen code has already been removed in commit
5a6f8d2b (kconfig: nuke LKC_DIRECT_LINK cruft), so let's remove the
rest. The lkc_proto.h change was made with the following sed script:
sed -r 's/^P\(([^,]*), *([^,]*), *(.*)\);/\2 \1\3;/'
Plus some manual adjustments.
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/lkc.h | 2 | ||||
-rw-r--r-- | scripts/kconfig/lkc_proto.h | 88 |
2 files changed, 43 insertions, 47 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index d5daa7af8b49..e418a30bbc40 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h | |||
@@ -21,9 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; | |||
21 | extern "C" { | 21 | extern "C" { |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #define P(name,type,arg) extern type name arg | ||
25 | #include "lkc_proto.h" | 24 | #include "lkc_proto.h" |
26 | #undef P | ||
27 | 25 | ||
28 | #define SRCTREE "srctree" | 26 | #define SRCTREE "srctree" |
29 | 27 | ||
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index ecdb9659b67d..ceddbcf1e5ac 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h | |||
@@ -1,57 +1,55 @@ | |||
1 | #include <stdarg.h> | 1 | #include <stdarg.h> |
2 | 2 | ||
3 | /* confdata.c */ | 3 | /* confdata.c */ |
4 | P(conf_parse,void,(const char *name)); | 4 | void conf_parse(const char *name); |
5 | P(conf_read,int,(const char *name)); | 5 | int conf_read(const char *name); |
6 | P(conf_read_simple,int,(const char *name, int)); | 6 | int conf_read_simple(const char *name, int); |
7 | P(conf_write_defconfig,int,(const char *name)); | 7 | int conf_write_defconfig(const char *name); |
8 | P(conf_write,int,(const char *name)); | 8 | int conf_write(const char *name); |
9 | P(conf_write_autoconf,int,(void)); | 9 | int conf_write_autoconf(void); |
10 | P(conf_get_changed,bool,(void)); | 10 | bool conf_get_changed(void); |
11 | P(conf_set_changed_callback, void,(void (*fn)(void))); | 11 | void conf_set_changed_callback(void (*fn)(void)); |
12 | P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap))); | 12 | void conf_set_message_callback(void (*fn)(const char *fmt, va_list ap)); |
13 | 13 | ||
14 | /* menu.c */ | 14 | /* menu.c */ |
15 | P(rootmenu,struct menu,); | 15 | extern struct menu rootmenu; |
16 | 16 | ||
17 | P(menu_is_empty, bool, (struct menu *menu)); | 17 | bool menu_is_empty(struct menu *menu); |
18 | P(menu_is_visible, bool, (struct menu *menu)); | 18 | bool menu_is_visible(struct menu *menu); |
19 | P(menu_has_prompt, bool, (struct menu *menu)); | 19 | bool menu_has_prompt(struct menu *menu); |
20 | P(menu_get_prompt,const char *,(struct menu *menu)); | 20 | const char * menu_get_prompt(struct menu *menu); |
21 | P(menu_get_root_menu,struct menu *,(struct menu *menu)); | 21 | struct menu * menu_get_root_menu(struct menu *menu); |
22 | P(menu_get_parent_menu,struct menu *,(struct menu *menu)); | 22 | struct menu * menu_get_parent_menu(struct menu *menu); |
23 | P(menu_has_help,bool,(struct menu *menu)); | 23 | bool menu_has_help(struct menu *menu); |
24 | P(menu_get_help,const char *,(struct menu *menu)); | 24 | const char * menu_get_help(struct menu *menu); |
25 | P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head | 25 | void get_symbol_str(struct gstr *r, struct symbol *sym, struct list_head *head); |
26 | *head)); | 26 | struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); |
27 | P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head | 27 | void menu_get_ext_help(struct menu *menu, struct gstr *help); |
28 | *head)); | ||
29 | P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); | ||
30 | 28 | ||
31 | /* symbol.c */ | 29 | /* symbol.c */ |
32 | P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); | 30 | extern struct symbol * symbol_hash[SYMBOL_HASHSIZE]; |
33 | 31 | ||
34 | P(sym_lookup,struct symbol *,(const char *name, int flags)); | 32 | struct symbol * sym_lookup(const char *name, int flags); |
35 | P(sym_find,struct symbol *,(const char *name)); | 33 | struct symbol * sym_find(const char *name); |
36 | P(sym_expand_string_value,const char *,(const char *in)); | 34 | const char * sym_expand_string_value(const char *in); |
37 | P(sym_escape_string_value, const char *,(const char *in)); | 35 | const char * sym_escape_string_value(const char *in); |
38 | P(sym_re_search,struct symbol **,(const char *pattern)); | 36 | struct symbol ** sym_re_search(const char *pattern); |
39 | P(sym_type_name,const char *,(enum symbol_type type)); | 37 | const char * sym_type_name(enum symbol_type type); |
40 | P(sym_calc_value,void,(struct symbol *sym)); | 38 | void sym_calc_value(struct symbol *sym); |
41 | P(sym_get_type,enum symbol_type,(struct symbol *sym)); | 39 | enum symbol_type sym_get_type(struct symbol *sym); |
42 | P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); | 40 | bool sym_tristate_within_range(struct symbol *sym,tristate tri); |
43 | P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); | 41 | bool sym_set_tristate_value(struct symbol *sym,tristate tri); |
44 | P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); | 42 | tristate sym_toggle_tristate_value(struct symbol *sym); |
45 | P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); | 43 | bool sym_string_valid(struct symbol *sym, const char *newval); |
46 | P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); | 44 | bool sym_string_within_range(struct symbol *sym, const char *str); |
47 | P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); | 45 | bool sym_set_string_value(struct symbol *sym, const char *newval); |
48 | P(sym_is_changable,bool,(struct symbol *sym)); | 46 | bool sym_is_changable(struct symbol *sym); |
49 | P(sym_get_choice_prop,struct property *,(struct symbol *sym)); | 47 | struct property * sym_get_choice_prop(struct symbol *sym); |
50 | P(sym_get_default_prop,struct property *,(struct symbol *sym)); | 48 | struct property * sym_get_default_prop(struct symbol *sym); |
51 | P(sym_get_string_value,const char *,(struct symbol *sym)); | 49 | const char * sym_get_string_value(struct symbol *sym); |
52 | 50 | ||
53 | P(prop_get_type_name,const char *,(enum prop_type type)); | 51 | const char * prop_get_type_name(enum prop_type type); |
54 | 52 | ||
55 | /* expr.c */ | 53 | /* expr.c */ |
56 | P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); | 54 | int expr_compare_type(enum expr_type t1, enum expr_type t2); |
57 | P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)); | 55 | void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken); |