aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cli.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-03 20:36:22 +0900
committernsfisis <nsfisis@gmail.com>2025-09-03 20:36:22 +0900
commit980d73ce25b116e645b16e9ed37dcf55fdffad7a (patch)
tree1039ecaa3a98b443a6818d660763051be1f5a54b /src/cli.c
parent256cbd88c53d15884f3519ce75890c7bd1626cb2 (diff)
downloadducc-980d73ce25b116e645b16e9ed37dcf55fdffad7a.tar.gz
ducc-980d73ce25b116e645b16e9ed37dcf55fdffad7a.tar.zst
ducc-980d73ce25b116e645b16e9ed37dcf55fdffad7a.zip
feat: support native bool/true/false
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cli.c b/src/cli.c
index 4efd2e2..bd0d915 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -9,8 +9,8 @@ static void print_version() {
CliArgs* parse_cli_args(int argc, char** argv) {
const char* output_filename = NULL;
int positional_arguments_start = -1;
- BOOL only_compile = FALSE;
- BOOL generate_deps = FALSE;
+ bool only_compile = false;
+ bool generate_deps = false;
for (int i = 1; i < argc; ++i) {
if (argv[i][0] != '-') {
@@ -33,9 +33,9 @@ CliArgs* parse_cli_args(int argc, char** argv) {
output_filename = argv[i + 1];
++i;
} else if (c == 'c') {
- only_compile = TRUE;
+ only_compile = true;
} else if (strcmp(argv[i], "-MMD") == 0) {
- generate_deps = TRUE;
+ generate_deps = true;
} else if (strcmp(argv[i], "--version") == 0) {
print_version();
exit(0);
@@ -52,12 +52,12 @@ CliArgs* parse_cli_args(int argc, char** argv) {
a->output_filename = output_filename;
a->output_assembly = !output_filename || str_ends_with(output_filename, ".s");
a->only_compile = only_compile;
- a->totally_deligate_to_gcc = FALSE;
+ a->totally_deligate_to_gcc = false;
a->gcc_command = NULL;
a->generate_deps = generate_deps;
if (!a->only_compile && str_ends_with(a->input_filename, ".o")) {
- a->totally_deligate_to_gcc = TRUE;
+ a->totally_deligate_to_gcc = true;
StrBuilder builder;
strbuilder_init(&builder);
strbuilder_append_string(&builder, "gcc ");