aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tbl_layout.c8
-rw-r--r--tbl_opts.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/tbl_layout.c b/tbl_layout.c
index fc03086b..59490ad4 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_layout.c,v 1.12 2011/01/07 14:59:52 kristaps Exp $ */
+/* $Id: tbl_layout.c,v 1.13 2011/01/09 05:38:23 joerg Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 b9388676..b8e0ea2e 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_opts.c,v 1.7 2011/01/07 13:20:58 kristaps Exp $ */
+/* $Id: tbl_opts.c,v 1.8 2011/01/09 05:38:23 joerg Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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;
}