diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-04-20 14:24:37 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-04-20 14:24:37 -0400 |
| commit | e33aff908b77f43309e61634985c03551ab9cd10 (patch) | |
| tree | 2a220fb46ce838d78e75fdaea0da092200c1031a /tomo.c | |
| parent | e79ce52125875e17ac0b460dfff07a8ecca63676 (diff) | |
Inline color file
Diffstat (limited to 'tomo.c')
| -rw-r--r-- | tomo.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -316,11 +316,13 @@ int compile_executable(const char *filename, const char *object_files) "#include <tomo/tomo.h>\n" "#include \"", filename, ".h\"\n" "\n" + "public bool USE_COLOR = true;\n" + "\n" "int main(int argc, char *argv[]) {\n" "GC_INIT();\n" + "USE_COLOR = getenv(\"COLOR\") ? strcmp(getenv(\"COLOR\"), \"1\") == 0 : isatty(STDOUT_FILENO);\n" "srand(arc4random_uniform(UINT32_MAX));\n" - "srand48(arc4random_uniform(UINT32_MAX));\n" - "detect_color();\n", + "srand48(arc4random_uniform(UINT32_MAX));\n", module_name, "$main$run(argc, argv);\n", "return 0;\n" "}\n" |
