Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

41 rinda
1.0 KiB

  1. /*
  2. * libcaca Colour ASCII-Art library
  3. * Copyright (c) 2006-2012 Sam Hocevar <sam@hocevar.net>
  4. * All Rights Reserved
  5. *
  6. * This library is free software. It comes without any warranty, to
  7. * the extent permitted by applicable law. You can redistribute it
  8. * and/or modify it under the terms of the Do What the Fuck You Want
  9. * to Public License, Version 2, as published by Sam Hocevar. See
  10. * http://www.wtfpl.net/ for more details.
  11. */
  12. /*
  13. * This file contains debugging functions.
  14. */
  15. #ifndef __CACA_DEBUG_H__
  16. #define __CACA_DEBUG_H__
  17. /* debug messages */
  18. #if defined DEBUG && !defined __KERNEL__
  19. # include <stdio.h>
  20. # include <stdarg.h>
  21. static inline void debug(const char *format, ...)
  22. {
  23. int saved_errno = geterrno();
  24. va_list args;
  25. va_start(args, format);
  26. fprintf(stderr, "** libcaca debug ** ");
  27. vfprintf(stderr, format, args);
  28. fprintf(stderr, "\n");
  29. va_end(args);
  30. seterrno(saved_errno);
  31. }
  32. #else
  33. # define debug(format, ...) do {} while(0)
  34. #endif
  35. #endif /* __CACA_DEBUG_H__ */