# $Id$
-.PHONY: all no-doc replace format clean ./Library ./Client ./Document ./Server ./Grammar ./RemoteClient ./Installer ./Package/PKGBUILD archive archive-prepare archive-cleanup archive-targz archive-zip dosbox prepare-dosbox dosbox-x cleanup-dosbox get-version thanks-banner dos-installer
+.PHONY: all no-doc replace format clean ./Library ./Client ./Document ./Server ./Grammar ./RemoteClient ./Installer ./Tool ./Package/PKGBUILD archive archive-prepare archive-cleanup archive-targz archive-zip dosbox prepare-dosbox dosbox-x cleanup-dosbox get-version thanks-banner dos-installer
-all: ./Grammar ./Library ./Client $(SERVER) $(RCLI) $(INSTALLER) ./Document
+all: ./Tool ./Grammar ./Library ./Client $(SERVER) $(RCLI) $(INSTALLER) ./Document
@$(MAKE) thanks-banner
-no-doc: ./Grammar ./Library ./Client $(SERVER) $(RCLI) $(INSTALLER)
+no-doc: ./Tool ./Grammar ./Library ./Client $(SERVER) $(RCLI) $(INSTALLER)
@$(MAKE) thanks-banner
thanks-banner:
./Installer:: ./Library
$(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET)
-./Document::
+./Tool:: ./Library
+ $(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET)
+
+./Document:: ./Tool
$(MAKE) -C $@ $(COMPILE_FLAGS) $(TARGET)
FILES = `find . -name "*.c" -or -name "*.h"`
$(MAKE) -C ./RemoteClient clean $(COMPILE_FLAGS)
$(MAKE) -C ./Installer clean $(COMPILE_FLAGS)
$(MAKE) -C ./Document clean $(COMPILE_FLAGS)
+ $(MAKE) -C ./Tool clean $(COMPILE_FLAGS)
dos-installer:
if [ ! "$(FORMAT)" = "NO" ]; then $(MAKE) clean ; fi
--- /dev/null
+/* $Id$ */
+/* --- START LICENSE --- */
+/* -------------------------------------------------------------------------- */
+/* DataWorks - Simple DBMS */
+/* -------------------------------------------------------------------------- */
+/* Copyright (c) 2024 Crabware. */
+/* Copyright (c) 2024 pnsk-lab. */
+/* Redistribution and use in source and binary forms, with or without modific */
+/* ation, are permitted provided that the following conditions are met: */
+/* 1. Redistributions of source code must retain the above copyright noti */
+/* ce, this list of conditions and the following disclaimer. */
+/* 2. Redistributions in binary form must reproduce the above copyright n */
+/* otice, this list of conditions and the following disclaimer in the documen */
+/* tation and/or other materials provided with the distribution. */
+/* 3. Neither the name of the copyright holder nor the names of its contr */
+/* ibutors may be used to endorse or promote products derived from this softw */
+/* are without specific prior written permission. */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS */
+/* " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, TH */
+/* E IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO */
+/* SE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS */
+/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CON */
+/* SEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITU */
+/* TE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPT */
+/* ION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S */
+/* TRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN */
+/* Y WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY */
+/* OF SUCH DAMAGE. */
+/* -------------------------------------------------------------------------- */
+/* --- END LICENSE --- */
+
+#include <stdio.h>
+
+char* __util_strdup(const char* a) {
+ char* str = malloc(strlen(a) + 1);
+ memcpy(str, a, strlen(a));
+ str[strlen(a)] = 0;
+ return str;
+}
+
+char* __util_strcat(const char* a, const char* b) {
+ char* str = malloc(strlen(a) + strlen(b) + 1);
+ memcpy(str, a, strlen(a));
+ memcpy(str + strlen(a), b, strlen(b));
+ str[strlen(a) + strlen(b)] = 0;
+ return str;
+}
+
+int main(int argc, char** argv) {}