diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-10-15 09:29:41 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-10-15 09:29:41 -0400 |
commit | 10471c0ee8943ac6f9529b12eb496fd97efb7092 (patch) | |
tree | d42be020e10fca2e57b3a1a41725b8d74ca017e0 | |
parent | 49d392f261391f1c5b238df80c937d652ebbea87 (diff) | |
download | jdtalk-10471c0ee8943ac6f9529b12eb496fd97efb7092.tar.gz |
Disable line buffering
* Check pattern against acronym string
-rw-r--r-- | source/app.d | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/app.d b/source/app.d index 08cd3f4..9b3582c 100644 --- a/source/app.d +++ b/source/app.d @@ -16,6 +16,9 @@ import jdtalk.core; int main(string[] args) { + setvbuf(stdout.getFP(), null, _IONBF, 0); + setvbuf(stderr.getFP(), null, _IONBF, 0); + import std.getopt; long i = 0; long limit = 0; @@ -64,10 +67,10 @@ int main(string[] args) return 1; } - if (acronym) { + if (acronym !is null) { char result = 0; - if ((result = acronymSafe(dict, acronym)) > 0) { - stderr.writefln("No words start with: '%c'", result); + if ((result = acronymSafe(dict, acronym, pattern)) > 0) { + stderr.writefln("No words will have: '%c'", result); return 1; } } |