diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-04-13 23:44:34 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-04-14 09:34:18 -0400 |
commit | 2944235430c37970f82ad57b8ead343ee6065004 (patch) | |
tree | baef798ff629d958004a042c6334c3719880df83 /scripts | |
parent | c6ccc30fd7870879981de03feeec61029754b0ea (diff) |
gconfig: remove dbg_print_ptype() and dbg_print_stype()
Just use sym_get_type() and prop_get_type_name().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/gconf.c | 67 |
1 files changed, 4 insertions, 63 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 65464366fe3..80fe9ca2cbb 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -76,36 +76,7 @@ static void conf_changed(void); | |||
76 | 76 | ||
77 | /* Helping/Debugging Functions */ | 77 | /* Helping/Debugging Functions */ |
78 | 78 | ||
79 | 79 | const char *dbg_sym_flags(int val) | |
80 | const char *dbg_print_stype(int val) | ||
81 | { | ||
82 | static char buf[256]; | ||
83 | |||
84 | bzero(buf, 256); | ||
85 | |||
86 | if (val == S_UNKNOWN) | ||
87 | strcpy(buf, "unknown"); | ||
88 | if (val == S_BOOLEAN) | ||
89 | strcpy(buf, "boolean"); | ||
90 | if (val == S_TRISTATE) | ||
91 | strcpy(buf, "tristate"); | ||
92 | if (val == S_INT) | ||
93 | strcpy(buf, "int"); | ||
94 | if (val == S_HEX) | ||
95 | strcpy(buf, "hex"); | ||
96 | if (val == S_STRING) | ||
97 | strcpy(buf, "string"); | ||
98 | if (val == S_OTHER) | ||
99 | strcpy(buf, "other"); | ||
100 | |||
101 | #ifdef DEBUG | ||
102 | printf("%s", buf); | ||
103 | #endif | ||
104 | |||
105 | return buf; | ||
106 | } | ||
107 | |||
108 | const char *dbg_print_flags(int val) | ||
109 | { | 80 | { |
110 | static char buf[256]; | 81 | static char buf[256]; |
111 | 82 | ||
@@ -131,40 +102,10 @@ const char *dbg_print_flags(int val) | |||
131 | strcat(buf, "auto/"); | 102 | strcat(buf, "auto/"); |
132 | 103 | ||
133 | buf[strlen(buf) - 1] = '\0'; | 104 | buf[strlen(buf) - 1] = '\0'; |
134 | #ifdef DEBUG | ||
135 | printf("%s", buf); | ||
136 | #endif | ||
137 | |||
138 | return buf; | ||
139 | } | ||
140 | |||
141 | const char *dbg_print_ptype(int val) | ||
142 | { | ||
143 | static char buf[256]; | ||
144 | |||
145 | bzero(buf, 256); | ||
146 | |||
147 | if (val == P_UNKNOWN) | ||
148 | strcpy(buf, "unknown"); | ||
149 | if (val == P_PROMPT) | ||
150 | strcpy(buf, "prompt"); | ||
151 | if (val == P_COMMENT) | ||
152 | strcpy(buf, "comment"); | ||
153 | if (val == P_MENU) | ||
154 | strcpy(buf, "menu"); | ||
155 | if (val == P_DEFAULT) | ||
156 | strcpy(buf, "default"); | ||
157 | if (val == P_CHOICE) | ||
158 | strcpy(buf, "choice"); | ||
159 | |||
160 | #ifdef DEBUG | ||
161 | printf("%s", buf); | ||
162 | #endif | ||
163 | 105 | ||
164 | return buf; | 106 | return buf; |
165 | } | 107 | } |
166 | 108 | ||
167 | |||
168 | void replace_button_icon(GladeXML * xml, GdkDrawable * window, | 109 | void replace_button_icon(GladeXML * xml, GdkDrawable * window, |
169 | GtkStyle * style, gchar * btn_name, gchar ** xpm) | 110 | GtkStyle * style, gchar * btn_name, gchar ** xpm) |
170 | { | 111 | { |
@@ -1469,12 +1410,12 @@ static void display_tree(struct menu *menu) | |||
1469 | #ifdef DEBUG | 1410 | #ifdef DEBUG |
1470 | printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); | 1411 | printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); |
1471 | printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); | 1412 | printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); |
1472 | dbg_print_ptype(ptype); | 1413 | printf("%s", prop_get_type_name(ptype)); |
1473 | printf(" | "); | 1414 | printf(" | "); |
1474 | if (sym) { | 1415 | if (sym) { |
1475 | dbg_print_stype(sym->type); | 1416 | printf("%s", sym_type_name(sym->type)); |
1476 | printf(" | "); | 1417 | printf(" | "); |
1477 | dbg_print_flags(sym->flags); | 1418 | printf("%s", dbg_sym_flags(sym->flags)); |
1478 | printf("\n"); | 1419 | printf("\n"); |
1479 | } else | 1420 | } else |
1480 | printf("\n"); | 1421 | printf("\n"); |