output.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. clsync - file tree sync utility based on fanotify and inotify
  3. Copyright (C) 2013 Dmitry Yu Okunev <dyokunev@ut.mephi.ru> 0x8E30679C
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. extern int out_init(int *flags);
  16. extern void out_flush();
  17. extern void out_deinit();
  18. extern int debug_print_flags();
  19. typedef int (*printf_funct)(const char *fmt, ...);
  20. typedef int (*write_funct)(const char *buf, size_t len);
  21. extern printf_funct _printf_ddd;
  22. #define printf_ddd if(_printf_ddd!=NULL)_printf_ddd
  23. extern printf_funct _printf_dd;
  24. #define printf_dd if(_printf_dd!=NULL)_printf_dd
  25. extern printf_funct _printf_d;
  26. #define printf_d if(_printf_d!=NULL)_printf_d
  27. extern printf_funct _printf_v;
  28. #define printf_v if(_printf_v!=NULL)_printf_v
  29. extern write_funct _write_ddd;
  30. #define write_ddd if(_write_ddd!=null)_write_ddd
  31. extern write_funct _write_dd;
  32. #define write_dd if(_write_dd!=null)_write_dd
  33. extern write_funct _write_d;
  34. #define write_d if(_write_d!=NULL)_write_d
  35. extern write_funct _write_v;
  36. #define write_v if(_write_v!=NULL)_write_v
  37. extern printf_funct printf_e;
  38. extern printf_funct printf_out;
  39. extern write_funct write_e;
  40. extern write_funct write_out;
  41. extern int printf_syslog_err(const char *fmt, ...);
  42. extern int printf_syslog_debug(const char *fmt, ...);
  43. extern int printf_syslog_info(const char *fmt, ...);
  44. extern int write_syslog_err(const char *buf, size_t len);
  45. extern int write_syslog_debug(const char *buf, size_t len);
  46. extern int write_syslog_info(const char *buf, size_t len);
  47. extern int printf_stderr(const char *fmt, ...);
  48. extern int printf_stdout(const char *fmt, ...);
  49. extern int write_stderr(const char *buf, size_t len);
  50. extern int write_srdout(const char *buf, size_t len);
  51. #define write_out_s(buf) write_out(buf, sizeof(buf)-1)
  52. extern void hexdump_e(const unsigned char *buf, size_t len);
  53. extern void hexdump_d(const unsigned char *buf, size_t len);
  54. extern void hexdump_dd(const unsigned char *buf, size_t len);