Commit 70b2d086 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Cosmetic tweaks.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 15 deletions
+11 -15
2014-04-05 Benno Schulenberg <bensberg@justemail.net> 2014-04-05 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (version): Print the correct configuration options. * src/nano.c (version): Print the correct configuration options.
* src/{chars.c,nano.c,text.c}: Cosmetic tweaks.
2014-04-05 Mike Frysinger <vapier@gentoo.org> 2014-04-05 Mike Frysinger <vapier@gentoo.org>
* src/nano.c (do_input): Reload possibly freed function pointer. * src/nano.c (do_input): Reload possibly freed function pointer.
......
...@@ -54,7 +54,7 @@ bool using_utf8(void) ...@@ -54,7 +54,7 @@ bool using_utf8(void)
{ {
return use_utf8; return use_utf8;
} }
#endif #endif /* ENABLE_UTF8 */
#ifndef HAVE_ISBLANK #ifndef HAVE_ISBLANK
/* This function is equivalent to isblank(). */ /* This function is equivalent to isblank(). */
......
...@@ -1451,8 +1451,7 @@ void do_toggle(int flag) ...@@ -1451,8 +1451,7 @@ void do_toggle(int flag)
enabled = !enabled; enabled = !enabled;
desc = (char *) _(flagtostr(flag)); desc = (char *) _(flagtostr(flag));
statusbar("%s %s", desc, enabled ? _("enabled") : statusbar("%s %s", desc, enabled ? _("enabled") : _("disabled"));
_("disabled"));
} }
/* Bleh */ /* Bleh */
...@@ -1706,10 +1705,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool ...@@ -1706,10 +1705,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
#ifndef NANO_TINY #ifndef NANO_TINY
if (s->scfunc == do_toggle_void) if (s->scfunc == do_toggle_void)
do_toggle(s->toggle); do_toggle(s->toggle);
else { else
#else
{
#endif #endif
{
s->scfunc(); s->scfunc();
#ifndef DISABLE_COLOR #ifndef DISABLE_COLOR
/* The command might have re-initialized shortcuts, /* 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 ...@@ -1727,7 +1725,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
edit_refresh(); edit_refresh();
edit_refresh_needed = FALSE; edit_refresh_needed = FALSE;
} }
} }
} }
} }
...@@ -2531,9 +2528,7 @@ int main(int argc, char **argv) ...@@ -2531,9 +2528,7 @@ int main(int argc, char **argv)
load_poshistory(); load_poshistory();
} }
#endif /* ENABLE_NANORC */ #endif /* ENABLE_NANORC */
#endif /* !NANO_TINY */
#ifndef NANO_TINY
/* Set up the backup directory (unless we're using restricted mode, /* Set up the backup directory (unless we're using restricted mode,
* in which case backups are disabled, since they would allow * in which case backups are disabled, since they would allow
* reading from or writing to files not specified on the command * reading from or writing to files not specified on the command
...@@ -2541,7 +2536,7 @@ int main(int argc, char **argv) ...@@ -2541,7 +2536,7 @@ int main(int argc, char **argv)
* that backup files will be saved there. */ * that backup files will be saved there. */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
init_backup_dir(); init_backup_dir();
#endif #endif /* !NANO_TINY */
#ifndef DISABLE_OPERATINGDIR #ifndef DISABLE_OPERATINGDIR
/* Set up the operating directory. This entails chdir()ing there, /* Set up the operating directory. This entails chdir()ing there,
...@@ -2602,9 +2597,8 @@ int main(int argc, char **argv) ...@@ -2602,9 +2597,8 @@ int main(int argc, char **argv)
/* If matchbrackets wasn't specified, set its default value. */ /* If matchbrackets wasn't specified, set its default value. */
if (matchbrackets == NULL) if (matchbrackets == NULL)
matchbrackets = mallocstrcpy(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 wasn't specified, set its default value. */
if (whitespace == NULL) { if (whitespace == NULL) {
#ifdef ENABLE_UTF8 #ifdef ENABLE_UTF8
...@@ -2620,7 +2614,8 @@ int main(int argc, char **argv) ...@@ -2620,7 +2614,8 @@ int main(int argc, char **argv)
whitespace_len[1] = 1; whitespace_len[1] = 1;
} }
} }
#endif #endif /* ENABLE_NANORC */
#endif /* !NANO_TINY */
/* If tabsize wasn't specified, set its default value. */ /* If tabsize wasn't specified, set its default value. */
if (tabsize == -1) if (tabsize == -1)
...@@ -2711,7 +2706,7 @@ int main(int argc, char **argv) ...@@ -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 /* Read the first file on the command line into either the current
* buffer or a new buffer, depending on whether multibuffer mode is * buffer or a new buffer, depending on whether multibuffer mode is
......
...@@ -1076,7 +1076,7 @@ void update_undo(undo_type action) ...@@ -1076,7 +1076,7 @@ void update_undo(undo_type action)
* and as such we should note that so we can destroy it later. */ * and as such we should note that so we can destroy it later. */
u->xflags = UNsplit_madenew; u->xflags = UNsplit_madenew;
break; break;
#endif /* DISABLE_WRAPPING */ #endif /* !DISABLE_WRAPPING */
case UNSPLIT: case UNSPLIT:
/* These cases are handled by the earlier check for a new line and action. */ /* These cases are handled by the earlier check for a new line and action. */
case ENTER: case ENTER:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment