before trying the legacy ways. Patch by Mike Frysinger.
* configure.ac - Add a configure flag to disable the use of the
fattening libmagic. Patch by Mike Frysinger.
+ * src/{global,rcfile,winio}.c - Print menu numbers for debugging
+ in hex, and tweak a few of those debugging messages.
2014-03-23 Benno Schulenberg <bensberg@justemail.net>
* src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a
return rawsc;
#ifdef DEBUG
- fprintf(stderr, "Whoops, returning null given func %ld in menu %d\n", (long) func, menu);
+ fprintf(stderr, "Whoops, returning null given func %ld in menu %x\n", (long) func, menu);
#endif
/* Otherwise... */
return NULL;
assign_keyinfo(s);
#ifdef DEBUG
- fprintf(stderr, "list val = %d\n", (int) s->menu);
- fprintf(stderr, "Hey, set sequence to %d for shortcut \"%s\"\n", s->seq, scstring);
+ fprintf(stderr, "Setting sequence to %d for shortcut \"%s\" in menu %x\n", s->seq, scstring, (int) s->menu);
#endif
}
for (s = sclist; s->next != NULL; s = s->next) {
f = sctofunc(s);
if (f)
- fprintf(stderr, "Shortcut \"%s\", function: %s, menus %d\n", s->keystr, f->desc, f->menus);
+ fprintf(stderr, "Shortcut \"%s\", function: %s, menus %x\n", s->keystr, f->desc, f->menus);
else
fprintf(stderr, "Hmm, didnt find a func for \"%s\"\n", s->keystr);
}
}
#ifdef DEBUG
- fprintf(stderr, "newsc now address %d, menu func assigned = %d, menu = %d\n",
+ fprintf(stderr, "newsc now address %d, func assigned = %d, menu = %x\n",
&newsc, newsc->scfunc, menu);
#endif
we found for the same menu, then make this the new beginning. */
for (s = sclist; s != NULL; s = s->next) {
if (((s->menu & newsc->menu)) && s->seq == newsc->seq) {
- s->menu &= ~newsc->menu;
#ifdef DEBUG
- fprintf(stderr, "replaced menu entry %d\n", s->menu);
+ fprintf(stderr, "replacing entry in menu %x\n", s->menu);
#endif
+ s->menu &= ~newsc->menu;
}
}
newsc->next = sclist;
}
#ifdef DEBUG
- fprintf(stderr, "unbinding \"%s\" from menu = %d\n", keycopy, menu);
+ fprintf(stderr, "unbinding \"%s\" from menu %x\n", keycopy, menu);
#endif
/* Now find the appropriate entries in the menu to delete. */
for (s = sclist; s != NULL; s = s->next) {
if (((s->menu & menu)) && !strcmp(s->keystr,keycopy)) {
- s->menu &= ~menu;
#ifdef DEBUG
- fprintf(stderr, "deleted menu entry %d\n", s->menu);
+ fprintf(stderr, "deleting entry from menu %x\n", s->menu);
#endif
+ s->menu &= ~menu;
}
}
}
&& ((s->type == META && *meta_key == TRUE && *kbinput == s->seq)
|| (s->type != META && *kbinput == s->seq))) {
#ifdef DEBUG
- fprintf (stderr, "matched seq \"%s\" and btw meta was %d (menus %d = %d)\n", s->keystr, *meta_key, menu, s->menu);
+ fprintf (stderr, "matched seq \"%s\", and btw meta was %d (menus %x = %x)\n", s->keystr, *meta_key, menu, s->menu);
#endif
return s;
}
}
#ifdef DEBUG
- fprintf (stderr, "matched nothing btw meta was %d\n", *meta_key);
+ fprintf (stderr, "matched nothing, btw meta was %d\n", *meta_key);
#endif
return NULL;
continue;
#ifdef DEBUG
- fprintf(stderr, "found one! f->menus = %d, desc = \"%s\"\n", f->menus, f->desc);
+ fprintf(stderr, "found one! f->menus = %x, desc = \"%s\"\n", f->menus, f->desc);
#endif
s = first_sc_for(menu, f->scfunc);
if (s == NULL) {