Update tinycdb to 0.81
This commit is contained in:
parent
fe3250752d
commit
c27e1a3071
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -12,9 +12,9 @@ Jenkinsfile
|
||||||
*.gz
|
*.gz
|
||||||
*.tar
|
*.tar
|
||||||
.nova/
|
.nova/
|
||||||
packer
|
packer*
|
||||||
primum
|
primum
|
||||||
sokol-shdc
|
sokol-shdc*
|
||||||
source/shaders/*.h
|
source/shaders/*.h
|
||||||
core.cdb
|
core.cdb
|
||||||
primum.exe
|
primum.exe
|
||||||
|
|
27
Makefile
27
Makefile
|
@ -14,7 +14,6 @@ OPT ?= 0
|
||||||
INFO :=
|
INFO :=
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
|
|
||||||
|
|
||||||
STEAM = steam/sdk
|
STEAM = steam/sdk
|
||||||
STEAMAPI = steam_api
|
STEAMAPI = steam_api
|
||||||
|
|
||||||
|
@ -23,10 +22,6 @@ ifneq ($(findstring clangcc , $(CCC)),)
|
||||||
LDFLAGS += -Wl,-rpath=./
|
LDFLAGS += -Wl,-rpath=./
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CC), x86_64-w64-mingw32-gcc)
|
|
||||||
AR = x86_64-w64-mingw32-ar
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef NEDITOR
|
ifdef NEDITOR
|
||||||
CPPFLAGS += -DNO_EDITOR
|
CPPFLAGS += -DNO_EDITOR
|
||||||
endif
|
endif
|
||||||
|
@ -159,7 +154,6 @@ OBJS := $(patsubst %.cpp, %$(INFO).o, $(OBJS))
|
||||||
OBJS := $(patsubst %.c, %$(INFO).o,$(OBJS))
|
OBJS := $(patsubst %.c, %$(INFO).o,$(OBJS))
|
||||||
OBJS := $(patsubst %.m, %$(INFO).o, $(OBJS))
|
OBJS := $(patsubst %.m, %$(INFO).o, $(OBJS))
|
||||||
|
|
||||||
|
|
||||||
engineincs != find source/engine -maxdepth 1 -type d
|
engineincs != find source/engine -maxdepth 1 -type d
|
||||||
includeflag != find source -type d -name include
|
includeflag != find source -type d -name include
|
||||||
includeflag += $(engineincs) source/engine/thirdparty/tinycdb source/shaders source/engine/thirdparty/sokol source/engine/thirdparty/stb source/engine/thirdparty/cgltf source/engine/thirdparty/TinySoundFont source/engine/thirdparty/dr_libs
|
includeflag += $(engineincs) source/engine/thirdparty/tinycdb source/shaders source/engine/thirdparty/sokol source/engine/thirdparty/stb source/engine/thirdparty/cgltf source/engine/thirdparty/TinySoundFont source/engine/thirdparty/dr_libs
|
||||||
|
@ -196,28 +190,28 @@ install: $(NAME)
|
||||||
|
|
||||||
$(NAME): libengine$(INFO).a libquickjs$(INFO).a $(DEPS)
|
$(NAME): libengine$(INFO).a libquickjs$(INFO).a $(DEPS)
|
||||||
@echo Linking $(NAME)
|
@echo Linking $(NAME)
|
||||||
$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
|
$(CROSSWIN)$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
|
||||||
@echo Finished build
|
@echo Finished build
|
||||||
|
|
||||||
libengine$(INFO).a: $(OBJS)
|
libengine$(INFO).a: $(OBJS)
|
||||||
@echo Archiving $@
|
@echo Archiving $@
|
||||||
$(AR) rcs $@ $(OBJS)
|
$(CROSSWIN)$(AR) rcs $@ $(OBJS)
|
||||||
|
|
||||||
QUICKJS := source/engine/thirdparty/quickjs
|
QUICKJS := source/engine/thirdparty/quickjs
|
||||||
libquickjs$(INFO).a: $(QUICKJS)/libregexp$(INFO).o $(QUICKJS)/quickjs$(INFO).o $(QUICKJS)/libunicode$(INFO).o $(QUICKJS)/cutils$(INFO).o $(QUICKJS)/libbf$(INFO).o
|
libquickjs$(INFO).a: $(QUICKJS)/libregexp$(INFO).o $(QUICKJS)/quickjs$(INFO).o $(QUICKJS)/libunicode$(INFO).o $(QUICKJS)/cutils$(INFO).o $(QUICKJS)/libbf$(INFO).o
|
||||||
$(AR) rcs $@ $^
|
$(CROSSWIN)$(AR) rcs $@ $^
|
||||||
|
|
||||||
%$(INFO).o: %.c $(SHADERS) source/engine/core.cdb.h
|
%$(INFO).o: %.c $(SHADERS)
|
||||||
@echo Making C object $@
|
@echo Making C object $@
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CROSSWIN)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%$(INFO).o: %.cpp
|
%$(INFO).o: %.cpp
|
||||||
@echo Making C++ object $@
|
@echo Making C++ object $@
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpermissive -c $< -o $@
|
$(CROSSWIN)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpermissive -c $< -o $@
|
||||||
|
|
||||||
%$(INFO).o: %.m
|
%$(INFO).o: %.m
|
||||||
@echo Making Objective-C object $@
|
@echo Making Objective-C object $@
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CROSSWIN)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
shaders: $(SHADERS)
|
shaders: $(SHADERS)
|
||||||
@echo Making shaders
|
@echo Making shaders
|
||||||
|
@ -236,7 +230,7 @@ CDB_O := $(patsubst %.c, %.o, $(CDB_C))
|
||||||
CDB_O := $(notdir $(CDB_O))
|
CDB_O := $(notdir $(CDB_O))
|
||||||
tools/libcdb.a: $(CDB_C)
|
tools/libcdb.a: $(CDB_C)
|
||||||
cc -c $^
|
cc -c $^
|
||||||
$(AR) rcs $@ $(CDB_O)
|
$(CROSSWIN)$(AR) rcs $@ $(CDB_O)
|
||||||
|
|
||||||
cdb: tools/cdb.c tools/libcdb.a
|
cdb: tools/cdb.c tools/libcdb.a
|
||||||
@echo Making cdb
|
@echo Making cdb
|
||||||
|
@ -271,11 +265,10 @@ icon.ico: $(ICON)
|
||||||
rm $(ICNNAME)
|
rm $(ICNNAME)
|
||||||
|
|
||||||
resource.o: resource.rc resource.manifest icon.ico
|
resource.o: resource.rc resource.manifest icon.ico
|
||||||
x86_64-w64-mingw32-windres -i $< -o $@
|
$(CROSSWIN)windres -i $< -o $@
|
||||||
|
|
||||||
WINCC = x86_64-w64-mingw32-gcc
|
|
||||||
crosswin: packer resource.o
|
crosswin: packer resource.o
|
||||||
make CC=$(WINCC) OS=Windows_NT ARCH=x86_64 DEBUG=$(DEBUG) OPT=$(OPT)
|
make CROSSWIN=x86_64-w64-mingw32- CC=$(CROSSWIN)gcc OS=Windows_NT ARCH=x86_64 DEBUG=$(DEBUG) OPT=$(OPT)
|
||||||
|
|
||||||
crossios:
|
crossios:
|
||||||
make OS=IOS ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
|
make OS=IOS ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
|
||||||
|
|
|
@ -115,6 +115,8 @@ console.trace = console.stack;
|
||||||
var say = console.say;
|
var say = console.say;
|
||||||
var print = console.print;
|
var print = console.print;
|
||||||
|
|
||||||
|
console.warn("GOT HERE");
|
||||||
|
|
||||||
console.doc = {
|
console.doc = {
|
||||||
level: "Set level to output logging to console.",
|
level: "Set level to output logging to console.",
|
||||||
info: "Output info level message.",
|
info: "Output info level message.",
|
||||||
|
|
|
@ -205,6 +205,7 @@ int fexists(const char *path)
|
||||||
|
|
||||||
void *os_slurp(const char *file, size_t *size)
|
void *os_slurp(const char *file, size_t *size)
|
||||||
{
|
{
|
||||||
|
YughInfo("Slurping %s from the OS.\n", file);
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
jump:
|
jump:
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb.h
vendored
22
source/engine/thirdparty/tinycdb/cdb.h
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb.h: public cdb include file
|
/* cdb.h: public cdb include file
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TINYCDB_VERSION
|
#ifndef TINYCDB_VERSION
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_find.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_find.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_find.c: cdb_find routine
|
/* cdb_find.c: cdb_find routine
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb_int.h"
|
#include "cdb_int.h"
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_findnext.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_findnext.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_findnext.c: sequential cdb_find routines
|
/* cdb_findnext.c: sequential cdb_find routines
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* see cdb_find.c for comments */
|
/* see cdb_find.c for comments */
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_hash.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_hash.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_hash.c: cdb hashing routine
|
/* cdb_hash.c: cdb hashing routine
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb.h"
|
#include "cdb.h"
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_init.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_init.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_init.c: cdb_init, cdb_free and cdb_read routines
|
/* cdb_init.c: cdb_init, cdb_free and cdb_read routines
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_int.h
vendored
22
source/engine/thirdparty/tinycdb/cdb_int.h
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_int.h: internal cdb library declarations
|
/* cdb_int.h: internal cdb library declarations
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb.h"
|
#include "cdb.h"
|
||||||
|
|
27
source/engine/thirdparty/tinycdb/cdb_make.c
vendored
27
source/engine/thirdparty/tinycdb/cdb_make.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_make.c: basic cdb creation routines
|
/* cdb_make.c: basic cdb creation routines
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -147,11 +165,8 @@ cdb_make_finish_internal(struct cdb_make *cdbmp)
|
||||||
_cdb_make_fullwrite(cdbmp->cdb_fd, p, 2048) != 0)
|
_cdb_make_fullwrite(cdbmp->cdb_fd, p, 2048) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* TODO: Windows doesn't support fsync; simple workaround is to not do it!
|
|
||||||
It does not seem that the lower level open(), read(), write() require it anyway.
|
|
||||||
*/
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return 0;
|
return _commit(fileno(cdbmp->cdb_fd));
|
||||||
#else
|
#else
|
||||||
return fsync(cdbmp->cdb_fd);
|
return fsync(cdbmp->cdb_fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_make_add.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_make_add.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_make_add.c: basic cdb_make_add routine
|
/* cdb_make_add.c: basic cdb_make_add routine
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h> /* for malloc */
|
#include <stdlib.h> /* for malloc */
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_make_put.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_make_put.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_make_put.c: "advanced" cdb_make_put routine
|
/* cdb_make_put.c: "advanced" cdb_make_put routine
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_pack.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_pack.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_pack.c: pack a 32bit integer (to network byte order)
|
/* cdb_pack.c: pack a 32bit integer (to network byte order)
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb.h"
|
#include "cdb.h"
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_seek.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_seek.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_seek.c: old interface for reading cdb file
|
/* cdb_seek.c: old interface for reading cdb file
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_seq.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_seq.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_seq.c: sequential record retrieval routines
|
/* cdb_seq.c: sequential record retrieval routines
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb_int.h"
|
#include "cdb_int.h"
|
||||||
|
|
22
source/engine/thirdparty/tinycdb/cdb_unpack.c
vendored
22
source/engine/thirdparty/tinycdb/cdb_unpack.c
vendored
|
@ -1,7 +1,25 @@
|
||||||
/* cdb_unpack.c: unpack a 32bit integer from network byte order
|
/* cdb_unpack.c: unpack a 32bit integer from network byte order
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdb.h"
|
#include "cdb.h"
|
||||||
|
|
22
tools/cdb.c
22
tools/cdb.c
|
@ -1,7 +1,25 @@
|
||||||
/* cdb.c: cdb command line tool
|
/* cdb.c: cdb command line tool
|
||||||
*
|
*
|
||||||
* This file is a part of tinycdb package by Michael Tokarev, mjt+cdb@corpit.ru.
|
* This file is a part of tinycdb package.
|
||||||
* Public domain.
|
* Copyright (C) 2001-2023 Michael Tokarev <mjt+cdb@corpit.ru>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE /* #define this even on Windows */
|
#define _GNU_SOURCE /* #define this even on Windows */
|
||||||
|
|
Loading…
Reference in a new issue