summaryrefslogtreecommitdiff
path: root/src/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared.h')
-rw-r--r--src/shared.h6
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
25int readwholebuffer(char **str, unsigned long int initsize, int fd); 25int readwholebuffer(char **str, unsigned long int initsize, int fd);
26 26
27// Write the entire contents of a buffer into a file descriptor
27int writewholebuffer(int fd, const unsigned char *buf, int len); 28int 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
33char *xdirname(const char * const path);
34
29#endif \ No newline at end of file 35#endif \ No newline at end of file