zlib support; also internal compression changes
o Add support for zlib compression via ZLIB_COMP in config.h (ZLIB_COMP and COMPRESS are mutually exclusive). o rlecomp and zerocomp are run time options available if RLECOMP and ZEROCOMP are defined, but not turned on by default if either COMPRESS or ZLIB_COMP are defined. o Add information to the save file about internal compression options used when writing the save file, particularly rlecomp and zerocomp support. o Automatically adjust rlecomp and zerocomp (if support compiled in) when reading in an existing savefile that was saved with those options turned on. Still allows writing out of savefile in preferred format. o In order to support zlib and not conflict with compress and uncompress routines there, the NetHack internal functions were changed to nh_uncompress and nh_compress as done in the zlib contribution received in 1999 from <Someone>. I tagged the sources NETHACK_3_5_0_PREZLIB prior to applying these changes.
This commit is contained in:
@@ -673,8 +673,8 @@ E int NDECL(create_savefile);
|
||||
E int NDECL(open_savefile);
|
||||
E int NDECL(delete_savefile);
|
||||
E int NDECL(restore_saved_game);
|
||||
E void FDECL(compress, (const char *));
|
||||
E void FDECL(uncompress, (const char *));
|
||||
E void FDECL(nh_compress, (const char *));
|
||||
E void FDECL(nh_uncompress, (const char *));
|
||||
E boolean FDECL(lock_file, (const char *,int,int));
|
||||
E void FDECL(unlock_file, (const char *));
|
||||
#ifdef USER_SOUNDS
|
||||
@@ -1751,14 +1751,14 @@ E void FDECL(getlev, (int,int,XCHAR_P,BOOLEAN_P));
|
||||
E void FDECL(get_plname_from_file, (int, char *));
|
||||
E void NDECL(minit);
|
||||
E boolean FDECL(lookup_id_mapping, (unsigned, unsigned *));
|
||||
#ifdef ZEROCOMP
|
||||
E int FDECL(mread, (int,genericptr_t,unsigned int));
|
||||
#else
|
||||
E void FDECL(mread, (int,genericptr_t,unsigned int));
|
||||
#endif
|
||||
#ifndef GOLDOBJ
|
||||
E void FDECL(put_gold_back, (struct obj **,long *));
|
||||
#endif
|
||||
E int FDECL(validate, (int,const char *));
|
||||
E void NDECL(reset_restpref);
|
||||
E void FDECL(set_restpref, (const char *));
|
||||
E void FDECL(set_savepref, (const char *));
|
||||
|
||||
/* ### rip.c ### */
|
||||
|
||||
@@ -1835,10 +1835,15 @@ E void FDECL(bufoff, (int));
|
||||
E void FDECL(bflush, (int));
|
||||
E void FDECL(bwrite, (int,genericptr_t,unsigned int));
|
||||
E void FDECL(bclose, (int));
|
||||
E void FDECL(def_bclose, (int));
|
||||
#if defined(ZEROCOMP)
|
||||
E void FDECL(zerocomp_bclose, (int));
|
||||
#endif
|
||||
E void FDECL(savefruitchn, (int,int));
|
||||
E void FDECL(store_plname_in_file, (int));
|
||||
E void NDECL(free_dungeons);
|
||||
E void NDECL(freedynamicdata);
|
||||
E void FDECL(store_savefileinfo, (int));
|
||||
|
||||
/* ### shk.c ### */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user