From: Benno Schulenberg Date: Sun, 23 Mar 2014 20:49:59 +0000 (+0000) Subject: Improving a debugging message, fixing a translator comment, and tweaking others. X-Git-Tag: v2.3.3~263 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=52402756b0fd2d492471bc23129a46a0a99f3fd3;p=nano.git Improving a debugging message, fixing a translator comment, and tweaking others. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 71bc4401..eb798894 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-03-23 Benno Schulenberg + * src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a + debugging message, fix a translator comment, and tweak others. + 2014-03-22 Benno Schulenberg * THANKS - Add some missing translator names, and tweak others. diff --git a/src/rcfile.c b/src/rcfile.c index 29b0b297..c1cdcfdc 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -447,6 +447,7 @@ void parse_magictype(char *ptr) #endif /* HAVE_LIBMAGIC */ } + int check_bad_binding(sc *s) { #define BADLISTLEN 1 @@ -482,7 +483,7 @@ void parse_keybinding(char *ptr) if (keycopy[0] != 'M' && keycopy[0] != '^' && keycopy[0] != 'F' && keycopy[0] != 'K') { rcfile_error( - N_("keybindings must begin with \"^\", \"M\", or \"F\"")); + N_("Keybindings must begin with \"^\", \"M\", or \"F\"")); return; } @@ -500,8 +501,7 @@ void parse_keybinding(char *ptr) if (!strcmp(menuptr, "")) { rcfile_error( - /* Note to translators, do not translate the word "all" - in the sentence below, everything else is fine */ + /* TRANSLATORS: do not translate the word "all". */ N_("Must specify menu to bind key to (or \"all\")")); return; } @@ -520,13 +520,11 @@ void parse_keybinding(char *ptr) return; } - #ifdef DEBUG fprintf(stderr, "newsc now address %d, menu func assigned = %d, menu = %d\n", &newsc, newsc->scfunc, menu); #endif - newsc->keystr = keycopy; newsc->menu = menu; newsc->type = strtokeytype(newsc->keystr); @@ -542,9 +540,8 @@ void parse_keybinding(char *ptr) return; } - /* now let's have some fun. Try and delete the other entries - we found for the same menu, then make this new new - beginning */ + /* Now let's have some fun. Try and delete the other entries + 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; @@ -557,7 +554,7 @@ void parse_keybinding(char *ptr) sclist = newsc; } -/* Let user unbind a sequence from a given (or all) menus */ +/* Let the user unbind a sequence from a given (or all) menus. */ void parse_unbinding(char *ptr) { char *keyptr = NULL, *keycopy = NULL, *menuptr = NULL; @@ -578,12 +575,12 @@ void parse_unbinding(char *ptr) keycopy[i] = toupper(keycopy[i]); #ifdef DEBUG - fprintf(stderr, "Starting unbinding code"); + fprintf(stderr, "Starting the unbinding code...\n"); #endif if (keycopy[0] != 'M' && keycopy[0] != '^' && keycopy[0] != 'F' && keycopy[0] != 'K') { rcfile_error( - N_("keybindings must begin with \"^\", \"M\", or \"F\"")); + N_("Keybindings must begin with \"^\", \"M\", or \"F\"")); return; } @@ -592,8 +589,7 @@ void parse_unbinding(char *ptr) if (!strcmp(menuptr, "")) { rcfile_error( - /* Note to translators, do not translate the word "all" - in the sentence below, everything else is fine */ + /* TRANSLATORS: do not translate the word "all". */ N_("Must specify menu to bind key to (or \"all\")")); return; } @@ -605,12 +601,11 @@ void parse_unbinding(char *ptr) return; } - #ifdef DEBUG fprintf(stderr, "unbinding \"%s\" from menu = %d\n", keycopy, menu); #endif - /* Now find the apropriate entries in the menu to delete */ + /* 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;