Moving upwards definition of MEM_K so it's not restricted to \!NDEBUG; Initialized **i in list_dir_el properly to silence gcc when compiling
This commit is contained in:
parent
55871bba3e
commit
aff0187d79
|
@ -3,6 +3,7 @@ D2X-Rebirth Changelog
|
||||||
20100827
|
20100827
|
||||||
--------
|
--------
|
||||||
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
|
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
|
||||||
|
include/u_mem.h, main/menu.c: Moving upwards definition of MEM_K so it's not restricted to !NDEBUG; Initialized **i in list_dir_el properly to silence gcc when compiling
|
||||||
|
|
||||||
20100825
|
20100825
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -18,6 +18,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||||
|
|
||||||
void mem_init(void);
|
void mem_init(void);
|
||||||
|
|
||||||
|
#define MEM_K 1.5 // Dynamic array growth factor
|
||||||
|
|
||||||
#if !defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
|
|
||||||
void mem_display_blocks();
|
void mem_display_blocks();
|
||||||
|
@ -26,8 +28,6 @@ extern void * mem_realloc( void * buffer, unsigned int size, char * var, char *
|
||||||
extern void mem_free( void * buffer );
|
extern void mem_free( void * buffer );
|
||||||
extern char * mem_strdup(char * str, char * var, char * file, int line );
|
extern char * mem_strdup(char * str, char * var, char * file, int line );
|
||||||
|
|
||||||
#define MEM_K 1.5 // Dynamic array growth factor
|
|
||||||
|
|
||||||
/* DPH: Changed malloc, etc. to d_malloc. Overloading system calls is very evil and error prone */
|
/* DPH: Changed malloc, etc. to d_malloc. Overloading system calls is very evil and error prone */
|
||||||
#define d_malloc(size) mem_malloc((size),"Unknown", __FILE__,__LINE__, 0 )
|
#define d_malloc(size) mem_malloc((size),"Unknown", __FILE__,__LINE__, 0 )
|
||||||
#define d_calloc(n,size) mem_malloc((n*size),"Unknown", __FILE__,__LINE__, 1 )
|
#define d_calloc(n,size) mem_malloc((n*size),"Unknown", __FILE__,__LINE__, 1 )
|
||||||
|
|
|
@ -1197,7 +1197,7 @@ void searchpath_matches(browser *b, const char *str)
|
||||||
void list_dir_el(browser *b, const char *origdir, const char *fname)
|
void list_dir_el(browser *b, const char *origdir, const char *fname)
|
||||||
{
|
{
|
||||||
char *ext;
|
char *ext;
|
||||||
char **i;
|
char **i = NULL;
|
||||||
|
|
||||||
ext = strrchr(fname, '.');
|
ext = strrchr(fname, '.');
|
||||||
if (ext)
|
if (ext)
|
||||||
|
|
Loading…
Reference in a new issue