From 2ad1de0ba6de9325a7c3b86e9ef4d7911f1477d0 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 30 Dec 2012 19:20:10 +0000 Subject: [PATCH] Remove trailing spaces on source files as they suck git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/browser.c | 2 +- src/files.c | 4 ++-- src/global.c | 10 +++++----- src/move.c | 2 +- src/nano.c | 6 +++--- src/nano.h | 2 +- src/text.c | 4 ++-- src/winio.c | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/browser.c b/src/browser.c index 123e3137..2876d9f9 100644 --- a/src/browser.c +++ b/src/browser.c @@ -794,7 +794,7 @@ int filesearch_init(void) TRUE, #endif MWHEREISFILE, backupstring, - &meta_key, &func_key, + &meta_key, &func_key, #ifndef NANO_TINY &search_history, #endif diff --git a/src/files.c b/src/files.c index 430caf1d..382339a6 100644 --- a/src/files.c +++ b/src/files.c @@ -678,7 +678,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw * found". * * Return -2 if we say "New File", -1 if the file isn't opened, and the - * fd opened otherwise. The file might still have an error while reading + * fd opened otherwise. The file might still have an error while reading * with a 0 return value. *f is set to the opened file. */ int open_file(const char *filename, bool newfie, FILE **f) { @@ -693,7 +693,7 @@ int open_file(const char *filename, bool newfie, FILE **f) /* Okay, if we can't stat the path due to a component's permissions, just try the relative one */ - if (full_filename == NULL + if (full_filename == NULL || (stat(full_filename, &fileinfo) == -1 && stat(filename, &fileinfo2) != -1)) full_filename = mallocstrcpy(NULL, filename); diff --git a/src/global.c b/src/global.c index b5e868d8..b8355db8 100644 --- a/src/global.c +++ b/src/global.c @@ -153,7 +153,7 @@ char *syntaxstr = NULL; #endif bool edit_refresh_needed = 0; - /* Did a command mangle enough of the buffer refresh that we + /* Did a command mangle enough of the buffer refresh that we should repaint the screen */ const shortcut *currshortcut; @@ -374,7 +374,7 @@ void add_to_sclist(int menu, const char *scstring, void (*func)(void), int toggl /* Return the given menu's first shortcut sequence, or the default value (2nd arg). Assumes currmenu for the menu to check*/ -int sc_seq_or (void (*func)(void), int defaultval) +int sc_seq_or (void (*func)(void), int defaultval) { const sc *s = first_sc_for(currmenu, func); @@ -385,7 +385,7 @@ int sc_seq_or (void (*func)(void), int defaultval) } -/* Assign the info to the shortcut struct +/* Assign the info to the shortcut struct Assumes keystr is already assigned, naturally */ void assign_keyinfo(sc *s) { @@ -814,7 +814,7 @@ void shortcut_init(bool unjustify) #ifndef NANO_TINY - add_to_funcs(do_mark, MMAIN, N_("Mark Text"), + add_to_funcs(do_mark, MMAIN, N_("Mark Text"), IFSCHELP(nano_mark_msg), FALSE, VIEW); add_to_funcs(do_research, (MMAIN|MBROWSER), whereis_next_msg, @@ -953,7 +953,7 @@ void shortcut_init(bool unjustify) IFSCHELP(nano_wordcount_msg), FALSE, VIEW); #endif - add_to_funcs(total_refresh, (MMAIN|MHELP), refresh_msg, + add_to_funcs(total_refresh, (MMAIN|MHELP), refresh_msg, IFSCHELP(nano_refresh_msg), FALSE, VIEW); add_to_funcs(do_suspend_void, MMAIN, suspend_msg, diff --git a/src/move.c b/src/move.c index 5ec0b6fa..782613da 100644 --- a/src/move.c +++ b/src/move.c @@ -79,7 +79,7 @@ void do_page_up(void) if (ISSET(SOFTWRAP) && openfile->current) { skipped += strlenpt(openfile->current->data) / COLS; #ifdef DEBUG - fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %d\n", i, (unsigned long) skipped, + fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %d\n", i, (unsigned long) skipped, openfile->current->lineno, strlenpt(openfile->current->data)); #endif } diff --git a/src/nano.c b/src/nano.c index c51b644c..90c42491 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id$ */ /************************************************************************** * nano.c * * * @@ -2010,7 +2010,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) #endif } - /* Well we might also need a full refresh if we've changed the + /* Well we might also need a full refresh if we've changed the line length to be a new multiple of COLS */ if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE) if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS) @@ -2449,7 +2449,7 @@ int main(int argc, char **argv) #ifndef DISABLE_WRAPPING /* Overwrite an rcfile "set nowrap" or --disable-wrapping-as-root - if a --fill option was given on the command line. */ + if a --fill option was given on the command line. */ if (fill_used) UNSET(NO_WRAP); #endif diff --git a/src/nano.h b/src/nano.h index 6db8447c..4600d5d5 100644 --- a/src/nano.h +++ b/src/nano.h @@ -470,7 +470,7 @@ typedef struct subnfunc { } subnfunc; -/* Enumeration to be used in flags table. See FLAGBIT and FLAGOFF +/* Enumeration to be used in flags table. See FLAGBIT and FLAGOFF * definitions. */ enum { diff --git a/src/text.c b/src/text.c index ae434ee0..d8f80887 100644 --- a/src/text.c +++ b/src/text.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id$ */ /************************************************************************** * text.c * * * @@ -855,7 +855,7 @@ void add_undo(undo_type current_action) /* Ugh, if we were called while cutting not-to-end, non-marked and on the same lineno, we need to abort here */ u = fs->current_undo; - if (current_action == CUT && u && u->type == CUT + if (current_action == CUT && u && u->type == CUT && !u->mark_set && u->lineno == fs->current->lineno) return; diff --git a/src/winio.c b/src/winio.c index 6d3c0578..29a74f2b 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1800,7 +1800,7 @@ const sc *get_shortcut(int menu, int *kbinput, bool /* Try to get a function back from a window. Just a wrapper so - functions to need to create function_key meta_key blah blah + functions to need to create function_key meta_key blah blah mmenu - what menu name to look through for valid funcs */ const subnfunc *getfuncfromkey(WINDOW *win) { -- 2.39.5