From ae0f4ffab2c59f4ac77c16c7f14fa90e302dad4d Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 15 Jun 2024 00:55:02 +0000 Subject: [PATCH] added copyright stuff git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@304 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Document/Makefile | 5 ++++- Document/README.FMT | 1 + Makefiles/common.mk | 12 +++++++---- Tool/Makefile | 15 ++++++++++++++ Tool/docfmt.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 Document/README.FMT create mode 100644 Tool/Makefile create mode 100644 Tool/docfmt.c diff --git a/Document/Makefile b/Document/Makefile index 798af07..b29f58c 100644 --- a/Document/Makefile +++ b/Document/Makefile @@ -1,10 +1,13 @@ # $Id$ .PHONY: all clean document -all: document +all: document README.DOC document: doxygen +README.DOC: README.FMT + ../Tool/docfmt README.FMT + clean: rm -rf doc diff --git a/Document/README.FMT b/Document/README.FMT new file mode 100644 index 0000000..a20878c --- /dev/null +++ b/Document/README.FMT @@ -0,0 +1 @@ +DataWorks Users' Manual diff --git a/Makefiles/common.mk b/Makefiles/common.mk index 124d5fb..f70c441 100644 --- a/Makefiles/common.mk +++ b/Makefiles/common.mk @@ -1,11 +1,11 @@ # $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: @@ -34,7 +34,10 @@ 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"` @@ -58,6 +61,7 @@ clean: $(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 diff --git a/Tool/Makefile b/Tool/Makefile new file mode 100644 index 0000000..5fd0d48 --- /dev/null +++ b/Tool/Makefile @@ -0,0 +1,15 @@ +# $Id$ + +.SUFFIXES: .c .o +.PHONY: all clean + +all: docfmt + +docfmt: docfmt.o + cc -std=c99 -o $@ docfmt.o + +.c.o: + cc -std=c99 -c -o $@ $< + +clean: + rm -f docfmt *.o diff --git a/Tool/docfmt.c b/Tool/docfmt.c new file mode 100644 index 0000000..8043c83 --- /dev/null +++ b/Tool/docfmt.c @@ -0,0 +1,49 @@ +/* $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 + +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) {} -- 2.43.0