From: joerg@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Add some unsigned char casts for tolower() usage
Date: Sun, 9 Jan 2011 00:38:23 -0500 (EST) [thread overview]
Message-ID: <201101090538.p095cNPq002787@krisdoz.my.domain> (raw)
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
reply other threads:[~2011-01-09 5:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201101090538.p095cNPq002787@krisdoz.my.domain \
--to=joerg@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).