bfc1508d (kx 2023-03-24 03:55:33 +0300 1)
bfc1508d (kx 2023-03-24 03:55:33 +0300 2) #ifndef __WRAPPER_H
bfc1508d (kx 2023-03-24 03:55:33 +0300 3) #define __WRAPPER_H
bfc1508d (kx 2023-03-24 03:55:33 +0300 4)
bfc1508d (kx 2023-03-24 03:55:33 +0300 5) #ifdef __cplusplus
bfc1508d (kx 2023-03-24 03:55:33 +0300 6) extern "C" {
bfc1508d (kx 2023-03-24 03:55:33 +0300 7) #endif
bfc1508d (kx 2023-03-24 03:55:33 +0300 8)
bfc1508d (kx 2023-03-24 03:55:33 +0300 9)
bfc1508d (kx 2023-03-24 03:55:33 +0300 10) typedef void (*wrapper_errfunc)( const char *fmt, ... );
bfc1508d (kx 2023-03-24 03:55:33 +0300 11)
bfc1508d (kx 2023-03-24 03:55:33 +0300 12) extern void wrapper_error( const char *fmt, ... ) __attribute__((format (printf,1,2)));
bfc1508d (kx 2023-03-24 03:55:33 +0300 13) extern wrapper_errfunc wrapper_fatal; /* Default Fatal Error Function == wrapper_error() */
bfc1508d (kx 2023-03-24 03:55:33 +0300 14)
bfc1508d (kx 2023-03-24 03:55:33 +0300 15)
bfc1508d (kx 2023-03-24 03:55:33 +0300 16) extern char *xstrdup( const char *str );
bfc1508d (kx 2023-03-24 03:55:33 +0300 17) extern void *xmalloc( size_t size );
bfc1508d (kx 2023-03-24 03:55:33 +0300 18) extern void *xrealloc( void *ptr, size_t size );
bfc1508d (kx 2023-03-24 03:55:33 +0300 19)
bfc1508d (kx 2023-03-24 03:55:33 +0300 20) extern int xopen( const char *path, int oflag, ... );
bfc1508d (kx 2023-03-24 03:55:33 +0300 21) extern ssize_t xread(int fd, void *buf, size_t len);
bfc1508d (kx 2023-03-24 03:55:33 +0300 22) extern ssize_t xwrite( int fd, const void *buf, size_t len );
bfc1508d (kx 2023-03-24 03:55:33 +0300 23)
bfc1508d (kx 2023-03-24 03:55:33 +0300 24) extern ssize_t read_in_full( int fd, void *buf, size_t count );
bfc1508d (kx 2023-03-24 03:55:33 +0300 25) extern ssize_t write_in_full( int fd, const void *buf, size_t count );
bfc1508d (kx 2023-03-24 03:55:33 +0300 26)
bfc1508d (kx 2023-03-24 03:55:33 +0300 27) extern int xdup( int fd );
bfc1508d (kx 2023-03-24 03:55:33 +0300 28)
bfc1508d (kx 2023-03-24 03:55:33 +0300 29) extern FILE *xfopen( const char *path, const char *mode );
bfc1508d (kx 2023-03-24 03:55:33 +0300 30) extern FILE *xfdopen( int fd, const char *mode );
bfc1508d (kx 2023-03-24 03:55:33 +0300 31)
bfc1508d (kx 2023-03-24 03:55:33 +0300 32)
bfc1508d (kx 2023-03-24 03:55:33 +0300 33)
bfc1508d (kx 2023-03-24 03:55:33 +0300 34) #ifdef __cplusplus
bfc1508d (kx 2023-03-24 03:55:33 +0300 35) }
bfc1508d (kx 2023-03-24 03:55:33 +0300 36) #endif
bfc1508d (kx 2023-03-24 03:55:33 +0300 37)
bfc1508d (kx 2023-03-24 03:55:33 +0300 38) #endif /* __WRAPPER_H */