pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d4843ea
)
fixed -Wchar-subscripts on isspace() macros
author
Michael Göhler
<somebody.here@gmx.de>
Mon, 15 Sep 2014 18:38:30 +0000
(20:38 +0200)
committer
Michael Göhler
<somebody.here@gmx.de>
Mon, 15 Sep 2014 18:38:30 +0000
(20:38 +0200)
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
dc2677d
..
ec341ab
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-133,7
+133,7
@@
deck_t *markdown_load(FILE *input) {
}
}
- } else if(isprint(c) || isspace(c)) {
+ } else if(isprint(c) || isspace(
(unsigned char)
c)) {
// add char to line
(text->expand)(text, c);
// add char to line
(text->expand)(text, c);
@@
-235,7
+235,7
@@
int markdown_analyse(cstring_t *text) {
offset = next_nonblank(text, 0);
// strip trailing spaces
offset = next_nonblank(text, 0);
// strip trailing spaces
- for(eol = text->size; eol > offset && isspace(text->text[eol - 1]); eol--);
+ for(eol = text->size; eol > offset && isspace(
(unsigned char)
text->text[eol - 1]); eol--);
// IS_CODE
if(offset >= CODE_INDENT) {
// IS_CODE
if(offset >= CODE_INDENT) {
@@
-380,14
+380,14
@@
int length_utf8(char ch) {
}
int next_nonblank(cstring_t *text, int i) {
}
int next_nonblank(cstring_t *text, int i) {
- while ((i < text->size) && isspace((text->text)[i]))
+ while ((i < text->size) && isspace((
unsigned char) (
text->text)[i]))
++i;
return i;
}
int next_blank(cstring_t *text, int i) {
++i;
return i;
}
int next_blank(cstring_t *text, int i) {
- while ((i < text->size) && !isspace((text->text)[i]))
+ while ((i < text->size) && !isspace((
unsigned char) (
text->text)[i]))
++i;
return i;
++i;
return i;