diff options
author | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-11-22 16:11:26 +0000 |
---|---|---|
committer | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-11-22 16:22:31 +0000 |
commit | 30d730f51fea587574a922f8763f3c7988198029 (patch) | |
tree | a3dc07cc1d1788a4875086db2995f1939ac05ec5 /src/isatty.c | |
parent | 2654623adea742b2e10a85aa90706f20f8b87b88 (diff) | |
download | fpm-30d730f51fea587574a922f8763f3c7988198029.tar.gz fpm-30d730f51fea587574a922f8763f3c7988198029.zip |
Update: backend with verbose argument
Diffstat (limited to 'src/isatty.c')
-rw-r--r-- | src/isatty.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/isatty.c b/src/isatty.c new file mode 100644 index 0000000..bd0f74a --- /dev/null +++ b/src/isatty.c @@ -0,0 +1,13 @@ +#include <unistd.h> //for isatty()
+#include <stdio.h> //for fileno()
+
+int c_isatty(void)
+{
+
+ if (isatty(fileno(stdin))){
+ return 1;
+ } else {
+ return 0;
+ }
+
+}
\ No newline at end of file |