pkgsrc/games/vms-empire/patches/patch-term.c
leot 930757fb15 Update games/vms-empire to 1.14.
Patch based on PR pkg/50624 provided by Ben Gergely.

Thanks to riastradh@, joerg@ and dholland@ for misc suggestions and review.

pkgsrc changes:
 o Add LICENSE
 o Instead of define a do-install use the install target provided by upstream

Changes:
1.14: 2016-01-05 06:49:17Z
        Add an identifying magic cookie and version to save files.
        Full ANSI prototypes for private functions as well as public.
	Markup fix for probability table.

1.13: 2014-12-14T17:06:26Z
	Comment on entry to and exit from edit mode.
	Cleaned up packaging and install/uninstall productions.

1.12: 2014-05-20T09:03:09Z
	Incorporated Dennis Pinckard's fix for a Mac OS/X port bug.
	Added desktop file.

1.11: 2013-12-31T17:31:04Z
	Clean up code to modern C, apply cppcheck.
	Fix code typo reported as Debian bug #593434

1.10: 2013-08-22T23:47:21Z
	Fix core dump when a satellite bounced off the world edge.
	Full ANSIfication of function prototypes (which fixed the
	sat bug - the code appears to have been tickling some obscure
	bug in the compilation of function calls with K&R-style prototypes).

1.9: 2012-02-16T22:59:22Z
	Drop RPM packaging. Documentation cleanups.

1.8: 2010-10-21T12:47:33Z
	Joe Wells's patch to enable different-sized worlds.  Minor fixes to
	map functions by Andrew Morrow. More on the history of the game.
	Enable arrow keys in edit mode.
	License changed from Chuck Simmons's cosmetically tweaked clone
	of the GPL to GPL proper, so the classifier systems that forge
	and archive sites use will be less confused.
2016-01-11 19:37:43 +00:00

26 lines
718 B
C

$NetBSD: patch-term.c,v 1.1 2016/01/11 19:37:43 leot Exp $
Fix ctype(3) functions usage.
--- term.c.orig 2014-12-15 16:26:35.000000000 +0000
+++ term.c
@@ -249,8 +249,8 @@ get_chx(void)
c = get_cq ();
- if (islower(c))
- return (toupper(c));
+ if (islower((unsigned char)c))
+ return (toupper((unsigned char)c));
else
return (c);
}
@@ -390,7 +390,7 @@ help(char **text, int nlines)
pos_str (r + text_lines + NUMTOPS + 3, c,"%-12s%c %c%6d%5d%6d",
piece_attr[i].nickname,
piece_attr[i].sname,
- tolower (piece_attr[i].sname),
+ tolower ((unsigned char)piece_attr[i].sname),
piece_attr[i].speed,
piece_attr[i].max_hits,
piece_attr[i].build_time,0,0); //FLAG