EDuke32 Changelog Archivio non ufficiale

Build 2566

28 marzo 2012 · 14 commit di 1 autore · SVN

Build per mese 15 build

File di log originale · 20120328-2566.txt
------------------------------------------------------------------------
r2566 | helixhorned | 2012-03-28 12:45:25 -0700 (Wed, 28 Mar 2012) | 1 line

The obligatory portion of trivial stuff.
------------------------------------------------------------------------
r2565 | helixhorned | 2012-03-28 12:45:05 -0700 (Wed, 28 Mar 2012) | 1 line

Polymer: Fix a potential uninitialized mem read in debug msg when in void space.
------------------------------------------------------------------------
r2564 | helixhorned | 2012-03-28 12:44:47 -0700 (Wed, 28 Mar 2012) | 1 line

Clean up astub.c in a similar fashion to the preceding changes.
------------------------------------------------------------------------
r2563 | helixhorned | 2012-03-28 12:44:33 -0700 (Wed, 28 Mar 2012) | 1 line

Make g_grpNamePtr memory-clean, extern clearGrpNamePtr().
------------------------------------------------------------------------
r2562 | helixhorned | 2012-03-28 12:44:14 -0700 (Wed, 28 Mar 2012) | 1 line

numgrpfiles --> NUMGRPFILES in Apple/GameListSource.game.m
------------------------------------------------------------------------
r2561 | helixhorned | 2012-03-28 12:44:00 -0700 (Wed, 28 Mar 2012) | 16 lines

Clear up handling of g_*NamePtr in the game.

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).
------------------------------------------------------------------------
r2560 | helixhorned | 2012-03-28 12:43:39 -0700 (Wed, 28 Mar 2012) | 3 lines

New helper function "char *dup_filename(const char *fn)" in common.h.

It allocates a buffer of size BMAX_PATH and copies the passed string into it.
------------------------------------------------------------------------
r2559 | helixhorned | 2012-03-28 12:43:21 -0700 (Wed, 28 Mar 2012) | 1 line

Replace various occurences of "Bstrncpy(buf, src, sz); buf[sz-1]=0;" with Bstrncpyz
------------------------------------------------------------------------
r2558 | helixhorned | 2012-03-28 12:42:49 -0700 (Wed, 28 Mar 2012) | 1 line

Minor tweaks of makepalookup() and hicinit().
------------------------------------------------------------------------
r2557 | helixhorned | 2012-03-28 12:42:32 -0700 (Wed, 28 Mar 2012) | 5 lines

Replace {get,clear}filenames and duplicate autoload code in astub.c/game.c.

This additionally fixes leaks that were caused by traversing the file name
list with the 'findfiles' pointer and not clearing them afterwards (even if
there was a handle to the list head via 'findfileshigh').
------------------------------------------------------------------------
r2556 | helixhorned | 2012-03-28 12:42:16 -0700 (Wed, 28 Mar 2012) | 1 line

Replace {get,clear}filenames with fnlist functions in build.c, menus.c and osdcmds.c
------------------------------------------------------------------------
r2555 | helixhorned | 2012-03-28 12:41:57 -0700 (Wed, 28 Mar 2012) | 9 lines

Factor out different {clear,get}filenames definitions into fnlist_t + functions.

Don't actually replace the instances in the code now.
Additions in common.h:
 - fnlist_t, which combines CACHE1D_FIND_REC *finddirs, *findfiles and
   int32_t numdirs, numfiles
 - the FNLIST_INITIALIZER macro, which MUST be used for automatic variables
 - fnlist_clearnames, fnlist_getnames functions
 - G_LoadGroupsInDir, G_DoAutoload, two often-occurring uses of these
------------------------------------------------------------------------
r2554 | helixhorned | 2012-03-28 12:41:39 -0700 (Wed, 28 Mar 2012) | 1 line

Factor out eleven (!) instances of identical code into check_file_exist().
------------------------------------------------------------------------
r2553 | helixhorned | 2012-03-28 12:41:15 -0700 (Wed, 28 Mar 2012) | 6 lines

Clean up defs.c a little.

- remove redundant bound checks
- add necessary bound checks
- make one comparison pair consistent (> vs. >=)
- one if-if --> clamp
------------------------------------------------------------------------

Clear up handling of g_*NamePtr in the game.

Philipp Kutin (Helixhorned) 28 mar 2012, 12:44 UTC−7 r2561

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).

New helper function "char *dup_filename(const char *fn)" in common.h.

Philipp Kutin (Helixhorned) 28 mar 2012, 12:43 UTC−7 r2560

It allocates a buffer of size BMAX_PATH and copies the passed string into it.

Fix

Replace {get,clear}filenames and duplicate autoload code in astub.c/game.c.

Philipp Kutin (Helixhorned) 28 mar 2012, 12:42 UTC−7 r2557

This additionally fixes leaks that were caused by traversing the file name list with the 'findfiles' pointer and not clearing them afterwards (even if there was a handle to the list head via 'findfileshigh').

Factor out different {clear,get}filenames definitions into fnlist_t + functions.

Philipp Kutin (Helixhorned) 28 mar 2012, 12:41 UTC−7 r2555

Don't actually replace the instances in the code now. Additions in common.h: - fnlist_t, which combines CACHE1D_FIND_REC *finddirs, *findfiles and int32_t numdirs, numfiles - the FNLIST_INITIALIZER macro, which MUST be used for automatic variables - fnlist_clearnames, fnlist_getnames functions - G_LoadGroupsInDir, G_DoAutoload, two often-occurring uses of these

Clean up defs.c a little.

Philipp Kutin (Helixhorned) 28 mar 2012, 12:41 UTC−7 r2553

- remove redundant bound checks - add necessary bound checks - make one comparison pair consistent (> vs. >=) - one if-if --> clamp