Modified how we initialize save file info.
There should be no net change other then improving code maintenance.
This commit is contained in:
@@ -294,15 +294,42 @@ struct savefile_info {
|
|||||||
unsigned long sfi3; /* thirdparty */
|
unsigned long sfi3; /* thirdparty */
|
||||||
};
|
};
|
||||||
#ifdef NHSTDC
|
#ifdef NHSTDC
|
||||||
|
#define SFI_ZERO (0UL)
|
||||||
#define SFI1_EXTERNALCOMP (1UL)
|
#define SFI1_EXTERNALCOMP (1UL)
|
||||||
#define SFI1_RLECOMP (1UL << 1)
|
#define SFI1_RLECOMP (1UL << 1)
|
||||||
#define SFI1_ZEROCOMP (1UL << 2)
|
#define SFI1_ZEROCOMP (1UL << 2)
|
||||||
#else
|
#else
|
||||||
|
#define SFI_ZERO (0L)
|
||||||
#define SFI1_EXTERNALCOMP (1L)
|
#define SFI1_EXTERNALCOMP (1L)
|
||||||
#define SFI1_RLECOMP (1L << 1)
|
#define SFI1_RLECOMP (1L << 1)
|
||||||
#define SFI1_ZEROCOMP (1L << 2)
|
#define SFI1_ZEROCOMP (1L << 2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(COMPRESS) || defined(ZLIB_COMP)
|
||||||
|
#define SFI1_DEFAULT_EXTERNALCOMP SFI1_EXTERNALCOMP
|
||||||
|
#else
|
||||||
|
#define SFI1_DEFAULT_EXTERNALCOMP SFI_ZERO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ZEROCOMP)
|
||||||
|
#define SFI1_DEFAULT_ZEROCOMP SFI1_EXTERNALCOMP
|
||||||
|
#else
|
||||||
|
#define SFI1_DEFAULT_ZEROCOMP SFI_ZERO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(RLECOMP)
|
||||||
|
#define SFI1_DEFAULT_RLECOMP SFI1_RLECOMP
|
||||||
|
#else
|
||||||
|
#define SFI1_DEFAULT_RLECOMP SFI_ZERO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SFI1_DEFAULT (SFI1_DEFAULT_EXTERNALCOMP | \
|
||||||
|
SFI1_DEFAULT_ZEROCOMP | \
|
||||||
|
SFI1_DEFAULT_RLECOMP)
|
||||||
|
#define SFI2_DEFAULT SFI_ZERO
|
||||||
|
#define SFI3_DEFAULT SFI_ZERO
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configurable internal parameters.
|
* Configurable internal parameters.
|
||||||
*
|
*
|
||||||
|
|||||||
42
src/decl.c
42
src/decl.c
@@ -285,49 +285,11 @@ char *fqn_prefix_names[PREFIX_COUNT] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
NEARDATA struct savefile_info sfcap = {
|
NEARDATA struct savefile_info sfcap = {
|
||||||
#ifdef NHSTDC
|
SFI1_DEFAULT, SFI2_DEFAULT, SFI3_DEFAULT
|
||||||
0x00000000UL
|
|
||||||
#else
|
|
||||||
0x00000000L
|
|
||||||
#endif
|
|
||||||
#if defined(COMPRESS) || defined(ZLIB_COMP)
|
|
||||||
| SFI1_EXTERNALCOMP
|
|
||||||
#endif
|
|
||||||
#if defined(ZEROCOMP)
|
|
||||||
| SFI1_ZEROCOMP
|
|
||||||
#endif
|
|
||||||
#if defined(RLECOMP)
|
|
||||||
| SFI1_RLECOMP
|
|
||||||
#endif
|
|
||||||
,
|
|
||||||
#ifdef NHSTDC
|
|
||||||
0x00000000UL, 0x00000000UL
|
|
||||||
#else
|
|
||||||
0x00000000L, 0x00000000L
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NEARDATA struct savefile_info sfrestinfo, sfsaveinfo = {
|
NEARDATA struct savefile_info sfrestinfo, sfsaveinfo = {
|
||||||
#ifdef NHSTDC
|
SFI1_DEFAULT, SFI2_DEFAULT, SFI3_DEFAULT
|
||||||
0x00000000UL
|
|
||||||
#else
|
|
||||||
0x00000000L
|
|
||||||
#endif
|
|
||||||
#if defined(COMPRESS) || defined(ZLIB_COMP)
|
|
||||||
| SFI1_EXTERNALCOMP
|
|
||||||
#endif
|
|
||||||
#if defined(ZEROCOMP)
|
|
||||||
| SFI1_ZEROCOMP
|
|
||||||
#endif
|
|
||||||
#if defined(RLECOMP)
|
|
||||||
| SFI1_RLECOMP
|
|
||||||
#endif
|
|
||||||
,
|
|
||||||
#ifdef NHSTDC
|
|
||||||
0x00000000UL, 0x00000000UL
|
|
||||||
#else
|
|
||||||
0x00000000L, 0x00000000L
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct plinemsg_type *plinemsg_types = (struct plinemsg_type *) 0;
|
struct plinemsg_type *plinemsg_types = (struct plinemsg_type *) 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user