From: Peter Verthez Date: Tue, 1 Oct 2002 16:14:54 +0000 (+0000) Subject: Count total number of conversion failures. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=e27dbec88a292363b9b5992c1b6b53d584111ad8;p=gedcom-parse.git Count total number of conversion failures. --- diff --git a/t/src/standalone.c b/t/src/standalone.c index 22eb56f..44483e7 100644 --- a/t/src/standalone.c +++ b/t/src/standalone.c @@ -32,6 +32,7 @@ #include "utf8-locale.h" #define BOGUS_FILE_NAME "Makefile.am" +int total_conv_fails = 0; void show_help () { @@ -185,6 +186,7 @@ void default_cb(Gedcom_elt elt, Gedcom_ctxt ctxt, int level, char *tag, converted = convert_utf8_to_locale(raw_value, &conv_fails); output(0, "== %d %s (%d) %s (ctxt is %d, conversion failures: %d)\n", level, tag, tag_value, converted, (int)ctxt, conv_fails); + total_conv_fails += conv_fails; } void subscribe_callbacks() @@ -293,6 +295,7 @@ int main(int argc, char* argv[]) while (run_times-- > 0) { output(0, "\n=== Parsing file %s\n", file_name); result |= gedcom_parse_file(file_name); + output(0, "\n=== Total conversion failures: %d\n", total_conv_fails); } if (result == 0) { output(1, "Parse succeeded\n");