Add lots of debugging asserts and try to clean up behavior of lists in general.

Make dumping of proc data controlled by a separate debug define.
This commit is contained in:
Hisham Muhammad
2006-11-08 20:12:57 +00:00
parent 110ce71b9b
commit febe259e91
2 changed files with 25 additions and 15 deletions

View File

@ -60,7 +60,7 @@ in the source distribution for its full text.
#ifdef DEBUG
#ifdef DEBUG_PROC
typedef int(*vxscanf)(void*, const char*, va_list);
#endif
@ -118,13 +118,13 @@ typedef struct ProcessList_ {
bool highlightBaseName;
bool highlightMegabytes;
bool expandSystemTime;
#ifdef DEBUG
#ifdef DEBUG_PROC
FILE* traceFile;
#endif
} ProcessList;
#ifdef DEBUG
#ifdef DEBUG_PROC
#define ProcessList_read(this, buffer, format, ...) ProcessList_xread(this, (vxscanf) vsscanf, buffer, format, ## __VA_ARGS__ )
#define ProcessList_fread(this, file, format, ...) ProcessList_xread(this, (vxscanf) vfscanf, file, format, ## __VA_ARGS__ )