summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tbl_layout.c6
-rw-r--r--tbl_opts.c2
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) {
diff --git a/tbl_opts.c b/tbl_opts.c
index 227deb1f..28b658f7 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -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;
}