diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-25 11:55:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-25 11:55:36 -0400 |
commit | ca02fe9b77037d56dd01ea7b5d33eebb62983e44 (patch) | |
tree | bec5ea0b7366669261a931a82c80b6c0d92bec3e /src/bfstd.h | |
parent | 598422e7678a719b37cc4221c637b840f4e13fcc (diff) | |
download | bfs-ca02fe9b77037d56dd01ea7b5d33eebb62983e44.tar.xz |
bfstd: New helper for open(ctermid())
Diffstat (limited to 'src/bfstd.h')
-rw-r--r-- | src/bfstd.h | 10 |
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> /** |