nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 3aea69daae6d33b4e59cd61216206867b1e85343
parent 919c9bdbbb2de7cd32bba0855569b610724b412a
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Fri, 28 Feb 2014 20:08:59 +0000

Indenting conditions consistently and tightly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 1+
Msrc/global.c | 29+++++++++++++----------------
2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -6,6 +6,7 @@ * src/rcfile.c (check_vitals_mapped) - Actually translate a helpful message, and reword it somewhat for clarity. * src/global.c - Remove unused function 'free_shortcutage'. + * src/global.c (strtosc) - Indent conditions consistently. 2014-02-28 Eitan Adler <lists@eitanadler.com> * src/nano.c (do_toggle) - Constify a char pointer, to fix diff --git a/src/global.c b/src/global.c @@ -1401,7 +1401,6 @@ sc *strtosc(int menu, char *input) s = (sc *)nmalloc(sizeof(sc)); s->execute = TRUE; /* overridden as needed below */ - #ifndef DISABLE_HELP if (!strcasecmp(input, "help")) s->scfunc = do_help_void; @@ -1422,18 +1421,18 @@ sc *strtosc(int menu, char *input) s->scfunc = do_up_void; else if (!strcasecmp(input, "down")) s->scfunc = do_down_void; - else if (!strcasecmp(input, "pageup") - || !strcasecmp(input, "prevpage")) + else if (!strcasecmp(input, "pageup") || + !strcasecmp(input, "prevpage")) s->scfunc = do_page_up; - else if (!strcasecmp(input, "pagedown") - || !strcasecmp(input, "nextpage")) + else if (!strcasecmp(input, "pagedown") || + !strcasecmp(input, "nextpage")) s->scfunc = do_page_down; else if (!strcasecmp(input, "cut")) s->scfunc = do_cut_text_void; else if (!strcasecmp(input, "uncut")) s->scfunc = do_uncut_text; else if (!strcasecmp(input, "curpos") || - !strcasecmp(input, "cursorpos")) + !strcasecmp(input, "cursorpos")) s->scfunc = do_cursorpos_void; else if (!strcasecmp(input, "firstline")) s->scfunc = do_first_line; @@ -1457,7 +1456,7 @@ sc *strtosc(int menu, char *input) else if (!strcasecmp(input, "mark")) s->scfunc = do_mark; else if (!strcasecmp(input, "searchagain") || - !strcasecmp(input, "research")) + !strcasecmp(input, "research")) s->scfunc = do_research; else if (!strcasecmp(input, "copytext")) s->scfunc = do_copy_text; @@ -1490,7 +1489,7 @@ sc *strtosc(int menu, char *input) s->scfunc = get_history_newer_void; s->execute = FALSE; } else if (!strcasecmp(input, "nohelp") || - !strcasecmp(input, "nohelp")) { + !strcasecmp(input, "nohelp")) { s->scfunc = do_toggle_void; s->execute = FALSE; s->toggle = NO_HELP; @@ -1557,16 +1556,16 @@ sc *strtosc(int menu, char *input) } #endif /* NANO_TINY */ else if (!strcasecmp(input, "right") || - !strcasecmp(input, "forward")) + !strcasecmp(input, "forward")) s->scfunc = do_right; else if (!strcasecmp(input, "left") || - !strcasecmp(input, "back")) + !strcasecmp(input, "back")) s->scfunc = do_left; else if (!strcasecmp(input, "up") || - !strcasecmp(input, "prevline")) + !strcasecmp(input, "prevline")) s->scfunc = do_up_void; else if (!strcasecmp(input, "down") || - !strcasecmp(input, "nextline")) + !strcasecmp(input, "nextline")) s->scfunc = do_down_void; else if (!strcasecmp(input, "home")) s->scfunc = do_home; @@ -1594,7 +1593,7 @@ sc *strtosc(int menu, char *input) s->scfunc = case_sens_void; s->execute = FALSE; } else if (!strcasecmp(input, "regexp") || - !strcasecmp(input, "regex")) { + !strcasecmp(input, "regex")) { s->scfunc = regexp_void; s->execute = FALSE; } else if (!strcasecmp(input, "dontreplace")) { @@ -1604,7 +1603,7 @@ sc *strtosc(int menu, char *input) s->scfunc = gototext_void; s->execute = FALSE; } else if (!strcasecmp(input, "browser") || - !strcasecmp(input, "tofiles")) { + !strcasecmp(input, "tofiles")) { s->scfunc = to_files_void; s->execute = FALSE; } else if (!strcasecmp(input, "dosformat")) { @@ -1639,9 +1638,7 @@ sc *strtosc(int menu, char *input) free(s); return NULL; } - return s; - } #ifdef ENABLE_NANORC