Skip to content

Commit 4547eb8

Browse files
authored
better option names
1 parent b7c490e commit 4547eb8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

acftool.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,15 @@ int main(int argc, char **argv) {
594594
printf("Copyright (c) 2026 SombrAbsol\n");
595595
printf("acftool - ACF archive utility for Pokémon Ranger: Guardian Signs\n\n");
596596
printf("Usage:\n");
597-
printf(" %s e <file.acf|directory> extract mode\n", argv[0]);
598-
printf(" %s b <directory> build mode\n", argv[0]);
597+
printf(" %s -x|--extract <in.acf|indir>\n", argv[0]);
598+
printf(" %s -b|--build <indir>\n", argv[0]);
599599
return 0;
600600
}
601601

602602
const char *mode = argv[1];
603603
const char *path = argv[2];
604604

605-
if (strcmp(mode, "e") == 0) { // extract mode
605+
if (!strcmp(mode, "-x") || !strcmp(mode, "--extract")) { // extract mode
606606
struct stat st;
607607
if (stat(path, &st) != 0) {
608608
fprintf(stderr, "Invalid path: %s\n", path);
@@ -616,10 +616,10 @@ int main(int argc, char **argv) {
616616
extract_acf(path);
617617
}
618618
}
619-
else if (strcmp(mode, "b") == 0) { // build mode
619+
else if (!strcmp(mode, "-b") || !strcmp(mode, "--build")) { // build mode
620620
struct stat st;
621621
if (stat(path, &st) != 0 || !S_ISDIR(st.st_mode)) {
622-
fprintf(stderr, "Invalid directory for build: %s\n", path);
622+
fprintf(stderr, "Invalid path: %s\n", path);
623623
return 1;
624624
}
625625

0 commit comments

Comments
 (0)