removed some unused code

This commit is contained in:
oy 2011-12-29 12:37:28 +01:00
parent 6e20c32859
commit 4f0ee26fcf
2 changed files with 3 additions and 22 deletions

View file

@ -142,8 +142,6 @@ void dbg_logger_file(const char *filename)
}
/* */
int memory_alloced = 0;
typedef struct MEMHEADER
{
const char *filename;
@ -165,8 +163,10 @@ void *mem_alloc_debug(const char *filename, int line, unsigned size, unsigned al
{
/* TODO: fix alignment */
/* TODO: add debugging */
MEMTAIL *tail;
MEMHEADER *header = (struct MEMHEADER *)malloc(size+sizeof(MEMHEADER)+sizeof(MEMTAIL));
MEMTAIL *tail = (struct MEMTAIL *)(((char*)(header+1))+size);
dbg_assert(header != 0, "mem_alloc failure");
tail = (struct MEMTAIL *)(((char*)(header+1))+size);
header->size = size;
header->filename = filename;
header->line = line;

View file

@ -1130,25 +1130,6 @@ void mem_debug_dump(IOHANDLE file);
void swap_endian(void *data, unsigned elem_size, unsigned num);
/* Group: Debug levels */
//by format
enum {
DBG_FMT_RAW = 1, //raw output
DBG_FMT_TIME = 2, //show time
DBG_FMT_SYS = 3, //show sys
DBG_FMT_FULL = 4 //show both
};
enum {
DBG_LEVEL_IMPORTANT = 0, //important always showed messages
DBG_LEVEL_ERROR = 1, //error messages
DBG_LEVEL_WARNING = 2, //warning messages
DBG_LEVEL_MSG = 3, //extra debug messages
DBG_LEVEL_INFO = 4 //info messages
};
#define DBG_LEVEL_LOW DBG_LEVEL_IMPORTANT
#define DBG_LEVEL_HIGH DBG_LEVEL_INFO
typedef void (*DBG_LOGGER)(const char *line);
void dbg_logger(DBG_LOGGER logger);