mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r23576) -Codechange: split the base of strgen with the strgen code that creates the actual .lng files
This commit is contained in:
parent
c97b2a5224
commit
1f083c3ac8
@ -42,6 +42,10 @@ RES := $(shell mkdir -p $(BIN_DIR)/lang )
|
||||
|
||||
all: table/strings.h $(LANGS)
|
||||
|
||||
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
@ -62,7 +66,7 @@ lang/english.txt: $(LANG_DIR)/english.txt
|
||||
$(Q)mkdir -p lang
|
||||
$(Q)cp $(LANG_DIR)/english.txt lang/english.txt
|
||||
|
||||
$(STRGEN): alloc_func.o string.o strgen.o getoptdata.o
|
||||
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
|
||||
$(E) '$(STAGE) Compiling and Linking $@'
|
||||
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -138,4 +138,14 @@ struct LanguageWriter {
|
||||
void WriteLang(const StringData &data);
|
||||
};
|
||||
|
||||
void CDECL strgen_warning(const char *s, ...) WARN_FORMAT(1, 2);
|
||||
void CDECL strgen_error(const char *s, ...) WARN_FORMAT(1, 2);
|
||||
void NORETURN CDECL strgen_fatal(const char *s, ...) WARN_FORMAT(1, 2);
|
||||
char *ParseWord(char **buf);
|
||||
|
||||
extern const char *_file;
|
||||
extern int _cur_line;
|
||||
extern int _errors, _warnings, _show_todo;
|
||||
extern LanguagePackHeader _lang;
|
||||
|
||||
#endif /* STRGEN_H */
|
||||
|
1030
src/strgen/strgen_base.cpp
Normal file
1030
src/strgen/strgen_base.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -30,9 +30,9 @@ struct CmdStruct {
|
||||
CmdFlags flags;
|
||||
};
|
||||
|
||||
static void EmitSingleChar(Buffer *buffer, char *buf, int value);
|
||||
static void EmitPlural(Buffer *buffer, char *buf, int value);
|
||||
static void EmitGender(Buffer *buffer, char *buf, int value);
|
||||
extern void EmitSingleChar(Buffer *buffer, char *buf, int value);
|
||||
extern void EmitPlural(Buffer *buffer, char *buf, int value);
|
||||
extern void EmitGender(Buffer *buffer, char *buf, int value);
|
||||
|
||||
static const CmdStruct _cmd_structs[] = {
|
||||
/* Font size */
|
||||
|
Loading…
Reference in New Issue
Block a user