(svn r24516) -Add: [GS] Support ##plural pragma in GS lang files.

This commit is contained in:
frosch
2012-09-09 15:55:20 +00:00
parent 2ec6136113
commit 16760cff8b
4 changed files with 13 additions and 12 deletions

View File

@@ -783,6 +783,17 @@ void StringReader::HandleString(char *str)
}
}
void StringReader::HandlePragma(char *str)
{
if (!memcmp(str, "plural ", 7)) {
_lang.plural_form = atoi(str + 7);
if (_lang.plural_form >= lengthof(_plural_forms)) {
strgen_fatal("Invalid pluralform %d", _lang.plural_form);
}
} else {
strgen_fatal("unknown pragma '%s'", str);
}
}
static void rstrip(char *buf)
{