source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* texi2mdoc: Casting for ctype functions.
@ 2015-02-25 15:51 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-02-25 15:51 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-25 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 15:51 texi2mdoc: Casting for ctype functions kristaps

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).