summaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'screen.c')
-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;