From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id deacee34; for ; Wed, 25 Feb 2015 10:51:26 -0500 (EST) Date: Wed, 25 Feb 2015 10:51:26 -0500 (EST) Message-Id: <8899161759492633903.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: texi2mdoc: Casting for ctype functions. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Casting for ctype functions. Patch by Thomas Klausner--thanks! Modified Files: -------------- texi2mdoc: main.c util.c Revision Data ------------- Index: main.c =================================================================== RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v retrieving revision 1.48 retrieving revision 1.49 diff -Lmain.c -Lmain.c -u -p -r1.48 -r1.49 --- main.c +++ main.c @@ -990,7 +990,7 @@ doaccent(struct texi *p, enum texicmd cm if ('{' == BUF(p)[*pos]) { brace = 1; advance(p, pos); - } else if (isalpha(texitoks[cmd].tok[0])) + } else if (isalpha((unsigned char)texitoks[cmd].tok[0])) while (*pos < BUFSZ(p) && isws(BUF(p)[*pos])) advance(p, pos); @@ -1312,7 +1312,7 @@ dosymbol(struct texi *p, enum texicmd cm } /* Alphabetic commands have braces we ignore. */ - if (isalpha(texitoks[cmd].tok[0])) + if (isalpha((unsigned char)texitoks[cmd].tok[0])) doignbracket(p, cmd, pos); } @@ -1608,7 +1608,7 @@ dotop(struct texi *p, enum texicmd cmd, teximacroclose(p); teximacroopen(p, "Dt"); for (cp = p->title; '\0' != *cp; cp++) - texiputchar(p, toupper(*cp)); + texiputchar(p, toupper((unsigned int)*cp)); texiputchars(p, " 7"); teximacroclose(p); teximacro(p, "Os"); Index: util.c =================================================================== RCS file: /home/cvs/mdocml/texi2mdoc/util.c,v retrieving revision 1.15 retrieving revision 1.16 diff -Lutil.c -Lutil.c -u -p -r1.15 -r1.16 --- util.c +++ util.c @@ -589,7 +589,7 @@ texicmd(struct texi *p, size_t pos, size return(TEXICMD__MAX); /* Alphabetic commands are special. */ - if ( ! isalpha(BUF(p)[pos])) { + if ( ! isalpha((unsigned char)BUF(p)[pos])) { if ((*end = pos + 1) == BUFSZ(p)) return(TEXICMD__MAX); for (i = 0; i < TEXICMD__MAX; i++) { -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv