diff options
author | WlodekM <[email protected]> | 2025-02-18 12:27:09 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-02-18 12:27:09 +0200 |
commit | 3ff89680eb8e7309e879001de5b2d0f33e0cdae1 (patch) | |
tree | f21bd5d2a773f96bf259891d21fb04f8184aeb65 /progs/testterm | |
parent | 235001629adf67f173ae4db28eb42a301f9de878 (diff) |
uuuuuh wip hard drives thing
Diffstat (limited to 'progs/testterm')
-rw-r--r-- | progs/testterm/testterm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/progs/testterm/testterm.c b/progs/testterm/testterm.c new file mode 100644 index 0000000..5a79633 --- /dev/null +++ b/progs/testterm/testterm.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <stdlib.h> + +int main() { + char *term = getenv("TERM"); + if (term) { + printf("TERM=%s\n", term); + } else { + printf("TERM is not set.\n"); + return 1; + } + + if (system("tput colors") == 0) { + printf("Colors are supported\n"); + } else { + printf("Colors are NOT supported\n"); + } + + return 0; +} |