From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (joerg@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p095cN8i029893 for ; Sun, 9 Jan 2011 00:38:23 -0500 (EST) Received: (from joerg@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p095cNPq002787; Sun, 9 Jan 2011 00:38:23 -0500 (EST) Date: Sun, 9 Jan 2011 00:38:23 -0500 (EST) Message-Id: <201101090538.p095cNPq002787@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: joerg@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Add some unsigned char casts for tolower() usage X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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