stdio.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) Siddharth Bharat Purohit 2017
  3. * This file is free software: you can redistribute it and/or modify it
  4. * under the terms of the GNU General Public License as published by the
  5. * Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This file is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along
  14. * with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include <stdarg.h>
  18. #include <stdint.h>
  19. #include <stddef.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. int __wrap_snprintf(char *str, size_t size, const char *fmt, ...);
  24. int __wrap_vsnprintf(char *str, size_t size, const char *fmt, va_list ap);
  25. int __wrap_vasprintf(char **strp, const char *fmt, va_list ap);
  26. int __wrap_asprintf(char **strp, const char *fmt, ...);
  27. int __wrap_vprintf(const char *fmt, va_list arg);
  28. int __wrap_printf(const char *fmt, ...);
  29. int __wrap_scanf(const char *fmt, ...);
  30. int __wrap_sscanf(const char *buf, const char *fmt, ...);
  31. int __wrap_fprintf(void *f, const char *fmt, ...);
  32. int vsnprintf(char *str, size_t size, const char *fmt, va_list ap);
  33. int snprintf(char *str, size_t size, const char *fmt, ...); //undefined, only used as a placeholder, its replaced by wrap method at link time
  34. int vasprintf(char **strp, const char *fmt, va_list ap);
  35. int asprintf(char **strp, const char *fmt, ...);
  36. int vprintf(const char *fmt, va_list arg);
  37. int printf(const char *fmt, ...);
  38. void *malloc(size_t size);
  39. void *calloc(size_t nmemb, size_t size);
  40. void free(void *ptr);
  41. extern int (*vprintf_console_hook)(const char *fmt, va_list arg);
  42. #define L_tmpnam 32
  43. #ifdef __cplusplus
  44. }
  45. #endif