diff --git a/ChangeLog b/ChangeLog index ab6b52126d40a80e287e60ddf4df367869d4ce5d..d5bac19e24b22716b35fe78899373c9a2e70d305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-06-10 Benno Schulenberg <bensberg@justemail.net> + * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: + A few minimalistic whitespace adjustments. + 2014-06-10 David Lawrence Ramsey <pooka109@gmail.com> * src/winio.c: One more type fix and two tiny message tweaks. diff --git a/src/browser.c b/src/browser.c index a97b9f8595b9c0a8cfe862e16e551e36ed6d2230..3957e67ff9ff823b92b79633a7b7e49ebdc47830 100644 --- a/src/browser.c +++ b/src/browser.c @@ -460,7 +460,7 @@ void browser_init(const char *path, DIR *dir) /* Don't show the "." entry. */ if (strcmp(nextdir->d_name, ".") == 0) - continue; + continue; d_len = strlenpt(nextdir->d_name); if (d_len > longest) @@ -487,7 +487,7 @@ void browser_init(const char *path, DIR *dir) while ((nextdir = readdir(dir)) != NULL && i < filelist_len) { /* Don't show the "." entry. */ if (strcmp(nextdir->d_name, ".") == 0) - continue; + continue; filelist[i] = charalloc(path_len + strlen(nextdir->d_name) + 1); sprintf(filelist[i], "%s%s", path, nextdir->d_name); diff --git a/src/files.c b/src/files.c index ea9dac4941b1eaf3aaad77cd50a3b5db12660948..b0115cc3afbe3f7cf75dbf8e88112fd94c6b2308 100644 --- a/src/files.c +++ b/src/files.c @@ -1842,7 +1842,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type if (ISSET(INSECURE_BACKUP)) backup_cflags = O_WRONLY | O_CREAT | O_APPEND; - else + else backup_cflags = O_WRONLY | O_CREAT | O_EXCL | O_APPEND; backup_fd = open(backupname, backup_cflags, @@ -1858,8 +1858,8 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type goto cleanup_and_exit; } - /* We shouldn't worry about chown()ing something if we're not - root, since it's likely to fail! */ + /* We shouldn't worry about chown()ing something if we're not + * root, since it's likely to fail! */ if (geteuid() == NANO_ROOT_UID && fchown(backup_fd, openfile->current_stat->st_uid, openfile->current_stat->st_gid) == -1 && !ISSET(INSECURE_BACKUP)) { diff --git a/src/nano.c b/src/nano.c index 5d076fff15332be8be8a0e95aca9c411de9ee645..2c2a8547530f4476e418e757ec2577ba35e9d9a8 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1642,7 +1642,7 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs) * output all the characters in the input buffer if it isn't * empty. Note that it should be empty if we're in view * mode. */ - if (have_shortcut || get_key_buffer_len() == 0) { + if (have_shortcut || get_key_buffer_len() == 0) { #ifndef DISABLE_WRAPPING /* If we got a shortcut or toggle, and it's not the shortcut * for verbatim input, turn off prepending of wrapped text. */ @@ -1907,7 +1907,7 @@ void precalc_multicolorinfo(void) goto precalc_cleanup; } if (regexec(tmpcolor->end, endptr->data, 1, &endmatch, 0) == 0) - break; + break; } if (endptr == NULL) { diff --git a/src/prompt.c b/src/prompt.c index 81d0979691a5f101af8ed7e8e7b9a65aef6317de..83784918654b2759d0bdc96f281b276915b121f1 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -1030,7 +1030,7 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe * move to an older search, which means that finished has * been set to TRUE. Set it back to FALSE here, so that * we aren't kicked out of the statusbar prompt. */ - finished = FALSE; + finished = FALSE; } } else if (s && s->scfunc == get_history_newer_void) { if (history_list != NULL) { diff --git a/src/winio.c b/src/winio.c index d39b4b58131bd4b556a724a3643e36205cda571e..934fec9e57a8b42203af450cbf6106be6ba3ed2e 100644 --- a/src/winio.c +++ b/src/winio.c @@ -545,9 +545,9 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key) /* Slang doesn't support KEY_SDC. */ case KEY_SDC: if (ISSET(REBIND_DELETE)) - retval = sc_seq_or(do_delete, *kbinput); + retval = sc_seq_or(do_delete, *kbinput); else - retval = sc_seq_or(do_backspace, *kbinput); + retval = sc_seq_or(do_backspace, *kbinput); break; #endif #ifdef KEY_SIC @@ -1743,7 +1743,7 @@ int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts) * wheel is equivalent to moving down three lines. */ for (i = 0; i < 3; i++) unget_kbinput((mevent.bstate & BUTTON4_PRESSED) ? - sc_seq_or(do_up_void, 0) : sc_seq_or(do_down_void, 0), + sc_seq_or(do_up_void, 0) : sc_seq_or(do_down_void, 0), FALSE, FALSE); return 1; @@ -3518,7 +3518,7 @@ void do_credits(void) * Small Letter O with Diaresis) if applicable. */ credits[16] = #ifdef ENABLE_UTF8 - using_utf8() ? "Florian K\xC3\xB6nig" : + using_utf8() ? "Florian K\xC3\xB6nig" : #endif "Florian K\xF6nig";