aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/gconf.c67
1 files changed, 4 insertions, 63 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 65464366fe38..80fe9ca2cbb3 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 79const char *dbg_sym_flags(int val)
80const 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
108const 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
141const 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
168void replace_button_icon(GladeXML * xml, GdkDrawable * window, 109void 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");