diff options
author | rubidium <rubidium@openttd.org> | 2009-04-25 21:09:42 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-25 21:09:42 +0000 |
commit | a36ab04d5dd345a020ab4168de11db8f7ea087cb (patch) | |
tree | 42e82146ba552b8ef44f2d55b8c6ba657b6f64ac /src/strgen | |
parent | 802d31aab683d1e6baeafd8f53bbe7187b39e69a (diff) | |
download | openttd-a36ab04d5dd345a020ab4168de11db8f7ea087cb.tar.xz |
(svn r16145) -Add: '-export-pragmas' to strgen so external tools can (hopefully) automatically be updated to support new pragmas
Diffstat (limited to 'src/strgen')
-rw-r--r-- | src/strgen/strgen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 8aeab932e..594b778a9 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1249,6 +1249,15 @@ int CDECL main(int argc, char *argv[]) return 0; } + if (strcmp(argv[1], "-export-pragmas") == 0) { + printf("name\tflags\tdefault\tdescription\n"); + for (int i = 0; i < lengthof(_pragmas); i++) { + printf("\"%s\"\t%s\t\"%s\"\t\"%s\"\n", + _pragmas[i][0], _pragmas[i][1], _pragmas[i][2], _pragmas[i][3]); + } + return 0; + } + if (strcmp(argv[1], "-t") == 0 || strcmp(argv[1], "--todo") == 0) { _show_todo |= 1; argc--, argv++; @@ -1272,6 +1281,7 @@ int CDECL main(int argc, char *argv[]) " -d | --dest_dir put output file in the specified directory, create if needed\n" " -export-commands export all commands and exit\n" " -export-plurals export all plural forms and exit\n" + " -export-pragmas export all pragmas and exit\n" " Run without parameters and strgen will search for english.txt and parse it,\n" " creating strings.h. Passing an argument, strgen will translate that language\n" " file using english.txt as a reference and output <language>.lng." |