From f80dcb2b2500b1044681538385ae944a241d6531 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 21 Jun 2014 19:01:51 +0000 Subject: [PATCH] Miscellaneous whitespace fixes, one type fix, and one more #ifdef NANO_TINY. Patch by David Lawrence Ramsey. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/move.c | 10 ++++++---- src/nano.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e651bb4d..564a0e2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-06-21 David Lawrence Ramsey + * src/move.c, src/nano.c: Miscellaneous whitespace fixes, one + type fix, and one more #ifdef NANO_TINY. + 2014-06-20 Benno Schulenberg * src/proto.h, src/global.c: Remove two obsolete variables and an unneeded extern, and regroup some stuff. diff --git a/src/move.c b/src/move.c index 503e13b1..6114fe23 100644 --- a/src/move.c +++ b/src/move.c @@ -78,13 +78,15 @@ void do_page_up(void) for (i = editwinrows - 2; i - skipped > 0 && openfile->current != openfile->fileage; i--) { openfile->current = openfile->current->prev; +#ifndef NANO_TINY 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 %lu len %d\n", - i, skipped, (unsigned long) openfile->current->lineno, strlenpt(openfile->current->data)); + fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %lu\n", + i, skipped, (long)openfile->current->lineno, (unsigned long)strlenpt(openfile->current->data)); #endif } +#endif } openfile->current_x = actual_x(openfile->current->data, @@ -92,7 +94,7 @@ void do_page_up(void) #ifdef DEBUG fprintf(stderr, "do_page_up: openfile->current->lineno = %lu, skipped = %d\n", - (unsigned long) openfile->current->lineno, skipped); + (unsigned long)openfile->current->lineno, skipped); #endif /* Scroll the edit window up a page. */ @@ -128,7 +130,7 @@ void do_page_down(void) openfile->filebot; i--) { openfile->current = openfile->current->next; #ifdef DEBUG - fprintf(stderr, "do_page_down: moving to line %lu\n", (unsigned long) openfile->current->lineno); + fprintf(stderr, "do_page_down: moving to line %lu\n", (unsigned long)openfile->current->lineno); #endif } diff --git a/src/nano.c b/src/nano.c index 6e4d1734..0ec51752 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2081,7 +2081,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) /* 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) + if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS) edit_refresh_needed = TRUE; #endif -- 2.39.5