add is_test_tty() for notcurses-tester

pull/1670/head
nick black 3 years ago committed by Nick Black
parent 65c3aa6653
commit 6d1b7e7571

@ -31,6 +31,16 @@ auto find_data(const char* datum) -> char* {
return strdup(p.c_str());
}
auto is_test_tty(FILE* fp) -> bool {
int fd = fileno(fp);
if(fd >= 0){
if(isatty(fd)){
return true;
}
}
return false;
}
static void
handle_opts(const char** argv){
bool inarg = false;

@ -10,6 +10,7 @@
#include <ncpp/_exceptions.hh>
#include "internal.h"
auto is_test_tty(FILE* fp) -> bool;
auto find_data(const char* datum) -> char*;
auto testing_notcurses() -> struct notcurses*;
auto ncreel_validate(const ncreel* n) -> bool;

Loading…
Cancel
Save