diff options
author | KatolaZ <katolaz@freaknet.org> | 2019-08-05 07:52:47 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2019-08-05 07:52:47 +0100 |
commit | 6bf74b8e63315aeeac6fe4307e9e2679d334aca3 (patch) | |
tree | bb55e59563dc601c25b40fcb4dd6371f1afa3124 /screen.c | |
parent | f813572a98e71ca4ea6be99196c60618cc45836c (diff) |
replace isblank
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -10,6 +10,12 @@ /*** screen management functions ***/ +/*** _isblank ***/ + +int _isblank(int c){ + return c==32 || c==9 ? 1 : 0; +} + /*** Status bar ***/ @@ -161,7 +167,7 @@ void erase_blank_lines(int y1, int y2){ for (; y1 <= y2; y1++){ j = screen.l[y1].lst; - while (j>=0 && isblank(screen.l[y1].s[j])) + while (j>=0 && _isblank(screen.l[y1].s[j])) j--; if (j<0){ screen.l[y1].lst = -1; @@ -430,12 +436,12 @@ void find_nonblank_rect(int *x1, int *y1, int *x2, int *y2){ if (i < *y1) *y1 = i; j = 0; - while((j <= screen.l[i].lst) && isblank(first=screen.l[i].s[j])) + while((j <= screen.l[i].lst) && _isblank(first=screen.l[i].s[j])) j++; if (j < *x1) *x1 = j; j = screen.l[i].lst; - while(isblank(screen.l[i].s[j])) + while(_isblank(screen.l[i].s[j])) j--; if (j > *x2) *x2 = j; |