tweaks: drop some old debugging code
parent
7ae8f3bca4
commit
f2adefb158
23
src/rcfile.c
23
src/rcfile.c
|
@ -315,10 +315,6 @@ void parse_syntax(char *ptr)
|
||||||
|
|
||||||
opensyntax = TRUE;
|
opensyntax = TRUE;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "Starting a new syntax type: \"%s\"\n", nameptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The default syntax should have no associated extensions. */
|
/* The default syntax should have no associated extensions. */
|
||||||
if (strcmp(live_syntax->name, "default") == 0 && *ptr != '\0') {
|
if (strcmp(live_syntax->name, "default") == 0 && *ptr != '\0') {
|
||||||
rcfile_error(N_("The \"default\" syntax does not accept extensions"));
|
rcfile_error(N_("The \"default\" syntax does not accept extensions"));
|
||||||
|
@ -351,10 +347,6 @@ void parse_binding(char *ptr, bool dobind)
|
||||||
sc *s, *newsc = NULL;
|
sc *s, *newsc = NULL;
|
||||||
int menu;
|
int menu;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "Starting the rebinding code...\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (*ptr == '\0') {
|
if (*ptr == '\0') {
|
||||||
rcfile_error(N_("Missing key name"));
|
rcfile_error(N_("Missing key name"));
|
||||||
return;
|
return;
|
||||||
|
@ -544,10 +536,6 @@ static void parse_one_include(char *file)
|
||||||
nanorc = file;
|
nanorc = file;
|
||||||
lineno = 0;
|
lineno = 0;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "Parsing file \"%s\"\n", file);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parse_rcfile(rcstream, TRUE);
|
parse_rcfile(rcstream, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1050,10 +1038,6 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, " Option name = \"%s\"\n", rcopts[i].name);
|
|
||||||
fprintf(stderr, " Flag = %ld\n", rcopts[i].flag);
|
|
||||||
#endif
|
|
||||||
/* First handle unsetting. */
|
/* First handle unsetting. */
|
||||||
if (set == -1) {
|
if (set == -1) {
|
||||||
if (rcopts[i].flag != 0)
|
if (rcopts[i].flag != 0)
|
||||||
|
@ -1082,9 +1066,7 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
|
||||||
ptr = parse_argument(ptr);
|
ptr = parse_argument(ptr);
|
||||||
|
|
||||||
option = mallocstrcpy(NULL, option);
|
option = mallocstrcpy(NULL, option);
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, " Option argument = \"%s\"\n", option);
|
|
||||||
#endif
|
|
||||||
#ifdef ENABLE_UTF8
|
#ifdef ENABLE_UTF8
|
||||||
/* When in a UTF-8 locale, ignore arguments with invalid sequences. */
|
/* When in a UTF-8 locale, ignore arguments with invalid sequences. */
|
||||||
if (using_utf8() && mbstowcs(NULL, option, 0) == (size_t)-1) {
|
if (using_utf8() && mbstowcs(NULL, option, 0) == (size_t)-1) {
|
||||||
|
@ -1210,9 +1192,6 @@ void parse_one_nanorc(void)
|
||||||
if (!is_good_file(nanorc))
|
if (!is_good_file(nanorc))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "Going to parse file \"%s\"\n", nanorc);
|
|
||||||
#endif
|
|
||||||
rcstream = fopen(nanorc, "rb");
|
rcstream = fopen(nanorc, "rb");
|
||||||
|
|
||||||
/* If opening the file succeeded, parse it. Otherwise, only
|
/* If opening the file succeeded, parse it. Otherwise, only
|
||||||
|
|
Loading…
Reference in New Issue