diff options
author | Joerg Sonnenberger <joerg@netbsd.org> | 2011-01-09 05:38:23 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@netbsd.org> | 2011-01-09 05:38:23 +0000 |
commit | f12fe2a87ec556851c27d5f8615e4c41a32d5cd3 (patch) | |
tree | bcc28ab3731cdcc194fc2b53364d0a0108734b99 | |
parent | a3167f92b87276e53ce071892274dd6964f4d8fb (diff) | |
download | mandoc-f12fe2a87ec556851c27d5f8615e4c41a32d5cd3.tar.gz |
Add some unsigned char casts for tolower() usage
-rw-r--r-- | tbl_layout.c | 6 | ||||
-rw-r--r-- | tbl_opts.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tbl_layout.c b/tbl_layout.c index 50e9728d..cc4fdfb5 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -130,7 +130,7 @@ mod: /* TODO: GNU has many more extensions. */ - switch (tolower(p[(*pos)++])) { + switch (tolower((unsigned char)p[(*pos)++])) { case ('z'): cp->flags |= TBL_CELL_WIGN; goto mod; @@ -160,7 +160,7 @@ mod: return(0); } - switch (tolower(p[(*pos)++])) { + switch (tolower((unsigned char)p[(*pos)++])) { case ('b'): cp->flags |= TBL_CELL_BOLD; goto mod; @@ -185,7 +185,7 @@ cell(struct tbl_node *tbl, struct tbl_row *rp, /* Parse the column position (`r', `R', `|', ...). */ for (i = 0; i < KEYS_MAX; i++) - if (tolower(p[*pos]) == keys[i].name) + if (tolower((unsigned char)p[*pos]) == keys[i].name) break; if (KEYS_MAX == i) { @@ -188,7 +188,7 @@ again: /* /* Copy up to first non-alpha character. */ for (sv = *pos, i = 0; i < KEY_MAXNAME; i++, (*pos)++) { - buf[i] = tolower(p[*pos]); + buf[i] = tolower((unsigned char)p[*pos]); if ( ! isalpha((unsigned char)buf[i])) break; } |