A tool for adding anime to your anidb list.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 2 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #include <stdarg.h>
  2. #include <stdio.h>
  3. #include "uio.h"
  4. #include "config.h"
  5. void uio_user(const char *format, ...)
  6. {
  7. va_list ap;
  8. va_start(ap, format);
  9. vprintf(format, ap);
  10. printf("\n");
  11. va_end(ap);
  12. }
  13. void uio_error(const char *format, ...)
  14. {
  15. va_list ap;
  16. va_start(ap, format);
  17. printf("\033[31m[ERROR]: ");
  18. vprintf(format, ap);
  19. printf("\033[0m\n");
  20. va_end(ap);
  21. }
  22. void uio_debug(const char *format, ...)
  23. {
  24. bool *dbg_enabled;
  25. va_list ap;
  26. config_get("debug", (void**)&dbg_enabled);
  27. if (!*dbg_enabled)
  28. return;
  29. va_start(ap, format);
  30. printf("\033[35m[DEBUG]: ");
  31. vprintf(format, ap);
  32. printf("\033[0m\n");
  33. va_end(ap);
  34. }
  35. void uio_warning(const char *format, ...)
  36. {
  37. va_list ap;
  38. va_start(ap, format);
  39. printf("\033[33m[WARNING]: ");
  40. vprintf(format, ap);
  41. printf("\033[0m\n");
  42. va_end(ap);
  43. }