Mercurial > hg > openttd
changeset 5360:3d9d8e02e1ec draft
(svn r7540) -Codechange: Print a summary of the number of errors/warnings of a language when strgen is run with the -w flag.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Fri, 22 Dec 2006 01:18:56 +0000 |
parents | b8afcd94a1dc |
children | 838dbe81bc18 |
files | strgen/strgen.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/strgen/strgen.c +++ b/strgen/strgen.c @@ -217,7 +217,7 @@ 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 @@ 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"); }