Version 1.02.04 -
============================
+ Add file & line to dm_strdup_aux().
Add setgeometry.
Version 1.02.03 - 7 Feb 2006
void *dm_malloc_aux(size_t s, const char *file, int line);
void *dm_malloc_aux_debug(size_t s, const char *file, int line);
-char *dm_strdup_aux(const char *str);
+char *dm_strdup_aux(const char *str, const char *file, int line);
void dm_free_aux(void *p);
void *dm_realloc_aux(void *p, unsigned int s, const char *file, int line);
int dm_dump_memory_debug(void);
#ifdef DEBUG_MEM
# define dm_malloc(s) dm_malloc_aux_debug((s), __FILE__, __LINE__)
-# define dm_strdup(s) dm_strdup_aux(s)
+# define dm_strdup(s) dm_strdup_aux((s), __FILE__, __LINE__)
# define dm_free(p) dm_free_aux(p)
# define dm_realloc(p, s) dm_realloc_aux(p, s, __FILE__, __LINE__)
# define dm_dump_memory() dm_dump_memory_debug()
#include <assert.h>
#include <stdarg.h>
-char *dm_strdup_aux(const char *str)
+char *dm_strdup_aux(const char *str, const char *file, int line)
{
- char *ret = dm_malloc(strlen(str) + 1);
+ char *ret = dm_malloc_aux_debug(strlen(str) + 1, file, line);
if (ret)
strcpy(ret, str);