From c656e9d737d43e4bca3b4e160c8aa0dc274108b6 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 16 Mar 2008 12:55:41 +0000 Subject: [PATCH] Fix for bug #22615: nano-2.0.99pre1 fails to build when configured with --disable-justify git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/global.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/global.c b/src/global.c index 39e5a3df..fc3085e5 100644 --- a/src/global.c +++ b/src/global.c @@ -1017,7 +1017,7 @@ void shortcut_init(bool unjustify) add_to_sclist(MMAIN, "F13", do_gotolinecolumn_void, 0, TRUE); add_to_sclist(MMAIN, "^O", do_writeout_void, 0, TRUE); add_to_sclist(MMAIN, "F3", do_writeout_void, 0, TRUE); -#ifndef NANO_TINY +#ifndef DISABLE_JUSTIFY add_to_sclist(MMAIN, "^J", do_justify_void, 0, TRUE); add_to_sclist(MMAIN, "F4", do_justify_void, 0, TRUE); #endif @@ -1078,7 +1078,7 @@ void shortcut_init(bool unjustify) add_to_sclist(MALL, "khome", do_home, 0, TRUE); add_to_sclist(MALL, "^E", do_end, 0, TRUE); add_to_sclist(MALL, "kend", do_end, 0, TRUE); -#ifndef NANO_TINY +#ifndef DISABLE_JUSTIFY add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2, "^W", do_para_begin_void, 0, TRUE); add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2, @@ -1129,7 +1129,9 @@ void shortcut_init(bool unjustify) add_to_sclist(MMAIN, "M-V", do_verbatim_input, 0, TRUE); #ifndef NANO_TINY add_to_sclist(MALL, "M-T", do_cut_till_end, 0, TRUE); +#ifndef DISABLE_JUSTIFY add_to_sclist(MALL, "M-J", do_full_justify, 0, TRUE); +#endif add_to_sclist(MMAIN, "M-D", do_wordlinechar_count, 0, TRUE); add_to_sclist(MMAIN, "M-X", do_toggle, NO_HELP, TRUE); add_to_sclist(MMAIN, "M-C", do_toggle, CONST_UPDATE, TRUE); @@ -1295,9 +1297,17 @@ sc *strtosc(int menu, char *input) s->scfunc = do_gotolinecolumn_void; else if (!strcasecmp(input, "replace")) s->scfunc = do_replace; -#ifndef NANO_TINY +#ifndef DISABLE_JUSTIFY else if (!strcasecmp(input, "justify")) s->scfunc = do_justify_void; + else if (!strcasecmp(input, "beginpara")) + s->scfunc = do_para_begin_void; + else if (!strcasecmp(input, "endpara")) + s->scfunc = do_para_end_void; + else if (!strcasecmp(input, "fulljustify")) + s->scfunc = do_full_justify; +#endif +#ifndef NANO_TINY else if (!strcasecmp(input, "mark")) s->scfunc = do_mark; else if (!strcasecmp(input, "searchagain") || @@ -1394,12 +1404,7 @@ sc *strtosc(int menu, char *input) s->scfunc = (void *) do_toggle; s->execute = FALSE; s->toggle = SUSPEND; - } else if (!strcasecmp(input, "beginpara")) - s->scfunc = do_para_begin_void; - else if (!strcasecmp(input, "endpara")) - s->scfunc = do_para_end_void; - else if (!strcasecmp(input, "fulljustify")) - s->scfunc = do_full_justify; + } #endif /* NANO_TINY */ else if (!strcasecmp(input, "right") || !strcasecmp(input, "forward")) -- 2.39.5