From 70b2d086106559f32b06682513a51dc1770e8e21 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 5 Apr 2014 20:28:29 +0000 Subject: [PATCH] Cosmetic tweaks. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/chars.c | 2 +- src/nano.c | 21 ++++++++------------- src/text.c | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fd93c06..0838f257 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2014-04-05 Benno Schulenberg * src/nano.c (version): Print the correct configuration options. + * src/{chars.c,nano.c,text.c}: Cosmetic tweaks. 2014-04-05 Mike Frysinger * src/nano.c (do_input): Reload possibly freed function pointer. diff --git a/src/chars.c b/src/chars.c index 67eb0df3..5696fbe1 100644 --- a/src/chars.c +++ b/src/chars.c @@ -54,7 +54,7 @@ bool using_utf8(void) { return use_utf8; } -#endif +#endif /* ENABLE_UTF8 */ #ifndef HAVE_ISBLANK /* This function is equivalent to isblank(). */ diff --git a/src/nano.c b/src/nano.c index 482c532c..b2a6cbe0 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1451,8 +1451,7 @@ void do_toggle(int flag) enabled = !enabled; desc = (char *) _(flagtostr(flag)); - statusbar("%s %s", desc, enabled ? _("enabled") : - _("disabled")); + statusbar("%s %s", desc, enabled ? _("enabled") : _("disabled")); } /* Bleh */ @@ -1706,10 +1705,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool #ifndef NANO_TINY if (s->scfunc == do_toggle_void) do_toggle(s->toggle); - else { -#else - { + else #endif + { s->scfunc(); #ifndef DISABLE_COLOR /* The command might have re-initialized shortcuts, @@ -1727,7 +1725,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool edit_refresh(); edit_refresh_needed = FALSE; } - } } } @@ -2531,9 +2528,7 @@ int main(int argc, char **argv) load_poshistory(); } #endif /* ENABLE_NANORC */ -#endif /* !NANO_TINY */ -#ifndef NANO_TINY /* Set up the backup directory (unless we're using restricted mode, * in which case backups are disabled, since they would allow * reading from or writing to files not specified on the command @@ -2541,7 +2536,7 @@ int main(int argc, char **argv) * that backup files will be saved there. */ if (!ISSET(RESTRICTED)) init_backup_dir(); -#endif +#endif /* !NANO_TINY */ #ifndef DISABLE_OPERATINGDIR /* Set up the operating directory. This entails chdir()ing there, @@ -2602,9 +2597,8 @@ int main(int argc, char **argv) /* If matchbrackets wasn't specified, set its default value. */ if (matchbrackets == NULL) matchbrackets = mallocstrcpy(NULL, "(<[{)>]}"); -#endif -#if !defined(NANO_TINY) && defined(ENABLE_NANORC) +#ifdef ENABLE_NANORC /* If whitespace wasn't specified, set its default value. */ if (whitespace == NULL) { #ifdef ENABLE_UTF8 @@ -2620,7 +2614,8 @@ int main(int argc, char **argv) whitespace_len[1] = 1; } } -#endif +#endif /* ENABLE_NANORC */ +#endif /* !NANO_TINY */ /* If tabsize wasn't specified, set its default value. */ if (tabsize == -1) @@ -2711,7 +2706,7 @@ int main(int argc, char **argv) } } } -#endif +#endif /* !DISABLE_MULTIBUFFER */ /* Read the first file on the command line into either the current * buffer or a new buffer, depending on whether multibuffer mode is diff --git a/src/text.c b/src/text.c index b02d1edf..503605d1 100644 --- a/src/text.c +++ b/src/text.c @@ -1076,7 +1076,7 @@ void update_undo(undo_type action) * and as such we should note that so we can destroy it later. */ u->xflags = UNsplit_madenew; break; -#endif /* DISABLE_WRAPPING */ +#endif /* !DISABLE_WRAPPING */ case UNSPLIT: /* These cases are handled by the earlier check for a new line and action. */ case ENTER: -- 2.39.5