summaryrefslogtreecommitdiffstats
path: root/src/bfstd.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-25 11:55:36 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-25 11:55:36 -0400
commitca02fe9b77037d56dd01ea7b5d33eebb62983e44 (patch)
treebec5ea0b7366669261a931a82c80b6c0d92bec3e /src/bfstd.h
parent598422e7678a719b37cc4221c637b840f4e13fcc (diff)
downloadbfs-ca02fe9b77037d56dd01ea7b5d33eebb62983e44.tar.xz
bfstd: New helper for open(ctermid())
Diffstat (limited to 'src/bfstd.h')
-rw-r--r--src/bfstd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bfstd.h b/src/bfstd.h
index 8055c55..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>
/**