The primary change is that things have been made memory-clean. Some of these
pointers may point to wildly different places during the course of the program
such as statically or dynamically allocated storage, the buffer returned by
getenv() (which must not be modified according to the docs), or an element of
argv[]. Consequently, we need to strdup, or better, dup_filename them if they
are ever to be passed to a function that modifies their pointed-to data.
Specifically:
- added statics or consts according to usage
- 3 new functions clear{Grp,Def,Script}NamePtr, only 'Def' one extern for now
- in G_CheckCommandLine, don't strip 'const'; use Bstrncpyz where appropriate
- remove multiple declarations
Also, warn if an application parameter has been ignored (not matched).
git-svn-id: https://svn.eduke32.com/eduke32@2561 1a8010ca-5511-0410-912e-c29ae57300e0
There were two instances of nearly identical code in premap.c and savegame.c.
Also identifies a (harmless) problem with realloc'ing, we had:
if (len+1 > sizeof(MapInfo[...].musicfn))
MapInfo[...].musicfn = Brealloc(MapInfo[...].musicfn, len+1)
which reallocs almost all the time (since .musicfn is a pointer). Now we do
realloc every time...
git-svn-id: https://svn.eduke32.com/eduke32@2202 1a8010ca-5511-0410-912e-c29ae57300e0
- fix an earlier 'oops': make highpals load correctly again
- maphack lights shouldn't be double-loaded now
- slight tweak to the loading screen fadein/out timing
- two bound checks
- make some variables static in engine.c
git-svn-id: https://svn.eduke32.com/eduke32@1969 1a8010ca-5511-0410-912e-c29ae57300e0