ireplace isblank - gramscii - A simple editor for ASCII box-and-arrow charts Err bitreich.org 70
1Log /scm/gramscii/log.gph bitreich.org 70
1Files /scm/gramscii/files.gph bitreich.org 70
1Refs /scm/gramscii/refs.gph bitreich.org 70
1Tags /scm/gramscii/tag bitreich.org 70
1README /scm/gramscii/file/README.md.gph bitreich.org 70
1LICENSE /scm/gramscii/file/COPYING.gph bitreich.org 70
i--- Err bitreich.org 70
1commit 6bf74b8e63315aeeac6fe4307e9e2679d334aca3 /scm/gramscii/commit/6bf74b8e63315aeeac6fe4307e9e2679d334aca3.gph bitreich.org 70
1parent f813572a98e71ca4ea6be99196c60618cc45836c /scm/gramscii/commit/f813572a98e71ca4ea6be99196c60618cc45836c.gph bitreich.org 70
hAuthor: KatolaZ <katolaz@freaknet.org> URL:mailto:katolaz@freaknet.org bitreich.org 70
iDate: Mon, 5 Aug 2019 07:52:47 +0100 Err bitreich.org 70
i Err bitreich.org 70
ireplace isblank Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M screen.c | 12 +++++++++--- Err bitreich.org 70
i Err bitreich.org 70
i1 file changed, 9 insertions(+), 3 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/screen.c b/screen.c /scm/gramscii/file/screen.c.gph bitreich.org 70
i@@ -10,6 +10,12 @@ Err bitreich.org 70
i Err bitreich.org 70
i /*** screen management functions ***/ Err bitreich.org 70
i Err bitreich.org 70
i+/*** _isblank ***/ Err bitreich.org 70
i+ Err bitreich.org 70
i+int _isblank(int c){ Err bitreich.org 70
i+ return c==32 || c==9 ? 1 : 0; Err bitreich.org 70
i+} Err bitreich.org 70
i+ Err bitreich.org 70
i Err bitreich.org 70
i /*** Status bar ***/ Err bitreich.org 70
i Err bitreich.org 70
i@@ -161,7 +167,7 @@ void erase_blank_lines(int y1, int y2){ Err bitreich.org 70
i Err bitreich.org 70
i for (; y1 <= y2; y1++){ Err bitreich.org 70
i j = screen.l[y1].lst; Err bitreich.org 70
i- while (j>=0 && isblank(screen.l[y1].s[j])) Err bitreich.org 70
i+ while (j>=0 && _isblank(screen.l[y1].s[j])) Err bitreich.org 70
i j--; Err bitreich.org 70
i if (j<0){ Err bitreich.org 70
i screen.l[y1].lst = -1; Err bitreich.org 70
i@@ -430,12 +436,12 @@ void find_nonblank_rect(int *x1, int *y1, int *x2, int *y2){ Err bitreich.org 70
i if (i < *y1) Err bitreich.org 70
i *y1 = i; Err bitreich.org 70
i j = 0; Err bitreich.org 70
i- while((j <= screen.l[i].lst) && isblank(first=screen.l[i].s[j])) Err bitreich.org 70
i+ while((j <= screen.l[i].lst) && _isblank(first=screen.l[i].s[j])) Err bitreich.org 70
i j++; Err bitreich.org 70
i if (j < *x1) Err bitreich.org 70
i *x1 = j; Err bitreich.org 70
i j = screen.l[i].lst; Err bitreich.org 70
i- while(isblank(screen.l[i].s[j])) Err bitreich.org 70
i+ while(_isblank(screen.l[i].s[j])) Err bitreich.org 70
i j--; Err bitreich.org 70
i if (j > *x2) Err bitreich.org 70
i *x2 = j; Err bitreich.org 70
.
Response:
text/plain