aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2021-12-06 00:30:18 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2021-12-06 00:30:18 -0500
commitbf6b57adcd220c3704469cd06f21445e0eb13888 (patch)
tree95a88339186c834b57946ff36933aea666770ed6 /main.c
parent61b4313d03a93f50c5cb9d7320f3db7c21caa9f3 (diff)
downloadjdtalkc-bf6b57adcd220c3704469cd06f21445e0eb13888.tar.gz
Add DEFAULT_FORMAT define
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 81ce730..1de43c7 100644
--- a/main.c
+++ b/main.c
@@ -103,7 +103,7 @@ int main(int argc, char *argv[]) {
limit = 0;
salad_limit = 10;
- strcpy(format, "andv");
+ strcpy(format, DEFAULT_FORMAT);
pattern[0] = '\0';
buf[0] = '\0';
acronym[0] = '\0';
@@ -241,6 +241,7 @@ int main(int argc, char *argv[]) {
if (do_salad) {
strcpy(buf, talk_salad(dicts, salad_limit, part, OUTPUT_PART_MAX));
} else if (do_acronym) {
+ if (strcmp(format, DEFAULT_FORMAT) == 0) strcpy(format, "xxxx");
strcpy(buf, talk_acronym(dicts, format, acronym, part, OUTPUT_PART_MAX));
} else {
strcpy(buf, talkf(dicts, format, part, OUTPUT_PART_MAX));