From d1238c02d3de5b26fb9442eec62e6d58ba13ebf2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 13 May 2014 20:51:19 +0000 Subject: [PATCH] Improving compilation with --disable-browser. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4877 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/global.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index de2fdc5d..edd4808f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * src/*.c: Several random whitespace and comment tweaks. * src/global.c (replace_scs_for): Condense the function a bit. * src/help.c (help_init): No need to keep looping when two are found. + * src/global.c: Improve compilation with --disable-browser. 2014-05-12 Benno Schulenberg * src/text.c (do_spell): Provide startup feedback, as for the linter. diff --git a/src/global.c b/src/global.c index 11a70d4e..453abd41 100644 --- a/src/global.c +++ b/src/global.c @@ -239,12 +239,20 @@ void case_sens_void(void) void regexp_void(void) { } +void backwards_void(void) +{ +} void gototext_void(void) { } +#ifndef DISABLE_BROWSER void to_files_void(void) { } +void goto_dir_void(void) +{ +} +#endif void dos_format_void(void) { } @@ -263,12 +271,6 @@ void backup_file_void(void) void new_buffer_void(void) { } -void backwards_void(void) -{ -} -void goto_dir_void(void) -{ -} void no_replace_void(void) { } @@ -521,8 +523,10 @@ void shortcut_init(void) N_("Insert another file into the current one"); const char *nano_whereis_msg = N_("Search for a string or a regular expression"); +#ifndef DISABLE_BROWSER const char *nano_browser_whereis_msg = N_("Search for a string"); +#endif const char *nano_prevpage_msg = N_("Go one screenful up"); const char *nano_nextpage_msg = N_("Go one screenful down"); const char *nano_cut_msg = @@ -1159,7 +1163,9 @@ void shortcut_init(void) add_to_sclist(MWRITEFILE, "M-A", append_void, 0, FALSE); add_to_sclist(MWRITEFILE, "M-P", prepend_void, 0, FALSE); add_to_sclist(MWRITEFILE, "M-B", backup_file_void, 0, FALSE); +#ifndef DISABLE_BROWSER add_to_sclist(MWRITEFILE|MINSERTFILE, "^T", to_files_void, 0, FALSE); +#endif add_to_sclist(MINSERTFILE, "^X", ext_cmd_void, 0, FALSE); add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", new_buffer_void, 0, FALSE); add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0, TRUE); @@ -1482,10 +1488,12 @@ sc *strtosc(char *input) } else if (!strcasecmp(input, "gototext")) { s->scfunc = gototext_void; s->execute = FALSE; +#ifndef DISABLE_BROWSER } else if (!strcasecmp(input, "browser") || !strcasecmp(input, "tofiles")) { s->scfunc = to_files_void; s->execute = FALSE; +#endif } else if (!strcasecmp(input, "dosformat")) { s->scfunc = dos_format_void; s->execute = FALSE;