From: David Lawrence Ramsey Date: Thu, 19 Apr 2007 03:15:04 +0000 (+0000) Subject: more cosmetic fixes X-Git-Tag: v2.1.0~131 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b94d51aa7ee0801d814edfde686a0f31c869eb91;p=nano.git more cosmetic fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/chars.c b/src/chars.c index 5ab12f7a..e5be4e72 100644 --- a/src/chars.c +++ b/src/chars.c @@ -577,19 +577,19 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n) * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael R. Elkins * * Copyright (C) 1999, 2000 Thomas Roessler - * + * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, @@ -1021,7 +1021,7 @@ bool is_valid_mbstring(const char *s) { assert(s != NULL); - return + return #ifdef ENABLE_UTF8 use_utf8 ? (mbstowcs(NULL, s, 0) != (size_t)-1) : #endif diff --git a/src/files.c b/src/files.c index 1b02c477..73a73a70 100644 --- a/src/files.c +++ b/src/files.c @@ -701,9 +701,9 @@ void do_insertfile( while (TRUE) { #ifndef NANO_TINY if (execute) { - msg = + msg = #ifdef ENABLE_MULTIBUFFER - ISSET(MULTIBUFFER) ? + ISSET(MULTIBUFFER) ? _("Command to execute in new buffer [from %s] ") : #endif _("Command to execute [from %s] "); @@ -711,7 +711,7 @@ void do_insertfile( #endif msg = #ifdef ENABLE_MULTIBUFFER - ISSET(MULTIBUFFER) ? + ISSET(MULTIBUFFER) ? _("File to insert into new buffer [from %s] ") : #endif _("File to insert [from %s] "); diff --git a/src/global.c b/src/global.c index 189b2ffe..8d50349e 100644 --- a/src/global.c +++ b/src/global.c @@ -239,7 +239,7 @@ void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc for (s = *shortcutage; s->next != NULL; s = s->next) ; s->next = (shortcut *)nmalloc(sizeof(shortcut)); - s = s->next; + s = s->next; } s->ctrlval = ctrlval; diff --git a/src/help.c b/src/help.c index a7d66e84..fb6294a4 100644 --- a/src/help.c +++ b/src/help.c @@ -191,7 +191,7 @@ void do_help(void (*refresh_func)(void)) curs_set(1); refresh_func(); - /* The help_init() at the beginning allocated help_text. Since + /* The help_init() at the beginning allocated help_text. Since * help_text has now been written to the screen, we don't need it * anymore. */ free(help_text); @@ -212,7 +212,7 @@ void do_browser_help(void) } #endif -/* This function allocates help_text, and stores the help string in it. +/* This function allocates help_text, and stores the help string in it. * help_text should be NULL initially. */ void help_init(void) { diff --git a/src/search.c b/src/search.c index 52a30275..f90908ed 100644 --- a/src/search.c +++ b/src/search.c @@ -86,7 +86,7 @@ void not_found_msg(const char *str) { char *disp; int numchars; - + assert(str != NULL); disp = display_string(str, 0, (COLS / 2) + 1, FALSE); diff --git a/src/winio.c b/src/winio.c index 7f648476..5c0251c4 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1556,7 +1556,7 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len) /* Read in a stream of all available characters, and return the length * of the string in kbinput_len. Translate the first few characters of * the input into the corresponding multibyte value if possible. After - * that, leave the input as-is. */ + * that, leave the input as-is. */ int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len) { int *kbinput, *retval; @@ -1816,6 +1816,7 @@ const toggle *get_toggle(int kbinput, bool meta_key) void blank_line(WINDOW *win, int y, int x, int n) { wmove(win, y, x); + for (; n > 0; n--) waddch(win, ' '); } @@ -1839,6 +1840,7 @@ void blank_topbar(void) void blank_edit(void) { int i; + for (i = 0; i < editwinrows; i++) blank_line(edit, i, 0, COLS); } @@ -1992,7 +1994,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool converted[index++] = whitespace[i]; } else #endif - converted[index++] = ' '; + converted[index++] = ' '; start_col++; while (start_col % tabsize != 0) { converted[index++] = ' '; @@ -2028,7 +2030,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool converted[index++] = whitespace[i]; } else #endif - converted[index++] = ' '; + converted[index++] = ' '; start_col++; /* If buf contains a non-control character, interpret it. If * buf contains an invalid multibyte non-control character, @@ -3168,7 +3170,7 @@ void do_cursorpos(bool constant) return; } - /* Display the current cursor position on the statusbar, and set + /* Display the current cursor position on the statusbar, and set * disable_cursorpos to FALSE. */ linepct = 100 * openfile->current->lineno / openfile->filebot->lineno;