Skip to content

Commit a7efb16

Browse files
committed
kconfig: gconf: remove debug code
This is not so useful. If necessary, you can insert printf() or whatever during debugging. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 4763175 commit a7efb16

File tree

1 file changed

+1
-48
lines changed

1 file changed

+1
-48
lines changed

scripts/kconfig/gconf.c

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <unistd.h>
1919
#include <time.h>
2020

21-
//#define DEBUG
22-
2321
enum {
2422
SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW
2523
};
@@ -71,33 +69,6 @@ static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row);
7169
static gchar **fill_row(struct menu *menu);
7270
static void conf_changed(void);
7371

74-
/* Helping/Debugging Functions */
75-
#ifdef DEBUG
76-
static const char *dbg_sym_flags(int val)
77-
{
78-
static char buf[256];
79-
80-
bzero(buf, 256);
81-
82-
if (val & SYMBOL_CONST)
83-
strcat(buf, "const/");
84-
if (val & SYMBOL_CHECK)
85-
strcat(buf, "check/");
86-
if (val & SYMBOL_CHOICEVAL)
87-
strcat(buf, "choiceval/");
88-
if (val & SYMBOL_VALID)
89-
strcat(buf, "valid/");
90-
if (val & SYMBOL_WRITE)
91-
strcat(buf, "write/");
92-
if (val & SYMBOL_CHANGED)
93-
strcat(buf, "changed/");
94-
95-
buf[strlen(buf) - 1] = '\0';
96-
97-
return buf;
98-
}
99-
#endif
100-
10172
static void replace_button_icon(GladeXML *xml, GdkDrawable *window,
10273
GtkStyle *style, gchar *btn_name, gchar **xpm)
10374
{
@@ -1262,12 +1233,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
12621233
else
12631234
menu2 = NULL; // force adding of a first child
12641235

1265-
#ifdef DEBUG
1266-
printf("%*c%s | %s\n", indent, ' ',
1267-
menu1 ? menu_get_prompt(menu1) : "nil",
1268-
menu2 ? menu_get_prompt(menu2) : "nil");
1269-
#endif
1270-
12711236
if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) ||
12721237
(opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) ||
12731238
(opt_mode == OPT_ALL && !menu_get_prompt(child1))) {
@@ -1354,19 +1319,7 @@ static void display_tree(struct menu *menu)
13541319
(opt_mode == OPT_PROMPT && menu_has_prompt(child)) ||
13551320
(opt_mode == OPT_ALL && menu_get_prompt(child)))
13561321
place_node(child, fill_row(child));
1357-
#ifdef DEBUG
1358-
printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
1359-
printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : "");
1360-
printf("%s", prop_get_type_name(ptype));
1361-
printf(" | ");
1362-
if (sym) {
1363-
printf("%s", sym_type_name(sym->type));
1364-
printf(" | ");
1365-
printf("%s", dbg_sym_flags(sym->flags));
1366-
printf("\n");
1367-
} else
1368-
printf("\n");
1369-
#endif
1322+
13701323
if ((view_mode != FULL_VIEW) && (ptype == P_MENU)
13711324
&& (tree == tree2))
13721325
continue;

0 commit comments

Comments
 (0)