summaryrefslogtreecommitdiff
path: root/strgen
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-22 01:18:56 +0000
committerDarkvater <darkvater@openttd.org>2006-12-22 01:18:56 +0000
commit96a53f1b1303b0c651bcc8de5df04178c330e1c5 (patch)
tree6b5364dca4bec9f857c94df1544a08a4c76acc6b /strgen
parent9c5b15eff1e455d20f46629c9ead5d88d238628e (diff)
downloadopenttd-96a53f1b1303b0c651bcc8de5df04178c330e1c5.tar.xz
(svn r7540) -Codechange: Print a summary of the number of errors/warnings of a language when strgen is run with the -w flag.
Diffstat (limited to 'strgen')
-rw-r--r--strgen/strgen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c
index baa348e4f..27465fcae 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -217,7 +217,7 @@ static void PutUtf8(uint32 value)
PutByte(0x80 + GB(value, 6, 6));
PutByte(0x80 + GB(value, 0, 6));
} else {
- warning("Invalid unicode value U+0x%X\n", value);
+ warning("Invalid unicode value U+0x%X", value);
}
}
@@ -1386,6 +1386,11 @@ int CDECL main(int argc, char* argv[])
if (r == NULL || strcmp(r, ".txt") != 0) r = strchr(pathbuf, '\0');
ttd_strlcpy(r, ".lng", (size_t)(r - pathbuf));
WriteLangfile(pathbuf, show_todo);
+
+ /* if showing warnings, print a summary of the language */
+ if (show_todo == 2) {
+ fprintf(stdout, "%d warnings and %d errors for %s", _warnings, _errors, pathbuf);
+ }
} else {
fprintf(stderr, "Invalid arguments\n");
}