Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: Crossfire 0.95.2 Tru64 UNIX (Digital UNIX) compile patches



Minor patch attached to get it to compile on Digital UNIX V3.2C, which
has changed name to Tru64 UNIX.  The changes are;

	- random_maps/style.c select_regular_files() const removal
	- random_maps/style.c check NULL of an incremented pointer
	- server/main.c added a cast to generate_random_map() call
	- crossedit/Cnv/Makefile.in add a / to @x_includes@

These mainly cropped up because of the pedantic ANSI compliance mode of
the compiler.

-- 
James Cameron                                      (cameron@stl.dec.com)

OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.

"Specialisation is for insects." -- Robert Heinlein.
*** random_maps/style.c.orig	Mon Feb  1 11:00:15 EST 1999
--- random_maps/style.c	Mon Feb  1 11:04:17 EST 1999
***************
*** 118,124 ****
  
  /* the warning here is because I've declared it "const", the
     .h file in linux allows non-const.  */
! int select_regular_files(const struct dirent *the_entry) {
    if(the_entry->d_name[0]=='.') return 0;
    return 1;
  }
--- 118,124 ----
  
  /* the warning here is because I've declared it "const", the
     .h file in linux allows non-const.  */
! int select_regular_files(struct dirent *the_entry) {
    if(the_entry->d_name[0]=='.') return 0;
    return 1;
  }
***************
*** 176,182 ****
  	   for(i=0;i<n;i++) {
  	     int dist;
  	     char *mfile_name = strrchr(namelist[i]->d_name,'_')+1;
! 	     if(mfile_name == 0x1) { /* since there isn't a sequence, */
  	       /*pick one at random to recurse */
  	       return find_style(style_file_path,
  				 namelist[RANDOM()%n]->d_name,difficulty);
--- 176,182 ----
  	   for(i=0;i<n;i++) {
  	     int dist;
  	     char *mfile_name = strrchr(namelist[i]->d_name,'_')+1;
! 	     if((mfile_name-1) == NULL) { /* since there isn't a sequence, */
  	       /*pick one at random to recurse */
  	       return find_style(style_file_path,
  				 namelist[RANDOM()%n]->d_name,difficulty);
*** server/main.c.orig	Mon Feb  1 11:06:21 EST 1999
--- server/main.c	Mon Feb  1 11:07:29 EST 1999
***************
*** 252,258 ****
  			 sprintf(newmap_name,"/random/%s_%d_%d",oldmap_name,exit_ob->x,exit_ob->y);
  
  			 /* now to generate the actual map. */
! 			 new_map=generate_random_map("/tmp/rmap_params",newmap_name);
  			 
  			 /* set the hp,sp,path of the exit for the new */
  			 if(new_map) {
--- 252,258 ----
  			 sprintf(newmap_name,"/random/%s_%d_%d",oldmap_name,exit_ob->x,exit_ob->y);
  
  			 /* now to generate the actual map. */
! 			 new_map=(mapstruct *)generate_random_map("/tmp/rmap_params",newmap_name);
  			 
  			 /* set the hp,sp,path of the exit for the new */
  			 if(new_map) {
*** crossedit/Cnv/Makefile.in.orig	Mon Feb  1 11:15:07 EST 1999
--- crossedit/Cnv/Makefile.in	Mon Feb  1 11:16:55 EST 1999
***************
*** 10,16 ****
  
  OBJS = $(SRCS:.c=.o)
  
! INCLUDES= -I@x_includes@ $(EXTRA_INCLUDES) -I../include -I. -I../../include
  
  X11LIBS = 	@X11LIBS@
  LIBS = @LIBS@ $(X11LIBS)
--- 10,16 ----
  
  OBJS = $(SRCS:.c=.o)
  
! INCLUDES= -I@x_includes@/ $(EXTRA_INCLUDES) -I../include -I. -I../../include
  
  X11LIBS = 	@X11LIBS@
  LIBS = @LIBS@ $(X11LIBS)