diff options
author | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
commit | 24c4d5b06d231785db01500360c26815d8fe4d15 (patch) | |
tree | 757477dbdc02025cc29690a4e66e40f872cab02b /src/strgen | |
parent | 36bb92ae241403d61dc7a3e5a1696b615be61395 (diff) | |
download | openttd-24c4d5b06d231785db01500360c26815d8fe4d15.tar.xz |
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
Diffstat (limited to 'src/strgen')
-rw-r--r-- | src/strgen/strgen.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 86e964c80..f6193f0c9 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -31,7 +31,7 @@ typedef void (*ParseCmdProc)(char *buf, int value); -typedef struct LanguagePackHeader { +struct LanguagePackHeader { uint32 ident; uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h char name[32]; // the international name of this language @@ -40,15 +40,15 @@ typedef struct LanguagePackHeader { uint16 offsets[32]; // the offsets byte plural_form; // plural form index byte pad[3]; // pad header to be a multiple of 4 -} LanguagePackHeader; +}; -typedef struct CmdStruct { +struct CmdStruct { const char *cmd; ParseCmdProc proc; long value; int8 consumes; byte flags; -} CmdStruct; +}; enum { C_DONTCOUNT = 1, @@ -56,11 +56,11 @@ enum { }; -typedef struct Case { +struct Case { int caseidx; char *string; - struct Case *next; -} Case; + Case *next; +}; static bool _masterlang; static bool _translated; @@ -68,7 +68,7 @@ static const char* _file = "(unknown file)"; static int _cur_line; static int _errors, _warnings; -typedef struct LangString { +struct LangString { char *name; // Name of the string char *english; // English text char *translated; // Translated text @@ -77,7 +77,7 @@ typedef struct LangString { int line; // line of string in source-file Case *english_case; // cases for english Case *translated_case; // cases for foreign -} LangString; +}; static LangString *_strings[65536]; @@ -106,16 +106,16 @@ static const byte _plural_form_counts[] = { 2, 1, 2, 3, 3, 3, 3, 3, 4 }; static const char *_cur_ident; -typedef struct CmdPair { +struct CmdPair { const CmdStruct *a; const char *v; -} CmdPair; +}; -typedef struct ParsedCommandStruct { +struct ParsedCommandStruct { int np; CmdPair pairs[32]; const CmdStruct *cmd[32]; // ordered by param # -} ParsedCommandStruct; +}; // Used when generating some advanced commands. static ParsedCommandStruct _cur_pcs; |