void list_print(list *l, void (*print_callback) (void *p)) { list *l1 = l; while(l1 != NULL) { print_callback(l1->data); l1 = l1->next; } }
void console_print(const char *str) { if (print_callback) { print_callback(str, print_callback_userdata); } }