Is there a Zig equivalent in stdlib to the isatty() function in unistd.h from C? I'm making a logging function override for std_options that additionally shows the time and ANSI colors indicating the log level. Currently I'm doing this with:
const c = @cImport({
@cInclude("time.h"); // for printing the time
@cInclude("unistd.h); // for checking if the terminal supports colors
});
// ...
if (c.isatty(c.STDERR_FILENO) == 0) logging.use_colors = false;
// ...
I wanted to ask, is there an equivalent to c.isatty() in the stdlib?