2019-07-21 23:58:21 +02:00
|
|
|
#ifndef _OVERRIDE_STDIO_H_
|
|
|
|
#define _OVERRIDE_STDIO_H_
|
|
|
|
|
|
|
|
#include_next "stdio.h"
|
|
|
|
|
|
|
|
#ifdef __BUFSIZ__
|
|
|
|
# define BUFSIZ __BUFSIZ__
|
|
|
|
#else
|
|
|
|
# define BUFSIZ 1024
|
|
|
|
#endif
|
|
|
|
|
2020-04-27 02:13:38 +02:00
|
|
|
extern void output_redirect(const char *str, size_t l);
|
|
|
|
#define puts(s) output_redirect((s), strlen(s))
|
|
|
|
|
2019-07-21 23:58:21 +02:00
|
|
|
#define printf(...) do { \
|
2020-04-27 02:13:38 +02:00
|
|
|
char __printf_buf[BUFSIZ]; \
|
2020-09-23 02:41:07 +02:00
|
|
|
snprintf(__printf_buf, BUFSIZ, __VA_ARGS__); \
|
2019-07-21 23:58:21 +02:00
|
|
|
puts(__printf_buf); \
|
|
|
|
} while(0)
|
|
|
|
|
2020-09-23 02:41:07 +02:00
|
|
|
|
2019-07-21 23:58:21 +02:00
|
|
|
#endif
|