* mdocml: Add some unsigned char casts for tolower() usage
@ 2011-01-09 5:38 joerg
0 siblings, 0 replies; only message in thread
From: joerg @ 2011-01-09 5:38 UTC (permalink / raw)
To: source
Log Message:
-----------
Add some unsigned char casts for tolower() usage
Modified Files:
--------------
mdocml:
tbl_layout.c
tbl_opts.c
Revision Data
-------------
Index: tbl_opts.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_opts.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Ltbl_opts.c -Ltbl_opts.c -u -p -r1.7 -r1.8
--- tbl_opts.c
+++ 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;
}
Index: tbl_layout.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_layout.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Ltbl_layout.c -Ltbl_layout.c -u -p -r1.12 -r1.13
--- tbl_layout.c
+++ 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_ro
/* 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) {
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-09 5:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-09 5:38 mdocml: Add some unsigned char casts for tolower() usage joerg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).