summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-08-05 07:52:47 +0100
committerKatolaZ <katolaz@freaknet.org>2019-08-05 07:52:47 +0100
commit6bf74b8e63315aeeac6fe4307e9e2679d334aca3 (patch)
treebb55e59563dc601c25b40fcb4dd6371f1afa3124
parentf813572a98e71ca4ea6be99196c60618cc45836c (diff)
replace isblank
-rw-r--r--screen.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/screen.c b/screen.c
index e81f037..5729a68 100644
--- a/screen.c
+++ b/screen.c
@@ -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;