[comp.sources.bugs] Bug fixes for distribution problems in conquest

billr@tekred.TEK.COM (Bill Randle) (10/29/87)

There were a couple of minor problems in the recent conquest
distribution that may cause you difficulty in compiling the source.
There was an extra newline inserted in a very long line (this occurs
in makeworld.c and move.c).  Also, the control-G character in the
header.h file got stripped out.  If you have any program bugs be
sure to pass them on to the author so he can fix them up.

	-Bill Randle
	Moderator, comp.sources.games
	Tektronix, Inc.
	games-request@tekred.TEK.COM
---------------------------
*** header.h.orig	Fri Oct 23 16:35:45 1987
--- header.h	Thu Oct 29 09:00:10 1987
***************
*** 350,356 ****
  /*my first macro: which will return 1 if the nation has that power*/
  #define magic(NATION,POWER)	!(ntn[NATION].powers%(POWER))  
  
! #define beep()		putchar('')
  
  #define FOODTHRESH 3
  #define GOLDTHRESH 10
--- 350,356 ----
  /*my first macro: which will return 1 if the nation has that power*/
  #define magic(NATION,POWER)	!(ntn[NATION].powers%(POWER))  
  
! #define beep()		putchar('\007')
  
  #define FOODTHRESH 3
  #define GOLDTHRESH 10
*** makeworld.c.orig	Fri Oct 23 16:34:44 1987
--- makeworld.c	Thu Oct 29 09:06:25 1987
***************
*** 695,702 ****
  	while(done==0) {
  		/*read and parse a new line*/
  		if(line[0]!='#') {
! 			sscanf(line,"%s %s %c %c %c %hd %hd %hd %d %d %d %hd %hd",ntn[cnum].name,ntn[cnum].leader,&ntn[cnum].race,&ntn[cnum].mark,&ntn[cnum].location,&ntn[cnum].aplus,&ntn[cnum].dplus,&ntn[cnum].maxmove,&ntn[cnum].tgold,&ntn[cnum].tmil,&ntn[cnum].tciv,&ntn[cnu
! m].repro,&ntn[cnum].active);
  			ntn[cnum].active++;
  			ntn[cnum].class=0;
  			strcpy(ntn[cnum].passwd,ntn[0].passwd);
--- 695,706 ----
  	while(done==0) {
  		/*read and parse a new line*/
  		if(line[0]!='#') {
! 			sscanf(line,"%s %s %c %c %c %hd %hd %hd %d %d %d %hd %hd",
! 			    ntn[cnum].name,ntn[cnum].leader,&ntn[cnum].race,
! 			    &ntn[cnum].mark,&ntn[cnum].location,&ntn[cnum].aplus,
! 			    &ntn[cnum].dplus,&ntn[cnum].maxmove,&ntn[cnum].tgold,
! 			    &ntn[cnum].tmil,&ntn[cnum].tciv,&ntn[cnum].repro,
! 			    &ntn[cnum].active);
  			ntn[cnum].active++;
  			ntn[cnum].class=0;
  			strcpy(ntn[cnum].passwd,ntn[0].passwd);
*** move.c.orig	Fri Oct 23 16:34:40 1987
--- move.c	Thu Oct 29 09:08:49 1987
***************
*** 275,282 ****
  			for(Tnation=0;Tnation<NTOTAL;Tnation++) 
  			if(Tnation!=country) 
  			for(Tarmynum=0;Tarmynum<MAXNAVY;Tarmynum++) 
! 			if((ntn[Tnation].nvy[Tarmynum].warships>0)&&(ntn[Tnation].nvy[Tarmynum].xloc<=XREAL+1)&&(ntn[Tnation].nvy[Tarmynum].xloc>=XREAL-1)&&(ntn[Tnation].nvy[Tarmynum].yloc<=YREAL+1)&&(ntn[Tnation].nvy[Tarmynum].yloc>=YREAL-1)&&(ntn[Tnation].dstatus[country]>=
! HOSTILE))
  				total+=ntn[Tnation].nvy[Tarmynum].warships;
  		}
  
--- 275,286 ----
  			for(Tnation=0;Tnation<NTOTAL;Tnation++) 
  			if(Tnation!=country) 
  			for(Tarmynum=0;Tarmynum<MAXNAVY;Tarmynum++) 
! 			if((ntn[Tnation].nvy[Tarmynum].warships>0)
! 			    && (ntn[Tnation].nvy[Tarmynum].xloc<=XREAL+1)
! 			    && (ntn[Tnation].nvy[Tarmynum].xloc>=XREAL-1)
! 			    && (ntn[Tnation].nvy[Tarmynum].yloc<=YREAL+1)
! 			    && (ntn[Tnation].nvy[Tarmynum].yloc>=YREAL-1)
! 			    && (ntn[Tnation].dstatus[country]>=HOSTILE))
  				total+=ntn[Tnation].nvy[Tarmynum].warships;
  		}