From 379da1f2e04da37043372dec3ba161f2244a6ff4 Mon Sep 17 00:00:00 2001 From: John Slade Date: Mon, 5 Oct 2015 11:54:24 +0100 Subject: [PATCH] training/unicharset_extractor.cpp: Print whether WCTYPE is included Character properties are autogenerated only if wctype is found on the system. However, it is not possible to know if a version of unicharset_extractor was compiled with this support (especially if it was installed as a pre-compiled binary). This commit adds a print to the usage details to output if the binary was compiled with wctype support. --- training/unicharset_extractor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/training/unicharset_extractor.cpp b/training/unicharset_extractor.cpp index 05e61cd8..b60e9980 100644 --- a/training/unicharset_extractor.cpp +++ b/training/unicharset_extractor.cpp @@ -105,6 +105,11 @@ int main(int argc, char** argv) { // Print usage if (argc <= 1) { printf("Usage: %s [-D DIRECTORY] FILE...\n", argv[0]); +#ifdef USING_WCTYPE + printf("Character properties using wctype is enabled\n"); +#else + printf("WARNING: Character properties using wctype is DISABLED\n"); +#endif exit(1); }