Kleine Hilsfunktion zur Anzeige der registrierten Funktionen aus dem Debugger:

print list_registered_functions()
This commit is contained in:
Christian Schlittchen 2006-07-10 20:11:50 +00:00
parent d9f541f59e
commit 7c134e4f54
2 changed files with 12 additions and 0 deletions

View File

@ -57,3 +57,14 @@ register_function(pf_generic fun, const char * name)
fl->name = strdup(name); fl->name = strdup(name);
functions = fl; functions = fl;
} }
void
list_registered_functions(void)
{
function_list * fl = functions;
while(fl) {
printf("%s\n", fl->name);
fl = fl->next;
}
}

View File

@ -23,6 +23,7 @@ typedef void (*pf_generic)(void);
extern const char *get_functionname(pf_generic fun); extern const char *get_functionname(pf_generic fun);
extern pf_generic get_function(const char * name); extern pf_generic get_function(const char * name);
extern void register_function(pf_generic fun, const char * name); extern void register_function(pf_generic fun, const char * name);
extern void list_registered_functions(void);
#ifdef __cplusplus #ifdef __cplusplus
} }