commit 4b78ac4d9f47e9094f569fcd9f316cb8a8481b80
parent a684e46ca74a3e627d648b7a50db9fe79ae2272e
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Thu, 2 Apr 2020 22:30:25 +0200
Fix style
Diffstat:
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/scroll.c b/scroll.c
@@ -255,13 +255,12 @@ scrollup(void)
struct line *bottom_old = bottom;
/* account for last line */
- if(bottom != NULL && TAILQ_PREV(bottom, tailhead, entries) == NULL)
+ if (bottom != NULL && TAILQ_PREV(bottom, tailhead, entries) == NULL)
rows++;
/* wind back bottom pointer by two pages */
- for (; bottom != NULL &&
- TAILQ_NEXT(bottom, entries) != NULL &&
- rows <= ws.ws_row; rows++)
+ for (; bottom != NULL && TAILQ_NEXT(bottom, entries) != NULL &&
+ rows <= ws.ws_row; rows++)
bottom = TAILQ_NEXT(bottom, entries);
if (rows <= 0) {
@@ -290,9 +289,8 @@ scrolldown(char *buf, size_t size)
int rows = ws.ws_row;
/* print one page */
- for (; rows > 0 &&
- bottom != NULL &&
- TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
+ for (; rows > 0 && bottom != NULL &&
+ TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
bottom = TAILQ_PREV(bottom, tailhead, entries);
write(STDOUT_FILENO, bottom->buf, bottom->size);
}