]> Nishi Git Mirror - dataworks.git/commitdiff
add language files
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 2 Jul 2024 16:17:23 +0000 (16:17 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 2 Jul 2024 16:17:23 +0000 (16:17 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@450 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Library/database.c
Makefiles/common.mk
Resource/Makefile [new file with mode: 0644]
Resource/resource-en.c [new file with mode: 0644]
Resource/resource-jp.c [new file with mode: 0644]

index 2ee5c7a276519acb36caab659ee71ff8348cd011..7d4dfd39f8fa8acfb3e52daaba142c3109c658a3 100644 (file)
@@ -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
index aca0d6bde0a41eecaf3ee01ad8dbd7c3cddeb8d0..af2f17e37dc599695a3a0272086e49400b672daf 100644 (file)
@@ -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 (file)
index 0000000..789649f
--- /dev/null
@@ -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 (file)
index 0000000..2821418
--- /dev/null
@@ -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 (file)
index 0000000..2821418
--- /dev/null
@@ -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