From ca02fe9b77037d56dd01ea7b5d33eebb62983e44 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 25 May 2024 11:55:36 -0400 Subject: bfstd: New helper for open(ctermid()) --- src/bfstd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/bfstd.h') 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 /** -- cgit v1.2.3