Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199566
b: refs/heads/master
c: 2944235
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Michal Marek committed Apr 14, 2010
1 parent 5a9d7a8 commit d922a9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 64 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6ccc30fd7870879981de03feeec61029754b0ea
refs/heads/master: 2944235430c37970f82ad57b8ead343ee6065004
67 changes: 4 additions & 63 deletions trunk/scripts/kconfig/gconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,36 +76,7 @@ static void conf_changed(void);

/* Helping/Debugging Functions */


const char *dbg_print_stype(int val)
{
static char buf[256];

bzero(buf, 256);

if (val == S_UNKNOWN)
strcpy(buf, "unknown");
if (val == S_BOOLEAN)
strcpy(buf, "boolean");
if (val == S_TRISTATE)
strcpy(buf, "tristate");
if (val == S_INT)
strcpy(buf, "int");
if (val == S_HEX)
strcpy(buf, "hex");
if (val == S_STRING)
strcpy(buf, "string");
if (val == S_OTHER)
strcpy(buf, "other");

#ifdef DEBUG
printf("%s", buf);
#endif

return buf;
}

const char *dbg_print_flags(int val)
const char *dbg_sym_flags(int val)
{
static char buf[256];

Expand All @@ -131,40 +102,10 @@ const char *dbg_print_flags(int val)
strcat(buf, "auto/");

buf[strlen(buf) - 1] = '\0';
#ifdef DEBUG
printf("%s", buf);
#endif

return buf;
}

const char *dbg_print_ptype(int val)
{
static char buf[256];

bzero(buf, 256);

if (val == P_UNKNOWN)
strcpy(buf, "unknown");
if (val == P_PROMPT)
strcpy(buf, "prompt");
if (val == P_COMMENT)
strcpy(buf, "comment");
if (val == P_MENU)
strcpy(buf, "menu");
if (val == P_DEFAULT)
strcpy(buf, "default");
if (val == P_CHOICE)
strcpy(buf, "choice");

#ifdef DEBUG
printf("%s", buf);
#endif

return buf;
}


void replace_button_icon(GladeXML * xml, GdkDrawable * window,
GtkStyle * style, gchar * btn_name, gchar ** xpm)
{
Expand Down Expand Up @@ -1469,12 +1410,12 @@ static void display_tree(struct menu *menu)
#ifdef DEBUG
printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : "");
dbg_print_ptype(ptype);
printf("%s", prop_get_type_name(ptype));
printf(" | ");
if (sym) {
dbg_print_stype(sym->type);
printf("%s", sym_type_name(sym->type));
printf(" | ");
dbg_print_flags(sym->flags);
printf("%s", dbg_sym_flags(sym->flags));
printf("\n");
} else
printf("\n");
Expand Down

0 comments on commit d922a9c

Please sign in to comment.