diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-24 19:09:59 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-24 19:09:59 -0700 |
commit | 511e92f39fe9bdca51bea3ee0add95a6eca880f5 (patch) | |
tree | 399aec9d6bca17da43b99f7be66506408132a9a6 /src/inlines.c | |
parent | e8639baa2d91b653859fd8a3643c9c3127f0cece (diff) |
Use unsigned char, not char, throughout.
Closes #43.
Diffstat (limited to 'src/inlines.c')
-rw-r--r-- | src/inlines.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inlines.c b/src/inlines.c index 07a75f9..c95b46b 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -14,7 +14,7 @@ typedef struct InlineStack { struct InlineStack *previous; node_inl *first_inline; int delim_count; - char delim_char; + unsigned char delim_char; } inline_stack; typedef struct Subject { @@ -231,7 +231,7 @@ inline static chunk take_while(subject* subj, int (*f)(int)) static int scan_to_closing_backticks(subject* subj, int openticklength) { // read non backticks - char c; + unsigned char c; while ((c = peek_char(subj)) && c != '`') { advance(subj); } @@ -273,10 +273,10 @@ static node_inl* handle_backticks(subject *subj) // Scan ***, **, or * and return number scanned, or 0. // Advances position. -static int scan_delims(subject* subj, char c, bool * can_open, bool * can_close) +static int scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close) { int numdelims = 0; - char char_before, char_after; + unsigned char char_before, char_after; char_before = subj->pos == 0 ? '\n' : peek_at(subj, subj->pos - 1); while (peek_char(subj) == c) { @@ -305,7 +305,7 @@ static void free_openers(subject* subj, inline_stack* istack) // Parse strong/emph or a fallback. // Assumes the subject has '_' or '*' at the current position. -static node_inl* handle_strong_emph(subject* subj, char c, node_inl **last) +static node_inl* handle_strong_emph(subject* subj, unsigned char c, node_inl **last) { bool can_open, can_close; int numdelims; @@ -575,7 +575,7 @@ static int link_label(subject* subj, chunk *raw_label) } advance(subj); // advance past [ - char c; + unsigned char c; while ((c = peek_char(subj)) && (c != ']' || nestlevel > 0)) { switch (c) { case '`': |