diff options
Diffstat (limited to 'src/shared.h')
| -rw-r--r-- | src/shared.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared.h b/src/shared.h index 9cdbd33..3c23676 100644 --- a/src/shared.h +++ b/src/shared.h | |||
| @@ -24,6 +24,12 @@ void* xreallocarray(void *ptr, size_t nmemb, size_t size); | |||
| 24 | // Read the entire contents of a file descriptor into a malloc()'ed buffer | 24 | // Read the entire contents of a file descriptor into a malloc()'ed buffer |
| 25 | int readwholebuffer(char **str, unsigned long int initsize, int fd); | 25 | int readwholebuffer(char **str, unsigned long int initsize, int fd); |
| 26 | 26 | ||
| 27 | // Write the entire contents of a buffer into a file descriptor | ||
| 27 | int writewholebuffer(int fd, const unsigned char *buf, int len); | 28 | int writewholebuffer(int fd, const unsigned char *buf, int len); |
| 28 | 29 | ||
| 30 | // `dirname()` reimplementation that returns a malloc()'ed string. According to the `x___` naming scheme, exits on alloc error. | ||
| 31 | // `___VXGG___XALLOC_EXIT_ON_ERROR___` influences whether `exit()` or `abort()` is called on error, and `___VXGG___VERBOSE_ERRORS___` | ||
| 32 | // influences whether diagnostic error messages are printed | ||
| 33 | char *xdirname(const char * const path); | ||
| 34 | |||
| 29 | #endif \ No newline at end of file | 35 | #endif \ No newline at end of file |
