pinosaur
/
smdp.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework max_lines/cols detection to support line wrapping (#15 part 1)
[smdp.git]
/
src
/
parser.c
diff --git
a/src/parser.c
b/src/parser.c
index
c04facc
..
c8120cd
100644
(file)
--- a/
src/parser.c
+++ b/
src/parser.c
@@
-501,6
+501,13
@@
int next_nonblank(cstring_t *text, int i) {
return i;
}
return i;
}
+int prev_blank(cstring_t *text, int i) {
+ while ((i > 0) && !isspace((unsigned char) (text->text)[i]))
+ i--;
+
+ return i;
+}
+
int next_blank(cstring_t *text, int i) {
while ((i < text->size) && !isspace((unsigned char) (text->text)[i]))
i++;
int next_blank(cstring_t *text, int i) {
while ((i < text->size) && !isspace((unsigned char) (text->text)[i]))
i++;