summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-08-26 10:19:27 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2022-08-31 17:16:29 +0200
commit5490268683c82ad07eac6d2e8296a45702a8381e (patch)
treeba1054e61b36b1755d0f1de8390d087f14d6fd04
parent9ebb54c56852c5f8b62652776115000aafae0bdf (diff)
downloadroux-5490268683c82ad07eac6d2e8296a45702a8381e.tar.gz
flag the default target in "qbe -h"
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 2ff9b9c..5ea5704 100644
--- a/main.c
+++ b/main.c
@@ -162,8 +162,11 @@ main(int ac, char *av[])
 			fprintf(hf, "\t%-11s output to file\n", "-o file");
 			fprintf(hf, "\t%-11s generate for a target among:\n", "-t <target>");
 			fprintf(hf, "\t%-11s ", "");
-			for (t=tlist, sep=""; *t; t++, sep=", ")
+			for (t=tlist, sep=""; *t; t++, sep=", ") {
 				fprintf(hf, "%s%s", sep, (*t)->name);
+				if (*t == &Deftgt)
+					fputs(" (default)", hf);
+			}
 			fprintf(hf, "\n");
 			fprintf(hf, "\t%-11s generate gas (e) or osx (m) asm\n", "-G {e,m}");
 			fprintf(hf, "\t%-11s dump debug information\n", "-d <flags>");