From: nishi Date: Tue, 2 Jul 2024 16:17:23 +0000 (+0000) Subject: add language files X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d4ec53bc7ca685e369915ee40602f50f77c1b94b;p=dataworks.git add language files git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@450 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Library/database.c b/Library/database.c index 2ee5c7a..7d4dfd3 100644 --- a/Library/database.c +++ b/Library/database.c @@ -41,7 +41,8 @@ const char sig[3] = {0x7f, 'D', 'W'}; -const char* dw_errors[] = {"Success", "Used already", "File open fail", "Invalid signature", "Invalid version", "Parser returned NULL", "Cannot call non-method", "Unknown method", "Insufficient arguments", "Too many arguments", "Not used", "Too many tables", "Database not selected", "Parser fail", "Type mismatch"}; +#define DEFINE_DW_DATABASE +#include "../Resource/resource.c" #ifdef M_I86 #define BUFSIZE 128 diff --git a/Makefiles/common.mk b/Makefiles/common.mk index aca0d6b..af2f17e 100644 --- a/Makefiles/common.mk +++ b/Makefiles/common.mk @@ -19,16 +19,16 @@ thanks-banner: ./Grammar:: $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) -./Library:: ./Grammar +./Library:: ./Grammar ./Resource $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) -./Client:: ./Library +./Client:: ./Library ./Resource $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) -./Server:: ./Library +./Server:: ./Library ./Resource $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) -./RemoteClient:: ./Library +./RemoteClient:: ./Library ./Resource $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) ./Installer:: ./Library @@ -37,6 +37,9 @@ thanks-banner: ./Tool:: $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) +./Resource:: + $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) $(RESOURCE_TARGET) + ./Document:: ./Tool $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET) $(DOCTARGET) @@ -62,6 +65,7 @@ clean: $(MAKE) -C ./Installer clean $(COMPILE_FLAGS) $(MAKE) -C ./Document clean $(COMPILE_FLAGS) $(MAKE) -C ./Tool clean $(COMPILE_FLAGS) + $(MAKE) -C ./Resource clean $(COMPILE_FLAGS) get-version: @echo $(VERSION) diff --git a/Resource/Makefile b/Resource/Makefile new file mode 100644 index 0000000..789649f --- /dev/null +++ b/Resource/Makefile @@ -0,0 +1,15 @@ +# $Id$ + +.PHONY: english japanese dosv clean + +english: resource-en.c + cp resource-en.c resource.c + +japanese: resource-jp.c + cp resource-jp.c resource.c + +dosv: resource-jp.c + iconv -f utf-8 -t sjis < resource-jp.c > resource.c + +clean: + rm -f resource.c diff --git a/Resource/resource-en.c b/Resource/resource-en.c new file mode 100644 index 0000000..2821418 --- /dev/null +++ b/Resource/resource-en.c @@ -0,0 +1,9 @@ +/* $Id$ */ +/* --- START LICENSE --- */ +/* --- END LICENSE --- */ + +#ifndef __DW_RESOURCE__ +#ifdef DEFINE_DW_DATABASE +const char* dw_errors[] = {"Success", "Used already", "File open fail", "Invalid signature", "Invalid version", "Parser returned NULL", "Cannot call non-method", "Unknown method", "Insufficient arguments", "Too many arguments", "Not used", "Too many tables", "Database not selected", "Parser fail", "Type mismatch"}; +#endif +#endif diff --git a/Resource/resource-jp.c b/Resource/resource-jp.c new file mode 100644 index 0000000..2821418 --- /dev/null +++ b/Resource/resource-jp.c @@ -0,0 +1,9 @@ +/* $Id$ */ +/* --- START LICENSE --- */ +/* --- END LICENSE --- */ + +#ifndef __DW_RESOURCE__ +#ifdef DEFINE_DW_DATABASE +const char* dw_errors[] = {"Success", "Used already", "File open fail", "Invalid signature", "Invalid version", "Parser returned NULL", "Cannot call non-method", "Unknown method", "Insufficient arguments", "Too many arguments", "Not used", "Too many tables", "Database not selected", "Parser fail", "Type mismatch"}; +#endif +#endif