(svn r3123) eh, don't press enter after typing text, previous patch wasn't finished. Now strgen really behaves correctly. Thanks again glx
This commit is contained in:
		@@ -54,6 +54,7 @@ typedef struct Case {
 | 
				
			|||||||
	struct Case *next;
 | 
						struct Case *next;
 | 
				
			||||||
} Case;
 | 
					} Case;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static bool _masterlang;
 | 
				
			||||||
static bool _translated;
 | 
					static bool _translated;
 | 
				
			||||||
static const char* _file = "(unknown file)";
 | 
					static const char* _file = "(unknown file)";
 | 
				
			||||||
static int _cur_line;
 | 
					static int _cur_line;
 | 
				
			||||||
@@ -1157,7 +1158,7 @@ static void WriteLangfile(const char *filename, int show_todo)
 | 
				
			|||||||
				cmdp = ls->english;
 | 
									cmdp = ls->english;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			_translated = !(cmdp == ls->english);
 | 
								_translated = _masterlang || (cmdp != ls->english);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (casep) {
 | 
								if (casep) {
 | 
				
			||||||
				Case *c;
 | 
									Case *c;
 | 
				
			||||||
@@ -1226,6 +1227,7 @@ int CDECL main(int argc, char* argv[])
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (argc == 1) {
 | 
						if (argc == 1) {
 | 
				
			||||||
 | 
							_masterlang = true;
 | 
				
			||||||
		// parse master file
 | 
							// parse master file
 | 
				
			||||||
		ParseFile("lang/english.txt", true);
 | 
							ParseFile("lang/english.txt", true);
 | 
				
			||||||
		MakeHashOfStrings();
 | 
							MakeHashOfStrings();
 | 
				
			||||||
@@ -1237,6 +1239,7 @@ int CDECL main(int argc, char* argv[])
 | 
				
			|||||||
		WriteStringsH("table/strings.h");
 | 
							WriteStringsH("table/strings.h");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	} else if (argc == 2) {
 | 
						} else if (argc == 2) {
 | 
				
			||||||
 | 
							_masterlang = false;
 | 
				
			||||||
		ParseFile("lang/english.txt", true);
 | 
							ParseFile("lang/english.txt", true);
 | 
				
			||||||
		MakeHashOfStrings();
 | 
							MakeHashOfStrings();
 | 
				
			||||||
		ParseFile(argv[1], false);
 | 
							ParseFile(argv[1], false);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user