Tue Sep 23 22:21:43 2014 UTC ()
Don't include termcap.h on SunOS.


(jperkin)
diff -r1.7 -r1.8 pkgsrc/games/greed/distinfo
diff -r1.3 -r1.4 pkgsrc/games/greed/patches/patch-ab

cvs diff -r1.7 -r1.8 pkgsrc/games/greed/distinfo (expand / switch to context diff)
--- pkgsrc/games/greed/distinfo 2013/10/11 14:33:47 1.7
+++ pkgsrc/games/greed/distinfo 2014/09/23 22:21:43 1.8
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.7 2013/10/11 14:33:47 roy Exp $
+$NetBSD: distinfo,v 1.8 2014/09/23 22:21:43 jperkin Exp $
 
 SHA1 (greed-3.4.tar.gz) = d70bd592378531d6726dfe00d3627e13b9dd9cce
 RMD160 (greed-3.4.tar.gz) = 13c432c030d333d0b6722263067dfab2fb2cf26e
 Size (greed-3.4.tar.gz) = 11463 bytes
 SHA1 (patch-aa) = a3af5d13e44c760a8c28371588339c22fdf82ac0
-SHA1 (patch-ab) = a3a7720f3f48743fbd00c15a21a3e37368b9c5f1
+SHA1 (patch-ab) = 1b68df9d66948ed3eeae6c8fd7badea61b1fcd62

cvs diff -r1.3 -r1.4 pkgsrc/games/greed/patches/patch-ab (expand / switch to context diff)
--- pkgsrc/games/greed/patches/patch-ab 2012/05/23 05:58:17 1.3
+++ pkgsrc/games/greed/patches/patch-ab 2014/09/23 22:21:43 1.4
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.3 2012/05/23 05:58:17 dholland Exp $
+$NetBSD: patch-ab,v 1.4 2014/09/23 22:21:43 jperkin Exp $
 
 - use standard headers
 - don't declare own strchr, getenv, time, tgetent
@@ -11,7 +11,7 @@
 
 --- greed.c.orig	2002-07-30 22:03:43.000000000 +0000
 +++ greed.c
-@@ -47,38 +47,36 @@
+@@ -47,38 +47,38 @@
  
  static char *version = "Greed v" RELEASE;
  
@@ -36,7 +36,9 @@
  #else
 -#include <sys/file.h>
 +#include <pwd.h>
++#ifndef __sun
 +#include <termcap.h>
++#endif
 +#include <unistd.h>
  #endif
 +
@@ -65,7 +67,7 @@
  #define random rand
  #define srandom srand
  #define ESC 27
-@@ -105,22 +103,21 @@ struct score {				/* changing stuff in t
+@@ -105,22 +105,21 @@ struct score {				/* changing stuff in t
  int allmoves = 0, score = 1, grid[22][79], y, x, havebotmsg = 0;
  char *cmdname;
  WINDOW *helpwin = NULL;
@@ -92,7 +94,7 @@
  {
  	mvaddstr(23, 40, msg);
  	clrtoeol();
-@@ -134,7 +131,7 @@ register backcur;
+@@ -134,7 +133,7 @@ register backcur;
   * current score) and quits; otherwise, simply returns to the game.         */
  
  void quit() {
@@ -101,7 +103,7 @@
  #ifdef NOTBSD
  	void (*osig)() = signal(SIGINT, SIG_IGN);	/* save old signal */
  #else
-@@ -195,16 +192,14 @@ void showscore() {
+@@ -195,16 +194,14 @@ void showscore() {
  
  void showmoves();
  
@@ -120,7 +122,7 @@
  #endif
  
  	cmdname = argv[0];			/* save the command name */
-@@ -274,10 +269,10 @@ char *argv[];
+@@ -274,10 +271,10 @@ char *argv[];
  				if (strchr(cnames, *cp) != (char *) NULL)
  					if (*cp != ' ') {
  						init_pair(cp-colors+1,
@@ -134,7 +136,7 @@
  							attribs[cp-colors] |= A_BOLD;
  					}
  			if (*cp == ':')
-@@ -292,7 +287,7 @@ char *argv[];
+@@ -292,7 +289,7 @@ char *argv[];
  		for (x=0; x < 79; x++)		/* print numbers out */
  #ifdef A_COLOR
  			if (has_colors()) {
@@ -143,7 +145,7 @@
  
  				attron(attribs[newval - 1]);
  				mvaddch(y, x, (grid[y][x] = newval) + '0');
-@@ -331,11 +326,11 @@ char *argv[];
+@@ -331,11 +328,11 @@ char *argv[];
  /* tunnel() does the main game work.  Returns 1 if everything's okay, 0 if *
   * user "died", and -1 if user specified and confirmed 'q' (fast quit).    */
  
@@ -157,7 +159,7 @@
  	void help();
  
  	switch (cmd) {				/* process user command */
-@@ -396,7 +391,7 @@ int * attribs;
+@@ -396,7 +393,7 @@ int * attribs;
  		grid[y+dy][x+dx] : 0;
  
  	{
@@ -166,7 +168,7 @@
  
  		do {				/* process move for validity */
  			j += dy;
-@@ -450,10 +445,10 @@ int * attribs;
+@@ -450,10 +447,10 @@ int * attribs;
   * direction variables that tell othermove() they are already no good, and to *
   * not process them.  I don't know if this is efficient, but it works!        */
  
@@ -180,7 +182,7 @@
  
  	for (; dy <= 1; dy++)
  		for (dx = -1; dx <= 1; dx++)
-@@ -462,7 +457,7 @@ register bady, badx;
+@@ -462,7 +459,7 @@ register bady, badx;
  					/* don't do 0,0 or bad coordinates */
  				continue;
  			else {
@@ -189,7 +191,7 @@
  
  				if (!d) continue;
  				do {		/* "walk" the path, checking */
-@@ -481,15 +476,15 @@ register bady, badx;
+@@ -481,15 +478,15 @@ register bady, badx;
  /* moves instead.  "on" tells showmoves() whether to add or remove moves.     */
  
  void showmoves(on, attribs)
@@ -208,7 +210,7 @@
  
  			if (!d) continue;
  			do {
-@@ -499,7 +494,7 @@ int * attribs;
+@@ -499,7 +496,7 @@ int * attribs;
  				    || i >= 79 || !grid[j][i]) break;
  			} while (--d);
  			if (!d) {
@@ -217,7 +219,7 @@
  
  				/* The next section chooses inverse-video    *
  				 * or not, and then "walks" chosen valid     *
-@@ -529,8 +524,8 @@ int * attribs;
+@@ -529,8 +526,8 @@ int * attribs;
  
  /* doputc() simply prints out a character to stdout, used by tputs() */
  
@@ -228,7 +230,7 @@
  {
  	return(fputc(c, stdout));
  }
-@@ -542,18 +537,19 @@ register char c;
+@@ -542,18 +539,19 @@ register char c;
  void topscores(newscore)
  register int newscore;
  {
@@ -250,7 +252,7 @@
  	(void) signal(SIGINT, SIG_IGN);		/* Catch all signals, so high */
  #ifndef MSDOS
  	(void) signal(SIGQUIT, SIG_IGN);	/* score file doesn't get     */
-@@ -665,9 +661,9 @@ register int newscore;
+@@ -665,9 +663,9 @@ register int newscore;
  
  #ifndef MSDOS
  void lockit(on)