source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: texi2mdoc: Casting for ctype functions.
Date: Wed, 25 Feb 2015 10:51:26 -0500 (EST)	[thread overview]
Message-ID: <8899161759492633903.enqueue@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2015-02-25 15:51 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=8899161759492633903.enqueue@fantadrom.bsd.lv \
    --to=kristaps@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).