2 * Copyright (C) 2007 Stig Venaas <venaas@uninett.no>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
16 static uint8_t debug_level = 0;
18 void debug(uint8_t level, char *format, ...) {
21 if (level >= debug_level) {
24 vfprintf(stderr, format, ap);
27 fprintf(stderr, ": ");
29 fprintf(stderr, "errno=%d\n", errno);
31 fprintf(stderr, "\n");