summaryrefslogtreecommitdiffstats
path: root/src/bfstd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bfstd.h')
-rw-r--r--src/bfstd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bfstd.h b/src/bfstd.h
index f91e380..f5d8622 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -158,6 +158,16 @@ FILE *xfopen(const char *path, int flags);
*/
char *xgetdelim(FILE *file, char delim);
+/**
+ * Open the controlling terminal.
+ *
+ * @param flags
+ * The open() flags.
+ * @return
+ * An open file descriptor, or -1 on failure.
+ */
+int open_cterm(int flags);
+
// #include <stdlib.h>
/**
@@ -248,6 +258,11 @@ char *xstpencpy(char *dest, char *end, const char *src, size_t n);
const char *xstrerror(int errnum);
/**
+ * Shorthand for xstrerror(errno).
+ */
+const char *errstr(void);
+
+/**
* Format a mode like ls -l (e.g. -rw-r--r--).
*
* @param mode
@@ -410,6 +425,11 @@ char *xconfstr(int name);
*/
int xstrtofflags(const char **str, unsigned long long *set, unsigned long long *clear);
+/**
+ * Wrapper for sysconf() that works around an MSan bug.
+ */
+long xsysconf(int name);
+
#include <wchar.h>
/**