[comp.sources.games.bugs] Diffs to seahaven

setzer@matagh.ncsu.edu (Th'PoC) (02/14/91)

I had to make a few changes to get seahaven to compile under g++.
Here's the diffs for anyone that's interested.  You'll get a warning
about flock being declared inconsistently, but it didn't seem to
affect the program, so I didn't try to make it go away.  The diffs
work for both /bin/make and gnumake on my Sun4/280 (SunOS 4.0).

William Setzer
setzer@matagh.ncsu.edu

8<-8<-8<-8<- Cut 8<-8<-8<-8<-
*** Makefile.orig	Wed Feb 13 09:46:25 1991
--- Makefile	Wed Feb 13 10:58:40 1991
***************
*** 4,16 ****
  LIBX = -lX11
  DEFINES =
  
! CPLUSPLUS = CC
  
  OBJS = main.o util.o card.o cardbitmaps.o stack.o score.o auto.o 
  
  .SUFFIXES: $(.SUFFIXES) .C
  
! .C.o: $*.C
  	$(CPLUSPLUS) -c -g $(INCLUDES) $(DEFINES) $*.C
  
  
--- 4,16 ----
  LIBX = -lX11
  DEFINES =
  
! CPLUSPLUS = g++
  
  OBJS = main.o util.o card.o cardbitmaps.o stack.o score.o auto.o 
  
  .SUFFIXES: $(.SUFFIXES) .C
  
! .C.o:
  	$(CPLUSPLUS) -c -g $(INCLUDES) $(DEFINES) $*.C
  
  
*** auto.c.orig	Wed Feb 13 09:46:26 1991
--- auto.c	Wed Feb 13 10:46:47 1991
***************
*** 35,41 ****
  #endif
  
  
- struct timezone tz;
  struct timeval start_time;
  struct timeval end_time;
  
--- 35,40 ----
***************
*** 345,351 ****
  #ifdef AUTO
  SolutionLog solutionhead = NULL;
  
- overload LogSolution();
  
  static void LogOneSolution(Card card, int dest) {
      SolutionLog temp = new SolutionLogRec;
--- 344,349 ----
***************
*** 454,460 ****
    public:
      Card& operator[] (int i) { return data[i]; }
      void MoveToAce(Card& from) {
! 	data[from.suit()] = Card(from);
  	from = Card();
      }
      void MoveToAce(CardRange& from) {
--- 452,458 ----
    public:
      Card& operator[] (int i) { return data[i]; }
      void MoveToAce(Card& from) {
! 	data[from.suit()] = from;
  	from = Card();
      }
      void MoveToAce(CardRange& from) {
***************
*** 470,476 ****
    public:
      Card& operator[] (int i) { return data[i]; }
      void MoveToKing(Card& from) {
! 	data[from.suit()] = Card(from);
  	from = Card();
      }
      void MoveToKing(CardRange& from) {
--- 468,474 ----
    public:
      Card& operator[] (int i) { return data[i]; }
      void MoveToKing(Card& from) {
! 	data[from.suit()] = from;
  	from = Card();
      }
      void MoveToKing(CardRange& from) {
***************
*** 946,952 ****
  
      sprintf(savefile, "%s/.seahavensave", getenv("HOME"));
  
!     istream in = istream(open(savefile, O_RDONLY));
      Tableaux t(in);
  
      solutionhead = NULL;
--- 944,950 ----
  
      sprintf(savefile, "%s/.seahavensave", getenv("HOME"));
  
!     istream in(open(savefile, O_RDONLY));
      Tableaux t(in);
  
      solutionhead = NULL;