<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>example/tctdbex.c</filename>
    </added>
    <added>
      <filename>lab/datechange</filename>
    </added>
    <added>
      <filename>man/tctdb.3</filename>
    </added>
    <added>
      <filename>man/tctmgr.1</filename>
    </added>
    <added>
      <filename>man/tctmttest.1</filename>
    </added>
    <added>
      <filename>man/tcttest.1</filename>
    </added>
    <added>
      <filename>tctdb.c</filename>
    </added>
    <added>
      <filename>tctdb.h</filename>
    </added>
    <added>
      <filename>tctmgr.c</filename>
    </added>
    <added>
      <filename>tctmttest.c</filename>
    </added>
    <added>
      <filename>tcttest.c</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,28 @@
-2009-12-27  Mikio Hirabayashi  &lt;mikio@users.sourceforge.net&gt;
+2009-01-04  Mikio Hirabayashi  &lt;mikio@users.sourceforge.net&gt;
+
+	* tcutil.c (tccmpdecimal): equal numbers are now distinct by lexical order.
+
+	* tcutil.c (tclistnew3, tcmapnew3): new functions.
+
+	* tcutil.c (tcatoix, tclistinvert, tclog2l, tclog2d): new functions.
+
+	* tcutil.c (tcstrsplit2, tcstrsplit3, tcstrsplit4): new functions.
+
+	* tcutil.c (tcstrjoin2, tcstrjoin3, tcstrjoin4): new functions.
+
+	* tchdb.c (tchdbputimpl): a bug of memory corruption was fixed.
+
+	* tchdb.c (tchdbgetnext3): new function.
+
+	* tcbdb.c (tcbdbleafaddrec): a bug of memory corruption was fixed.
+
+	* tcbdb.c (tcbdboptimizeimpl): a bug related to parameter accession was fixed.
+
+	* tctdb.h, tctdb.c, tcttest.c, tctmttest.c, tctmgr.c: new files.
+
+	- Release: 1.4.0
+
+2008-12-27  Mikio Hirabayashi  &lt;mikio@users.sourceforge.net&gt;
 
 	* tcadb.c (tcadbmisc): the return value of the &quot;getlist&quot; function was modified.
 </diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -162,6 +162,20 @@ distclean : clean
 
 
 check :
+	make check-util
+	make check-hdb
+	make check-bdb
+	make check-fdb
+	make check-tdb
+	make check-adb
+	rm -rf casket*
+	@printf '\n'
+	@printf '#================================================================\n'
+	@printf '# Checking completed.\n'
+	@printf '#================================================================\n'
+
+
+check-util :
 	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./tcamgr version
 	$(RUNENV) $(RUNCMD) ./tcutest xstr 50000
@@ -206,6 +220,11 @@ check :
 	$(RUNENV) $(RUNCMD) ./tcucodec ucs -d check.in &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcucodec date -ds '1978-02-11T18:05:30+09:00' -rf &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcucodec conf
+	rm -rf casket*
+
+
+check-hdb :
+	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./tchtest write casket 50000 5000 5 5
 	$(RUNENV) $(RUNCMD) ./tchtest read casket
 	$(RUNENV) $(RUNCMD) ./tchtest remove casket
@@ -219,6 +238,8 @@ check :
 	$(RUNENV) $(RUNCMD) ./tchtest rcat -tl -td -pn 5000 casket 50000 500 5 15
 	$(RUNENV) $(RUNCMD) ./tchtest rcat -nl -pn 500 -rl casket 5000 500 5 5
 	$(RUNENV) $(RUNCMD) ./tchtest rcat -tb -pn 500 casket 5000 500 5 5
+	$(RUNENV) $(RUNCMD) ./tchtest rcat -ru -pn 500 casket 5000 500 1 1
+	$(RUNENV) $(RUNCMD) ./tchtest rcat -tl -td -ru -pn 500 casket 5000 500 1 1
 	$(RUNENV) $(RUNCMD) ./tchmgr list -pv casket &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tchmgr list -pv -fm 1 -px casket &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tchtest misc casket 5000
@@ -261,6 +282,11 @@ check :
 	$(RUNENV) $(RUNCMD) ./tchmgr get casket four &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tchmgr get casket five &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tchmgr list -pv casket &gt; check.out
+	rm -rf casket*
+
+
+check-bdb :
+	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./tcbtest write casket 50000 5 5 5000 5 5
 	$(RUNENV) $(RUNCMD) ./tcbtest read casket
 	$(RUNENV) $(RUNCMD) ./tcbtest remove casket
@@ -276,6 +302,8 @@ check :
 	$(RUNENV) $(RUNCMD) ./tcbtest rcat -tl -td -pn 5000 casket 50000 5 5 500 5 15
 	$(RUNENV) $(RUNCMD) ./tcbtest rcat -nl -pn 5000 -rl casket 15000 5 5 500 5 5
 	$(RUNENV) $(RUNCMD) ./tcbtest rcat -ca 1000 -tb -pn 5000 casket 15000 5 5 500 5 5
+	$(RUNENV) $(RUNCMD) ./tcbtest rcat -ru -pn 500 casket 5000 5 5 500 1 1
+	$(RUNENV) $(RUNCMD) ./tcbtest rcat -cd -tl -td -ru -pn 500 casket 5000 5 5 500 1 1
 	$(RUNENV) $(RUNCMD) ./tcbmgr list -pv casket &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcbtest queue casket 15000 5 5
 	$(RUNENV) $(RUNCMD) ./tcbtest misc casket 5000
@@ -332,6 +360,10 @@ check :
 	$(RUNENV) $(RUNCMD) ./tcbmgr get casket four &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcbmgr get casket five &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcbmgr list -pv casket &gt; check.out
+
+
+check-fdb :
+	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./tcftest write casket 50000 50
 	$(RUNENV) $(RUNCMD) ./tcftest read casket
 	$(RUNENV) $(RUNCMD) ./tcftest remove casket
@@ -377,6 +409,74 @@ check :
 	$(RUNENV) $(RUNCMD) ./tcfmgr get casket 4 &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcfmgr get casket 5 &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcfmgr list -pv casket &gt; check.out
+
+
+check-tdb :
+	rm -rf casket*
+	$(RUNENV) $(RUNCMD) ./tcttest write casket 50000 5000 5 5
+	$(RUNENV) $(RUNCMD) ./tcttest read casket
+	$(RUNENV) $(RUNCMD) ./tcttest remove casket
+	$(RUNENV) $(RUNCMD) ./tcttest write -mt -tl -td -xm 500000 \
+	  -is -in -it -if casket 5000 5000 5 5
+	$(RUNENV) $(RUNCMD) ./tcttest read -mt -nb -xm 500000 casket
+	$(RUNENV) $(RUNCMD) ./tcttest remove -mt -xm 500000 casket
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -pn 500 -xm 50000 -is casket 5000 5000 5 5
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -tl -td -pn 5000 -is -in casket 5000 500 5 15
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -nl -pn 500 -rl -is -in casket 5000 500 5 5
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -tb -pn 500 -is -in casket 5000 500 5 5
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -ru -pn 500 -is -in casket 5000 500 1 1
+	$(RUNENV) $(RUNCMD) ./tcttest rcat -tl -td -ru -pn 500 -is -in casket 5000 500 1 1
+	$(RUNENV) $(RUNCMD) ./tctmgr list -pv casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr list -pv -px casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tcttest misc casket 500
+	$(RUNENV) $(RUNCMD) ./tcttest misc -tl -td casket 500
+	$(RUNENV) $(RUNCMD) ./tcttest misc -mt -tb casket 500
+	$(RUNENV) $(RUNCMD) ./tcttest wicked casket 5000
+	$(RUNENV) $(RUNCMD) ./tcttest wicked -tl -td casket 5000
+	$(RUNENV) $(RUNCMD) ./tcttest wicked -mt -tb casket 5000
+	$(RUNENV) $(RUNCMD) ./tcttest wicked -tt casket 5000
+	$(RUNENV) $(RUNCMD) ./tcttest wicked -tx casket 5000
+	$(RUNENV) $(RUNCMD) ./tctmttest write -xm 500000 -tl -is -in casket 5 5000 500 5
+	$(RUNENV) $(RUNCMD) ./tctmttest read -xm 500000 casket 5
+	$(RUNENV) $(RUNCMD) ./tctmttest read -xm 500000 -rnd casket 5
+	$(RUNENV) $(RUNCMD) ./tctmttest remove -xm 500000 casket 5
+	$(RUNENV) $(RUNCMD) ./tctmttest wicked casket 5 5000
+	$(RUNENV) $(RUNCMD) ./tctmttest wicked -tl -td casket 5 5000
+	$(RUNENV) $(RUNCMD) ./tctmttest typical casket 5 5000 500
+	$(RUNENV) $(RUNCMD) ./tctmttest typical -rr 1000 casket 5 5000 500
+	$(RUNENV) $(RUNCMD) ./tctmgr create casket 3 1 1
+	$(RUNENV) $(RUNCMD) ./tctmgr setindex casket name
+	$(RUNENV) $(RUNCMD) ./tctmgr inform casket
+	$(RUNENV) $(RUNCMD) ./tctmgr put casket &quot;&quot; name mikio birth 19780211 lang ja,en,c
+	$(RUNENV) $(RUNCMD) ./tctmgr put casket &quot;&quot; name fal birth 19771007 lang ja
+	$(RUNENV) $(RUNCMD) ./tctmgr put casket &quot;&quot; name banana price 100
+	$(RUNENV) $(RUNCMD) ./tctmgr put -dc casket 3 color yellow
+	$(RUNENV) $(RUNCMD) ./tctmgr put -dk casket &quot;&quot; name melon price 1200 color green
+	$(RUNENV) $(RUNCMD) ./tctmgr put casket &quot;&quot; name void birth 20010101 lang en
+	$(RUNENV) $(RUNCMD) ./tctmgr out casket 5
+	$(RUNENV) $(RUNCMD) ./tctmgr get casket 1 &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr get casket 2 &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr get casket 3 &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -pv -ph casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -ord name strdesc -pv -ph casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -ord name strdesc -pv -ph casket \
+	  name strbw mi birth numbt 19700101,19791231 lang strand ja,en &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr setindex casket name
+	$(RUNENV) $(RUNCMD) ./tctmgr setindex -cd casket birth
+	$(RUNENV) $(RUNCMD) ./tctmgr setindex casket lang
+	$(RUNENV) $(RUNCMD) ./tctmgr list -pv casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr optimize casket
+	$(RUNENV) $(RUNCMD) ./tctmgr put casket &quot;&quot; name tokyo country japan lang ja
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -pv -ph casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -ord name strdesc -pv -ph casket &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr search -m 10 -ord name strdesc -pv -ph casket \
+	  name strbw mi birth numbt 19700101,19791231 lang strand ja,en &gt; check.out
+	$(RUNENV) $(RUNCMD) ./tctmgr list -pv casket &gt; check.out
+
+
+check-adb :
+	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./tcatest write 'casket.tch#mode=wct#bnum=5000' 50000
 	$(RUNENV) $(RUNCMD) ./tcatest read 'casket.tch#mode=r'
 	$(RUNENV) $(RUNCMD) ./tcatest remove 'casket.tch#mode=w'
@@ -418,11 +518,6 @@ check :
 	$(RUNENV) $(RUNCMD) ./tcamgr misc casket.tch outlist six
 	$(RUNENV) $(RUNCMD) ./tcamgr misc casket.tch getlist three four five six &gt; check.out
 	$(RUNENV) $(RUNCMD) ./tcamgr list -pv casket.tch &gt; check.out
-	rm -rf casket*
-	@printf '\n'
-	@printf '#================================================================\n'
-	@printf '# Checking completed.\n'
-	@printf '#================================================================\n'
 
 
 check-valgrind :
@@ -467,7 +562,7 @@ words :
 	rm -f casket-* words.tsv
 	cat /usr/share/dict/words | \
 	  tr '\t\r' '  ' | grep -v '^ *$$' | cat -n | sort | \
-	  sed -e 's/^ *//' -e 's/\(^[0-9]*\)\t\(.*\)/\2\t\1/' &gt; words.tsv
+	  LC_ALL=C sed -e 's/^ *//' -e 's/\(^[0-9]*\)\t\(.*\)/\2\t\1/' &gt; words.tsv
 	./tchmgr create casket-hash -1 0 ; ./tchmgr importtsv casket-hash words.tsv
 	./tcbmgr create casket-btree 8192 ; ./tcbmgr importtsv casket-btree words.tsv
 	./tcbmgr create -td casket-btree-td 8192 ; ./tcbmgr importtsv casket-btree-td words.tsv
@@ -478,6 +573,18 @@ words :
 	  casket-btree-td casket-btree-tb casket-btree-tt casket-btree-tx
 
 
+wordtable :
+	rm -rf casket* words.tsv
+	cat /usr/share/dict/words | \
+	  tr '\t\r' '  ' | grep -v '^ *$$' | cat -n | sort | \
+	  LC_ALL=C sed -e 's/^ *//' -e 's/\(^[0-9]*\)\t\(.*\)/\1\tword\t\2\tnum\t\1/' \
+	    -e 's/$$/\txxx\tabc\tyyy\t123/' &gt; words.tsv
+	./tctmgr create casket
+	./tctmgr setindex casket word
+	./tctmgr setindex -cd casket num
+	./tctmgr importtsv casket words.tsv
+
+
 .PHONY : all clean install check
 
 
@@ -573,6 +680,18 @@ tcfmgr : tcfmgr.o $(LIBRARYFILES)
 	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(CMDLDFLAGS) -ltokyocabinet $(LIBS)
 
 
+tcttest : tcttest.o $(LIBRARYFILES)
+	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(CMDLDFLAGS) -ltokyocabinet $(LIBS)
+
+
+tctmttest : tctmttest.o $(LIBRARYFILES)
+	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(CMDLDFLAGS) -ltokyocabinet $(LIBS)
+
+
+tctmgr : tctmgr.o $(LIBRARYFILES)
+	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(CMDLDFLAGS) -ltokyocabinet $(LIBS)
+
+
 tcatest : tcatest.o $(LIBRARYFILES)
 	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(CMDLDFLAGS) -ltokyocabinet $(LIBS)
 
@@ -587,23 +706,29 @@ tcawmgr.cgi : tcawmgr.o $(LIBRARYFILES)
 
 myconf.o : myconf.h
 
-tcutil.o : tcutil.h myconf.h md5.h
+tcutil.o : myconf.h tcutil.h md5.h
+
+tchdb.o : myconf.h tcutil.h tchdb.h
+
+tcbdb.o : myconf.h tcutil.h tchdb.h tcbdb.h
+
+tcfdb.o : myconf.h tcutil.h tcfdb.h
 
-tchdb.o : tchdb.h tcutil.h myconf.h
+tctdb.o : myconf.h tcutil.h tchdb.h tctdb.h
 
-tcbdb.o : tcbdb.h tchdb.h tcutil.h myconf.h
+tcadb.o : myconf.h tcutil.h tchdb.h tcbdb.h tcfdb.h tctdb.h tcadb.h
 
-tcfdb.o : tcfdb.h tcutil.h myconf.h
+tcutest.o tcucodec.o : myconf.h tcutil.h
 
-tcutest.o tcucodec.o : tcutil.h myconf.h
+tchtest.o tchmttest.o tchmgr.o : myconf.h tcutil.h tchdb.h
 
-tchtest.o tchmttest.o tchmgr.o : tcutil.h tchdb.h myconf.h
+tcbtest.o tcbmttest.o tcbmgr.o : myconf.h tcutil.h tchdb.h tcbdb.h
 
-tcbtest.o tcbmttest.o tcbmgr.o : tcutil.h tchdb.h tcbdb.h myconf.h
+tcftest.o tcfmttest.o tcfmgr.o : myconf.h tcutil.h tcfdb.h
 
-tcftest.o tcfmttest.o tcfmgr.o : tcutil.h tcfdb.h myconf.h
+tcttest.o tctmttest.o tctmgr.o : myconf.h tcutil.h tchdb.h tcbdb.h tctdb.h
 
-tcatest.o tcamgr.o tcawmgr.o : tcutil.h tchdb.h tcbdb.h tcadb.h myconf.h
+tcatest.o tcamgr.o tcawmgr.o : myconf.h tcutil.h tchdb.h tcbdb.h tcfdb.h tctdb.h tcadb.h
 
 
 </diff>
      <filename>Makefile.in</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ================================================================
  Tokyo Cabinet: a modern implementation of DBM
- Copyright (C) 2006-2008 Mikio Hirabayashi
+ Copyright (C) 2006-2009 Mikio Hirabayashi
 ================================================================
 
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for tokyocabinet 1.3.27.
+# Generated by GNU Autoconf 2.61 for tokyocabinet 1.4.0.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='tokyocabinet'
 PACKAGE_TARNAME='tokyocabinet'
-PACKAGE_VERSION='1.3.27'
-PACKAGE_STRING='tokyocabinet 1.3.27'
+PACKAGE_VERSION='1.4.0'
+PACKAGE_STRING='tokyocabinet 1.4.0'
 PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
@@ -1192,7 +1192,7 @@ if test &quot;$ac_init_help&quot; = &quot;long&quot;; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat &lt;&lt;_ACEOF
-\`configure' configures tokyocabinet 1.3.27 to adapt to many kinds of systems.
+\`configure' configures tokyocabinet 1.4.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1253,7 +1253,7 @@ fi
 
 if test -n &quot;$ac_init_help&quot;; then
   case $ac_init_help in
-     short | recursive ) echo &quot;Configuration of tokyocabinet 1.3.27:&quot;;;
+     short | recursive ) echo &quot;Configuration of tokyocabinet 1.4.0:&quot;;;
    esac
   cat &lt;&lt;\_ACEOF
 
@@ -1354,7 +1354,7 @@ fi
 test -n &quot;$ac_init_help&quot; &amp;&amp; exit $ac_status
 if $ac_init_version; then
   cat &lt;&lt;\_ACEOF
-tokyocabinet configure 1.3.27
+tokyocabinet configure 1.4.0
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1368,7 +1368,7 @@ cat &gt;config.log &lt;&lt;_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tokyocabinet $as_me 1.3.27, which was
+It was created by tokyocabinet $as_me 1.4.0, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1724,22 +1724,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 # Package information
 MYLIBVER=7
-MYLIBREV=4
+MYLIBREV=5
 MYFORMATVER=&quot;1.0&quot;
 
 # Targets
-MYHEADERFILES=&quot;tcutil.h tchdb.h tcbdb.h tcfdb.h tcadb.h&quot;
+MYHEADERFILES=&quot;tcutil.h tchdb.h tcbdb.h tcfdb.h tctdb.h tcadb.h&quot;
 MYLIBRARYFILES=&quot;libtokyocabinet.a&quot;
-MYLIBOBJFILES=&quot;tcutil.o tchdb.o tcbdb.o tcfdb.o tcadb.o myconf.o md5.o&quot;
+MYLIBOBJFILES=&quot;tcutil.o tchdb.o tcbdb.o tcfdb.o tctdb.o tcadb.o myconf.o md5.o&quot;
 MYCOMMANDFILES=&quot;tcutest tcumttest tcucodec tchtest tchmttest tchmgr&quot;
 MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcbtest tcbmttest tcbmgr tcftest tcfmttest tcfmgr&quot;
-MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcatest tcamgr&quot;
+MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcttest tctmttest tctmgr tcatest tcamgr&quot;
 MYCGIFILES=&quot;tcawmgr.cgi&quot;
 MYMAN1FILES=&quot;tcutest.1 tcumttest.1 tcucodec.1 tchtest.1 tchmttest.1 tchmgr.1&quot;
 MYMAN1FILES=&quot;$MYMAN1FILES tcbtest.1 tcbmttest.1 tcbmgr.1 tcftest.1 tcfmttest.1 tcfmgr.1&quot;
-MYMAN1FILES=&quot;$MYMAN1FILES tcatest.1 tcamgr.1&quot;
+MYMAN1FILES=&quot;$MYMAN1FILES tcttest.1 tctmttest.1 tctmgr.1 tcatest.1 tcamgr.1&quot;
 MYMAN3FILES=&quot;tokyocabinet.3 tcutil.3 tcxstr.3 tclist.3 tcmap.3 tctree.3 tcmdb.3 tcmpool.3&quot;
-MYMAN3FILES=&quot;$MYMAN3FILES tchdb.3 tcbdb.3 tcfdb.3 tcadb.3&quot;
+MYMAN3FILES=&quot;$MYMAN3FILES tchdb.3 tcbdb.3 tcfdb.3 tctdb.3 tcadb.3&quot;
 MYDOCUMENTFILES=&quot;COPYING ChangeLog THANKS doc&quot;
 MYPCFILES=&quot;tokyocabinet.pc&quot;
 
@@ -6279,7 +6279,7 @@ exec 6&gt;&amp;1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log=&quot;
-This file was extended by tokyocabinet $as_me 1.3.27, which was
+This file was extended by tokyocabinet $as_me 1.4.0, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6322,7 +6322,7 @@ Report bugs to &lt;bug-autoconf@gnu.org&gt;.&quot;
 _ACEOF
 cat &gt;&gt;$CONFIG_STATUS &lt;&lt;_ACEOF
 ac_cs_version=&quot;\\
-tokyocabinet config.status 1.3.27
+tokyocabinet config.status 1.4.0
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\&quot;`echo &quot;$ac_configure_args&quot; | sed 's/^ //; s/[\\&quot;&quot;\`\$]/\\\\&amp;/g'`\\&quot;
 </diff>
      <filename>configure</filename>
    </modified>
    <modified>
      <diff>@@ -7,26 +7,26 @@
 #================================================================
 
 # Package name
-AC_INIT(tokyocabinet, 1.3.27)
+AC_INIT(tokyocabinet, 1.4.0)
 
 # Package information
 MYLIBVER=7
-MYLIBREV=4
+MYLIBREV=5
 MYFORMATVER=&quot;1.0&quot;
 
 # Targets
-MYHEADERFILES=&quot;tcutil.h tchdb.h tcbdb.h tcfdb.h tcadb.h&quot;
+MYHEADERFILES=&quot;tcutil.h tchdb.h tcbdb.h tcfdb.h tctdb.h tcadb.h&quot;
 MYLIBRARYFILES=&quot;libtokyocabinet.a&quot;
-MYLIBOBJFILES=&quot;tcutil.o tchdb.o tcbdb.o tcfdb.o tcadb.o myconf.o md5.o&quot;
+MYLIBOBJFILES=&quot;tcutil.o tchdb.o tcbdb.o tcfdb.o tctdb.o tcadb.o myconf.o md5.o&quot;
 MYCOMMANDFILES=&quot;tcutest tcumttest tcucodec tchtest tchmttest tchmgr&quot;
 MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcbtest tcbmttest tcbmgr tcftest tcfmttest tcfmgr&quot;
-MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcatest tcamgr&quot;
+MYCOMMANDFILES=&quot;$MYCOMMANDFILES tcttest tctmttest tctmgr tcatest tcamgr&quot;
 MYCGIFILES=&quot;tcawmgr.cgi&quot;
 MYMAN1FILES=&quot;tcutest.1 tcumttest.1 tcucodec.1 tchtest.1 tchmttest.1 tchmgr.1&quot;
 MYMAN1FILES=&quot;$MYMAN1FILES tcbtest.1 tcbmttest.1 tcbmgr.1 tcftest.1 tcfmttest.1 tcfmgr.1&quot;
-MYMAN1FILES=&quot;$MYMAN1FILES tcatest.1 tcamgr.1&quot;
+MYMAN1FILES=&quot;$MYMAN1FILES tcttest.1 tctmttest.1 tctmgr.1 tcatest.1 tcamgr.1&quot;
 MYMAN3FILES=&quot;tokyocabinet.3 tcutil.3 tcxstr.3 tclist.3 tcmap.3 tctree.3 tcmdb.3 tcmpool.3&quot;
-MYMAN3FILES=&quot;$MYMAN3FILES tchdb.3 tcbdb.3 tcfdb.3 tcadb.3&quot;
+MYMAN3FILES=&quot;$MYMAN3FILES tchdb.3 tcbdb.3 tcfdb.3 tctdb.3 tcadb.3&quot;
 MYDOCUMENTFILES=&quot;COPYING ChangeLog THANKS doc&quot;
 MYPCFILES=&quot;tokyocabinet.pc&quot;
 </diff>
      <filename>configure.in</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@
 &lt;h1 id=&quot;headline&quot;&gt;Tokyo Cabinet: a modern implementation of DBM&lt;/h1&gt;
 
 &lt;div class=&quot;note&quot;&gt;Copyright (C) 2006-2009 Mikio Hirabayashi&lt;/div&gt;
-&lt;div class=&quot;note&quot;&gt;Last Update: Sat, 03 Jan 2009 21:41:33 +0900&lt;/div&gt;
+&lt;div class=&quot;note&quot;&gt;Last Update: Wed, 07 Jan 2009 01:03:53 +0900&lt;/div&gt;
 &lt;div class=&quot;navi&quot;&gt;[&lt;span class=&quot;void&quot;&gt;English&lt;/span&gt;/&lt;a href=&quot;index.ja.html&quot; hreflang=&quot;ja&quot;&gt;Japanese&lt;/a&gt;]&lt;/div&gt;
 
 &lt;div class=&quot;logo&quot;&gt;&lt;img src=&quot;logo.png&quot; alt=&quot;Tokyo Cabinet&quot; width=&quot;300&quot; height=&quot;110&quot; /&gt;&lt;/div&gt;
@@ -126,7 +126,7 @@
 &lt;p&gt;The following are the source packages of Tokyo Cabinet.  As for binary packages, see the site of each distributor.&lt;/p&gt;
 
 &lt;ul&gt;
-&lt;li&gt;&lt;a href=&quot;tokyocabinet-1.3.27.tar.gz&quot;&gt;Latest Source Package (version 1.3.27)&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;tokyocabinet-1.4.0.tar.gz&quot;&gt;Latest Source Package (version 1.4.0)&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;pastpkg/&quot;&gt;Past Versions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 </diff>
      <filename>doc/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -106,7 +106,7 @@
 &lt;h1 id=&quot;headline&quot;&gt;Tokyo Cabinet: DBM&#12398;&#29694;&#20195;&#30340;&#12394;&#22769;&#23455;&#35013;&lt;/h1&gt;
 
 &lt;div class=&quot;note&quot;&gt;Copyright (C) 2006-2009 Mikio Hirabayashi&lt;/div&gt;
-&lt;div class=&quot;note&quot;&gt;Last Update: Sat, 03 Jan 2009 21:41:33 +0900&lt;/div&gt;
+&lt;div class=&quot;note&quot;&gt;Last Update: Wed, 07 Jan 2009 01:03:53 +0900&lt;/div&gt;
 &lt;div class=&quot;navi&quot;&gt;[&lt;a href=&quot;index.html&quot; hreflang=&quot;en&quot;&gt;English&lt;/a&gt;/&lt;span class=&quot;void&quot;&gt;Japanese&lt;/span&gt;]&lt;/div&gt;
 
 &lt;div class=&quot;logo&quot;&gt;&lt;img src=&quot;logo-ja.png&quot; alt=&quot;Tokyo Cabinet&quot; width=&quot;300&quot; height=&quot;110&quot; /&gt;&lt;/div&gt;
@@ -167,7 +167,7 @@
 &lt;p&gt;&#20197;&#19979;&#12398;&#12477;&#12540;&#12473;&#12497;&#12483;&#12465;&#12540;&#12472;&#12434;&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;&#12496;&#12452;&#12490;&#12522;&#12497;&#12483;&#12465;&#12540;&#12472;&#12395;&#12388;&#12356;&#12390;&#12399;&#12289;&#21508;&#12487;&#12451;&#12473;&#12488;&#12522;&#12499;&#12517;&#12540;&#12479;&#12398;&#12469;&#12452;&#12488;&#12434;&#12372;&#35239;&#12367;&#12384;&#12373;&#12356;&#12290;&lt;/p&gt;
 
 &lt;ul&gt;
-&lt;li&gt;&lt;a href=&quot;tokyocabinet-1.3.27.tar.gz&quot;&gt;&#26368;&#26032;&#12398;&#12477;&#12540;&#12473;&#12497;&#12483;&#12465;&#12540;&#12472;&#65288;&#12496;&#12540;&#12472;&#12519;&#12531;1.3.27&#65289;&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;tokyocabinet-1.4.0.tar.gz&quot;&gt;&#26368;&#26032;&#12398;&#12477;&#12540;&#12473;&#12497;&#12483;&#12465;&#12540;&#12472;&#65288;&#12496;&#12540;&#12472;&#12519;&#12531;1.4.0&#65289;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;pastpkg/&quot;&gt;&#36942;&#21435;&#12398;&#12496;&#12540;&#12472;&#12519;&#12531;&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 </diff>
      <filename>doc/index.ja.html</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
 &lt;h1&gt;Fundamental Specifications of Tokyo Cabinet Version 1&lt;/h1&gt;
 
 &lt;div class=&quot;note&quot;&gt;Copyright (C) 2006-2009 Mikio Hirabayashi&lt;/div&gt;
-&lt;div class=&quot;note&quot;&gt;Last Update: Sat, 03 Jan 2009 21:41:33 +0900&lt;/div&gt;
+&lt;div class=&quot;note&quot;&gt;Last Update: Wed, 07 Jan 2009 01:03:53 +0900&lt;/div&gt;
 &lt;div class=&quot;navi&quot;&gt;[&lt;span class=&quot;void&quot;&gt;English&lt;/span&gt;/&lt;a href=&quot;spex-ja.html&quot; hreflang=&quot;ja&quot;&gt;Japanese&lt;/a&gt;] [&lt;a href=&quot;index.html&quot;&gt;HOME&lt;/a&gt;]&lt;/div&gt;
 
 &lt;hr /&gt;
@@ -39,6 +39,7 @@
 &lt;li&gt;&lt;a href=&quot;#tchdbapi&quot;&gt;The Hash Database API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcbdbapi&quot;&gt;The B+ Tree Database API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcfdbapi&quot;&gt;The Fixed-length Database API&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;#tctdbapi&quot;&gt;The Table Database API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcadbapi&quot;&gt;The Abstract Database API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#license&quot;&gt;License&lt;/a&gt;&lt;/li&gt;
 &lt;/ol&gt;
@@ -55,6 +56,8 @@
 
 &lt;p&gt;As for database of fixed-length array, records are stored with unique natural numbers.  It is impossible to store two or more records with a key overlaps.  Moreover, the length of each record is limited by the specified length.  Provided operations are the same as ones of hash database.&lt;/p&gt;
 
+&lt;p&gt;Table database is also provided as a variant of hash database.  Each record is identified by the primary key and has a set of named columns.  Although there is no concept of data schema, it is possible to search for records with complex conditions efficiently by using indexes of arbitrary columns.&lt;/p&gt;
+
 &lt;p&gt;Tokyo Cabinet is written in the C language, and provided as API of C, Perl, Ruby, Java, and Lua.  Tokyo Cabinet is available on platforms which have API conforming to C99 and POSIX.  Tokyo Cabinet is a free software licensed under the GNU Lesser General Public License.&lt;/p&gt;
 
 &lt;hr /&gt;
@@ -63,7 +66,7 @@
 
 &lt;p&gt;Tokyo Cabinet is the successor of QDBM and improves time and space efficiency.  This section describes the features of Tokyo Cabinet.&lt;/p&gt;
 
-&lt;h3&gt;The Dinosaur Wing of the DBM fork&lt;/h3&gt;
+&lt;h3&gt;The Dinosaur Wing of the DBM Forks&lt;/h3&gt;
 
 &lt;p&gt;Tokyo Cabinet is developed as the successor of GDBM and QDBM on the following purposes.  They are achieved and Tokyo Cabinet replaces conventional DBM products.&lt;/p&gt;
 
@@ -108,6 +111,14 @@
 
 &lt;p&gt;The size of the database is proportional to the range of keys and the limit size of each value.  That is, the smaller the range of keys is or the smaller the length of each value is, the higher the space efficiency is.  For example, if the maximum key is 1000000 and the limit size of the value is 100 bytes, the size of the database will be about 100MB.  Because regions around referred records are only loaded on the RAM, you can increase the size of the database to the size of the virtual memory.&lt;/p&gt;
 
+&lt;h3&gt;Flexible Implementation of Table Database&lt;/h3&gt;
+
+&lt;p&gt;Table database does not express simple key/value structure but expresses a structure like a table of relational database.  Each record is identified by the primary key and has a set of multiple columns named with arbitrary strings.  For example, a stuff in your company can be expressed by a record identified by the primary key of the employee ID number and structured by columns of his name, division, salary, and so on.  Unlike relational database, table database does not need to define any data schema and can contain records of various structures different from each other.&lt;/p&gt;
+
+&lt;p&gt;Table database supports query functions with not only the primary key but also with conditions about arbitrary columns.  Each column condition is composed of the name of a column and a condition expression.  Operators of full matching, forward matching, regular expression matching, and so on are provided for the string type.  Operators of full matching, range matching and so on are provided for the number type.  A query can contain multiple conditions.  The order of the result set can be specified as the ascending or descending order of strings or numbers.&lt;/p&gt;
+
+&lt;p&gt;You can create indexes for arbitrary columns to improve performance of search and sorting.  Although columns do not have data types, indexes have types for strings or numbers.  The query optimizer uses indexes in suitable way according to each query.  Indexes are implemented as different files of B+ tree database.&lt;/p&gt;
+
 &lt;h3&gt;Practical Functionality&lt;/h3&gt;
 
 &lt;p&gt;Hash database and B+ tree database feature transaction mechanisms.  It is possible to commit a series of operations between the beginning and the end of the transaction in a lump, or to abort the transaction and perform rollback to the state before the transaction.  Two isolation levels are supported; serializable and read uncommitted.  Durability is secured by write ahead logging and shadow paging.&lt;/p&gt;
@@ -122,7 +133,7 @@
 
 &lt;p&gt;The utility API is also provided.  Such fundamental data structure as list and map are included.  And, some useful features; memory pool, string processing, encoding, are also included.&lt;/p&gt;
 
-&lt;p&gt;Five kinds of API; the utility API, the hash database API, the B+ tree database API, the fixed-length database API, and the abstract database API, are provided for the C language.  Command line interfaces are also provided corresponding to each API.  They are useful for prototyping, test, and debugging.  Except for C, Tokyo Cabinet provides APIs for Perl, Ruby, Java, and Lua.  The Perl API has methods calling the hash database API, the B+ tree database API, and the fixed-length database API with XS language.  The Ruby API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Ruby.  The Java API has native methods calling the hash database API, the B+ tree database API, and the fixed-length database API with Java Native Interface.  The Lua API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Lua.  APIs for other languages will hopefully be provided by third party.&lt;/p&gt;
+&lt;p&gt;Six kinds of API; the utility API, the hash database API, the B+ tree database API, the fixed-length database API, the table database API, and the abstract database API, are provided for the C language.  Command line interfaces are also provided corresponding to each API.  They are useful for prototyping, test, and debugging.  Except for C, Tokyo Cabinet provides APIs for Perl, Ruby, Java, and Lua.  The Perl API has methods calling the hash database API, the B+ tree database API, and the fixed-length database API with XS language.  The Ruby API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Ruby.  The Java API has native methods calling the hash database API, the B+ tree database API, and the fixed-length database API with Java Native Interface.  The Lua API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Lua.  APIs for other languages will hopefully be provided by third party.&lt;/p&gt;
 
 &lt;p&gt;In cases that multiple processes access a database at the same time or some processes access a database on a remote host, the remote service is useful.  The remote service is composed of a database server and its access library.  Applications can access the database server by using the remote database API.  The server implements HTTP and the memcached protocol partly so that client programs on almost all platforms can access the server easily.&lt;/p&gt;
 
@@ -182,10 +193,11 @@
 /usr/local/include/tchdb.h
 /usr/local/include/tcbdb.h
 /usr/local/include/tcfdb.h
+/usr/local/include/tctdb.h
 /usr/local/include/tcadb.h
 /usr/local/lib/libtokyocabinet.a
-/usr/local/lib/libtokyocabinet.so.7.4.0
-/usr/local/lib/libtokyocabinet.so.7
+/usr/local/lib/libtokyocabinet.so.x.y.z
+/usr/local/lib/libtokyocabinet.so.x
 /usr/local/lib/libtokyocabinet.so
 /usr/local/lib/pkgconfig/tokyocabinet.pc
 /usr/local/bin/tcutest
@@ -200,6 +212,9 @@
 /usr/local/bin/tcftest
 /usr/local/bin/tcfmttest
 /usr/local/bin/tcfmgr
+/usr/local/bin/tcttest
+/usr/local/bin/tctmttest
+/usr/local/bin/tctmgr
 /usr/local/bin/tcamgr
 /usr/local/bin/tcatest
 /usr/local/libexec/tcawmgr.cgi
@@ -449,6 +464,15 @@
 &lt;dd&gt;The return value is the new list object.&lt;/dd&gt;
 &lt;/dl&gt;
 
+&lt;p&gt;The function `tclistnew3' is used in order to create a list object with initial string elements.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tclistnew3(const char *&lt;var&gt;str&lt;/var&gt;, ...);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies the string of the first element.&lt;/dd&gt;
+&lt;dd&gt;The other arguments are other elements.  They should be trailed by a `NULL' argument.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new list object.&lt;/dd&gt;
+&lt;/dl&gt;
+
 &lt;p&gt;The function `tclistdup' is used in order to copy a list object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
@@ -703,6 +727,16 @@
 &lt;dd&gt;The return value is the new map object.&lt;/dd&gt;
 &lt;/dl&gt;
 
+&lt;p&gt;The function `tcmapnew3' is used in order to create a map object with initial string elements.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCMAP *tcmapnew3(const char *&lt;var&gt;str&lt;/var&gt;, ...);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies the string of the first element.&lt;/dd&gt;
+&lt;dd&gt;The other arguments are other elements.  They should be trailed by a `NULL' argument.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new map object.&lt;/dd&gt;
+&lt;dd&gt;The key and the value of each record are situated one after the other.&lt;/dd&gt;
+&lt;/dl&gt;
+
 &lt;p&gt;The function `tcmapdup' is used in order to copy a map object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
@@ -2110,17 +2144,26 @@
 &lt;p&gt;The function `tcstrjoin' is used in order to create a string by joining all elements of a list object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
-&lt;dt&gt;&lt;code&gt;char *tcstrjoin(TCLIST *&lt;var&gt;list&lt;/var&gt;, char &lt;var&gt;delim&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;char *tcstrjoin(const TCLIST *&lt;var&gt;list&lt;/var&gt;, char &lt;var&gt;delim&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;`&lt;var&gt;list&lt;/var&gt;' specifies a list object.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;delim&lt;/var&gt;' specifies a delimiting character.&lt;/dd&gt;
 &lt;dd&gt;The return value is the result string.&lt;/dd&gt;
 &lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
 &lt;/dl&gt;
 
-&lt;p&gt;The function `tcatoi' is used in order to convert a string with a metric prefix to an integer.&lt;/p&gt;
+&lt;p&gt;The function `tcatoi' is used in order to convert a string to an integer.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
-&lt;dt&gt;&lt;code&gt;int64_t tcatoi(const char *str);&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tcatoi(const char *&lt;var&gt;str&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies a string.&lt;/dd&gt;
+&lt;dd&gt;The return value is the integer.  If the string does not contain numeric expression, 0 is returned.&lt;/dd&gt;
+&lt;dd&gt;This function is equivalent to `atoll' except that it does not depend on the locale.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tcatoix' is used in order to convert a string with a metric prefix to an integer.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tcatoix(const char *&lt;var&gt;str&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies a string which can be trailed by a binary metric prefix.  &quot;K&quot;, &quot;M&quot;, &quot;G&quot;, &quot;T&quot;, &quot;P&quot;, and &quot;E&quot; are supported.  They are case-insensitive.&lt;/dd&gt;
 &lt;dd&gt;The return value is the integer.  If the string does not contain numeric expression, 0 is returned.  If the integer overflows the domain, `INT64_MAX' or `INT64_MIN' is returned according to the sign.&lt;/dd&gt;
 &lt;/dl&gt;
@@ -2695,7 +2738,7 @@
 &lt;dd&gt;Because the object of the return value is created with the function `tcmapnew', it should be deleted with the function `tcmapdel' when it is no longer in use.&lt;/dd&gt;
 &lt;/dl&gt;
 
-&lt;h3&gt;Example&lt;/h3&gt;
+&lt;h3&gt;Example Code&lt;/h3&gt;
 
 &lt;p&gt;The following code is an example using extensible string, array list, and hash map.&lt;/p&gt;
 
@@ -3264,7 +3307,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -3370,7 +3413,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCHDB *hdb;
   int ecode;
   char *key, *value;
@@ -3439,7 +3481,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;Retrieve all records of the database above.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tchtest remove [-mt] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Remove all records of the database above.&lt;/dd&gt;
-&lt;dt&gt;&lt;code&gt;tchtest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;tchtest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Store records with partway duplicated keys using concatenate mode.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tchtest misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Perform miscellaneous test of various operations.&lt;/dd&gt;
@@ -3467,6 +3509,7 @@ int main(int argc, char **argv){
 &lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : use the function `tchdbaddint' instead of `tchdbputcat'.&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : use the function `tchdbadddouble' instead of `tchdbputcat'.&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : set the length of values at random.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : select update operations at random.&lt;/li&gt;
 &lt;/ul&gt;
 
 &lt;p&gt;This command returns 0 on success, another on failure.&lt;/p&gt;
@@ -3983,7 +4026,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -4260,7 +4303,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCBDB *bdb;
   BDBCUR *cur;
   int ecode;
@@ -4333,7 +4375,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;Retrieve all records of the database above.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tcbtest remove [-mt] [-cd|-ci|-cj] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Remove all records of the database above.&lt;/dd&gt;
-&lt;dt&gt;&lt;code&gt;tcbtest rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;tcbtest rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Store records with partway duplicated keys using concatenate mode.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tcbtest queue [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Perform queueing and dequeueing.&lt;/dd&gt;
@@ -4368,6 +4410,7 @@ int main(int argc, char **argv){
 &lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : use the function `tcbdbaddint' instead of `tcbdbputcat'.&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : use the function `tcbdbadddouble' instead of `tcbdbputcat'.&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : set the length of values at random.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : select update operations at random.&lt;/li&gt;
 &lt;/ul&gt;
 
 &lt;p&gt;This command returns 0 on success, another on failure.&lt;/p&gt;
@@ -4879,7 +4922,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;fdb&lt;/var&gt;' specifies the fixed-length database object connected as a writer.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;id&lt;/var&gt;' specifies the ID number.  It should be more than 0.  If it is `FDBIDMIN', the minimum ID number of existing records is specified.  If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified.  If it is `FDBIDMAX', the maximum ID number of existing records is specified.  If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -4955,7 +4998,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCFDB *fdb;
   int ecode;
   char *key, *value;
@@ -5120,6 +5162,769 @@ int main(int argc, char **argv){
 
 &lt;hr /&gt;
 
+&lt;h2 id=&quot;tctdbapi&quot;&gt;The Table Database API&lt;/h2&gt;
+
+&lt;p&gt;Table database is a file containing records composed of the primary keys and arbitrary columns and is handled with the table database API.  See `&lt;code&gt;tctdb.h&lt;/code&gt;' for entire specification.&lt;/p&gt;
+
+&lt;h3&gt;Description&lt;/h3&gt;
+
+&lt;p&gt;To use the table database API, include `&lt;code&gt;tcutil.h&lt;/code&gt;', `&lt;code&gt;tctdb.h&lt;/code&gt;', and related standard header files.  Usually, write the following description near the front of a source file.&lt;/p&gt;
+
+&lt;dl&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;tcutil.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;tctdb.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdbool.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;Objects whose type is pointer to `&lt;code&gt;TCTDB&lt;/code&gt;' are used to handle table databases.  A table database object is created with the function `&lt;code&gt;tctdbnew&lt;/code&gt;' and is deleted with the function `&lt;code&gt;tctdbdel&lt;/code&gt;'.  To avoid memory leak, it is important to delete every object when it is no longer in use.&lt;/p&gt;
+
+&lt;p&gt;Before operations to store or retrieve records, it is necessary to open a database file and connect the table database object to it.  The function `&lt;code&gt;tctdbopen&lt;/code&gt;' is used to open a database file and the function `&lt;code&gt;tctdbclose&lt;/code&gt;' is used to close the database file.  To avoid data missing or corruption, it is important to close every database file when it is no longer in use.&lt;/p&gt;
+
+&lt;h3&gt;API&lt;/h3&gt;
+
+&lt;p&gt;The function `tctdberrmsg' is used in order to get the message string corresponding to an error code.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdberrmsg(int &lt;var&gt;ecode&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;ecode&lt;/var&gt;' specifies the error code.&lt;/dd&gt;
+&lt;dd&gt;The return value is the message string of the error code.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbnew' is used in order to create a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCTDB *tctdbnew(void);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;The return value is the new table database object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbdel' is used in order to delete a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbdel(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If the database is not closed, it is closed implicitly.  Note that the deleted object and its derivatives can not be used anymore.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbecode' is used in order to get the last happened error code of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbecode(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the last happened error code.&lt;/dd&gt;
+&lt;dd&gt;The following error code is defined: `TCESUCCESS' for success, `TCETHREAD' for threading error, `TCEINVALID' for invalid operation, `TCENOFILE' for file not found, `TCENOPERM' for no permission, `TCEMETA' for invalid meta data, `TCERHEAD' for invalid record header, `TCEOPEN' for open error, `TCECLOSE' for close error, `TCETRUNC' for trunc error, `TCESYNC' for sync error, `TCESTAT' for stat error, `TCESEEK' for seek error, `TCEREAD' for read error, `TCEWRITE' for write error, `TCEMMAP' for mmap error, `TCELOCK' for lock error, `TCEUNLINK' for unlink error, `TCERENAME' for rename error, `TCEMKDIR' for mkdir error, `TCERMDIR' for rmdir error, `TCEKEEP' for existing record, `TCENOREC' for no record found, and `TCEMISC' for miscellaneous error.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetmutex' is used in order to set mutual exclusion control of a table database object for threading.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetmutex(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the mutual exclusion control is needed if the object is shared by plural threads and this function should should be called before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtune' is used in order to set the tuning parameters of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtune(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;bnum&lt;/var&gt;, int8_t &lt;var&gt;apow&lt;/var&gt;, int8_t &lt;var&gt;fpow&lt;/var&gt;, uint8_t &lt;var&gt;opts&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;bnum&lt;/var&gt;' specifies the number of elements of the bucket array.  If it is not more than 0, the default value is specified.  The default value is 131071.  Suggested size of the bucket array is about from 0.5 to 4 times of the number of all records to be stored.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;apow&lt;/var&gt;' specifies the size of record alignment by power of 2.  If it is negative, the default value is specified.  The default value is 4 standing for 2^4=16.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;fpow&lt;/var&gt;' specifies the maximum number of elements of the free block pool by power of 2.  If it is negative, the default value is specified.  The default value is 10 standing for 2^10=1024.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;opts&lt;/var&gt;' specifies options by bitwise or: `TDBTLARGE' specifies that the size of the database can be larger than 2GB by using 64-bit bucket array, `TDBTDEFLATE' specifies that each record is compressed with Deflate encoding, `TDBTBZIP' specifies that each record is compressed with BZIP2 encoding, `TDBTTCBS' specifies that each record is compressed with TCBS encoding.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the tuning parameters should be set before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetxmsiz' is used in order to set the size of the extra mapped memory of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetxmsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;xmsiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;xmsiz&lt;/var&gt;' specifies the size of the extra mapped memory.  If it is not more than 0, the extra mapped memory is disabled.  The default size is 67108864.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the mapping parameters should be set before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbopen' is used in order to open a database file and connect a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbopen(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;path&lt;/var&gt;, int &lt;var&gt;omode&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;path&lt;/var&gt;' specifies the path of the database file.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;omode&lt;/var&gt;' specifies the connection mode: `TDBOWRITER' as a writer, `TDBOREADER' as a reader.  If the mode is `TDBOWRITER', the following may be added by bitwise or: `TDBOCREAT', which means it creates a new database if not exist, `TDBOTRUNC', which means it creates a new database regardless if one exists, `TDBOTSYNC', which means every transaction synchronizes updated contents with the device.  Both of `TDBOREADER' and `TDBOWRITER' can be added to by bitwise or: `TDBONOLCK', which means it opens the database file without file locking, or `TDBOLCKNB', which means locking is performed without blocking.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbclose' is used in order to close a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbclose(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update of a database is assured to be written when the database is closed.  If a writer opens a database but does not close it appropriately, the database will be broken.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput' is used in order to store a record into a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput2' is used in order to store a string record into a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput3' is used in order to store a string record into a table database object with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep' is used in order to store a new record into a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep2' is used in order to store a new string record into a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep3' is used in order to store a new string record into a table database object with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat' is used in order to concatenate columns of the existing record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat2' is used in order to concatenate columns in a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat3' is used in order to concatenate columns in a table database object with with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbout' is used in order to remove a record of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbout(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbout2' is used in order to remove a string record of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbout2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget' is used in order to retrieve a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCMAP *tctdbget(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is a map object of the columns of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tcmapnew', it should be deleted with the function `tcmapdel' when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget2' is used in order to retrieve a record in a table database object as a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbget2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, int *&lt;var&gt;sp&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;sp&lt;/var&gt;' specifies the pointer to the variable into which the size of the region of the return value is assigned.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the pointer to the region of the column string of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget3' is used in order to retrieve a string record in a table database object as a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbget3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the tab separated column string of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvsiz' is used in order to get the size of the value of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbvsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the size of the value of the corresponding record, else, it is -1.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvsiz2' is used in order to get the size of the value of a string record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbvsiz2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the size of the value of the corresponding record, else, it is -1.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiterinit' is used in order to initialize the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbiterinit(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;The iterator is used in order to access the key of every record stored in a database.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiternext' is used in order to get the next primary key of the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void *tctdbiternext(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int *&lt;var&gt;sp&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;sp&lt;/var&gt;' specifies the pointer to the variable into which the size of the region of the return value is assigned.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the pointer to the region of the next primary key, else, it is `NULL'.  `NULL' is returned when no record is to be get out of the iterator.&lt;/dd&gt;
+&lt;dd&gt;Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  It is possible to access every record by iteration of calling this function.  It is allowed to update or remove records whose keys are fetched while the iteration.  However, it is not assured if updating the database is occurred while the iteration.  Besides, the order of this traversal access method is arbitrary, so it is not assured that the order of storing matches the one of the traversal access.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiternext2' is used in order to get the next primary key string of the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbiternext2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the string of the next primary key, else, it is `NULL'.  `NULL' is returned when no record is to be get out of the iterator.&lt;/dd&gt;
+&lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  It is possible to access every record by iteration of calling this function.  However, it is not assured if updating the database is occurred while the iteration.  Besides, the order of this traversal access method is arbitrary, so it is not assured that the order of storing matches the one of the traversal access.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfwmkeys' is used in order to get forward matching primary keys in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbfwmkeys(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pbuf&lt;/var&gt;, int &lt;var&gt;psiz&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pbuf&lt;/var&gt;' specifies the pointer to the region of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;psiz&lt;/var&gt;' specifies the size of the region of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of keys to be fetched.  If it is negative, no limit is specified.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the corresponding keys.  This function does never fail and return an empty list even if no key corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.  Note that this function may be very slow because every key in the database is scanned.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfwmkeys2' is used in order to get forward matching string primary keys in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbfwmkeys2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pstr&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pstr&lt;/var&gt;' specifies the string of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of keys to be fetched.  If it is negative, no limit is specified.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the corresponding keys.  This function does never fail and return an empty list even if no key corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.  Note that this function may be very slow because every key in the database is scanned.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbaddint' is used in order to add an integer to a column of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbaddint(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, int &lt;var&gt;num&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is `INT_MIN'.&lt;/dd&gt;
+&lt;dd&gt;The additional value is stored as a decimal string value of a column whose name is &quot;_num&quot;.  If no record corresponds, a new record with the additional value is stored.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbadddouble' is used in order to add a real number to a column of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;double tctdbadddouble(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, double &lt;var&gt;num&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
+&lt;dd&gt;The additional value is stored as a decimal string value of a column whose name is &quot;_num&quot;.  If no record corresponds, a new record with the additional value is stored.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsync' is used in order to synchronize updated contents of a table database object with the file and the device.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsync(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;This function is useful when another process connects to the same database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdboptimize' is used in order to optimize the file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdboptimize(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;bnum&lt;/var&gt;, int8_t &lt;var&gt;apow&lt;/var&gt;, int8_t &lt;var&gt;fpow&lt;/var&gt;, uint8_t &lt;var&gt;opts&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;bnum&lt;/var&gt;' specifies the number of elements of the bucket array.  If it is not more than 0, the default value is specified.  The default value is two times of the number of records.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;apow&lt;/var&gt;' specifies the size of record alignment by power of 2.  If it is negative, the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;fpow&lt;/var&gt;' specifies the maximum number of elements of the free block pool by power of 2.  If it is negative, the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;opts&lt;/var&gt;' specifies options by bitwise or: `BDBTLARGE' specifies that the size of the database can be larger than 2GB by using 64-bit bucket array, `BDBTDEFLATE' specifies that each record is compressed with Deflate encoding, `BDBTBZIP' specifies that each record is compressed with BZIP2 encoding, `BDBTTCBS' specifies that each record is compressed with TCBS encoding.  If it is `UINT8_MAX', the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;This function is useful to reduce the size of the database file with data fragmentation by successive updating.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvanish' is used in order to remove all records of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbvanish(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbcopy' is used in order to copy the database file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbcopy(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;path&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;path&lt;/var&gt;' specifies the path of the destination file.  If it begins with `@', the trailing substring is executed as a command line.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.  False is returned if the executed command returns non-zero code.&lt;/dd&gt;
+&lt;dd&gt;The database file is assured to be kept synchronized and not modified while the copying or executing operation is in progress.  So, this function is useful to create a backup file of the database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtranbegin' is used in order to begin the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtranbegin(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;The database is locked by the thread while the transaction so that only one transaction can be activated with a database object at the same time.  Thus, the serializable isolation level is assumed if every database operation is performed in the transaction.  Because all pages are cached on memory while the transaction, the amount of referred records is limited by the memory capacity.  If the database is closed during transaction, the transaction is aborted implicitly.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtrancommit' is used in order to commit the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtrancommit(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update in the transaction is fixed when it is committed successfully.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtranabort' is used in order to abort the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtranabort(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update in the transaction is discarded when it is aborted.  The state of the database is rollbacked to before transaction.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbpath' is used in order to get the file path of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdbpath(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the path of the database file or `NULL' if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbrnum' is used in order to get the number of records ccccof a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;uint64_t tctdbrnum(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the number of records or 0 if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfsiz' is used in order to get the size of the database file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;uint64_t tctdbfsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the size of the database file or 0 if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetindex' is used in order to set a column index to a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetindex(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;type&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  If the name of an existing index is specified, the index is rebuilt.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;type&lt;/var&gt;' specifies the index type: `TDBITLEXICAL' for lexical string, `TDBITDECIMAL' for decimal string.  If it is `TDBITVOID', the index is removed.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the setting indexes should be set after the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+
+&lt;p&gt;The function `tctdbgenuid' is used in order to generate a unique ID number of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tctdbgenuid(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new unique ID number or -1 on failure.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrynew' is used in order to create a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TDBQRY *tctdbqrynew(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new query object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrydel' is used in order to delete a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrydel(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqryaddcond' is used in order to add a narrowing condition to a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqryaddcond(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;op&lt;/var&gt;, const char *&lt;var&gt;expr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;op&lt;/var&gt;' specifies an operation type: `TDBQCSTREQ' for string which is equal to the expression, `TDBQCSTRINC' for string which is included in the expression, `TDBQCSTRBW' for string which begins with the expression, `TDBQCSTREW' for string which ends with the expression, `TDBQCSTRAND' for string which includes all tokens in the expression, `TDBQCSTROR' for string which includes at least one token in the expression, `TDBQCSTROREQ' for string which is equal to at least one token in the expression, `TDBQCSTRRX' for string which matches regular expressions of the expression, `TDBQCNUMEQ' for number which is equal to the expression, `TDBQCNUMGT' for number which is greater than the expression, `TDBQCNUMGE' for number which is greater than or equal to the expression, `TDBQCNUMLT' for number which is less than the expression, `TDBQCNUMLE' for number which is less than or equal to the expression, `TDBQCNUMBT' for number which is between two tokens of the expression, `TDBQCNUMOREQ' for number which is equal to at least one token in the expression.  All operations can be flagged by bitwise or: `TDBQCNEGATE' for negation, `TDBQCNOIDX' for using no index.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;expr&lt;/var&gt;' specifies an operand exression.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysetorder' is used in order to set the order of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrysetorder(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;type&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;type&lt;/var&gt;' specifies the order type: `TDBQOSTRASC' for string ascending, `TDBQOSTRDESC' for string descending, `TDBQONUMASC' for number ascending, `TDBQONUMDESC' for number descending.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysetmax' is used in order to set the maximum number of records of the result of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrysetmax(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of records of the result.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysearch' is used in order to execute the search of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbqrysearch(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the primary keys of the corresponding records.  This function does never fail and return an empty list even if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqryhint' is used in order to get the hint of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdbqryhint(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the hint string.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;h3&gt;Example Code&lt;/h3&gt;
+
+&lt;p&gt;The following code is an example to use a table database.&lt;/p&gt;
+
+&lt;pre&gt;#include &amp;lt;tctdb.h&amp;gt;
+#include &amp;lt;stdlib.h&amp;gt;
+#include &amp;lt;stdbool.h&amp;gt;
+#include &amp;lt;stdint.h&amp;gt;
+
+int main(int argc, char **argv){
+  TCTDB *tdb;
+  int ecode, pksiz, i, rsiz;
+  char pkbuf[256];
+  const char *rbuf, *name;
+  TCMAP *cols;
+  TDBQRY *qry;
+  TCLIST *res;
+
+  /* create the object */
+  tdb = tctdbnew();
+
+  /* open the database */
+  if(!tctdbopen(tdb, &quot;casket.tdb&quot;, TDBOWRITER | TDBOCREAT)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;open error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* store a record */
+  pksiz = sprintf(pkbuf, &quot;%ld&quot;, (long)tctdbgenuid(tdb));
+  cols = tcmapnew3(&quot;name&quot;, &quot;mikio&quot;, &quot;age&quot;, &quot;30&quot;, &quot;lang&quot;, &quot;ja,en,c&quot;, NULL);
+  if(!tctdbput(tdb, pkbuf, pksiz, cols)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+  tcmapdel(cols);
+
+  /* store a record in a naive way */
+  pksiz = sprintf(pkbuf, &quot;12345&quot;);
+  cols = tcmapnew();
+  tcmapput2(cols, &quot;name&quot;, &quot;falcon&quot;);
+  tcmapput2(cols, &quot;age&quot;, &quot;31&quot;);
+  tcmapput2(cols, &quot;lang&quot;, &quot;ja&quot;);
+  if(!tctdbput(tdb, pkbuf, pksiz, cols)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+  tcmapdel(cols);
+
+  /* store a record with a TSV string */
+  if(!tctdbput3(tdb, &quot;abcde&quot;, &quot;name\tjoker\tage\t19\tlang\ten,es&quot;)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* search for records */
+  qry = tctdbqrynew(tdb);
+  tctdbqryaddcond(qry, &quot;age&quot;, TDBQCNUMGE, &quot;20&quot;);
+  tctdbqryaddcond(qry, &quot;lang&quot;, TDBQCSTROR, &quot;ja,en&quot;);
+  tctdbqrysetorder(qry, &quot;name&quot;, TDBQOSTRASC);
+  tctdbqrysetmax(qry, 10);
+  res = tctdbqrysearch(qry);
+  for(i = 0; i &amp;lt; tclistnum(res); i++){
+    rbuf = tclistval(res, i, &amp;amp;rsiz);
+    cols = tctdbget(tdb, rbuf, rsiz);
+    if(cols){
+      printf(&quot;%s&quot;, rbuf);
+      tcmapiterinit(cols);
+      while((name = tcmapiternext2(cols)) != NULL){
+        printf(&quot;\t%s\t%s&quot;, name, tcmapget2(cols, name));
+      }
+      printf(&quot;\n&quot;);
+      tcmapdel(cols);
+    }
+  }
+  tclistdel(res);
+  tctdbqrydel(qry);
+
+  /* close the database */
+  if(!tctdbclose(tdb)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;close error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* delete the object */
+  tctdbdel(tdb);
+
+  return 0;
+}
+&lt;/pre&gt;
+
+&lt;h3&gt;CLI&lt;/h3&gt;
+
+&lt;p&gt;To use the table database API easily, the commands `&lt;code&gt;tcttest&lt;/code&gt;', `&lt;code&gt;tctmttest&lt;/code&gt;', and `&lt;code&gt;tctmgr&lt;/code&gt;' are provided.&lt;/p&gt;
+
+&lt;p&gt;The command `&lt;code&gt;tcttest&lt;/code&gt;' is a utility for facility test and performance test.  This command is used in the following format.  `&lt;var&gt;path&lt;/var&gt;' specifies the path of a database file.  `&lt;var&gt;rnum&lt;/var&gt;' specifies the number of iterations.  `&lt;var&gt;bnum&lt;/var&gt;' specifies the number of buckets.  `&lt;var&gt;apow&lt;/var&gt;' specifies the power of the alignment.  `&lt;var&gt;fpow&lt;/var&gt;' specifies the power of the free block pool.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tcttest write [-mt] [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Store records with columns &quot;str&quot;, &quot;num&quot;, &quot;type&quot;, and &quot;flag&quot;.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest read [-mt] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Retrieve all records of the database above.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest remove [-mt] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Remove all records of the database above.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Store records with partway duplicated keys using concatenate mode.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Perform miscellaneous test of various operations.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest wicked [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Perform updating operations selected at random.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;Options feature the following.&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-mt&lt;/code&gt; : call the function `tctdbsetmutex'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : enable the option `TDBTLARGE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : enable the option `TDBTDEFLATE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : enable the option `TDBTBZIP'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : enable the option `TDBTTCBS'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : enable the option `TDBTEXCODEC'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-xm &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : specify the size of the extra mapped memory.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ip&lt;/code&gt; : create the number index for the primary key.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-is&lt;/code&gt; : create the string index for the column &quot;str&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-in&lt;/code&gt; : create the number index for the column &quot;num&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-it&lt;/code&gt; : create the string index for the column &quot;type&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-if&lt;/code&gt; : create the string index for the column &quot;flag&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : enable the option `TDBNOLCK'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : enable the option `TDBLCKNB'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rnd&lt;/code&gt; : select keys at random.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pn &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : specify the number of patterns.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : use the function `tctdbaddint' instead of `tctdbputcat'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : use the function `tctdbadddouble' instead of `tctdbputcat'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : set the length of values at random.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : select update operations at random.&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;This command returns 0 on success, another on failure.&lt;/p&gt;
+
+&lt;p&gt;The command `&lt;code&gt;tctmttest&lt;/code&gt;' is a utility for facility test under multi-thread situation.  This command is used in the following format.  `&lt;var&gt;path&lt;/var&gt;' specifies the path of a database file.  `&lt;var&gt;tnum&lt;/var&gt;' specifies the number of running threads.  `&lt;var&gt;rnum&lt;/var&gt;' specifies the number of iterations.  `&lt;var&gt;bnum&lt;/var&gt;' specifies the number of buckets.  `&lt;var&gt;apow&lt;/var&gt;' specifies the power of the alignment.  `&lt;var&gt;fpow&lt;/var&gt;' specifies the power of the free block pool.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest write [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Store records with columns &quot;str&quot;, &quot;num&quot;, &quot;type&quot;, and &quot;flag&quot;.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest read [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Retrieve all records of the database above.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest remove [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Remove all records of the database above.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest wicked [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Perform updating operations selected at random.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest typical [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rr &lt;var&gt;num&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Perform typical operations selected at random.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;Options feature the following.&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : enable the option `TDBTLARGE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : enable the option `TDBTDEFLATE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : enable the option `TDBTBZIP'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : enable the option `TDBTTCBS'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : enable the option `TDBTEXCODEC'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-xm &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : specify the size of the extra mapped memory.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ip&lt;/code&gt; : create the number index for the primary key.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-is&lt;/code&gt; : create the string index for the column &quot;str&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-in&lt;/code&gt; : create the number index for the column &quot;num&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-it&lt;/code&gt; : create the string index for the column &quot;type&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-if&lt;/code&gt; : create the string index for the column &quot;flag&quot;.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : enable the option `TDBNOLCK'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : enable the option `TDBLCKNB'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rnd&lt;/code&gt; : select keys at random.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nc&lt;/code&gt; : omit the comparison test.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rr &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : specifiy the ratio of reading operation by percentage.&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;This command returns 0 on success, another on failure.&lt;/p&gt;
+
+&lt;p&gt;The command `&lt;code&gt;tctmgr&lt;/code&gt;' is a utility for test and debugging of the table database API and its applications.  `&lt;var&gt;path&lt;/var&gt;' specifies the path of a database file.  `&lt;var&gt;bnum&lt;/var&gt;' specifies the number of buckets.  `&lt;var&gt;apow&lt;/var&gt;' specifies the power of the alignment.  `&lt;var&gt;fpow&lt;/var&gt;' specifies the power of the free block pool.  `&lt;var&gt;pkey&lt;/var&gt;' specifies the primary key of a record.  `&lt;var&gt;cols&lt;/var&gt;' specifies the names and the values of a record alternately.  `&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  `&lt;var&gt;op&lt;/var&gt;' specifies an operator.  `&lt;var&gt;expr&lt;/var&gt;' specifies the condition expression.  `&lt;var&gt;file&lt;/var&gt;' specifies the input file.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr create [-tl] [-td|-tb|-tt|-tx] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Create a database file.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr inform [-nl|-nb] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Print miscellaneous information to the standard output.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr put [-nl|-nb] [-sx] [-dk|-dc] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt; [&lt;var&gt;cols&lt;/var&gt; ...]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Store a record.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr out [-nl|-nb] [-sx] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Remove a record.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr get [-nl|-nb] [-sx] [-px] [-pz] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Print the value of a record.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr list [-nl|-nb] [-m &lt;var&gt;num&lt;/var&gt;] [-pv] [-px] [-fm &lt;var&gt;str&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Print the primary keys of all records, separated by line feeds.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr search [-nl|-nb] [-ord &lt;var&gt;name&lt;/var&gt; &lt;var&gt;type&lt;/var&gt;] [-m &lt;var&gt;num&lt;/var&gt;] [-pv] [-px] [-ph] [-bt &lt;var&gt;num&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;name&lt;/var&gt; &lt;var&gt;op&lt;/var&gt; &lt;var&gt;expr&lt;/var&gt; ...]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Print records matching conditions, separated by line feeds.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr optimize [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Optimize a database file.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr setindex [-nl|-nb] [-cd|-cv] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;name&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Set the index of a column.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr importtsv [-nl|-nb] [-sc] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;file&lt;/var&gt;]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Store records of TSV in each line of a file.&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr version&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Print the version information of Tokyo Cabinet.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;Options feature the following.&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : enable the option `TDBTLARGE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : enable the option `TDBTDEFLATE'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : enable the option `TDBTBZIP'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : enable the option `TDBTTCBS'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : enable the option `TDBTEXCODEC'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : enable the option `TDBNOLCK'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : enable the option `TDBLCKNB'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-sx&lt;/code&gt; : input data is evaluated as a hexadecimal data string.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dk&lt;/code&gt; : use the function `tctdbputkeep' instead of `tctdbput'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dc&lt;/code&gt; : use the function `tctdbputcat' instead of `tctdbput'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-px&lt;/code&gt; : output data is converted into a hexadecimal data string.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pz&lt;/code&gt; : do not append line feed at the end of the output.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-m &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : specify the maximum number of the output.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pv&lt;/code&gt; : print values of records also.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-fm &lt;var&gt;str&lt;/var&gt;&lt;/code&gt; : specify the prefix of keys.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ord &lt;var&gt;name&lt;/var&gt; &lt;var&gt;type&lt;/var&gt;&lt;/code&gt; : specify the order of the result.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ph&lt;/code&gt; : print hint information also.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-bt&lt;/code&gt; : specifies the number of benchmark tests.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tz&lt;/code&gt; : enable the option `UINT8_MAX'.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-cd&lt;/code&gt; : create the number index instead of the string index.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-cv&lt;/code&gt; : remove the existing index.&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-sc&lt;/code&gt; : normalize keys as lower cases.&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;The operator of the `search' subcommand is one of &quot;STREQ&quot;, &quot;STRINC&quot;, &quot;STRBW&quot;, &quot;STREW&quot;, &quot;STRAND&quot;, &quot;STROR&quot;, &quot;STROREQ&quot;, &quot;STRRX&quot;, &quot;NUMEQ&quot;, &quot;NUMGT&quot;, &quot;NUMGE&quot;, &quot;NUMLT&quot;, &quot;NUMLE&quot;, &quot;NUMBT&quot;, and &quot;NUMOREQ&quot;.  The type of the `-ord' option is one of &quot;STRASC&quot;, &quot;STRDESC&quot;, &quot;NUMASC&quot;, and &quot;NUMDESC&quot;.  This command returns 0 on success, another on failure.&lt;/p&gt;
+
+&lt;hr /&gt;
+
 &lt;h2 id=&quot;tcadbapi&quot;&gt;The Abstract Database API&lt;/h2&gt;
 
 &lt;p&gt;Abstract database is a set of interfaces to use on-memory hash database, on-memory tree database, hash database, B+ tree database, and fixed-length database with the same API.  See `&lt;code&gt;tcadb.h&lt;/code&gt;' for entire specification.&lt;/p&gt;
@@ -5377,7 +6182,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -5434,7 +6239,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;All databases support &quot;putlist&quot;, &quot;outlist&quot;, and &quot;getlist&quot;.  &quot;putlist&quot; is to store records.  It receives keys and values one after the other, and returns an empty list.  &quot;outlist&quot; is to remove records.  It receives keys, and returns an empty list.  &quot;getlist&quot; is to retrieve records.  It receives keys, and returns keys and values of corresponding records one after the other.  Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.&lt;/dd&gt;
 &lt;/dl&gt;
 
-&lt;h3&gt;Example&lt;/h3&gt;
+&lt;h3&gt;Example Code&lt;/h3&gt;
 
 &lt;p&gt;The following code is an example to use an abstract database.&lt;/p&gt;
 
@@ -5445,7 +6250,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCADB *adb;
   char *key, *value;
 </diff>
      <filename>doc/spex-en.html</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
 &lt;h1&gt;Tokyo Cabinet&#31532;1&#29256;&#22522;&#26412;&#20181;&#27096;&#26360;&lt;/h1&gt;
 
 &lt;div class=&quot;note&quot;&gt;Copyright (C) 2006-2009 Mikio Hirabayashi&lt;/div&gt;
-&lt;div class=&quot;note&quot;&gt;Last Update: Sat, 03 Jan 2009 21:41:33 +0900&lt;/div&gt;
+&lt;div class=&quot;note&quot;&gt;Last Update: Wed, 07 Jan 2009 01:03:53 +0900&lt;/div&gt;
 &lt;div class=&quot;navi&quot;&gt;[&lt;a href=&quot;spex-en.html&quot; hreflang=&quot;en&quot;&gt;English&lt;/a&gt;/&lt;span class=&quot;void&quot;&gt;Japanese&lt;/span&gt;] [&lt;a href=&quot;index.ja.html&quot;&gt;HOME&lt;/a&gt;]&lt;/div&gt;
 
 &lt;hr /&gt;
@@ -39,6 +39,7 @@
 &lt;li&gt;&lt;a href=&quot;#tchdbapi&quot;&gt;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcbdbapi&quot;&gt;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcfdbapi&quot;&gt;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;#tctdbapi&quot;&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tcadbapi&quot;&gt;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#tips&quot;&gt;&#12385;&#12423;&#12387;&#12392;&#12375;&#12383;&#12467;&#12484;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#fileformat&quot;&gt;&#12501;&#12449;&#12452;&#12523;&#12501;&#12457;&#12540;&#12510;&#12483;&#12488;&lt;/a&gt;&lt;/li&gt;
@@ -58,6 +59,8 @@
 
 &lt;p&gt;&#22266;&#23450;&#38263;&#37197;&#21015;&#12398;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12391;&#12399;&#12289;&#19968;&#24847;&#12394;&#33258;&#28982;&#25968;&#12434;&#12461;&#12540;&#12392;&#12375;&#12390;&#12524;&#12467;&#12540;&#12489;&#12364;&#26684;&#32013;&#12373;&#12428;&#12414;&#12377;&#12290;&#12461;&#12540;&#12364;&#37325;&#35079;&#12377;&#12427;&#35079;&#25968;&#12398;&#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427;&#12371;&#12392;&#12399;&#12391;&#12365;&#12414;&#12379;&#12435;&#12290;&#12414;&#12383;&#12289;&#21508;&#12524;&#12467;&#12540;&#12489;&#12398;&#20516;&#12398;&#38263;&#12373;&#12399;&#19968;&#23450;&#20197;&#19979;&#12395;&#21046;&#38480;&#12373;&#12428;&#12414;&#12377;&#12290;&#25552;&#20379;&#12373;&#12428;&#12427;&#25805;&#20316;&#12399;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;&#12411;&#12412;&#21516;&#27096;&#12391;&#12377;&#12290;&lt;/p&gt;
 
+&lt;p&gt;&#12495;&#12483;&#12471;&#12517;&#34920;&#12398;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#22793;&#31278;&#12392;&#12375;&#12390;&#12289;&#12486;&#12540;&#12502;&#12523;&#12398;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12418;&#25552;&#20379;&#12373;&#12428;&#12414;&#12377;&#12290;&#21508;&#12524;&#12467;&#12540;&#12489;&#12399;&#20027;&#12461;&#12540;&#12391;&#35672;&#21029;&#12373;&#12428;&#12427;&#12392;&#12392;&#12418;&#12395;&#12289;&#21517;&#21069;&#20184;&#12365;&#12459;&#12521;&#12512;&#12398;&#38598;&#21512;&#12434;&#20516;&#12392;&#12375;&#12390;&#25345;&#12385;&#12414;&#12377;&#12290;&#12487;&#12540;&#12479;&#12473;&#12461;&#12540;&#12510;&#12398;&#27010;&#24565;&#12399;&#12354;&#12426;&#12414;&#12379;&#12435;&#12364;&#12289;&#20219;&#24847;&#12398;&#12467;&#12521;&#12512;&#12395;&#24373;&#12425;&#12428;&#12383;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#29992;&#12356;&#12427;&#12371;&#12392;&#12391;&#35079;&#38609;&#12394;&#26465;&#20214;&#12395;&#22522;&#12389;&#12367;&#12524;&#12467;&#12540;&#12489;&#12398;&#26908;&#32034;&#12434;&#21177;&#29575;&#21270;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&lt;/p&gt;
+
 &lt;p&gt;Tokyo Cabinet&#12399;C&#35328;&#35486;&#12391;&#35352;&#36848;&#12373;&#12428;&#12289;C&#12392;Perl&#12392;Ruby&#12392;Java&#12392;Lua&#12398;API&#12392;&#12375;&#12390;&#25552;&#20379;&#12373;&#12428;&#12414;&#12377;&#12290;Tokyo Cabinet&#12399;C99&#12362;&#12424;&#12403;POSIX&#28310;&#25312;&#12398;API&#12434;&#20633;&#12360;&#12427;&#12503;&#12521;&#12483;&#12488;&#12501;&#12457;&#12540;&#12512;&#12391;&#21033;&#29992;&#12391;&#12365;&#12414;&#12377;&#12290;Tokyo Cabinet&#12399;GNU Lesser General Public License&#12395;&#22522;&#12389;&#12367;&#12501;&#12522;&#12540;&#12477;&#12501;&#12488;&#12454;&#12455;&#12450;&#12391;&#12377;&#12290;&lt;/p&gt;
 
 &lt;hr /&gt;
@@ -111,6 +114,14 @@
 
 &lt;p&gt;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#12469;&#12452;&#12474;&#12399;&#12289;&#12461;&#12540;&#12398;&#22793;&#22495;&#12392;&#20516;&#12398;&#21046;&#38480;&#38263;&#12395;&#27604;&#20363;&#12375;&#12414;&#12377;&#12290;&#12377;&#12394;&#12431;&#12385;&#12289;&#12461;&#12540;&#12398;&#22793;&#22495;&#12364;&#23567;&#12373;&#12367;&#12289;&#20516;&#12398;&#12469;&#12452;&#12474;&#12364;&#23567;&#12373;&#12356;&#12411;&#12393;&#12289;&#31354;&#38291;&#21177;&#29575;&#12399;&#21521;&#19978;&#12375;&#12414;&#12377;&#12290;&#20363;&#12360;&#12400;&#12289;&#12461;&#12540;&#12398;&#26368;&#22823;&#20516;&#12364;100&#19975;&#12391;&#12289;&#20516;&#12398;&#21046;&#38480;&#38263;&#12364;100&#12496;&#12452;&#12488;&#12398;&#22580;&#21512;&#12289;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#12469;&#12452;&#12474;&#12399;100MB&#12411;&#12393;&#12395;&#12394;&#12426;&#12414;&#12377;&#12290;RAM&#19978;&#12395;&#35501;&#12415;&#36796;&#12414;&#12428;&#12427;&#12398;&#12399;&#23455;&#38555;&#12395;&#21442;&#29031;&#12373;&#12428;&#12383;&#12524;&#12467;&#12540;&#12489;&#12398;&#21608;&#36794;&#12398;&#38936;&#22495;&#12398;&#12415;&#12394;&#12398;&#12391;&#12289;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#12469;&#12452;&#12474;&#12399;&#20206;&#24819;&#12513;&#12514;&#12522;&#12398;&#12469;&#12452;&#12474;&#12414;&#12391;&#22823;&#12365;&#12367;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&lt;/p&gt;
 
+&lt;h3&gt;&#26580;&#36575;&#12394;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#23455;&#35013;&lt;/h3&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12399;&#12289;&#21336;&#32020;&#12394;&#12461;&#12540;&#12392;&#20516;&#12398;&#27083;&#36896;&#12391;&#12399;&#12394;&#12367;&#12289;&#12522;&#12524;&#12540;&#12471;&#12519;&#12490;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#34920;&#12398;&#12424;&#12358;&#12394;&#27083;&#36896;&#12434;&#34920;&#29694;&#12375;&#12414;&#12377;&#12290;&#21508;&#12524;&#12467;&#12540;&#12489;&#12399;&#20027;&#12461;&#12540;&#12391;&#35672;&#21029;&#12373;&#12428;&#12427;&#12392;&#12392;&#12418;&#12395;&#12289;&#20219;&#24847;&#12398;&#25991;&#23383;&#21015;&#12391;&#21517;&#21069;&#12434;&#20184;&#12369;&#12425;&#12428;&#12383;&#12459;&#12521;&#12512;&#12398;&#38598;&#21512;&#12434;&#20516;&#12392;&#12375;&#12390;&#25345;&#12385;&#12414;&#12377;&#12290;&#20363;&#12360;&#12400;&#12289;&#31038;&#21729;&#30058;&#21495;&#12434;&#20027;&#12461;&#12540;&#12395;&#12375;&#12390;&#12289;&#21517;&#21069;&#12420;&#37096;&#32626;&#12420;&#32102;&#19982;&#12394;&#12393;&#12398;&#12467;&#12521;&#12512;&#12434;&#27083;&#36896;&#21270;&#12375;&#12390;&#26684;&#32013;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12522;&#12524;&#12540;&#12471;&#12519;&#12490;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;&#36949;&#12387;&#12390;&#12487;&#12540;&#12479;&#12473;&#12461;&#12540;&#12510;&#12434;&#20107;&#21069;&#12395;&#23450;&#32681;&#12377;&#12427;&#24517;&#35201;&#12399;&#12394;&#12367;&#12289;&#12524;&#12467;&#12540;&#12489;&#27598;&#12395;&#30064;&#12394;&#12427;&#31278;&#39006;&#12398;&#12467;&#12521;&#12512;&#12434;&#25345;&#12383;&#12379;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12395;&#23550;&#12375;&#12390;&#12399;&#12289;&#20027;&#12461;&#12540;&#20197;&#22806;&#12398;&#26465;&#20214;&#12391;&#12418;&#21839;&#12356;&#21512;&#12431;&#12379;&#12434;&#34892;&#12358;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#26465;&#20214;&#12399;&#12467;&#12521;&#12512;&#12398;&#21517;&#21069;&#12392;&#26465;&#20214;&#24335;&#12391;&#27083;&#25104;&#12373;&#12428;&#12414;&#12377;&#12290;&#26465;&#20214;&#24335;&#12398;&#28436;&#31639;&#23376;&#12392;&#12375;&#12390;&#12399;&#12289;&#25991;&#23383;&#21015;&#22411;&#12395;&#38306;&#12375;&#12390;&#12399;&#23436;&#20840;&#19968;&#33268;&#12420;&#21069;&#26041;&#19968;&#33268;&#12420;&#27491;&#35215;&#34920;&#29694;&#12394;&#12393;&#12364;&#25552;&#20379;&#12373;&#12428;&#12289;&#25968;&#20516;&#22411;&#12395;&#38306;&#12375;&#12390;&#12399;&#23436;&#20840;&#19968;&#33268;&#12420;&#31684;&#22258;&#19968;&#33268;&#12364;&#25552;&#20379;&#12373;&#12428;&#12414;&#12377;&#12290;&#35079;&#25968;&#12398;&#26465;&#20214;&#24335;&#12434;&#32068;&#12415;&#21512;&#12431;&#12379;&#12427;&#12371;&#12392;&#12418;&#12391;&#12365;&#12414;&#12377;&#12290;&#26908;&#32034;&#32080;&#26524;&#12398;&#38918;&#24207;&#12399;&#25991;&#23383;&#21015;&#12414;&#12383;&#12399;&#25968;&#20516;&#12398;&#26119;&#38918;&#12414;&#12383;&#12399;&#38477;&#38918;&#12434;&#25351;&#23450;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12467;&#12521;&#12512;&#12434;&#20351;&#12387;&#12383;&#26908;&#32034;&#12420;&#12477;&#12540;&#12488;&#12434;&#39640;&#36895;&#21270;&#12377;&#12427;&#12383;&#12417;&#12395;&#12289;&#12467;&#12521;&#12512;&#27598;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#20316;&#25104;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12467;&#12521;&#12512;&#12395;&#12399;&#22411;&#12398;&#27010;&#24565;&#12399;&#12354;&#12426;&#12414;&#12379;&#12435;&#12364;&#12289;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12395;&#12399;&#25991;&#23383;&#21015;&#22411;&#12418;&#12375;&#12367;&#12399;&#25968;&#20516;&#22411;&#12398;&#21306;&#21029;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&#12463;&#12456;&#12522;&#12458;&#12503;&#12486;&#12451;&#12510;&#12452;&#12470;&#12399;&#26908;&#32034;&#26465;&#20214;&#12420;&#12477;&#12540;&#12488;&#26465;&#20214;&#12395;&#24540;&#12376;&#12383;&#26368;&#36969;&#12394;&#38918;&#24207;&#12391;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#21033;&#29992;&#12375;&#12414;&#12377;&#12290;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12399;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#22806;&#37096;&#12501;&#12449;&#12452;&#12523;&#12392;&#12375;&#12390;&#23455;&#35013;&#12373;&#12428;&#12414;&#12377;&#12290;&lt;/p&gt;
+
 &lt;h3&gt;&#23455;&#29992;&#30340;&#12394;&#27231;&#33021;&#24615;&lt;/h3&gt;
 
 &lt;p&gt;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12399;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#27231;&#27083;&#12434;&#25552;&#20379;&#12375;&#12414;&#12377;&#12290;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#12434;&#38283;&#22987;&#12375;&#12390;&#12363;&#12425;&#32066;&#20102;&#12377;&#12427;&#12414;&#12391;&#12398;&#19968;&#36899;&#12398;&#25805;&#20316;&#12434;&#19968;&#25324;&#12375;&#12390;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12395;&#12467;&#12511;&#12483;&#12488;&#12375;&#12383;&#12426;&#12289;&#19968;&#36899;&#12398;&#26356;&#26032;&#25805;&#20316;&#12434;&#30772;&#26820;&#12375;&#12390;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#29366;&#24907;&#12434;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#12398;&#38283;&#22987;&#21069;&#12398;&#29366;&#24907;&#12395;&#12525;&#12540;&#12523;&#12496;&#12483;&#12463;&#12375;&#12383;&#12426;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#12398;&#20998;&#38626;&#12524;&#12505;&#12523;&#12399;2&#31278;&#39006;&#12354;&#12426;&#12414;&#12377;&#12290;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12395;&#23550;&#12377;&#12427;&#20840;&#12390;&#12398;&#25805;&#20316;&#12434;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#20869;&#12391;&#34892;&#12358;&#12392;&#30452;&#21015;&#21270;&#21487;&#33021;&#65288;serializable&#65289;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#12392;&#12394;&#12426;&#12289;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#22806;&#12398;&#25805;&#20316;&#12434;&#21516;&#26178;&#12395;&#34892;&#12358;&#12392;&#38750;&#12467;&#12511;&#12483;&#12488;&#35501;&#12415;&#21462;&#12426;&#65288;read uncommitted&#65289;&#12488;&#12521;&#12531;&#12470;&#12463;&#12471;&#12519;&#12531;&#12392;&#12394;&#12426;&#12414;&#12377;&#12290;&#32784;&#20037;&#24615;&#12399;&#12525;&#12464;&#20808;&#34892;&#26360;&#12365;&#36796;&#12415;&#12392;&#12471;&#12515;&#12489;&#12454;&#12506;&#12540;&#12472;&#12531;&#12464;&#12395;&#12424;&#12387;&#12390;&#25285;&#20445;&#12373;&#12428;&#12414;&#12377;&#12290;&lt;/p&gt;
@@ -125,7 +136,7 @@
 
 &lt;p&gt;&#12513;&#12514;&#12522;&#19978;&#12391;&#12524;&#12467;&#12540;&#12489;&#12434;&#31777;&#21336;&#12395;&#25201;&#12358;&#12383;&#12417;&#12395;&#12289;&#12518;&#12540;&#12486;&#12451;&#12522;&#12486;&#12451;API&#12364;&#25552;&#20379;&#12373;&#12428;&#12414;&#12377;&#12290;&#12522;&#12473;&#12488;&#12420;&#12510;&#12483;&#12503;&#12392;&#12356;&#12387;&#12383;&#22522;&#26412;&#30340;&#12394;&#12487;&#12540;&#12479;&#27083;&#36896;&#12434;&#12399;&#12376;&#12417;&#12289;&#12513;&#12514;&#12522;&#12503;&#12540;&#12523;&#12420;&#25991;&#23383;&#21015;&#20966;&#29702;&#12420;&#31526;&#21495;&#20966;&#29702;&#12394;&#12393;&#12289;&#12503;&#12525;&#12464;&#12521;&#12511;&#12531;&#12464;&#12391;&#33391;&#12367;&#20351;&#12358;&#27231;&#33021;&#12434;&#35440;&#12417;&#36796;&#12435;&#12391;&#12356;&#12414;&#12377;&#12290;&lt;/p&gt;
 
-&lt;p&gt;C&#35328;&#35486;&#12398;API&#12395;&#12399;&#12289;&#12518;&#12540;&#12486;&#12451;&#12522;&#12486;&#12451;API&#12289;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12398;5&#31278;&#39006;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&#21508;API&#12395;&#23550;&#24540;&#12375;&#12383;&#12467;&#12510;&#12531;&#12489;&#12521;&#12452;&#12531;&#12452;&#12531;&#12479;&#12501;&#12455;&#12540;&#12473;&#12418;&#29992;&#24847;&#12373;&#12428;&#12390;&#12356;&#12414;&#12377;&#12290;&#12381;&#12428;&#12425;&#12399;&#12503;&#12525;&#12488;&#12479;&#12452;&#12500;&#12531;&#12464;&#12420;&#12486;&#12473;&#12488;&#12420;&#12487;&#12496;&#12483;&#12464;&#12394;&#12393;&#12391;&#27963;&#36493;&#12377;&#12427;&#12391;&#12375;&#12423;&#12358;&#12290;Tokyo Cabinet&#12399;C&#35328;&#35486;&#12398;&#20182;&#12395;&#12418;&#12289;Perl&#12392;Ruby&#12392;Java&#12392;Lua&#12398;API&#12434;&#25552;&#20379;&#12375;&#12414;&#12377;&#12290;Perl&#29992;API&#12399;XS&#35328;&#35486;&#12434;&#29992;&#12356;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Ruby&#29992;API&#12399;Ruby&#12398;&#12514;&#12472;&#12517;&#12540;&#12523;&#12392;&#12375;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Java&#29992;API&#12399;Java Native Interface&#12434;&#29992;&#12356;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Lua&#29992;API&#12399;Lua&#12398;&#12514;&#12472;&#12517;&#12540;&#12523;&#12392;&#12375;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;&#12381;&#12398;&#20182;&#12398;&#35328;&#35486;&#12398;&#12452;&#12531;&#12479;&#12540;&#12501;&#12455;&#12452;&#12473;&#12418;&#31532;&#19977;&#32773;&#12395;&#12424;&#12387;&#12390;&#25552;&#20379;&#12373;&#12428;&#12427;&#12391;&#12375;&#12423;&#12358;&#12290;&lt;/p&gt;
+&lt;p&gt;C&#35328;&#35486;&#12398;API&#12395;&#12399;&#12289;&#12518;&#12540;&#12486;&#12451;&#12522;&#12486;&#12451;API&#12289;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12289;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12398;6&#31278;&#39006;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&#21508;API&#12395;&#23550;&#24540;&#12375;&#12383;&#12467;&#12510;&#12531;&#12489;&#12521;&#12452;&#12531;&#12452;&#12531;&#12479;&#12501;&#12455;&#12540;&#12473;&#12418;&#29992;&#24847;&#12373;&#12428;&#12390;&#12356;&#12414;&#12377;&#12290;&#12381;&#12428;&#12425;&#12399;&#12503;&#12525;&#12488;&#12479;&#12452;&#12500;&#12531;&#12464;&#12420;&#12486;&#12473;&#12488;&#12420;&#12487;&#12496;&#12483;&#12464;&#12394;&#12393;&#12391;&#27963;&#36493;&#12377;&#12427;&#12391;&#12375;&#12423;&#12358;&#12290;Tokyo Cabinet&#12399;C&#35328;&#35486;&#12398;&#20182;&#12395;&#12418;&#12289;Perl&#12392;Ruby&#12392;Java&#12392;Lua&#12398;API&#12434;&#25552;&#20379;&#12375;&#12414;&#12377;&#12290;Perl&#29992;API&#12399;XS&#35328;&#35486;&#12434;&#29992;&#12356;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Ruby&#29992;API&#12399;Ruby&#12398;&#12514;&#12472;&#12517;&#12540;&#12523;&#12392;&#12375;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Java&#29992;API&#12399;Java Native Interface&#12434;&#29992;&#12356;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;Lua&#29992;API&#12399;Lua&#12398;&#12514;&#12472;&#12517;&#12540;&#12523;&#12392;&#12375;&#12390;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#21628;&#12403;&#20986;&#12377;&#12418;&#12398;&#12391;&#12377;&#12290;&#12381;&#12398;&#20182;&#12398;&#35328;&#35486;&#12398;&#12452;&#12531;&#12479;&#12540;&#12501;&#12455;&#12452;&#12473;&#12418;&#31532;&#19977;&#32773;&#12395;&#12424;&#12387;&#12390;&#25552;&#20379;&#12373;&#12428;&#12427;&#12391;&#12375;&#12423;&#12358;&#12290;&lt;/p&gt;
 
 &lt;p&gt;&#35079;&#25968;&#12398;&#12503;&#12525;&#12475;&#12473;&#12364;&#21516;&#26178;&#12395;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#25805;&#20316;&#12375;&#12383;&#12356;&#22580;&#21512;&#12420;&#12522;&#12514;&#12540;&#12488;&#12507;&#12473;&#12488;&#12395;&#12354;&#12427;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#25805;&#20316;&#12375;&#12383;&#12356;&#22580;&#21512;&#12395;&#12399;&#12289;&#12522;&#12514;&#12540;&#12488;&#12469;&#12540;&#12499;&#12473;&#12434;&#20351;&#12358;&#12392;&#20415;&#21033;&#12391;&#12377;&#12290;&#12522;&#12514;&#12540;&#12488;&#12469;&#12540;&#12499;&#12473;&#12399;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12469;&#12540;&#12496;&#12392;&#12381;&#12398;&#12450;&#12463;&#12475;&#12473;&#12521;&#12452;&#12502;&#12521;&#12522;&#12363;&#12425;&#12394;&#12426;&#12289;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12399;&#12522;&#12514;&#12540;&#12488;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#20171;&#12375;&#12390;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12469;&#12540;&#12496;&#12434;&#25805;&#20316;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;HTTP&#12420;memcached&#12503;&#12525;&#12488;&#12467;&#12523;&#12418;&#12469;&#12509;&#12540;&#12488;&#12377;&#12427;&#12398;&#12391;&#12289;&#12411;&#12412;&#20840;&#12390;&#12398;&#12503;&#12521;&#12483;&#12488;&#12501;&#12457;&#12540;&#12512;&#12363;&#12425;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12469;&#12540;&#12496;&#12434;&#31777;&#21336;&#12395;&#25805;&#20316;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&lt;/p&gt;
 
@@ -185,10 +196,11 @@
 /usr/local/include/tchdb.h
 /usr/local/include/tcbdb.h
 /usr/local/include/tcfdb.h
+/usr/local/include/tctdb.h
 /usr/local/include/tcadb.h
 /usr/local/lib/libtokyocabinet.a
-/usr/local/lib/libtokyocabinet.so.7.4.0
-/usr/local/lib/libtokyocabinet.so.7
+/usr/local/lib/libtokyocabinet.so.x.y.z
+/usr/local/lib/libtokyocabinet.so.x
 /usr/local/lib/libtokyocabinet.so
 /usr/local/lib/pkgconfig/tokyocabinet.pc
 /usr/local/bin/tcutest
@@ -203,6 +215,9 @@
 /usr/local/bin/tcftest
 /usr/local/bin/tcfmttest
 /usr/local/bin/tcfmgr
+/usr/local/bin/tcttest
+/usr/local/bin/tctmttest
+/usr/local/bin/tctmgr
 /usr/local/bin/tcamgr
 /usr/local/bin/tcatest
 /usr/local/libexec/tcawmgr.cgi
@@ -452,6 +467,15 @@
 &lt;dd&gt;The return value is the new list object.&lt;/dd&gt;
 &lt;/dl&gt;
 
+&lt;p&gt;The function `tclistnew3' is used in order to create a list object with initial string elements.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tclistnew3(const char *&lt;var&gt;str&lt;/var&gt;, ...);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies the string of the first element.&lt;/dd&gt;
+&lt;dd&gt;The other arguments are other elements.  They should be trailed by a `NULL' argument.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new list object.&lt;/dd&gt;
+&lt;/dl&gt;
+
 &lt;p&gt;The function `tclistdup' is used in order to copy a list object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
@@ -706,6 +730,16 @@
 &lt;dd&gt;The return value is the new map object.&lt;/dd&gt;
 &lt;/dl&gt;
 
+&lt;p&gt;The function `tcmapnew3' is used in order to create a map object with initial string elements.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCMAP *tcmapnew3(const char *&lt;var&gt;str&lt;/var&gt;, ...);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies the string of the first element.&lt;/dd&gt;
+&lt;dd&gt;The other arguments are other elements.  They should be trailed by a `NULL' argument.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new map object.&lt;/dd&gt;
+&lt;dd&gt;The key and the value of each record are situated one after the other.&lt;/dd&gt;
+&lt;/dl&gt;
+
 &lt;p&gt;The function `tcmapdup' is used in order to copy a map object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
@@ -2113,17 +2147,26 @@
 &lt;p&gt;The function `tcstrjoin' is used in order to create a string by joining all elements of a list object.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
-&lt;dt&gt;&lt;code&gt;char *tcstrjoin(TCLIST *&lt;var&gt;list&lt;/var&gt;, char &lt;var&gt;delim&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;char *tcstrjoin(const TCLIST *&lt;var&gt;list&lt;/var&gt;, char &lt;var&gt;delim&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;`&lt;var&gt;list&lt;/var&gt;' specifies a list object.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;delim&lt;/var&gt;' specifies a delimiting character.&lt;/dd&gt;
 &lt;dd&gt;The return value is the result string.&lt;/dd&gt;
 &lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
 &lt;/dl&gt;
 
-&lt;p&gt;The function `tcatoi' is used in order to convert a string with a metric prefix to an integer.&lt;/p&gt;
+&lt;p&gt;The function `tcatoi' is used in order to convert a string to an integer.&lt;/p&gt;
 
 &lt;dl class=&quot;api&quot;&gt;
-&lt;dt&gt;&lt;code&gt;int64_t tcatoi(const char *str);&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tcatoi(const char *&lt;var&gt;str&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies a string.&lt;/dd&gt;
+&lt;dd&gt;The return value is the integer.  If the string does not contain numeric expression, 0 is returned.&lt;/dd&gt;
+&lt;dd&gt;This function is equivalent to `atoll' except that it does not depend on the locale.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tcatoix' is used in order to convert a string with a metric prefix to an integer.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tcatoix(const char *&lt;var&gt;str&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;`&lt;var&gt;str&lt;/var&gt;' specifies a string which can be trailed by a binary metric prefix.  &quot;K&quot;, &quot;M&quot;, &quot;G&quot;, &quot;T&quot;, &quot;P&quot;, and &quot;E&quot; are supported.  They are case-insensitive.&lt;/dd&gt;
 &lt;dd&gt;The return value is the integer.  If the string does not contain numeric expression, 0 is returned.  If the integer overflows the domain, `INT64_MAX' or `INT64_MIN' is returned according to the sign.&lt;/dd&gt;
 &lt;/dl&gt;
@@ -3267,7 +3310,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -3373,7 +3416,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCHDB *hdb;
   int ecode;
   char *key, *value;
@@ -3442,7 +3484,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#26908;&#32034;&#12377;&#12427;&#12290;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tchtest remove [-mt] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/dd&gt;
-&lt;dt&gt;&lt;code&gt;tchtest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;tchtest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-rc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#12461;&#12540;&#12364;&#12354;&#12427;&#31243;&#24230;&#37325;&#35079;&#12377;&#12427;&#12424;&#12358;&#12395;&#12524;&#12467;&#12540;&#12489;&#12398;&#36861;&#21152;&#12434;&#34892;&#12356;&#12289;&#36899;&#32080;&#12514;&#12540;&#12489;&#12391;&#20966;&#29702;&#12377;&#12427;&#12290;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tchtest misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#21508;&#31278;&#25805;&#20316;&#12398;&#32068;&#12415;&#21512;&#12431;&#12379;&#12486;&#12473;&#12488;&#12434;&#34892;&#12358;&#12290;&lt;/dd&gt;
@@ -3470,6 +3512,7 @@ int main(int argc, char **argv){
 &lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : &#38306;&#25968; `tchdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tchdbaddint' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : &#38306;&#25968; `tchdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tchdbadddouble' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : &#20516;&#12434;&#28961;&#20316;&#28858;&#12394;&#38263;&#12373;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : &#26356;&#26032;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12377;&#12427;&#12290;&lt;/li&gt;
 &lt;/ul&gt;
 
 &lt;p&gt;&#12371;&#12398;&#12467;&#12510;&#12531;&#12489;&#12399;&#20966;&#29702;&#12364;&#27491;&#24120;&#12395;&#32066;&#20102;&#12377;&#12428;&#12400; 0 &#12434;&#36820;&#12375;&#12289;&#12456;&#12521;&#12540;&#12364;&#12354;&#12428;&#12400;&#12381;&#12428;&#20197;&#22806;&#12398;&#20516;&#12434;&#36820;&#12375;&#12390;&#32066;&#20102;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
@@ -3986,7 +4029,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -4263,7 +4306,6 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCBDB *bdb;
   BDBCUR *cur;
   int ecode;
@@ -4336,7 +4378,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#26908;&#32034;&#12377;&#12427;&#12290;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tcbtest remove [-mt] [-cd|-ci|-cj] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/dd&gt;
-&lt;dt&gt;&lt;code&gt;tcbtest rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;tcbtest rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#12461;&#12540;&#12364;&#12354;&#12427;&#31243;&#24230;&#37325;&#35079;&#12377;&#12427;&#12424;&#12358;&#12395;&#12524;&#12467;&#12540;&#12489;&#12398;&#36861;&#21152;&#12434;&#34892;&#12356;&#12289;&#36899;&#32080;&#12514;&#12540;&#12489;&#12391;&#20966;&#29702;&#12377;&#12427;&#12290;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;tcbtest queue [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc &lt;var&gt;num&lt;/var&gt;] [-nc &lt;var&gt;num&lt;/var&gt;] [-xm &lt;var&gt;num&lt;/var&gt;] [-ls &lt;var&gt;num&lt;/var&gt;] [-ca &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;lmemb&lt;/var&gt; [&lt;var&gt;nmemb&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]]]&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&#12461;&#12517;&#12540;&#12398;&#20986;&#12375;&#20837;&#12428;&#12434;&#34892;&#12358;&#12290;&lt;/dd&gt;
@@ -4371,6 +4413,7 @@ int main(int argc, char **argv){
 &lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : &#38306;&#25968; `tcbdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tcbdbaddint' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : &#38306;&#25968; `tcbdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tcbdbadddouble' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : &#20516;&#12434;&#28961;&#20316;&#28858;&#12394;&#38263;&#12373;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : &#26356;&#26032;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12377;&#12427;&#12290;&lt;/li&gt;
 &lt;/ul&gt;
 
 &lt;p&gt;&#12371;&#12398;&#12467;&#12510;&#12531;&#12489;&#12399;&#20966;&#29702;&#12364;&#27491;&#24120;&#12395;&#32066;&#20102;&#12377;&#12428;&#12400; 0 &#12434;&#36820;&#12375;&#12289;&#12456;&#12521;&#12540;&#12364;&#12354;&#12428;&#12400;&#12381;&#12428;&#20197;&#22806;&#12398;&#20516;&#12434;&#36820;&#12375;&#12390;&#32066;&#20102;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
@@ -4463,7 +4506,7 @@ int main(int argc, char **argv){
 
 &lt;hr /&gt;
 
-&lt;h2 id=&quot;tcfdbapi&quot;&gt;The Fixed-length Database API&lt;/h2&gt;
+&lt;h2 id=&quot;tcfdbapi&quot;&gt;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/h2&gt;
 
 &lt;p&gt;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12399;&#12289;&#22266;&#23450;&#38263;&#12398;&#35201;&#32032;&#12363;&#12425;&#12394;&#12427;&#37197;&#21015;&#12434;&#21336;&#19968;&#12398;&#12501;&#12449;&#12452;&#12523;&#12395;&#35352;&#37682;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12391;&#12377;&#12290;&#12381;&#12428;&#12434;&#25201;&#12358;&#12398;&#12364;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12391;&#12377;&#12290;`&lt;code&gt;tcfdb.h&lt;/code&gt;' &#12395;API&#12398;&#20181;&#27096;&#12398;&#23436;&#20840;&#12394;&#35352;&#36848;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&lt;/p&gt;
 
@@ -4882,7 +4925,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;fdb&lt;/var&gt;' specifies the fixed-length database object connected as a writer.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;id&lt;/var&gt;' specifies the ID number.  It should be more than 0.  If it is `FDBIDMIN', the minimum ID number of existing records is specified.  If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified.  If it is `FDBIDMAX', the maximum ID number of existing records is specified.  If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -4958,21 +5001,20 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCFDB *fdb;
   int ecode;
   char *key, *value;
 
-  /* create the object */
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#20316;&#25104;&#12377;&#12427; */
   fdb = tcfdbnew();
 
-  /* open the database */
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38283;&#12367; */
   if(!tcfdbopen(fdb, &quot;casket.fdb&quot;, FDBOWRITER | FDBOCREAT)){
     ecode = tcfdbecode(fdb);
     fprintf(stderr, &quot;open error: %s\n&quot;, tcfdberrmsg(ecode));
   }
 
-  /* store records */
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427; */
   if(!tcfdbput3(fdb, &quot;1&quot;, &quot;one&quot;) ||
      !tcfdbput3(fdb, &quot;12&quot;, &quot;twelve&quot;) ||
      !tcfdbput3(fdb, &quot;144&quot;, &quot;one forty four&quot;)){
@@ -4980,7 +5022,7 @@ int main(int argc, char **argv){
     fprintf(stderr, &quot;put error: %s\n&quot;, tcfdberrmsg(ecode));
   }
 
-  /* retrieve records */
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#21462;&#24471;&#12377;&#12427; */
   value = tcfdbget3(fdb, &quot;1&quot;);
   if(value){
     printf(&quot;%s\n&quot;, value);
@@ -4990,7 +5032,7 @@ int main(int argc, char **argv){
     fprintf(stderr, &quot;get error: %s\n&quot;, tcfdberrmsg(ecode));
   }
 
-  /* traverse records */
+  /* &#27178;&#26029;&#30340;&#12395;&#12524;&#12467;&#12540;&#12489;&#12434;&#21442;&#29031;&#12377;&#12427; */
   tcfdbiterinit(fdb);
   while((key = tcfdbiternext3(fdb)) != NULL){
     value = tcfdbget3(fdb, key);
@@ -5001,13 +5043,13 @@ int main(int argc, char **argv){
     free(key);
   }
 
-  /* close the database */
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38281;&#12376;&#12427; */
   if(!tcfdbclose(fdb)){
     ecode = tcfdbecode(fdb);
     fprintf(stderr, &quot;close error: %s\n&quot;, tcfdberrmsg(ecode));
   }
 
-  /* delete the object */
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#30772;&#26820;&#12377;&#12427; */
   tcfdbdel(fdb);
 
   return 0;
@@ -5123,6 +5165,768 @@ int main(int argc, char **argv){
 
 &lt;hr /&gt;
 
+&lt;h2 id=&quot;tctdbapi&quot;&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/h2&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12399;&#12289;&#12503;&#12521;&#12452;&#12510;&#12522;&#12461;&#12540;&#12392;&#20219;&#24847;&#12398;&#12459;&#12521;&#12512;&#12434;&#25345;&#12388;&#12524;&#12467;&#12540;&#12489;&#32676;&#12434;&#21336;&#19968;&#12398;&#12501;&#12449;&#12452;&#12523;&#12395;&#35352;&#37682;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12391;&#12377;&#12290;&#12381;&#12428;&#12434;&#25201;&#12358;&#12398;&#12364;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12391;&#12377;&#12290;`&lt;code&gt;tctdb.h&lt;/code&gt;' &#12395;API&#12398;&#20181;&#27096;&#12398;&#23436;&#20840;&#12394;&#35352;&#36848;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;h3&gt;&#27010;&#35201;&lt;/h3&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#20351;&#12358;&#12383;&#12417;&#12395;&#12399;&#12289;`&lt;code&gt;tcutil.h&lt;/code&gt;'&#12289;`&lt;code&gt;tctdb.h&lt;/code&gt;' &#12362;&#12424;&#12403;&#38306;&#36899;&#12377;&#12427;&#27161;&#28310;&#12504;&#12483;&#12480;&#12501;&#12449;&#12452;&#12523;&#12434;&#12452;&#12531;&#12463;&#12523;&#12540;&#12489;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;&#36890;&#24120;&#12289;&#12477;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12398;&#20882;&#38957;&#20184;&#36817;&#12391;&#20197;&#19979;&#12398;&#35352;&#36848;&#12434;&#34892;&#12356;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;dl&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;tcutil.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;tctdb.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdbool.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dt&gt;&lt;code&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#25201;&#12358;&#38555;&#12395;&#12399;&#12289;`&lt;code&gt;TCTDB&lt;/code&gt;' &#22411;&#12408;&#12398;&#12509;&#12452;&#12531;&#12479;&#12434;&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12392;&#12375;&#12390;&#29992;&#12356;&#12414;&#12377;&#12290;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12399;&#12289;&#38306;&#25968; `&lt;code&gt;tctdbnew&lt;/code&gt;' &#12391;&#20316;&#25104;&#12375;&#12289;&#38306;&#25968; `&lt;code&gt;tctdbdel&lt;/code&gt;' &#12391;&#30772;&#26820;&#12375;&#12414;&#12377;&#12290;&#20316;&#25104;&#12375;&#12383;&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#20351;&#12356;&#32066;&#12431;&#12387;&#12383;&#12425;&#24517;&#12378;&#30772;&#26820;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;&#12381;&#12358;&#12375;&#12394;&#12356;&#12392;&#12513;&#12514;&#12522;&#12522;&#12540;&#12463;&#12364;&#30330;&#29983;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12524;&#12467;&#12540;&#12489;&#12398;&#26684;&#32013;&#12420;&#25506;&#32034;&#12434;&#34892;&#12358;&#21069;&#25552;&#12392;&#12375;&#12390;&#12289;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12392;&#25509;&#32154;&#12373;&#12379;&#12427;&#24517;&#35201;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12434;&#38283;&#12356;&#12390;&#25509;&#32154;&#12377;&#12427;&#12395;&#12399;&#38306;&#25968; `&lt;code&gt;tctdbopen&lt;/code&gt;' &#12434;&#29992;&#12356;&#12289;&#25509;&#32154;&#12398;&#35299;&#38500;&#12375;&#12390;&#12501;&#12449;&#12452;&#12523;&#12434;&#38281;&#12376;&#12427;&#12395;&#12399;&#38306;&#25968; `&lt;code&gt;tctdbclose&lt;/code&gt;' &#12434;&#29992;&#12356;&#12414;&#12377;&#12290;&#38283;&#12356;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12399;&#24517;&#12378;&#38281;&#12376;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;&#12381;&#12358;&#12375;&#12394;&#12356;&#12392;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12364;&#22730;&#12428;&#12383;&#12426;&#26684;&#32013;&#12375;&#12383;&#12487;&#12540;&#12479;&#12364;&#22833;&#12431;&#12428;&#12383;&#12426;&#12377;&#12427;&#21487;&#33021;&#24615;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;h3&gt;API&#65288;&#33521;&#35486;&#12473;&#12510;&#12513;&#65289;&lt;/h3&gt;
+
+&lt;p&gt;The function `tctdberrmsg' is used in order to get the message string corresponding to an error code.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdberrmsg(int &lt;var&gt;ecode&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;ecode&lt;/var&gt;' specifies the error code.&lt;/dd&gt;
+&lt;dd&gt;The return value is the message string of the error code.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbnew' is used in order to create a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCTDB *tctdbnew(void);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;The return value is the new table database object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbdel' is used in order to delete a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbdel(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If the database is not closed, it is closed implicitly.  Note that the deleted object and its derivatives can not be used anymore.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbecode' is used in order to get the last happened error code of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbecode(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the last happened error code.&lt;/dd&gt;
+&lt;dd&gt;The following error code is defined: `TCESUCCESS' for success, `TCETHREAD' for threading error, `TCEINVALID' for invalid operation, `TCENOFILE' for file not found, `TCENOPERM' for no permission, `TCEMETA' for invalid meta data, `TCERHEAD' for invalid record header, `TCEOPEN' for open error, `TCECLOSE' for close error, `TCETRUNC' for trunc error, `TCESYNC' for sync error, `TCESTAT' for stat error, `TCESEEK' for seek error, `TCEREAD' for read error, `TCEWRITE' for write error, `TCEMMAP' for mmap error, `TCELOCK' for lock error, `TCEUNLINK' for unlink error, `TCERENAME' for rename error, `TCEMKDIR' for mkdir error, `TCERMDIR' for rmdir error, `TCEKEEP' for existing record, `TCENOREC' for no record found, and `TCEMISC' for miscellaneous error.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetmutex' is used in order to set mutual exclusion control of a table database object for threading.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetmutex(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the mutual exclusion control is needed if the object is shared by plural threads and this function should should be called before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtune' is used in order to set the tuning parameters of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtune(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;bnum&lt;/var&gt;, int8_t &lt;var&gt;apow&lt;/var&gt;, int8_t &lt;var&gt;fpow&lt;/var&gt;, uint8_t &lt;var&gt;opts&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;bnum&lt;/var&gt;' specifies the number of elements of the bucket array.  If it is not more than 0, the default value is specified.  The default value is 131071.  Suggested size of the bucket array is about from 0.5 to 4 times of the number of all records to be stored.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;apow&lt;/var&gt;' specifies the size of record alignment by power of 2.  If it is negative, the default value is specified.  The default value is 4 standing for 2^4=16.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;fpow&lt;/var&gt;' specifies the maximum number of elements of the free block pool by power of 2.  If it is negative, the default value is specified.  The default value is 10 standing for 2^10=1024.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;opts&lt;/var&gt;' specifies options by bitwise or: `TDBTLARGE' specifies that the size of the database can be larger than 2GB by using 64-bit bucket array, `TDBTDEFLATE' specifies that each record is compressed with Deflate encoding, `TDBTBZIP' specifies that each record is compressed with BZIP2 encoding, `TDBTTCBS' specifies that each record is compressed with TCBS encoding.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the tuning parameters should be set before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetxmsiz' is used in order to set the size of the extra mapped memory of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetxmsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;xmsiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;xmsiz&lt;/var&gt;' specifies the size of the extra mapped memory.  If it is not more than 0, the extra mapped memory is disabled.  The default size is 67108864.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the mapping parameters should be set before the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbopen' is used in order to open a database file and connect a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbopen(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;path&lt;/var&gt;, int &lt;var&gt;omode&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object which is not opened.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;path&lt;/var&gt;' specifies the path of the database file.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;omode&lt;/var&gt;' specifies the connection mode: `TDBOWRITER' as a writer, `TDBOREADER' as a reader.  If the mode is `TDBOWRITER', the following may be added by bitwise or: `TDBOCREAT', which means it creates a new database if not exist, `TDBOTRUNC', which means it creates a new database regardless if one exists, `TDBOTSYNC', which means every transaction synchronizes updated contents with the device.  Both of `TDBOREADER' and `TDBOWRITER' can be added to by bitwise or: `TDBONOLCK', which means it opens the database file without file locking, or `TDBOLCKNB', which means locking is performed without blocking.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbclose' is used in order to close a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbclose(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update of a database is assured to be written when the database is closed.  If a writer opens a database but does not close it appropriately, the database will be broken.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput' is used in order to store a record into a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput2' is used in order to store a string record into a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbput3' is used in order to store a string record into a table database object with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbput3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, it is overwritten.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep' is used in order to store a new record into a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep2' is used in order to store a new string record into a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputkeep3' is used in order to store a new string record into a table database object with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputkeep3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If a record with the same key exists in the database, this function has no effect.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat' is used in order to concatenate columns of the existing record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, TCMAP *&lt;var&gt;cols&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cols&lt;/var&gt;' specifies a map object containing columns.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat2' is used in order to concatenate columns in a table database object with a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, const void *&lt;var&gt;cbuf&lt;/var&gt;, int &lt;var&gt;csiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cbuf&lt;/var&gt;' specifies the pointer to the region of the zero separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;csiz&lt;/var&gt;' specifies the size of the region of the column string.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbputcat3' is used in order to concatenate columns in a table database object with with a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbputcat3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;, const char *&lt;var&gt;cstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;cstr&lt;/var&gt;' specifies the string of the the tab separated column string where the name and the value of each column are situated one after the other.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;If there is no corresponding record, a new record is created.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbout' is used in order to remove a record of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbout(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbout2' is used in order to remove a string record of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbout2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget' is used in order to retrieve a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCMAP *tctdbget(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is a map object of the columns of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tcmapnew', it should be deleted with the function `tcmapdel' when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget2' is used in order to retrieve a record in a table database object as a zero separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbget2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, int *&lt;var&gt;sp&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;sp&lt;/var&gt;' specifies the pointer to the variable into which the size of the region of the return value is assigned.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the pointer to the region of the column string of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbget3' is used in order to retrieve a string record in a table database object as a tab separated column string.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbget3(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pkstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the tab separated column string of the corresponding record.  `NULL' is returned if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvsiz' is used in order to get the size of the value of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbvsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the size of the value of the corresponding record, else, it is -1.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvsiz2' is used in order to get the size of the value of a string record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbvsiz2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pkstr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kstr&lt;/var&gt;' specifies the string of the primary key.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the size of the value of the corresponding record, else, it is -1.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiterinit' is used in order to initialize the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbiterinit(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;The iterator is used in order to access the key of every record stored in a database.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiternext' is used in order to get the next primary key of the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void *tctdbiternext(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int *&lt;var&gt;sp&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;sp&lt;/var&gt;' specifies the pointer to the variable into which the size of the region of the return value is assigned.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the pointer to the region of the next primary key, else, it is `NULL'.  `NULL' is returned when no record is to be get out of the iterator.&lt;/dd&gt;
+&lt;dd&gt;Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  It is possible to access every record by iteration of calling this function.  It is allowed to update or remove records whose keys are fetched while the iteration.  However, it is not assured if updating the database is occurred while the iteration.  Besides, the order of this traversal access method is arbitrary, so it is not assured that the order of storing matches the one of the traversal access.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbiternext2' is used in order to get the next primary key string of the iterator of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;char *tctdbiternext2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the string of the next primary key, else, it is `NULL'.  `NULL' is returned when no record is to be get out of the iterator.&lt;/dd&gt;
+&lt;dd&gt;Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  It is possible to access every record by iteration of calling this function.  However, it is not assured if updating the database is occurred while the iteration.  Besides, the order of this traversal access method is arbitrary, so it is not assured that the order of storing matches the one of the traversal access.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfwmkeys' is used in order to get forward matching primary keys in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbfwmkeys(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pbuf&lt;/var&gt;, int &lt;var&gt;psiz&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pbuf&lt;/var&gt;' specifies the pointer to the region of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;psiz&lt;/var&gt;' specifies the size of the region of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of keys to be fetched.  If it is negative, no limit is specified.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the corresponding keys.  This function does never fail and return an empty list even if no key corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.  Note that this function may be very slow because every key in the database is scanned.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfwmkeys2' is used in order to get forward matching string primary keys in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbfwmkeys2(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;pstr&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;pstr&lt;/var&gt;' specifies the string of the prefix.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of keys to be fetched.  If it is negative, no limit is specified.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the corresponding keys.  This function does never fail and return an empty list even if no key corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.  Note that this function may be very slow because every key in the database is scanned.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbaddint' is used in order to add an integer to a column of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int tctdbaddint(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, int &lt;var&gt;num&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is `INT_MIN'.&lt;/dd&gt;
+&lt;dd&gt;The additional value is stored as a decimal string value of a column whose name is &quot;_num&quot;.  If no record corresponds, a new record with the additional value is stored.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbadddouble' is used in order to add a real number to a column of a record in a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;double tctdbadddouble(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const void *&lt;var&gt;pkbuf&lt;/var&gt;, int &lt;var&gt;pksiz&lt;/var&gt;, double &lt;var&gt;num&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
+&lt;dd&gt;The additional value is stored as a decimal string value of a column whose name is &quot;_num&quot;.  If no record corresponds, a new record with the additional value is stored.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsync' is used in order to synchronize updated contents of a table database object with the file and the device.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsync(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;This function is useful when another process connects to the same database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdboptimize' is used in order to optimize the file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdboptimize(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, int64_t &lt;var&gt;bnum&lt;/var&gt;, int8_t &lt;var&gt;apow&lt;/var&gt;, int8_t &lt;var&gt;fpow&lt;/var&gt;, uint8_t &lt;var&gt;opts&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;bnum&lt;/var&gt;' specifies the number of elements of the bucket array.  If it is not more than 0, the default value is specified.  The default value is two times of the number of records.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;apow&lt;/var&gt;' specifies the size of record alignment by power of 2.  If it is negative, the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;fpow&lt;/var&gt;' specifies the maximum number of elements of the free block pool by power of 2.  If it is negative, the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;opts&lt;/var&gt;' specifies options by bitwise or: `BDBTLARGE' specifies that the size of the database can be larger than 2GB by using 64-bit bucket array, `BDBTDEFLATE' specifies that each record is compressed with Deflate encoding, `BDBTBZIP' specifies that each record is compressed with BZIP2 encoding, `BDBTTCBS' specifies that each record is compressed with TCBS encoding.  If it is `UINT8_MAX', the current setting is not changed.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;This function is useful to reduce the size of the database file with data fragmentation by successive updating.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbvanish' is used in order to remove all records of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbvanish(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbcopy' is used in order to copy the database file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbcopy(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;path&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;path&lt;/var&gt;' specifies the path of the destination file.  If it begins with `@', the trailing substring is executed as a command line.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.  False is returned if the executed command returns non-zero code.&lt;/dd&gt;
+&lt;dd&gt;The database file is assured to be kept synchronized and not modified while the copying or executing operation is in progress.  So, this function is useful to create a backup file of the database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtranbegin' is used in order to begin the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtranbegin(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;The database is locked by the thread while the transaction so that only one transaction can be activated with a database object at the same time.  Thus, the serializable isolation level is assumed if every database operation is performed in the transaction.  Because all pages are cached on memory while the transaction, the amount of referred records is limited by the memory capacity.  If the database is closed during transaction, the transaction is aborted implicitly.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtrancommit' is used in order to commit the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtrancommit(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update in the transaction is fixed when it is committed successfully.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbtranabort' is used in order to abort the transaction of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbtranabort(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Update in the transaction is discarded when it is aborted.  The state of the database is rollbacked to before transaction.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbpath' is used in order to get the file path of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdbpath(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the path of the database file or `NULL' if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbrnum' is used in order to get the number of records ccccof a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;uint64_t tctdbrnum(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the number of records or 0 if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbfsiz' is used in order to get the size of the database file of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;uint64_t tctdbfsiz(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the size of the database file or 0 if the object does not connect to any database file.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbsetindex' is used in order to set a column index to a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;bool tctdbsetindex(TCTDB *&lt;var&gt;tdb&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;type&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  If the name of an existing index is specified, the index is rebuilt.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;type&lt;/var&gt;' specifies the index type: `TDBITLEXICAL' for lexical string, `TDBITDECIMAL' for decimal string.  If it is `TDBITVOID', the index is removed.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is true, else, it is false.&lt;/dd&gt;
+&lt;dd&gt;Note that the setting indexes should be set after the database is opened.&lt;/dd&gt;
+&lt;/dl&gt;
+
+
+&lt;p&gt;The function `tctdbgenuid' is used in order to generate a unique ID number of a table database object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;int64_t tctdbgenuid(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object connected as a writer.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new unique ID number or -1 on failure.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrynew' is used in order to create a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TDBQRY *tctdbqrynew(TCTDB *&lt;var&gt;tdb&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;tdb&lt;/var&gt;' specifies the table database object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the new query object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrydel' is used in order to delete a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrydel(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqryaddcond' is used in order to add a narrowing condition to a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqryaddcond(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;op&lt;/var&gt;, const char *&lt;var&gt;expr&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;op&lt;/var&gt;' specifies an operation type: `TDBQCSTREQ' for string which is equal to the expression, `TDBQCSTRINC' for string which is included in the expression, `TDBQCSTRBW' for string which begins with the expression, `TDBQCSTREW' for string which ends with the expression, `TDBQCSTRAND' for string which includes all tokens in the expression, `TDBQCSTROR' for string which includes at least one token in the expression, `TDBQCSTROREQ' for string which is equal to at least one token in the expression, `TDBQCSTRRX' for string which matches regular expressions of the expression, `TDBQCNUMEQ' for number which is equal to the expression, `TDBQCNUMGT' for number which is greater than the expression, `TDBQCNUMGE' for number which is greater than or equal to the expression, `TDBQCNUMLT' for number which is less than the expression, `TDBQCNUMLE' for number which is less than or equal to the expression, `TDBQCNUMBT' for number which is between two tokens of the expression, `TDBQCNUMOREQ' for number which is equal to at least one token in the expression.  All operations can be flagged by bitwise or: `TDBQCNEGATE' for negation, `TDBQCNOIDX' for using no index.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;expr&lt;/var&gt;' specifies an operand exression.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysetorder' is used in order to set the order of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrysetorder(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, const char *&lt;var&gt;name&lt;/var&gt;, int &lt;var&gt;type&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;name&lt;/var&gt;' specifies the name of a column.  An empty string means the primary key.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;type&lt;/var&gt;' specifies the order type: `TDBQOSTRASC' for string ascending, `TDBQOSTRDESC' for string descending, `TDBQONUMASC' for number ascending, `TDBQONUMDESC' for number descending.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysetmax' is used in order to set the maximum number of records of the result of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;void tctdbqrysetmax(TDBQRY *&lt;var&gt;qry&lt;/var&gt;, int &lt;var&gt;max&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;`&lt;var&gt;max&lt;/var&gt;' specifies the maximum number of records of the result.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqrysearch' is used in order to execute the search of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;TCLIST *tctdbqrysearch(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;The return value is a list object of the primary keys of the corresponding records.  This function does never fail and return an empty list even if no record corresponds.&lt;/dd&gt;
+&lt;dd&gt;Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;The function `tctdbqryhint' is used in order to get the hint of a query object.&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;const char *tctdbqryhint(TDBQRY *&lt;var&gt;qry&lt;/var&gt;);&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;`&lt;var&gt;qry&lt;/var&gt;' specifies the query object.&lt;/dd&gt;
+&lt;dd&gt;The return value is the hint string.&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;h3&gt;&#12467;&#12540;&#12489;&#20363;&lt;/h3&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#20351;&#12387;&#12383;&#12467;&#12540;&#12489;&#20363;&#12434;&#20197;&#19979;&#12395;&#31034;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;pre&gt;#include &amp;lt;tctdb.h&amp;gt;
+#include &amp;lt;stdlib.h&amp;gt;
+#include &amp;lt;stdbool.h&amp;gt;
+#include &amp;lt;stdint.h&amp;gt;
+
+int main(int argc, char **argv){
+  TCTDB *tdb;
+  int ecode, pksiz, i, rsiz;
+  char pkbuf[256];
+  const char *rbuf, *name;
+  TCMAP *cols;
+  TDBQRY *qry;
+  TCLIST *res;
+
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#20316;&#25104;&#12377;&#12427; */
+  tdb = tctdbnew();
+
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38283;&#12367; */
+  if(!tctdbopen(tdb, &quot;casket.tdb&quot;, TDBOWRITER | TDBOCREAT)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;open error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427; */
+  pksiz = sprintf(pkbuf, &quot;%ld&quot;, (long)tctdbgenuid(tdb));
+  cols = tcmapnew3(&quot;name&quot;, &quot;mikio&quot;, &quot;age&quot;, &quot;30&quot;, &quot;lang&quot;, &quot;ja,en,c&quot;, NULL);
+  if(!tctdbput(tdb, pkbuf, pksiz, cols)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+  tcmapdel(cols);
+
+  /* &#32032;&#26420;&#12394;&#26041;&#27861;&#12391;&#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427; */
+  pksiz = sprintf(pkbuf, &quot;12345&quot;);
+  cols = tcmapnew();
+  tcmapput2(cols, &quot;name&quot;, &quot;falcon&quot;);
+  tcmapput2(cols, &quot;age&quot;, &quot;31&quot;);
+  tcmapput2(cols, &quot;lang&quot;, &quot;ja&quot;);
+  if(!tctdbput(tdb, pkbuf, pksiz, cols)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+  tcmapdel(cols);
+
+  /* TSV&#25991;&#23383;&#21015;&#12434;&#20351;&#12387;&#12390;&#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427; */
+  if(!tctdbput3(tdb, &quot;abcde&quot;, &quot;name\tjoker\tage\t19\tlang\ten,es&quot;)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;put error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#26908;&#32034;&#12377;&#12427; */
+  qry = tctdbqrynew(tdb);
+  tctdbqryaddcond(qry, &quot;age&quot;, TDBQCNUMGE, &quot;20&quot;);
+  tctdbqryaddcond(qry, &quot;lang&quot;, TDBQCSTROR, &quot;ja,en&quot;);
+  tctdbqrysetorder(qry, &quot;name&quot;, TDBQOSTRASC);
+  tctdbqrysetmax(qry, 10);
+  res = tctdbqrysearch(qry);
+  for(i = 0; i &amp;lt; tclistnum(res); i++){
+    rbuf = tclistval(res, i, &amp;amp;rsiz);
+    cols = tctdbget(tdb, rbuf, rsiz);
+    if(cols){
+      printf(&quot;%s&quot;, rbuf);
+      tcmapiterinit(cols);
+      while((name = tcmapiternext2(cols)) != NULL){
+        printf(&quot;\t%s\t%s&quot;, name, tcmapget2(cols, name));
+      }
+      printf(&quot;\n&quot;);
+      tcmapdel(cols);
+    }
+  }
+  tclistdel(res);
+  tctdbqrydel(qry);
+
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38281;&#12376;&#12427; */
+  if(!tctdbclose(tdb)){
+    ecode = tctdbecode(tdb);
+    fprintf(stderr, &quot;close error: %s\n&quot;, tctdberrmsg(ecode));
+  }
+
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#30772;&#26820;&#12377;&#12427; */
+  tctdbdel(tdb);
+
+  return 0;
+}
+&lt;/pre&gt;
+
+&lt;h3&gt;CLI&lt;/h3&gt;
+
+&lt;p&gt;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12434;&#31777;&#21336;&#12395;&#21033;&#29992;&#12377;&#12427;&#12383;&#12417;&#12395;&#12289;&#12467;&#12510;&#12531;&#12489;&#12521;&#12452;&#12531;&#12452;&#12531;&#12479;&#12540;&#12501;&#12455;&#12452;&#12473;&#12392;&#12375;&#12390; `&lt;code&gt;tcttest&lt;/code&gt;' &#12392; `&lt;code&gt;tctmttest&lt;/code&gt;' &#12392; `&lt;code&gt;tctmgr&lt;/code&gt;' &#12364;&#25552;&#20379;&#12373;&#12428;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12467;&#12510;&#12531;&#12489; `&lt;code&gt;tcttest&lt;/code&gt;' &#12399;&#12289;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12398;&#27231;&#33021;&#12486;&#12473;&#12488;&#12420;&#24615;&#33021;&#12486;&#12473;&#12488;&#12395;&#29992;&#12356;&#12427;&#12484;&#12540;&#12523;&#12391;&#12377;&#12290;&#20197;&#19979;&#12398;&#26360;&#24335;&#12391;&#29992;&#12356;&#12414;&#12377;&#12290;`&lt;var&gt;path&lt;/var&gt;' &#12399;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12398;&#12497;&#12473;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;rnum&lt;/var&gt;' &#12399;&#35430;&#34892;&#22238;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;bnum&lt;/var&gt;' &#12399;&#12496;&#12465;&#12483;&#12488;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;apow&lt;/var&gt;' &#12399;&#12450;&#12521;&#12452;&#12531;&#12513;&#12531;&#12488;&#21147;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;fpow&lt;/var&gt;' &#12399;&#12501;&#12522;&#12540;&#12502;&#12525;&#12483;&#12463;&#12503;&#12540;&#12523;&#21147;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tcttest write [-mt] [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&quot;str&quot; &#12392; &quot;num&quot; &#12392; &quot;type&quot; &#12392; &quot;flag&quot; &#12434;&#12467;&#12521;&#12512;&#12395;&#25345;&#12388;&#12524;&#12467;&#12540;&#12489;&#32676;&#12434;&#36899;&#32154;&#12375;&#12390;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12395;&#36861;&#21152;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest read [-mt] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#26908;&#32034;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest remove [-mt] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest rcat [-mt] [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-pn &lt;var&gt;num&lt;/var&gt;] [-dai|-dad|-rl|-ru] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12461;&#12540;&#12364;&#12354;&#12427;&#31243;&#24230;&#37325;&#35079;&#12377;&#12427;&#12424;&#12358;&#12395;&#12524;&#12467;&#12540;&#12489;&#12398;&#36861;&#21152;&#12434;&#34892;&#12356;&#12289;&#36899;&#32080;&#12514;&#12540;&#12489;&#12391;&#20966;&#29702;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#21508;&#31278;&#25805;&#20316;&#12398;&#32068;&#12415;&#21512;&#12431;&#12379;&#12486;&#12473;&#12488;&#12434;&#34892;&#12358;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tcttest wicked [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#21508;&#31278;&#26356;&#26032;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12375;&#12390;&#23455;&#34892;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;&#21508;&#12458;&#12503;&#12471;&#12519;&#12531;&#12399;&#20197;&#19979;&#12398;&#27231;&#33021;&#12434;&#25345;&#12385;&#12414;&#12377;&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-mt&lt;/code&gt; : &#38306;&#25968; `tctdbsetmutex' &#12434;&#21628;&#12403;&#20986;&#12377;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTLARGE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTDEFLATE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTBZIP' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTTCBS' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTEXCODEC' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-xm &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : &#25313;&#24373;&#12510;&#12483;&#12503;&#12513;&#12514;&#12522;&#12398;&#12469;&#12452;&#12474;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ip&lt;/code&gt; : &#20027;&#12461;&#12540;&#12395;&#25968;&#20516;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-is&lt;/code&gt; : &quot;str&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-in&lt;/code&gt; : &quot;num&quot; &#12467;&#12521;&#12512;&#12395;&#25968;&#20516;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-it&lt;/code&gt; : &quot;type&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-if&lt;/code&gt; : &quot;flag&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBNOLCK' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBLCKNB' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rnd&lt;/code&gt; : &#12461;&#12540;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pn &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : &#12497;&#12479;&#12540;&#12531;&#25968;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dai&lt;/code&gt; : &#38306;&#25968; `tctdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tctdbaddint' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dad&lt;/code&gt; : &#38306;&#25968; `tctdbputcat' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tctdbadddouble' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rl&lt;/code&gt; : &#20516;&#12434;&#28961;&#20316;&#28858;&#12394;&#38263;&#12373;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ru&lt;/code&gt; : &#26356;&#26032;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;&#12371;&#12398;&#12467;&#12510;&#12531;&#12489;&#12399;&#20966;&#29702;&#12364;&#27491;&#24120;&#12395;&#32066;&#20102;&#12377;&#12428;&#12400; 0 &#12434;&#36820;&#12375;&#12289;&#12456;&#12521;&#12540;&#12364;&#12354;&#12428;&#12400;&#12381;&#12428;&#20197;&#22806;&#12398;&#20516;&#12434;&#36820;&#12375;&#12390;&#32066;&#20102;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12467;&#12510;&#12531;&#12489; `&lt;code&gt;tctmttest&lt;/code&gt;' &#12399;&#12289;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12398;&#27231;&#33021;&#12486;&#12473;&#12488;&#12434;&#12510;&#12523;&#12481;&#12473;&#12524;&#12483;&#12489;&#12391;&#34892;&#12358;&#12484;&#12540;&#12523;&#12391;&#12377;&#12290;&#20197;&#19979;&#12398;&#26360;&#24335;&#12391;&#29992;&#12356;&#12414;&#12377;&#12290;`&lt;var&gt;path&lt;/var&gt;' &#12399;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12398;&#12497;&#12473;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;tnum&lt;/var&gt;' &#12399;&#12473;&#12524;&#12483;&#12489;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;rnum&lt;/var&gt;' &#12399;&#35430;&#34892;&#22238;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;bnum&lt;/var&gt;' &#12399;&#12496;&#12465;&#12483;&#12488;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;apow&lt;/var&gt;' &#12399;&#12450;&#12521;&#12452;&#12531;&#12513;&#12531;&#12488;&#21147;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;fpow&lt;/var&gt;' &#12399;&#12501;&#12522;&#12540;&#12502;&#12525;&#12483;&#12463;&#12503;&#12540;&#12523;&#21147;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest write [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-ip] [-is] [-in] [-it] [-if] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&quot;str&quot; &#12392; &quot;num&quot; &#12392; &quot;type&quot; &#12392; &quot;flag&quot; &#12434;&#12467;&#12521;&#12512;&#12395;&#25345;&#12388;&#12524;&#12467;&#12540;&#12489;&#32676;&#12434;&#36899;&#32154;&#12375;&#12390;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12395;&#36861;&#21152;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest read [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#26908;&#32034;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest remove [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rnd] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#19978;&#35352;&#12391;&#29983;&#25104;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#20840;&#12524;&#12467;&#12540;&#12489;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest wicked [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#21508;&#31278;&#26356;&#26032;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12375;&#12390;&#23455;&#34892;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmttest typical [-tl] [-td|-tb|-tt|-tx] [-xm &lt;var&gt;num&lt;/var&gt;] [-nl|-nb] [-rr &lt;var&gt;num&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;tnum&lt;/var&gt; &lt;var&gt;rnum&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#20856;&#22411;&#30340;&#12394;&#25805;&#20316;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12375;&#12390;&#23455;&#34892;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;&#21508;&#12458;&#12503;&#12471;&#12519;&#12531;&#12399;&#20197;&#19979;&#12398;&#27231;&#33021;&#12434;&#25345;&#12385;&#12414;&#12377;&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTLARGE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTDEFLATE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTBZIP' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTTCBS' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTEXCODEC' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-xm &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : &#25313;&#24373;&#12510;&#12483;&#12503;&#12513;&#12514;&#12522;&#12398;&#12469;&#12452;&#12474;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ip&lt;/code&gt; : &#20027;&#12461;&#12540;&#12395;&#25968;&#20516;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-is&lt;/code&gt; : &quot;str&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-in&lt;/code&gt; : &quot;num&quot; &#12467;&#12521;&#12512;&#12395;&#25968;&#20516;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-it&lt;/code&gt; : &quot;type&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-if&lt;/code&gt; : &quot;flag&quot; &#12467;&#12521;&#12512;&#12395;&#25991;&#23383;&#21015;&#22411;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#24373;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBNOLCK' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBLCKNB' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rnd&lt;/code&gt; : &#12461;&#12540;&#12434;&#28961;&#20316;&#28858;&#12395;&#36984;&#25246;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-rr &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : &#35501;&#12415;&#36796;&#12415;&#25805;&#20316;&#12398;&#21106;&#21512;&#12434;&#30334;&#20998;&#29575;&#12391;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;&#12371;&#12398;&#12467;&#12510;&#12531;&#12489;&#12399;&#20966;&#29702;&#12364;&#27491;&#24120;&#12395;&#32066;&#20102;&#12377;&#12428;&#12400; 0 &#12434;&#36820;&#12375;&#12289;&#12456;&#12521;&#12540;&#12364;&#12354;&#12428;&#12400;&#12381;&#12428;&#20197;&#22806;&#12398;&#20516;&#12434;&#36820;&#12375;&#12390;&#32066;&#20102;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;p&gt;&#12467;&#12510;&#12531;&#12489; `&lt;code&gt;tctmgr&lt;/code&gt;' &#12399;&#12289;&#12486;&#12540;&#12502;&#12523;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12420;&#12381;&#12398;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12398;&#12486;&#12473;&#12488;&#12420;&#12487;&#12496;&#12483;&#12464;&#12395;&#24441;&#31435;&#12388;&#12484;&#12540;&#12523;&#12391;&#12377;&#12290;&#20197;&#19979;&#12398;&#26360;&#24335;&#12391;&#29992;&#12356;&#12414;&#12377;&#12290;`&lt;var&gt;path&lt;/var&gt;' &#12399;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12398;&#12497;&#12473;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;bnum&lt;/var&gt;' &#12399;&#12496;&#12465;&#12483;&#12488;&#25968;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;apow&lt;/var&gt;' &#12399;&#12450;&#12521;&#12452;&#12531;&#12513;&#12531;&#12488;&#21147;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;fpow&lt;/var&gt;' &#12399;&#12501;&#12522;&#12540;&#12502;&#12525;&#12483;&#12463;&#12503;&#12540;&#12523;&#21147;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;pkey&lt;/var&gt;' &#12399;&#12524;&#12467;&#12540;&#12489;&#12398;&#20027;&#12461;&#12540;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;cols&lt;/var&gt;' &#12399;&#12467;&#12521;&#12512;&#12398;&#21517;&#21069;&#12392;&#20516;&#12434;&#20132;&#20114;&#12395;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;name&lt;/var&gt;' &#12399;&#12467;&#12521;&#12512;&#12398;&#21517;&#21069;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;op&lt;/var&gt;' &#12399;&#28436;&#31639;&#23376;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;expr&lt;/var&gt;' &#12399;&#26465;&#20214;&#24335;&#12434;&#25351;&#23450;&#12375;&#12289;`&lt;var&gt;file&lt;/var&gt;' &#12399;&#20837;&#21147;&#12501;&#12449;&#12452;&#12523;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;dl class=&quot;api&quot;&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr create [-tl] [-td|-tb|-tt|-tx] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12501;&#12449;&#12452;&#12523;&#12434;&#20316;&#25104;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr inform [-nl|-nb] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;&#38609;&#22810;&#12394;&#24773;&#22577;&#12434;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr put [-nl|-nb] [-sx] [-dk|-dc] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt; [&lt;var&gt;cols&lt;/var&gt; ...]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12524;&#12467;&#12540;&#12489;&#12434;&#36861;&#21152;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr out [-nl|-nb] [-sx] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12524;&#12467;&#12540;&#12489;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr get [-nl|-nb] [-sx] [-px] [-pz] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;pkey&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12524;&#12467;&#12540;&#12489;&#12398;&#20516;&#12434;&#21462;&#24471;&#12375;&#12390;&#27161;&#28310;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr list [-nl|-nb] [-m &lt;var&gt;num&lt;/var&gt;] [-pv] [-px] [-fm &lt;var&gt;str&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#20840;&#12390;&#12398;&#12524;&#12467;&#12540;&#12489;&#12398;&#20027;&#12461;&#12540;&#12434;&#25913;&#34892;&#12391;&#21306;&#20999;&#12387;&#12390;&#27161;&#28310;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr search [-nl|-nb] [-ord &lt;var&gt;name&lt;/var&gt; &lt;var&gt;type&lt;/var&gt;] [-m &lt;var&gt;num&lt;/var&gt;] [-pv] [-px] [-ph] [-bt &lt;var&gt;num&lt;/var&gt;] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;name&lt;/var&gt; &lt;var&gt;op&lt;/var&gt; &lt;var&gt;expr&lt;/var&gt; ...]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#26908;&#32034;&#26465;&#20214;&#12395;&#21512;&#33268;&#12377;&#12427;&#12524;&#12467;&#12540;&#12489;&#12434;&#25913;&#34892;&#12391;&#21306;&#20999;&#12387;&#12390;&#27161;&#28310;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr optimize [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;bnum&lt;/var&gt; [&lt;var&gt;apow&lt;/var&gt; [&lt;var&gt;fpow&lt;/var&gt;]]]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#26368;&#36969;&#21270;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr setindex [-nl|-nb] [-cd|-cv] &lt;var&gt;path&lt;/var&gt; &lt;var&gt;name&lt;/var&gt;&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#35373;&#23450;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr importtsv [-nl|-nb] [-sc] &lt;var&gt;path&lt;/var&gt; [&lt;var&gt;file&lt;/var&gt;]&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;TSV&#12501;&#12449;&#12452;&#12523;&#12398;&#21508;&#34892;&#12434;&#12461;&#12540;&#12392;&#20516;&#12392;&#12415;&#12394;&#12375;&#12390;&#12524;&#12467;&#12540;&#12489;&#12434;&#30331;&#37682;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;dt&gt;&lt;code&gt;tctmgr version&lt;/code&gt;&lt;/dt&gt;
+&lt;dd&gt;Tokyo Cabinet&#12398;&#12496;&#12540;&#12472;&#12519;&#12531;&#24773;&#22577;&#12434;&#27161;&#28310;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/dd&gt;
+&lt;/dl&gt;
+
+&lt;p&gt;&#21508;&#12458;&#12503;&#12471;&#12519;&#12531;&#12399;&#20197;&#19979;&#12398;&#27231;&#33021;&#12434;&#25345;&#12385;&#12414;&#12377;&lt;/p&gt;
+
+&lt;ul class=&quot;options&quot;&gt;
+&lt;li&gt;&lt;code&gt;-tl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTLARGE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-td&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTDEFLATE' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTBZIP' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tt&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTTCBS' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tx&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBTEXCODEC' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nl&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBNOLCK' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-nb&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `TDBLCKNB' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-sx&lt;/code&gt; : &#20837;&#21147;&#12434;16&#36914;&#25968;&#12398;&#25991;&#23383;&#21015;&#12391;&#34892;&#12358;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dk&lt;/code&gt; : &#38306;&#25968; `tctdbput' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tctdbputkeep' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-dc&lt;/code&gt; : &#38306;&#25968; `tctdbput' &#12398;&#20195;&#12431;&#12426;&#12395;&#38306;&#25968; `tctdbputcat' &#12434;&#29992;&#12356;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-px&lt;/code&gt; : &#20986;&#21147;&#12434;16&#36914;&#25968;&#12398;&#25991;&#23383;&#21015;&#12391;&#34892;&#12358;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pz&lt;/code&gt; : &#20986;&#21147;&#12398;&#26411;&#23614;&#12395;&#25913;&#34892;&#12434;&#20184;&#21152;&#12375;&#12394;&#12356;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-m &lt;var&gt;num&lt;/var&gt;&lt;/code&gt; : &#20986;&#21147;&#12398;&#26368;&#22823;&#25968;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-pv&lt;/code&gt; : &#12524;&#12467;&#12540;&#12489;&#12398;&#20516;&#12418;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-fm &lt;var&gt;str&lt;/var&gt;&lt;/code&gt; : &#12461;&#12540;&#12398;&#25509;&#38957;&#36766;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ord &lt;var&gt;name&lt;/var&gt; &lt;var&gt;type&lt;/var&gt;&lt;/code&gt; : &#32080;&#26524;&#12398;&#20006;&#12403;&#38918;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-ph&lt;/code&gt; : &#12498;&#12531;&#12488;&#24773;&#22577;&#12418;&#20986;&#21147;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-bt&lt;/code&gt; : &#12505;&#12531;&#12481;&#12510;&#12540;&#12463;&#12486;&#12473;&#12488;&#12398;&#22238;&#25968;&#12434;&#25351;&#23450;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-tz&lt;/code&gt; : &#12458;&#12503;&#12471;&#12519;&#12531; `UINT8_MAX' &#12434;&#26377;&#21177;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-cd&lt;/code&gt; : &#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#25991;&#23383;&#21015;&#22411;&#12391;&#12394;&#12367;&#25968;&#20516;&#22411;&#12395;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-cv&lt;/code&gt; : &#26082;&#23384;&#12398;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;&#12434;&#21066;&#38500;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;li&gt;&lt;code&gt;-sc&lt;/code&gt; : &#12461;&#12540;&#12434;&#23567;&#25991;&#23383;&#12395;&#27491;&#35215;&#21270;&#12377;&#12427;&#12290;&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p&gt;`search' &#12469;&#12502;&#12467;&#12510;&#12531;&#12489;&#12398;&#28436;&#31639;&#23376;&#12395;&#12399;&#12289;&quot;STREQ&quot;, &quot;STRINC&quot;, &quot;STRBW&quot;, &quot;STREW&quot;, &quot;STRAND&quot;, &quot;STROR&quot;, &quot;STROREQ&quot;, &quot;STRRX&quot;, &quot;NUMEQ&quot;, &quot;NUMGT&quot;, &quot;NUMGE&quot;, &quot;NUMLT&quot;, &quot;NUMLE&quot;, &quot;NUMBT&quot;, &quot;NUMOREQ&quot; &#12398;&#12356;&#12378;&#12428;&#12363;&#12434;&#29992;&#12356;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;`-ord' &#12458;&#12503;&#12471;&#12519;&#12531;&#12398;&#22411;&#25351;&#23450;&#12395;&#12399;&#12289;&quot;STRASC&quot;, &quot;STRDESC&quot;, &quot;NUMASC&quot;, &quot;NUMDESC&quot; &#12398;&#12356;&#12378;&#12428;&#12363;&#12434;&#29992;&#12356;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12371;&#12398;&#12467;&#12510;&#12531;&#12489;&#12399;&#20966;&#29702;&#12364;&#27491;&#24120;&#12395;&#32066;&#20102;&#12377;&#12428;&#12400; 0 &#12434;&#36820;&#12375;&#12289;&#12456;&#12521;&#12540;&#12364;&#12354;&#12428;&#12400;&#12381;&#12428;&#20197;&#22806;&#12398;&#20516;&#12434;&#36820;&#12375;&#12390;&#32066;&#20102;&#12375;&#12414;&#12377;&#12290;&lt;/p&gt;
+
+&lt;hr /&gt;
+
 &lt;h2 id=&quot;tcadbapi&quot;&gt;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&lt;/h2&gt;
 
 &lt;p&gt;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12399;&#12289;&#12458;&#12531;&#12513;&#12514;&#12522;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;&#12458;&#12531;&#12513;&#12514;&#12522;&#12484;&#12522;&#12540;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;&#12495;&#12483;&#12471;&#12517;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;B+&#26408;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12392;&#22266;&#23450;&#38263;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#21516;&#19968;&#12398;API&#12391;&#25277;&#35937;&#21270;&#12375;&#12383;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12391;&#12377;&#12290;&#12381;&#12428;&#12434;&#25201;&#12358;&#12398;&#12364;&#25277;&#35937;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;API&#12391;&#12377;&#12290;`&lt;code&gt;tcadb.h&lt;/code&gt;' &#12395;API&#12398;&#20181;&#27096;&#12398;&#23436;&#20840;&#12394;&#35352;&#36848;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&lt;/p&gt;
@@ -5380,7 +6184,7 @@ int main(int argc, char **argv){
 &lt;dd&gt;`&lt;var&gt;kbuf&lt;/var&gt;' specifies the pointer to the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;ksiz&lt;/var&gt;' specifies the size of the region of the key.&lt;/dd&gt;
 &lt;dd&gt;`&lt;var&gt;num&lt;/var&gt;' specifies the additional value.&lt;/dd&gt;
-&lt;dd&gt;If successful, the return value is the summation value, else, it is `NAN'.&lt;/dd&gt;
+&lt;dd&gt;If successful, the return value is the summation value, else, it is Not-a-Number.&lt;/dd&gt;
 &lt;dd&gt;If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.&lt;/dd&gt;
 &lt;/dl&gt;
 
@@ -5448,26 +6252,25 @@ int main(int argc, char **argv){
 #include &amp;lt;stdint.h&amp;gt;
 
 int main(int argc, char **argv){
-
   TCADB *adb;
   char *key, *value;
 
-  /* create the object */
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#20316;&#25104;&#12377;&#12427; */
   adb = tcadbnew();
 
-  /* open the database */
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38283;&#12367; */
   if(!tcadbopen(adb, &quot;casket.tch&quot;)){
     fprintf(stderr, &quot;open error\n&quot;);
   }
 
-  /* store records */
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#26684;&#32013;&#12377;&#12427; */
   if(!tcadbput2(adb, &quot;foo&quot;, &quot;hop&quot;) ||
      !tcadbput2(adb, &quot;bar&quot;, &quot;step&quot;) ||
      !tcadbput2(adb, &quot;baz&quot;, &quot;jump&quot;)){
     fprintf(stderr, &quot;put error\n&quot;);
   }
 
-  /* retrieve records */
+  /* &#12524;&#12467;&#12540;&#12489;&#12434;&#21462;&#24471;&#12377;&#12427; */
   value = tcadbget2(adb, &quot;foo&quot;);
   if(value){
     printf(&quot;%s\n&quot;, value);
@@ -5476,7 +6279,7 @@ int main(int argc, char **argv){
     fprintf(stderr, &quot;get error\n&quot;);
   }
 
-  /* traverse records */
+  /* &#27178;&#26029;&#30340;&#12395;&#12524;&#12467;&#12540;&#12489;&#12434;&#21442;&#29031;&#12377;&#12427; */
   tcadbiterinit(adb);
   while((key = tcadbiternext2(adb)) != NULL){
     value = tcadbget2(adb, key);
@@ -5487,12 +6290,12 @@ int main(int argc, char **argv){
     free(key);
   }
 
-  /* close the database */
+  /* &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38281;&#12376;&#12427; */
   if(!tcadbclose(adb)){
     fprintf(stderr, &quot;close error\n&quot;);
   }
 
-  /* delete the object */
+  /* &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12434;&#30772;&#26820;&#12377;&#12427; */
   tcadbdel(adb);
 
   return 0;
@@ -6305,7 +7108,7 @@ cp -f &quot;$srcpath&quot; &quot;$destpath&quot;
 &lt;dt&gt;Q. : Berkeley DB&#12392;&#12393;&#12358;&#36949;&#12358;&#12398;&#12391;&#12377;&#12363;&#65311;&lt;/dt&gt;
 &lt;dd&gt;A. : &#26178;&#38291;&#21177;&#29575;&#12392;&#31354;&#38291;&#21177;&#29575;&#12398;&#21452;&#26041;&#12391;Tokyo Cabinet&#12364;&#20778;&#12387;&#12390;&#12356;&#12414;&#12377;&#12290;&lt;/dd&gt;
 &lt;dt&gt;Q. : &#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12398;&#33391;&#12356;&#12469;&#12531;&#12503;&#12523;&#12467;&#12540;&#12489;&#12399;&#12354;&#12426;&#12414;&#12377;&#12363;&#65311;&lt;/dt&gt;
-&lt;dd&gt;A. : &#21508;API&#12398;&#12467;&#12510;&#12531;&#12489;&#12398;&#12477;&#12540;&#12473;&#12467;&#12540;&#12489;&#12434;&#21442;&#32771;&#12395;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;`&lt;code&gt;tchmgr.c&lt;/code&gt;' &#12392; `&lt;code&gt;tcbmgr.c&lt;/code&gt;' &#12364;&#26368;&#12418;&#31777;&#28500;&#12391;&#12375;&#12423;&#12358;&#12290;&lt;/dd&gt;
+&lt;dd&gt;A. : &#21508;API&#12398;&#12467;&#12510;&#12531;&#12489;&#12398;&#12477;&#12540;&#12473;&#12467;&#12540;&#12489;&#12434;&#21442;&#32771;&#12395;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;`&lt;code&gt;tchmgr.c&lt;/code&gt;' &#12392; `&lt;code&gt;tcbmgr.c&lt;/code&gt;' &#12392; `&lt;code&gt;tcfmgr.c&lt;/code&gt;' &#12364;&#26368;&#12418;&#31777;&#28500;&#12391;&#12375;&#12423;&#12358;&#12290;&lt;/dd&gt;
 &lt;dt&gt;Q. : &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12364;&#22730;&#12428;&#12383;&#12398;&#12391;&#12377;&#12364;&#12289;&#12393;&#12358;&#12375;&#12390;&#12391;&#12375;&#12423;&#12358;&#12363;&#65311;&#12290;&lt;/dt&gt;
 &lt;dd&gt;A. : &#22823;&#25269;&#12398;&#22580;&#21512;&#12289;&#12354;&#12394;&#12383;&#12398;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12364;&#12365;&#12385;&#12435;&#12392;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38281;&#12376;&#12390;&#12356;&#12394;&#12356;&#12398;&#12364;&#21407;&#22240;&#12391;&#12377;&#12290;&#12487;&#12540;&#12514;&#12531;&#12503;&#12525;&#12475;&#12473;&#12391;&#12354;&#12429;&#12358;&#12364;&#12289;CGI&#12473;&#12463;&#12522;&#12503;&#12488;&#12391;&#12354;&#12429;&#12358;&#12364;&#12289;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12364;&#32066;&#20102;&#12377;&#12427;&#38555;&#12395;&#12399;&#24517;&#12378;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#38281;&#12376;&#12394;&#12369;&#12428;&#12400;&#12394;&#12426;&#12414;&#12379;&#12435;&#12290;&#12394;&#12362;&#12289;CGI&#12398;&#12503;&#12525;&#12475;&#12473;&#12399;SIGPIPE&#12420;SIGTERM&#12395;&#12424;&#12387;&#12390;&#27578;&#12373;&#12428;&#12427;&#12371;&#12392;&#12364;&#12354;&#12427;&#12371;&#12392;&#12395;&#12418;&#30041;&#24847;&#12375;&#12414;&#12375;&#12423;&#12358;&#12290;&lt;/dd&gt;
 &lt;dt&gt;Q. : &#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#22730;&#12428;&#12395;&#12367;&#12367;&#12377;&#12427;&#12395;&#12399;&#12393;&#12358;&#12377;&#12428;&#12400;&#12424;&#12356;&#12391;&#12377;&#12363;&#65311;&lt;/dt&gt;</diff>
      <filename>doc/spex-ja.html</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@
 SHELL = /bin/sh
 
 # Targets
-MYBINS = tcutilex tchdbex tcbdbex tcfdbex tcadbex
+MYBINS = tcutilex tchdbex tcbdbex tcfdbex tctdbex tcadbex
 
 # Building binaries
 CC = gcc
@@ -72,6 +72,10 @@ tcfdbex : tcfdbex.o
 	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(LIBS)
 
 
+tctdbex : tctdbex.o
+	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(LIBS)
+
+
 tcadbex : tcadbex.o
 	$(LDENV) $(CC) $(CFLAGS) -o $@ $&lt; $(LDFLAGS) $(LIBS)
 </diff>
      <filename>example/Makefile</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,6 @@
 #include &lt;stdint.h&gt;
 
 int main(int argc, char **argv){
-
   TCADB *adb;
   char *key, *value;
 </diff>
      <filename>example/tcadbex.c</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,6 @@
 #include &lt;stdint.h&gt;
 
 int main(int argc, char **argv){
-
   TCBDB *bdb;
   BDBCUR *cur;
   int ecode;</diff>
      <filename>example/tcbdbex.c</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,6 @@
 #include &lt;stdint.h&gt;
 
 int main(int argc, char **argv){
-
   TCFDB *fdb;
   int ecode;
   char *key, *value;</diff>
      <filename>example/tcfdbex.c</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,6 @@
 #include &lt;stdint.h&gt;
 
 int main(int argc, char **argv){
-
   TCHDB *hdb;
   int ecode;
   char *key, *value;</diff>
      <filename>example/tchdbex.c</filename>
    </modified>
    <modified>
      <diff>@@ -7,9 +7,10 @@
 
 
 # set variables
-progexts='\.in|\.h|\.c|\.cc|\.cpp|\.cxx|\.java|\.pl|\.pm|\.pod|\.xs|\.rb|\.rd'
-docexts='\.[1-9]|\.html|\.txt'
-regex=&quot;($progexts|$docexts)\$&quot;
+LANG=C
+LC_ALL=C
+export LANG LC_ALL
+regex='\.(h|c|cc|cpp|cxx|java|pl|pm|pod|rb|rd|lua|[1-9]|html|txt)$'
 
 
 # check arguments</diff>
      <filename>lab/diffcheck</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,9 @@
 
 
 # set variables
+LANG=C
+LC_ALL=C
+export LANG LC_ALL
 regex='(\.h|\.c|\.cc|\.java|\.pl|\.pm|\.xs|\.rb|\.js)$'
 
 </diff>
      <filename>lab/stepcount</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,10 @@
 
 
 # set variables
-regex='(\.h|\.c|\.cc|\.cpp|\.cxx|\.java|\.pl|\.pm|\.pod|\.rb|\.rd)$'
+LANG=C
+LC_ALL=C
+export LANG LC_ALL
+regex='\.(h|c|cc|cpp|cxx|java|pl|pm|pod|rb|rd|lua)$'
 tabcode=`printf '\t'`
 
 </diff>
      <filename>lab/tabcheck</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCADB&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCADB&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcadb \- the abstract database API
@@ -485,7 +485,7 @@ The function `tcadbadddouble' is used in order to add a real number to a record
 `\fInum\fR' specifies the additional value.
 .RE
 .RS
-If successful, the return value is the summation value, else, it is `NAN'.
+If successful, the return value is the summation value, else, it is Not-a-Number.
 .RE
 .RS
 If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.</diff>
      <filename>man/tcadb.3</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCATEST&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCATEST&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcamgr \- the command line utility of the abstract database API</diff>
      <filename>man/tcamgr.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCATEST&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCATEST&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcatest \- test cases of the abstract database API</diff>
      <filename>man/tcatest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCBDB&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCBDB&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcbdb \- the B+ tree database API
@@ -843,7 +843,7 @@ The function `tcbdbadddouble' is used in order to add a real number to a record
 `\fInum\fR' specifies the additional value.
 .RE
 .RS
-If successful, the return value is the summation value, else, it is `NAN'.
+If successful, the return value is the summation value, else, it is Not-a-Number.
 .RE
 .RS
 If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.</diff>
      <filename>man/tcbdb.3</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCBMGR&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCBMGR&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcbmgr \- the command line utility of the B+ tree database API</diff>
      <filename>man/tcbmgr.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCBMTTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCBMTTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcbmttest \- test cases of the B+ tree database API</diff>
      <filename>man/tcbmttest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCBTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCBTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcbtest \- test cases of the B+ tree database API
@@ -24,7 +24,7 @@ Retrieve all records of the database above.
 Remove all records of the database above.
 .RE
 .br
-\fBtcbtest rcat \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-ls \fInum\fB\fR]\fB \fR[\fB\-ca \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-pn \fInum\fB\fR]\fB \fR[\fB\-dai\fR|\fB\-dad\fR|\fB\-rl\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
+\fBtcbtest rcat \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-ls \fInum\fB\fR]\fB \fR[\fB\-ca \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-pn \fInum\fB\fR]\fB \fR[\fB\-dai\fR|\fB\-dad\fR|\fB\-rl\fR|\fB\-ru\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
 .RS
 Store records with partway duplicated keys using concatenate mode.
 .RE
@@ -92,6 +92,8 @@ Options feature the following.
 .br
 \fB\-rl\fR : set the length of values at random.
 .br
+\fB\-ru\fR : select update operations at random.
+.br
 .RE
 .PP
 This command returns 0 on success, another on failure.</diff>
      <filename>man/tcbtest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCFDB&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCFDB&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcfdb \- the fixed-length database API
@@ -806,7 +806,7 @@ The function `tcfdbadddouble' is used in order to add a real number to a record
 `\fInum\fR' specifies the additional value.
 .RE
 .RS
-If successful, the return value is the summation value, else, it is `NAN'.
+If successful, the return value is the summation value, else, it is Not-a-Number.
 .RE
 .RS
 If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.</diff>
      <filename>man/tcfdb.3</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCFMGR&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCFMGR&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcfmgr \- the command line utility of the fixed-length database API</diff>
      <filename>man/tcfmgr.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCFMTTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCFMTTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcfmttest \- test cases of the fixed-length database API</diff>
      <filename>man/tcfmttest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCFTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCFTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcftest \- test cases of the fixed-length database API</diff>
      <filename>man/tcftest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCHDB&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCHDB&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tchdb \- the hash database API
@@ -701,7 +701,7 @@ The function `tchdbdbadddouble' is used in order to add a real number to a recor
 `\fInum\fR' specifies the additional value.
 .RE
 .RS
-If successful, the return value is the summation value, else, it is `NAN'.
+If successful, the return value is the summation value, else, it is Not-a-Number.
 .RE
 .RS
 If the corresponding record exists, the value is treated as a real number and is added to.  If no record corresponds, a new record of the additional value is stored.</diff>
      <filename>man/tchdb.3</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCHMGR&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCHMGR&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tchmgr \- the command line utility of the hash database API</diff>
      <filename>man/tchmgr.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCHMTTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCHMTTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tchmttest \- test cases of the hash database API</diff>
      <filename>man/tchmttest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCHTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCHTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tchtest \- test cases of the hash database API
@@ -24,7 +24,7 @@ Retrieve all records of the database above.
 Remove all records of the database above.
 .RE
 .br
-\fBtchtest rcat \fR[\fB\-mt\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-rc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-pn \fInum\fB\fR]\fB \fR[\fB\-dai\fR|\fB\-dad\fR|\fB\-rl\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR
+\fBtchtest rcat \fR[\fB\-mt\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-rc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-pn \fInum\fB\fR]\fB \fR[\fB\-dai\fR|\fB\-dad\fR|\fB\-rl\fR|\fB\-ru\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR
 .RS
 Store records with partway duplicated keys using concatenate mode.
 .RE
@@ -77,6 +77,8 @@ Options feature the following.
 .br
 \fB\-rl\fR : set the length of values at random.
 .br
+\fB\-ru\fR : select update operations at random.
+.br
 .RE
 .PP
 This command returns 0 on success, another on failure.</diff>
      <filename>man/tchtest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCUCODEC&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCUCODEC&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcucodec \- popular encoders and decoders</diff>
      <filename>man/tcucodec.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCUMTTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCUMTTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcutest \- test cases of the on-memory database API</diff>
      <filename>man/tcumttest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCUTEST&quot; 1 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCUTEST&quot; 1 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcutest \- test cases of the utility API</diff>
      <filename>man/tcutest.1</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TCUTIL&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TCUTIL&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tcutil \- the utility API
@@ -343,6 +343,22 @@ The return value is the new list object.
 .RE
 .RE
 .PP
+The function `tclistnew3' is used in order to create a list object with initial string elements.
+.PP
+.RS
+.br
+\fBTCLIST *tclistnew3(const char *\fIstr\fB, ...);\fR
+.RS
+`\fIstr\fR' specifies the string of the first element.
+.RE
+.RS
+The other arguments are other elements.  They should be trailed by a `NULL' argument.
+.RE
+.RS
+The return value is the new list object.
+.RE
+.RE
+.PP
 The function `tclistdup' is used in order to copy a list object.
 .PP
 .RS
@@ -804,6 +820,25 @@ The return value is the new map object.
 .RE
 .RE
 .PP
+The function `tcmapnew3' is used in order to create a map object with initial string elements.
+.PP
+.RS
+.br
+\fBTCMAP *tcmapnew3(const char *\fIstr\fB, ...);\fR
+.RS
+`\fIstr\fR' specifies the string of the first element.
+.RE
+.RS
+The other arguments are other elements.  They should be trailed by a `NULL' argument.
+.RE
+.RS
+The return value is the new map object.
+.RE
+.RS
+The key and the value of each record are situated one after the other.
+.RE
+.RE
+.PP
 The function `tcmapdup' is used in order to copy a map object.
 .PP
 .RS
@@ -3394,7 +3429,7 @@ The function `tcstrjoin' is used in order to create a string by joining all elem
 .PP
 .RS
 .br
-\fBchar *tcstrjoin(TCLIST *\fIlist\fB, char \fIdelim\fB);\fR
+\fBchar *tcstrjoin(const TCLIST *\fIlist\fB, char \fIdelim\fB);\fR
 .RS
 `\fIlist\fR' specifies a list object.
 .RE
@@ -3409,11 +3444,27 @@ Because the region of the return value is allocated with the `malloc' call, it s
 .RE
 .RE
 .PP
-The function `tcatoi' is used in order to convert a string with a metric prefix to an integer.
+The function `tcatoi' is used in order to convert a string to an integer.
+.PP
+.RS
+.br
+\fBint64_t tcatoi(const char *\fIstr\fB);\fR
+.RS
+`\fIstr\fR' specifies a string.
+.RE
+.RS
+The return value is the integer.  If the string does not contain numeric expression, 0 is returned.
+.RE
+.RS
+This function is equivalent to `atoll' except that it does not depend on the locale.
+.RE
+.RE
+.PP
+The function `tcatoix' is used in order to convert a string with a metric prefix to an integer.
 .PP
 .RS
 .br
-\fBint64_t tcatoi(const char *str);\fR
+\fBint64_t tcatoix(const char *\fIstr\fB);\fR
 .RS
 `\fIstr\fR' specifies a string which can be trailed by a binary metric prefix.  &quot;K&quot;, &quot;M&quot;, &quot;G&quot;, &quot;T&quot;, &quot;P&quot;, and &quot;E&quot; are supported.  They are case\-insensitive.
 .RE</diff>
      <filename>man/tcutil.3</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-.TH &quot;TOKYOCABINET&quot; 3 &quot;2008-11-25&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
+.TH &quot;TOKYOCABINET&quot; 3 &quot;2009-01-07&quot; &quot;Man Page&quot; &quot;Tokyo Cabinet&quot;
 
 .SH NAME
 tokyocabinet \- a modern implementation of DBM
@@ -13,6 +13,8 @@ As for database of B+ tree, records whose keys are duplicated can be stored.  Ac
 .PP
 As for database of fixed\-length array, records are stored with unique natural numbers.  It is impossible to store two or more records with a key overlaps.  Moreover, the length of each record is limited by the specified length.  Provided operations are the same as ones of hash database.
 .PP
+Table database is also provided as a variant of hash database.  Each record is identified by the primary key and has a set of named columns.  Although there is no concept of data schema, it is possible to search for records with complex conditions efficiently by using indexes of arbitrary columns.
+.PP
 Tokyo Cabinet is written in the C language, and provided as API of C, Perl, Ruby, Java, and Lua.  Tokyo Cabinet is available on platforms which have API conforming to C99 and POSIX.  Tokyo Cabinet is a free software licensed under the GNU Lesser General Public License.
 
 .SH FEATURES
@@ -70,6 +72,14 @@ Because the whole region of the database is mapped on memory by the `mmap' call
 .PP
 The size of the database is proportional to the range of keys and the limit size of each value.  That is, the smaller the range of keys is or the smaller the length of each value is, the higher the space efficiency is.  For example, if the maximum key is 1000000 and the limit size of the value is 100 bytes, the size of the database will be about 100MB.  Because regions around referred records are only loaded on the RAM, you can increase the size of the database to the size of the virtual memory.
 
+.SH FLEXIBLE IMPLEMENTATION OF TABLE DATABASE
+.PP
+Table database does not express simple key/value structure but expresses a structure like a table of relational database.  Each record is identified by the primary key and has a set of multiple columns named with arbitrary strings.  For example, a stuff in your company can be expressed by a record identified by the primary key of the employee ID number and structured by columns of his name, division, salary, and so on.  Unlike relational database, table database does not need to define any data schema and can contain records of various structures different from each other.
+.PP
+Table database supports query functions with not only the primary key but also with conditions about arbitrary columns.  Each column condition is composed of the name of a column and a condition expression.  Operators of full matching, forward matching, regular expression matching, and so on are provided for the string type.  Operators of full matching, range matching and so on are provided for the number type.  A query can contain multiple conditions.  The order of the result set can be specified as the ascending or descending order of strings or numbers.
+.PP
+You can create indexes for arbitrary columns to improve performance of search and sorting.  Although columns do not have data types, indexes have types for strings or numbers.  The query optimizer uses indexes in suitable way according to each query.  Indexes are implemented as different files of B+ tree database.
+
 .SH PRACTICAL FUNCTIONALITY
 .PP
 Hash database and B+ tree database feature transaction mechanisms.  It is possible to commit a series of operations between the beginning and the end of the transaction in a lump, or to abort the transaction and perform rollback to the state before the transaction.  Two isolation levels are supported; serializable and read uncommitted.  Durability is secured by write ahead logging and shadow paging.
@@ -84,7 +94,7 @@ Tokyo Cabinet provides simple API based on the object oriented design.  Every op
 .PP
 The utility API is also provided.  Such fundamental data structure as list and map are included.  And, some useful features; memory pool, string processing, encoding, are also included.
 .PP
-Five kinds of API; the utility API, the hash database API, the B+ tree database API, the fixed\-length database API, and the abstract database API, are provided for the C language.  Command line interfaces are also provided corresponding to each API.  They are useful for prototyping, test, and debugging.  Except for C, Tokyo Cabinet provides APIs for Perl, Ruby, Java, and Lua.  The Perl API has methods calling the hash database API, the B+ tree database API, and the fixed\-length database API with XS language.  The Ruby API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Ruby.  The Java API has native methods calling the hash database API, the B+ tree database API, and the fixed\-length database API with Java Native Interface.  The Lua API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Lua.  APIs for other languages will hopefully be provided by third party.
+Six kinds of API; the utility API, the hash database API, the B+ tree database API, the fixed\-length database API, the table database API, and the abstract database API, are provided for the C language.  Command line interfaces are also provided corresponding to each API.  They are useful for prototyping, test, and debugging.  Except for C, Tokyo Cabinet provides APIs for Perl, Ruby, Java, and Lua.  The Perl API has methods calling the hash database API, the B+ tree database API, and the fixed\-length database API with XS language.  The Ruby API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Ruby.  The Java API has native methods calling the hash database API, the B+ tree database API, and the fixed\-length database API with Java Native Interface.  The Lua API has methods calling the hash database API, the B+ tree database API, and the fixed length database API as modules of Lua.  APIs for other languages will hopefully be provided by third party.
 .PP
 In cases that multiple processes access a database at the same time or some processes access a database on a remote host, the remote service is useful.  The remote service is composed of a database server and its access library.  Applications can access the database server by using the remote database API.  The server implements HTTP and the memcached protocol partly so that client programs on almost all platforms can access the server easily.
 
@@ -114,7 +124,10 @@ Tokyo Cabinet was written by Mikio Hirabayashi.  You can contact the author by e
 .PP
 .BR tcutil (3),
 .BR tchdb (3),
-.BR tcbdb (3)
+.BR tcbdb (3),
+.BR tcfdb (3),
+.BR tctdb (3),
+.BR tcadb (3)
 .PP
 Please see
 .I http://tokyocabinet.sourceforge.net/spex\-en.html</diff>
      <filename>man/tokyocabinet.3</filename>
    </modified>
    <modified>
      <diff>@@ -27,67 +27,67 @@
 #if defined(__linux__)
 
 #define _SYS_LINUX_
-#define TCSYSNAME  &quot;Linux&quot;
+#define TCSYSNAME   &quot;Linux&quot;
 
 #elif defined(__FreeBSD__)
 
 #define _SYS_FREEBSD_
-#define TCSYSNAME  &quot;FreeBSD&quot;
+#define TCSYSNAME   &quot;FreeBSD&quot;
 
 #elif defined(__NetBSD__)
 
 #define _SYS_NETBSD_
-#define TCSYSNAME  &quot;NetBSD&quot;
+#define TCSYSNAME   &quot;NetBSD&quot;
 
 #elif defined(__OpenBSD__)
 
 #define _SYS_OPENBSD_
-#define TCSYSNAME  &quot;OpenBSD&quot;
+#define TCSYSNAME   &quot;OpenBSD&quot;
 
 #elif defined(__sun__)
 
 #define _SYS_SUNOS_
-#define TCSYSNAME  &quot;SunOS&quot;
+#define TCSYSNAME   &quot;SunOS&quot;
 
 #elif defined(__hpux)
 
 #define _SYS_HPUX_
-#define TCSYSNAME  &quot;HP-UX&quot;
+#define TCSYSNAME   &quot;HP-UX&quot;
 
 #elif defined(__osf)
 
 #define _SYS_TRU64_
-#define TCSYSNAME  &quot;Tru64&quot;
+#define TCSYSNAME   &quot;Tru64&quot;
 
 #elif defined(_AIX)
 
 #define _SYS_AIX_
-#define TCSYSNAME  &quot;AIX&quot;
+#define TCSYSNAME   &quot;AIX&quot;
 
 #elif defined(__APPLE__) &amp;&amp; defined(__MACH__)
 
 #define _SYS_MACOSX_
-#define TCSYSNAME  &quot;Mac OS X&quot;
+#define TCSYSNAME   &quot;Mac OS X&quot;
 
 #elif defined(_MSC_VER)
 
 #define _SYS_MSVC_
-#define TCSYSNAME  &quot;Windows (VC++)&quot;
+#define TCSYSNAME   &quot;Windows (VC++)&quot;
 
 #elif defined(_WIN32)
 
 #define _SYS_MINGW_
-#define TCSYSNAME  &quot;Windows (MinGW)&quot;
+#define TCSYSNAME   &quot;Windows (MinGW)&quot;
 
 #elif defined(__CYGWIN__)
 
 #define _SYS_CYGWIN_
-#define TCSYSNAME  &quot;Windows (Cygwin)&quot;
+#define TCSYSNAME   &quot;Windows (Cygwin)&quot;
 
 #else
 
 #define _SYS_GENERIC_
-#define TCSYSNAME  &quot;Generic&quot;
+#define TCSYSNAME   &quot;Generic&quot;
 
 #endif
 </diff>
      <filename>myconf.h</filename>
    </modified>
    <modified>
      <diff>@@ -93,11 +93,11 @@ bool tcadbopen(TCADB *adb, const char *name){
     if(!pv) continue;
     *(pv++) = '\0';
     if(!tcstricmp(elem, &quot;bnum&quot;)){
-      bnum = tcatoi(pv);
+      bnum = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;capnum&quot;)){
-      capnum = tcatoi(pv);
+      capnum = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;capsiz&quot;)){
-      capsiz = tcatoi(pv);
+      capsiz = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;mode&quot;)){
       owmode = strchr(pv, 'w') || strchr(pv, 'W');
       ocmode = strchr(pv, 'c') || strchr(pv, 'C');
@@ -105,30 +105,30 @@ bool tcadbopen(TCADB *adb, const char *name){
       onlmode = strchr(pv, 'e') || strchr(pv, 'E');
       onbmode = strchr(pv, 'f') || strchr(pv, 'F');
     } else if(!tcstricmp(elem, &quot;apow&quot;)){
-      apow = tcatoi(pv);
+      apow = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;fpow&quot;)){
-      fpow = tcatoi(pv);
+      fpow = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;opts&quot;)){
       if(strchr(pv, 'l') || strchr(pv, 'L')) tlmode = true;
       if(strchr(pv, 'd') || strchr(pv, 'D')) tdmode = true;
       if(strchr(pv, 'b') || strchr(pv, 'B')) tbmode = true;
       if(strchr(pv, 't') || strchr(pv, 'T')) ttmode = true;
     } else if(!tcstricmp(elem, &quot;rcnum&quot;)){
-      rcnum = tcatoi(pv);
+      rcnum = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;xmsiz&quot;)){
-      xmsiz = tcatoi(pv);
+      xmsiz = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;lmemb&quot;)){
-      lmemb = tcatoi(pv);
+      lmemb = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;nmemb&quot;)){
-      nmemb = tcatoi(pv);
+      nmemb = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;lcnum&quot;)){
-      lcnum = tcatoi(pv);
+      lcnum = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;ncnum&quot;)){
-      ncnum = tcatoi(pv);
+      ncnum = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;width&quot;)){
-      width = tcatoi(pv);
+      width = tcatoix(pv);
     } else if(!tcstricmp(elem, &quot;limsiz&quot;)){
-      limsiz = tcatoi(pv);
+      limsiz = tcatoix(pv);
     }
   }
   tclistdel(elems);</diff>
      <filename>tcadb.c</filename>
    </modified>
    <modified>
      <diff>@@ -306,7 +306,7 @@ int tcadbaddint(TCADB *adb, const void *kbuf, int ksiz, int num);
    `kbuf' specifies the pointer to the region of the key.
    `ksiz' specifies the size of the region of the key.
    `num' specifies the additional value.
-   If successful, the return value is the summation value, else, it is `NAN'.
+   If successful, the return value is the summation value, else, it is Not-a-Number.
    If the corresponding record exists, the value is treated as a real number and is added to.  If
    no record corresponds, a new record of the additional value is stored. */
 double tcadbadddouble(TCADB *adb, const void *kbuf, int ksiz, double num);</diff>
      <filename>tcadb.h</filename>
    </modified>
    <modified>
      <diff>@@ -183,8 +183,8 @@ static int runput(int argc, char **argv){
     }
   }
   if(!name || !key || !value) usage();
-  int ksiz, vsiz;
   char *kbuf, *vbuf;
+  int ksiz, vsiz;
   if(sx){
     kbuf = tchexdecode(key, &amp;ksiz);
     vbuf = tchexdecode(value, &amp;vsiz);
@@ -290,7 +290,7 @@ static int runlist(int argc, char **argv){
     if(!name &amp;&amp; argv[i][0] == '-'){
       if(!strcmp(argv[i], &quot;-m&quot;)){
         if(++i &gt;= argc) usage();
-        max = tcatoi(argv[i]);
+        max = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-pv&quot;)){
         pv = true;
       } else if(!strcmp(argv[i], &quot;-px&quot;)){
@@ -589,7 +589,8 @@ static int procmisc(const char *name, const char *func, const TCLIST *args, bool
 
 /* perform version command */
 static int procversion(void){
-  printf(&quot;Tokyo Cabinet version %s (%d:%s)\n&quot;, tcversion, _TC_LIBVER, _TC_FORMATVER);
+  printf(&quot;Tokyo Cabinet version %s (%d:%s) for %s\n&quot;,
+         tcversion, _TC_LIBVER, _TC_FORMATVER, TCSYSNAME);
   printf(&quot;Copyright (C) 2006-2009 Mikio Hirabayashi\n&quot;);
   return 0;
 }</diff>
      <filename>tcamgr.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tcadb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 
 /* global variables */
@@ -151,7 +151,7 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!name || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwrite(name, rnum);
   return rv;
@@ -210,7 +210,7 @@ static int runrcat(int argc, char **argv){
     }
   }
   if(!name || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procrcat(name, rnum);
   return rv;
@@ -233,7 +233,7 @@ static int runmisc(int argc, char **argv){
     }
   }
   if(!name || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procmisc(name, rnum);
   return rv;
@@ -256,7 +256,7 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!name || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwicked(name, rnum);
   return rv;
@@ -282,8 +282,8 @@ static int runcompare(int argc, char **argv){
     }
   }
   if(!name || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
   int rv = proccompare(name, tnum, rnum);
   return rv;</diff>
      <filename>tcatest.c</filename>
    </modified>
    <modified>
      <diff>@@ -77,7 +77,7 @@ int main(int argc, char **argv){
   params.action = ACTLIST;
   int size;
   const char *buf = tcmapget(pmap, &quot;action&quot;, 6, &amp;size);
-  if(buf) params.action = tcatoi(buf);
+  if(buf) params.action = tcatoix(buf);
   if(params.action &lt; ACTLIST) params.action = ACTLIST;
   buf = tcmapget(pmap, &quot;key&quot;, 3, &amp;size);
   if(buf){
@@ -104,11 +104,11 @@ int main(int argc, char **argv){
   }
   params.num = 0;
   buf = tcmapget(pmap, &quot;num&quot;, 3, &amp;size);
-  if(buf) params.num = tcatoi(buf);
+  if(buf) params.num = tcatoix(buf);
   if(params.num &lt; 1) params.num = DEFSHOWNUM;
   params.page = 1;
   buf = tcmapget(pmap, &quot;page&quot;, 4, &amp;size);
-  if(buf) params.page = tcatoi(buf);
+  if(buf) params.page = tcatoix(buf);
   if(params.page &lt; 1) params.page = 1;
   bool wmode;
   switch(params.action){
@@ -161,7 +161,7 @@ static void readparameters(TCMAP *params){
   int len = 0;
   const char *rp;
   if((rp = getenv(&quot;REQUEST_METHOD&quot;)) != NULL &amp;&amp; !strcmp(rp, &quot;POST&quot;) &amp;&amp;
-     (rp = getenv(&quot;CONTENT_LENGTH&quot;)) != NULL &amp;&amp; (len = tcatoi(rp)) &gt; 0){
+     (rp = getenv(&quot;CONTENT_LENGTH&quot;)) != NULL &amp;&amp; (len = tcatoix(rp)) &gt; 0){
     if(len &gt; maxlen) len = maxlen;
     buf = tccalloc(len + 1, 1);
     if(fread(buf, 1, len, stdin) != len){</diff>
      <filename>tcawmgr.c</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,6 @@
 #include &quot;tcbdb.h&quot;
 #include &quot;myconf.h&quot;
 
-#define BDBFILEMODE    00644             // permission of created files
 #define BDBOPAQUESIZ   64                // size of using opaque field
 #define BDBLEFTOPQSIZ  64                // size of left opaque field
 #define BDBPAGEBUFSIZ  32768             // size of a buffer to read each page
@@ -90,8 +89,8 @@ enum {                                   // enumeration for duplication behavior
 
 /* private function prototypes */
 static void tcbdbclear(TCBDB *bdb);
-static void tcdumpmeta(TCBDB *bdb);
-static void tcloadmeta(TCBDB *bdb);
+static void tcbdbdumpmeta(TCBDB *bdb);
+static void tcbdbloadmeta(TCBDB *bdb);
 static BDBLEAF *tcbdbleafnew(TCBDB *bdb, uint64_t prev, uint64_t next);
 static bool tcbdbleafcacheout(TCBDB *bdb, BDBLEAF *leaf);
 static bool tcbdbleafsave(TCBDB *bdb, BDBLEAF *leaf);
@@ -274,6 +273,7 @@ bool tcbdbsetcache(TCBDB *bdb, int32_t lcnum, int32_t ncnum){
 
 /* Set the size of the extra mapped memory of a B+ tree database object. */
 bool tcbdbsetxmsiz(TCBDB *bdb, int64_t xmsiz){
+  assert(bdb);
   if(bdb-&gt;open){
     tcbdbsetecode(bdb, TCEINVALID, __FILE__, __LINE__, __func__);
     return false;
@@ -606,6 +606,7 @@ TCLIST *tcbdbrange(TCBDB *bdb, const void *bkbuf, int bksiz, bool binc,
 /* Get string keys of ranged records in a B+ tree database object. */
 TCLIST *tcbdbrange2(TCBDB *bdb, const char *bkstr, bool binc,
                     const char *ekstr, bool einc, int max){
+  assert(bdb);
   return tcbdbrange(bdb, bkstr, bkstr ? strlen(bkstr) : 0, binc,
                     ekstr, ekstr ? strlen(ekstr) : 0, einc, max);
 }
@@ -851,7 +852,7 @@ bool tcbdbtranabort(TCBDB *bdb){
   }
   tcbdbcachepurge(bdb);
   memcpy(bdb-&gt;opaque, bdb-&gt;rbopaque, BDBOPAQUESIZ);
-  tcloadmeta(bdb);
+  tcbdbloadmeta(bdb);
   TCFREE(bdb-&gt;rbopaque);
   bdb-&gt;tran = false;
   bdb-&gt;rbopaque = NULL;
@@ -1292,6 +1293,13 @@ int tcbdbdbgfd(TCBDB *bdb){
 }
 
 
+/* Check whether mutual exclusion control is set to a B+ tree database object. */
+bool tcbdbhasmutex(TCBDB *bdb){
+  assert(bdb);
+  return bdb-&gt;mmtx != NULL;
+}
+
+
 /* Synchronize updating contents on memory of a B+ tree database object. */
 bool tcbdbmemsync(TCBDB *bdb, bool phys){
   assert(bdb);
@@ -1318,7 +1326,7 @@ bool tcbdbmemsync(TCBDB *bdb, bool phys){
     if(node-&gt;dirty &amp;&amp; !tcbdbnodesave(bdb, node)) err = true;
   }
   if(clk) BDBUNLOCKCACHE(bdb);
-  tcdumpmeta(bdb);
+  tcbdbdumpmeta(bdb);
   if(!tchdbmemsync(bdb-&gt;hdb, phys)) err = true;
   return !err;
 }
@@ -1490,9 +1498,9 @@ char *tcbdbopaque(TCBDB *bdb){
   assert(bdb);
   if(!bdb-&gt;open){
     tcbdbsetecode(bdb, TCEINVALID, __FILE__, __LINE__, __func__);
-    return 0;
+    return NULL;
   }
-  return tchdbopaque(bdb-&gt;hdb) + BDBOPAQUESIZ;
+  return bdb-&gt;opaque + BDBOPAQUESIZ;
 }
 
 
@@ -1666,7 +1674,7 @@ static void tcbdbclear(TCBDB *bdb){
 
 /* Serialize meta data into the opaque field.
    `bdb' specifies the B+ tree database object. */
-static void tcdumpmeta(TCBDB *bdb){
+static void tcbdbdumpmeta(TCBDB *bdb){
   assert(bdb);
   memset(bdb-&gt;opaque, 0, 64);
   char *wp = bdb-&gt;opaque;
@@ -1721,7 +1729,7 @@ static void tcdumpmeta(TCBDB *bdb){
 
 /* Deserialize meta data from the opaque field.
    `bdb' specifies the B+ tree database object. */
-static void tcloadmeta(TCBDB *bdb){
+static void tcbdbloadmeta(TCBDB *bdb){
   const char *rp = bdb-&gt;opaque;
   uint8_t cnum = *(uint8_t *)(rp++);
   if(cnum == 0x0){
@@ -2064,7 +2072,7 @@ static bool tcbdbleafaddrec(TCBDB *bdb, BDBLEAF *leaf, int dmode,
       rv = cmp(kbuf, ksiz, dbuf, rec-&gt;ksiz, cmpop);
     }
     if(rv == 0){
-      int psiz = TCALIGNPAD(ksiz);
+      int psiz = TCALIGNPAD(rec-&gt;ksiz);
       BDBREC *orec = rec;
       switch(dmode){
       case BDBPDKEEP:
@@ -2075,9 +2083,9 @@ static bool tcbdbleafaddrec(TCBDB *bdb, BDBLEAF *leaf, int dmode,
           tcptrlistover(recs, i, rec);
           dbuf = (char *)rec + sizeof(*rec);
         }
-        memcpy(dbuf + ksiz + psiz + rec-&gt;vsiz, vbuf, vsiz);
+        memcpy(dbuf + rec-&gt;ksiz + psiz + rec-&gt;vsiz, vbuf, vsiz);
         rec-&gt;vsiz += vsiz;
-        dbuf[ksiz+psiz+rec-&gt;vsiz] = '\0';
+        dbuf[rec-&gt;ksiz+psiz+rec-&gt;vsiz] = '\0';
         break;
       case BDBPDDUP:
         if(!rec-&gt;rest) rec-&gt;rest = tclistnew();
@@ -2094,39 +2102,39 @@ static bool tcbdbleafaddrec(TCBDB *bdb, BDBLEAF *leaf, int dmode,
             dbuf = (char *)rec + sizeof(*rec);
           }
         }
-        memcpy(dbuf + ksiz + psiz, vbuf, vsiz);
-        dbuf[ksiz+psiz+vsiz] = '\0';
+        memcpy(dbuf + rec-&gt;ksiz + psiz, vbuf, vsiz);
+        dbuf[rec-&gt;ksiz+psiz+vsiz] = '\0';
         rec-&gt;vsiz = vsiz;
         bdb-&gt;rnum++;
         break;
       case BDBPDADDINT:
         if(rec-&gt;vsiz != sizeof(int)) return false;
         if(*(int *)vbuf == 0){
-          *(int *)vbuf = *(int *)(dbuf + ksiz + psiz);
+          *(int *)vbuf = *(int *)(dbuf + rec-&gt;ksiz + psiz);
           return true;
         }
-        *(int *)(dbuf + ksiz + psiz) += *(int *)vbuf;
-        *(int *)vbuf = *(int *)(dbuf + ksiz + psiz);
+        *(int *)(dbuf + rec-&gt;ksiz + psiz) += *(int *)vbuf;
+        *(int *)vbuf = *(int *)(dbuf + rec-&gt;ksiz + psiz);
         break;
       case BDBPDADDDBL:
         if(rec-&gt;vsiz != sizeof(double)) return false;
         if(*(double *)vbuf == 0.0){
-          *(double *)vbuf = *(double *)(dbuf + ksiz + psiz);
+          *(double *)vbuf = *(double *)(dbuf + rec-&gt;ksiz + psiz);
           return true;
         }
-        *(double *)(dbuf + ksiz + psiz) += *(double *)vbuf;
-        *(double *)vbuf = *(double *)(dbuf + ksiz + psiz);
+        *(double *)(dbuf + rec-&gt;ksiz + psiz) += *(double *)vbuf;
+        *(double *)vbuf = *(double *)(dbuf + rec-&gt;ksiz + psiz);
         break;
       default:
         if(vsiz &gt; rec-&gt;vsiz){
-          TCREALLOC(rec, rec, sizeof(*rec) + ksiz + psiz + vsiz + 1);
+          TCREALLOC(rec, rec, sizeof(*rec) + rec-&gt;ksiz + psiz + vsiz + 1);
           if(rec != orec){
             tcptrlistover(recs, i, rec);
             dbuf = (char *)rec + sizeof(*rec);
           }
         }
-        memcpy(dbuf + ksiz + psiz, vbuf, vsiz);
-        dbuf[ksiz+psiz+vsiz] = '\0';
+        memcpy(dbuf + rec-&gt;ksiz + psiz, vbuf, vsiz);
+        dbuf[rec-&gt;ksiz+psiz+vsiz] = '\0';
         rec-&gt;vsiz = vsiz;
         break;
       }
@@ -2746,7 +2754,7 @@ static bool tcbdbopenimpl(TCBDB *bdb, const char *path, int omode){
       bdb-&gt;cmp = tccmplexical;
       bdb-&gt;cmpop = NULL;
     }
-    tcdumpmeta(bdb);
+    tcbdbdumpmeta(bdb);
     if(!tcbdbleafsave(bdb, leaf)){
       tcmapdel(bdb-&gt;nodec);
       tcmapdel(bdb-&gt;leafc);
@@ -2754,7 +2762,7 @@ static bool tcbdbopenimpl(TCBDB *bdb, const char *path, int omode){
       return false;
     }
   }
-  tcloadmeta(bdb);
+  tcbdbloadmeta(bdb);
   if(!bdb-&gt;cmp){
     tcbdbsetecode(bdb, TCEINVALID, __FILE__, __LINE__, __func__);
     tcmapdel(bdb-&gt;nodec);
@@ -2797,7 +2805,7 @@ static bool tcbdbcloseimpl(TCBDB *bdb){
   if(bdb-&gt;tran){
     tcbdbcachepurge(bdb);
     memcpy(bdb-&gt;opaque, bdb-&gt;rbopaque, BDBOPAQUESIZ);
-    tcloadmeta(bdb);
+    tcbdbloadmeta(bdb);
     TCFREE(bdb-&gt;rbopaque);
     bdb-&gt;tran = false;
     bdb-&gt;rbopaque = NULL;
@@ -2816,7 +2824,7 @@ static bool tcbdbcloseimpl(TCBDB *bdb){
   while((vbuf = tcmapiternext(nodec, &amp;vsiz)) != NULL){
     if(!tcbdbnodecacheout(bdb, (BDBNODE *)tcmapiterval(vbuf, &amp;vsiz))) err = true;
   }
-  if(bdb-&gt;wmode) tcdumpmeta(bdb);
+  if(bdb-&gt;wmode) tcbdbdumpmeta(bdb);
   tcmapdel(bdb-&gt;nodec);
   tcmapdel(bdb-&gt;leafc);
   if(!tchdbclose(bdb-&gt;hdb)) err = true;
@@ -3205,10 +3213,6 @@ static bool tcbdbrangefwm(TCBDB *bdb, const char *pbuf, int psiz, int max, TCLIS
 static bool tcbdboptimizeimpl(TCBDB *bdb, int32_t lmemb, int32_t nmemb,
                               int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts){
   assert(bdb);
-  if(lmemb &lt; 1) lmemb = bdb-&gt;lmemb;
-  if(nmemb &lt; 1) nmemb = bdb-&gt;nmemb;
-  if(bnum &lt; 1) bnum = tchdbrnum(bdb-&gt;hdb) * 2 + 1;
-  if(opts == UINT8_MAX) opts = bdb-&gt;opts;
   const char *path = tchdbpath(bdb-&gt;hdb);
   char *tpath = tcsprintf(&quot;%s%ctmp%c%llu&quot;, path, MYEXTCHR, MYEXTCHR, tchdbinode(bdb-&gt;hdb));
   TCBDB *tbdb = tcbdbnew();
@@ -3217,6 +3221,12 @@ static bool tcbdboptimizeimpl(TCBDB *bdb, int32_t lmemb, int32_t nmemb,
   void *encop, *decop;
   tchdbcodecfunc(bdb-&gt;hdb, &amp;enc, &amp;encop, &amp;dec, &amp;decop);
   if(enc &amp;&amp; dec) tcbdbsetcodecfunc(tbdb, enc, encop, dec, decop);
+  if(lmemb &lt; 1) lmemb = bdb-&gt;lmemb;
+  if(nmemb &lt; 1) nmemb = bdb-&gt;nmemb;
+  if(bnum &lt; 1) bnum = tchdbrnum(bdb-&gt;hdb) * 2 + 1;
+  if(apow &lt; 0) apow = tclog2l(tchdbalign(bdb-&gt;hdb));
+  if(fpow &lt; 0) fpow = tclog2l(tchdbfbpmax(bdb-&gt;hdb));
+  if(opts == UINT8_MAX) opts = bdb-&gt;opts;
   tcbdbtune(tbdb, lmemb, nmemb, bnum, apow, fpow, opts);
   tcbdbsetlsmax(tbdb, bdb-&gt;lsmax);
   if(!tcbdbopen(tbdb, tpath, BDBOWRITER | BDBOCREAT | BDBOTRUNC)){</diff>
      <filename>tcbdb.c</filename>
    </modified>
    <modified>
      <diff>@@ -525,7 +525,7 @@ int tcbdbaddint(TCBDB *bdb, const void *kbuf, int ksiz, int num);
    `kbuf' specifies the pointer to the region of the key.
    `ksiz' specifies the size of the region of the key.
    `num' specifies the additional value.
-   If successful, the return value is the summation value, else, it is `NAN'.
+   If successful, the return value is the summation value, else, it is Not-a-Number.
    If the corresponding record exists, the value is treated as a real number and is added to.  If
    no record corresponds, a new record of the additional value is stored. */
 double tcbdbadddouble(TCBDB *bdb, const void *kbuf, int ksiz, double num);
@@ -832,6 +832,12 @@ void tcbdbsetdbgfd(TCBDB *bdb, int fd);
 int tcbdbdbgfd(TCBDB *bdb);
 
 
+/* Check whether mutual exclusion control is set to a B+ tree database object.
+   `bdb' specifies the B+ tree database object.
+   If mutual exclusion control is set, it is true, else it is false. */
+bool tcbdbhasmutex(TCBDB *bdb);
+
+
 /* Synchronize updating contents on memory of a B+ tree database object.
    `bdb' specifies the B+ tree database object connected as a writer.
    `phys' specifies whether to synchronize physically.
@@ -906,15 +912,15 @@ uint32_t tcbdbfbpmax(TCBDB *bdb);
 
 /* Get the inode number of the database file of a B+ tree database object.
    `bdb' specifies the B+ tree database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 uint64_t tcbdbinode(TCBDB *bdb);
 
 
 /* Get the modification time of the database file of a B+ tree database object.
    `bdb' specifies the B+ tree database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 time_t tcbdbmtime(TCBDB *bdb);
 
 </diff>
      <filename>tcbdb.h</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   if(argc &lt; 2) usage();
   int rv = 0;
   if(!strcmp(argv[1], &quot;create&quot;)){
@@ -218,11 +218,11 @@ static int runcreate(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = proccreate(path, lmemb, nmemb, bnum, apow, fpow, cmp, opts);
   return rv;
 }
@@ -298,8 +298,8 @@ static int runput(int argc, char **argv){
     }
   }
   if(!path || !key || !value) usage();
-  int ksiz, vsiz;
   char *kbuf, *vbuf;
+  int ksiz, vsiz;
   if(sx){
     kbuf = tchexdecode(key, &amp;ksiz);
     vbuf = tchexdecode(value, &amp;vsiz);
@@ -443,7 +443,7 @@ static int runlist(int argc, char **argv){
         omode |= BDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-m&quot;)){
         if(++i &gt;= argc) usage();
-        max = tcatoi(argv[i]);
+        max = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-bk&quot;)){
         bk = true;
       } else if(!strcmp(argv[i], &quot;-pv&quot;)){
@@ -536,11 +536,11 @@ static int runoptimize(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procoptimize(path, lmemb, nmemb, bnum, apow, fpow, cmp, opts, omode);
   return rv;
 }
@@ -975,7 +975,8 @@ static int procimporttsv(const char *path, const char *file, int omode, bool sc)
 
 /* perform version command */
 static int procversion(void){
-  printf(&quot;Tokyo Cabinet version %s (%d:%s)\n&quot;, tcversion, _TC_LIBVER, _TC_FORMATVER);
+  printf(&quot;Tokyo Cabinet version %s (%d:%s) for %s\n&quot;,
+         tcversion, _TC_LIBVER, _TC_FORMATVER, TCSYSNAME);
   printf(&quot;Copyright (C) 2006-2009 Mikio Hirabayashi\n&quot;);
   return 0;
 }</diff>
      <filename>tcbmgr.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tcbdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 typedef struct {                         // type of structure for write thread
   TCBDB *bdb;
@@ -98,7 +98,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -277,14 +277,14 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procwrite(path, tnum, rnum, lmemb, nmemb, bnum, apow, fpow, opts, omode, rnd);
   return rv;
 }
@@ -319,7 +319,7 @@ static int runread(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procread(path, tnum, omode, wb, rnd);
   return rv;
@@ -352,7 +352,7 @@ static int runremove(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procremove(path, tnum, omode, rnd);
   return rv;
@@ -399,8 +399,8 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
   int rv = procwicked(path, tnum, rnum, opts, omode, nc);
   return rv;
@@ -441,7 +441,7 @@ static int runtypical(int argc, char **argv){
         nc = true;
       } else if(!strcmp(argv[i], &quot;-rr&quot;)){
         if(++i &gt;= argc) usage();
-        rratio = tcatoi(argv[i]);
+        rratio = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -466,14 +466,14 @@ static int runtypical(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = proctypical(path, tnum, rnum, lmemb, nmemb, bnum, apow, fpow, opts, omode, nc, rratio);
   return rv;
 }</diff>
      <filename>tcbmttest.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tcbdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 
 /* global variables */
@@ -51,8 +51,8 @@ static int procremove(const char *path, bool mt, TCCMP cmp, int lcnum, int ncnum
                       int omode, bool rnd);
 static int procrcat(const char *path, int rnum,
                     int lmemb, int nmemb, int bnum, int apow, int fpow,
-                    bool mt, TCCMP cmp, int opts, int lcnum, int ncnum, int xmsiz,
-                    int lsmax, int capnum, int omode, int pnum, bool dai, bool dad, bool rl);
+                    bool mt, TCCMP cmp, int opts, int lcnum, int ncnum, int xmsiz, int lsmax,
+                    int capnum, int omode, int pnum, bool dai, bool dad, bool rl, bool ru);
 static int procqueue(const char *path, int rnum, int lmemb, int nmemb, int bnum,
                      int apow, int fpow, bool mt, TCCMP cmp, int opts,
                      int lcnum, int ncnum, int xmsiz, int lsmax, int capnum, int omode);
@@ -65,7 +65,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -103,7 +103,7 @@ static void usage(void){
   fprintf(stderr, &quot;  %s remove [-mt] [-cd|-ci|-cj] [-lc num] [-nc num] [-xm num] [-nl|-nb] [-rnd]&quot;
           &quot; path\n&quot;, g_progname);
   fprintf(stderr, &quot;  %s rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc num] [-nc num]&quot;
-          &quot; [-xm num] [-ls num] [-ca num] [-nl|-nb] [-pn num] [-dai|-dad|-rl] path rnum&quot;
+          &quot; [-xm num] [-ls num] [-ca num] [-nl|-nb] [-pn num] [-dai|-dad|-rl|-ru] path rnum&quot;
           &quot; [lmemb [nmemb [bnum [apow [fpow]]]]]\n&quot;, g_progname);
   fprintf(stderr, &quot;  %s queue [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc num] [-nc num]&quot;
           &quot; [-xm num] [-ls num] [-ca num] [-nl|-nb] path rnum&quot;
@@ -234,19 +234,19 @@ static int runwrite(int argc, char **argv){
         opts |= BDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-lc&quot;)){
         if(++i &gt;= argc) usage();
-        lcnum = tcatoi(argv[i]);
+        lcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nc&quot;)){
         if(++i &gt;= argc) usage();
-        ncnum = tcatoi(argv[i]);
+        ncnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ls&quot;)){
         if(++i &gt;= argc) usage();
-        lsmax = tcatoi(argv[i]);
+        lsmax = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ca&quot;)){
         if(++i &gt;= argc) usage();
-        capnum = tcatoi(argv[i]);
+        capnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= BDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -275,13 +275,13 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procwrite(path, rnum, lmemb, nmemb, bnum, apow, fpow,
                      mt, cmp, opts, lcnum, ncnum, xmsiz, lsmax, capnum, omode, rnd);
   return rv;
@@ -311,13 +311,13 @@ static int runread(int argc, char **argv){
         cmp = tccmpint64;
       } else if(!strcmp(argv[i], &quot;-lc&quot;)){
         if(++i &gt;= argc) usage();
-        lcnum = tcatoi(argv[i]);
+        lcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nc&quot;)){
         if(++i &gt;= argc) usage();
-        ncnum = tcatoi(argv[i]);
+        ncnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= BDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -363,13 +363,13 @@ static int runremove(int argc, char **argv){
         cmp = tccmpint64;
       } else if(!strcmp(argv[i], &quot;-lc&quot;)){
         if(++i &gt;= argc) usage();
-        lcnum = tcatoi(argv[i]);
+        lcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nc&quot;)){
         if(++i &gt;= argc) usage();
-        ncnum = tcatoi(argv[i]);
+        ncnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= BDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -413,6 +413,7 @@ static int runrcat(int argc, char **argv){
   bool dai = false;
   bool dad = false;
   bool rl = false;
+  bool ru = false;
   for(int i = 2; i &lt; argc; i++){
     if(!path &amp;&amp; argv[i][0] == '-'){
       if(!strcmp(argv[i], &quot;-mt&quot;)){
@@ -435,32 +436,34 @@ static int runrcat(int argc, char **argv){
         opts |= BDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-lc&quot;)){
         if(++i &gt;= argc) usage();
-        lcnum = tcatoi(argv[i]);
+        lcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nc&quot;)){
         if(++i &gt;= argc) usage();
-        ncnum = tcatoi(argv[i]);
+        ncnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ls&quot;)){
         if(++i &gt;= argc) usage();
-        lsmax = tcatoi(argv[i]);
+        lsmax = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ca&quot;)){
         if(++i &gt;= argc) usage();
-        capnum = tcatoi(argv[i]);
+        capnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= BDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
         omode |= BDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-pn&quot;)){
         if(++i &gt;= argc) usage();
-        pnum = tcatoi(argv[i]);
+        pnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-dai&quot;)){
         dai = true;
       } else if(!strcmp(argv[i], &quot;-dad&quot;)){
         dad = true;
       } else if(!strcmp(argv[i], &quot;-rl&quot;)){
         rl = true;
+      } else if(!strcmp(argv[i], &quot;-ru&quot;)){
+        ru = true;
       } else {
         usage();
       }
@@ -483,15 +486,15 @@ static int runrcat(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procrcat(path, rnum, lmemb, nmemb, bnum, apow, fpow, mt, cmp, opts,
-                    lcnum, ncnum, xmsiz, lsmax, capnum, omode, pnum, dai, dad, rl);
+                    lcnum, ncnum, xmsiz, lsmax, capnum, omode, pnum, dai, dad, rl, ru);
   return rv;
 }
 
@@ -536,19 +539,19 @@ static int runqueue(int argc, char **argv){
         opts |= BDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-lc&quot;)){
         if(++i &gt;= argc) usage();
-        lcnum = tcatoi(argv[i]);
+        lcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nc&quot;)){
         if(++i &gt;= argc) usage();
-        ncnum = tcatoi(argv[i]);
+        ncnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ls&quot;)){
         if(++i &gt;= argc) usage();
-        lsmax = tcatoi(argv[i]);
+        lsmax = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-ca&quot;)){
         if(++i &gt;= argc) usage();
-        capnum = tcatoi(argv[i]);
+        capnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= BDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -575,13 +578,13 @@ static int runqueue(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int lmemb = lmstr ? tcatoi(lmstr) : -1;
-  int nmemb = nmstr ? tcatoi(nmstr) : -1;
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int lmemb = lmstr ? tcatoix(lmstr) : -1;
+  int nmemb = nmstr ? tcatoix(nmstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procqueue(path, rnum, lmemb, nmemb, bnum, apow, fpow,
                      mt, cmp, opts, lcnum, ncnum, xmsiz, lsmax, capnum, omode);
   return rv;
@@ -625,7 +628,7 @@ static int runmisc(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procmisc(path, rnum, mt, opts, omode);
   return rv;
@@ -669,7 +672,7 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwicked(path, rnum, mt, opts, omode);
   return rv;
@@ -931,14 +934,14 @@ static int procremove(const char *path, bool mt, TCCMP cmp, int lcnum, int ncnum
 /* perform rcat command */
 static int procrcat(const char *path, int rnum,
                     int lmemb, int nmemb, int bnum, int apow, int fpow,
-                    bool mt, TCCMP cmp, int opts, int lcnum, int ncnum, int xmsiz,
-                    int lsmax, int capnum, int omode, int pnum, bool dai, bool dad, bool rl){
+                    bool mt, TCCMP cmp, int opts, int lcnum, int ncnum, int xmsiz, int lsmax,
+                    int capnum, int omode, int pnum, bool dai, bool dad, bool rl, bool ru){
   iprintf(&quot;&lt;Random Concatenating Test&gt;\n&quot;
           &quot;  path=%s  rnum=%d  lmemb=%d  nmemb=%d  bnum=%d  apow=%d  fpow=%d&quot;
           &quot;  mt=%d  cmp=%p  opts=%d  lcnum=%d  ncnum=%d  xmsiz=%d  lsmax=%d  capnum=%d&quot;
-          &quot;  omode=%d  pnum=%d  dai=%d  dad=%d  rl=%d\n\n&quot;,
+          &quot;  omode=%d  pnum=%d  dai=%d  dad=%d  rl=%d  ru=%d\n\n&quot;,
           path, rnum, lmemb, nmemb, bnum, apow, fpow, mt, (void *)(intptr_t)cmp,
-          opts, lcnum, ncnum, xmsiz, lsmax, capnum, omode, pnum, dai, dad, rl);
+          opts, lcnum, ncnum, xmsiz, lsmax, capnum, omode, pnum, dai, dad, rl, ru);
   if(pnum &lt; 1) pnum = rnum;
   bool err = false;
   double stime = tctime();
@@ -981,49 +984,107 @@ static int procrcat(const char *path, int rnum,
     err = true;
   }
   for(int i = 1; i &lt;= rnum; i++){
-    char kbuf[RECBUFSIZ];
-    int ksiz;
-    if(cmp == tccmpdecimal){
-      ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
-    } else if(cmp == tccmpint32){
-      int32_t lnum = myrand(pnum);
-      memcpy(kbuf, &amp;lnum, sizeof(lnum));
-      ksiz = sizeof(lnum);
-    } else if(cmp == tccmpint64){
-      int64_t llnum = myrand(pnum);
-      memcpy(kbuf, &amp;llnum, sizeof(llnum));
-      ksiz = sizeof(llnum);
-    } else {
-      ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
-    }
-    if(dai){
-      if(tcbdbaddint(bdb, kbuf, ksiz, myrand(3)) == INT_MIN){
-        eprint(bdb, &quot;tcbdbaddint&quot;);
-        err = true;
+    if(ru){
+      char fmt[RECBUFSIZ];
+      sprintf(fmt, &quot;%%0%dd&quot;, myrand(RECBUFSIZ));
+      char kbuf[RECBUFSIZ];
+      int ksiz = sprintf(kbuf, fmt, myrand(pnum));
+      switch(myrand(9)){
+      case 0:
+        if(!tcbdbput(bdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(bdb, &quot;tcbdbput&quot;);
+          err = true;
+        }
         break;
-      }
-    } else if(dad){
-      if(isnan(tcbdbadddouble(bdb, kbuf, ksiz, myrand(3)))){
-        eprint(bdb, &quot;tcbdbadddouble&quot;);
-        err = true;
+      case 1:
+        if(!tcbdbputkeep(bdb, kbuf, ksiz, kbuf, ksiz) &amp;&amp; tcbdbecode(bdb) != TCEKEEP){
+          eprint(bdb, &quot;tcbdbputkeep&quot;);
+          err = true;
+        }
         break;
-      }
-    } else if(rl){
-      char vbuf[PATH_MAX];
-      int vsiz = myrand(PATH_MAX);
-      for(int j = 0; j &lt; vsiz; j++){
-        vbuf[j] = myrand(0x100);
-      }
-      if(!tcbdbputcat(bdb, kbuf, ksiz, vbuf, vsiz)){
-        eprint(bdb, &quot;tcbdbputcat&quot;);
-        err = true;
+      case 2:
+        if(!tcbdbputdup(bdb, kbuf, ksiz, kbuf, ksiz) &amp;&amp; tcbdbecode(bdb) != TCEKEEP){
+          eprint(bdb, &quot;tcbdbputkeep&quot;);
+          err = true;
+        }
+        break;
+      case 3:
+        if(!tcbdbputdupback(bdb, kbuf, ksiz, kbuf, ksiz) &amp;&amp; tcbdbecode(bdb) != TCEKEEP){
+          eprint(bdb, &quot;tcbdbputkeep&quot;);
+          err = true;
+        }
+        break;
+      case 4:
+        if(!tcbdbout(bdb, kbuf, ksiz) &amp;&amp; tcbdbecode(bdb) != TCENOREC){
+          eprint(bdb, &quot;tcbdbout&quot;);
+          err = true;
+        }
+        break;
+      case 5:
+        if(tcbdbaddint(bdb, kbuf, ksiz, 1) == INT_MIN &amp;&amp; tcbdbecode(bdb) != TCEKEEP){
+          eprint(bdb, &quot;tcbdbaddint&quot;);
+          err = true;
+        }
+        break;
+      case 6:
+        if(isnan(tcbdbadddouble(bdb, kbuf, ksiz, 1.0)) &amp;&amp; tcbdbecode(bdb) != TCEKEEP){
+          eprint(bdb, &quot;tcbdbadddouble&quot;);
+          err = true;
+        }
+        break;
+      default:
+        if(!tcbdbputcat(bdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(bdb, &quot;tcbdbputcat&quot;);
+          err = true;
+        }
         break;
       }
+      if(err) break;
     } else {
-      if(!tcbdbputcat(bdb, kbuf, ksiz, kbuf, ksiz)){
-        eprint(bdb, &quot;tcbdbputcat&quot;);
-        err = true;
-        break;
+      char kbuf[RECBUFSIZ];
+      int ksiz;
+      if(cmp == tccmpdecimal){
+        ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
+      } else if(cmp == tccmpint32){
+        int32_t lnum = myrand(pnum);
+        memcpy(kbuf, &amp;lnum, sizeof(lnum));
+        ksiz = sizeof(lnum);
+      } else if(cmp == tccmpint64){
+        int64_t llnum = myrand(pnum);
+        memcpy(kbuf, &amp;llnum, sizeof(llnum));
+        ksiz = sizeof(llnum);
+      } else {
+        ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
+      }
+      if(dai){
+        if(tcbdbaddint(bdb, kbuf, ksiz, myrand(3)) == INT_MIN){
+          eprint(bdb, &quot;tcbdbaddint&quot;);
+          err = true;
+          break;
+        }
+      } else if(dad){
+        if(isnan(tcbdbadddouble(bdb, kbuf, ksiz, myrand(30) / 10.0))){
+          eprint(bdb, &quot;tcbdbadddouble&quot;);
+          err = true;
+          break;
+        }
+      } else if(rl){
+        char vbuf[PATH_MAX];
+        int vsiz = myrand(PATH_MAX);
+        for(int j = 0; j &lt; vsiz; j++){
+          vbuf[j] = myrand(0x100);
+        }
+        if(!tcbdbputcat(bdb, kbuf, ksiz, vbuf, vsiz)){
+          eprint(bdb, &quot;tcbdbputcat&quot;);
+          err = true;
+          break;
+        }
+      } else {
+        if(!tcbdbputcat(bdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(bdb, &quot;tcbdbputcat&quot;);
+          err = true;
+          break;
+        }
       }
     }
     if(rnum &gt; 250 &amp;&amp; i % (rnum / 250) == 0){</diff>
      <filename>tcbtest.c</filename>
    </modified>
    <modified>
      <diff>@@ -70,8 +70,8 @@ enum {                                   // enumeration for duplication behavior
 
 
 /* private function prototypes */
-static void tcdumpmeta(TCFDB *fdb, char *hbuf);
-static void tcloadmeta(TCFDB *fdb, const char *hbuf);
+static void tcfdbdumpmeta(TCFDB *fdb, char *hbuf);
+static void tcfdbloadmeta(TCFDB *fdb, const char *hbuf);
 static void tcfdbclear(TCFDB *fdb);
 static void tcfdbsetflag(TCFDB *fdb, int flag, bool sign);
 static bool tcfdblockmethod(TCFDB *fdb, bool wr);
@@ -948,6 +948,13 @@ int tcfdbdbgfd(TCFDB *fdb){
 }
 
 
+/* Check whether mutual exclusion control is set to a fixed-length database object. */
+bool tcfdbhasmutex(TCFDB *fdb){
+  assert(fdb);
+  return fdb-&gt;mmtx != NULL;
+}
+
+
 /* Synchronize updating contents on memory of a fixed-length database object. */
 bool tcfdbmemsync(TCFDB *fdb, bool phys){
   assert(fdb);
@@ -957,7 +964,7 @@ bool tcfdbmemsync(TCFDB *fdb, bool phys){
   }
   bool err = false;
   char hbuf[FDBHEADSIZ];
-  tcdumpmeta(fdb, hbuf);
+  tcfdbdumpmeta(fdb, hbuf);
   memcpy(fdb-&gt;map, hbuf, FDBOPAQUEOFF);
   if(phys){
     if(msync(fdb-&gt;map, fdb-&gt;limsiz, MS_SYNC) == -1){
@@ -1147,7 +1154,7 @@ int64_t tcfdbkeytoid(const char *kbuf, int ksiz){
 /* Serialize meta data into a buffer.
    `fdb' specifies the fixed-length database object.
    `hbuf' specifies the buffer. */
-static void tcdumpmeta(TCFDB *fdb, char *hbuf){
+static void tcfdbdumpmeta(TCFDB *fdb, char *hbuf){
   memset(hbuf, 0, FDBHEADSIZ);
   sprintf(hbuf, &quot;%s\n%s:%d\n&quot;, FDBMAGICDATA, _TC_FORMATVER, _TC_LIBVER);
   memcpy(hbuf + FDBTYPEOFF, &amp;(fdb-&gt;type), sizeof(fdb-&gt;type));
@@ -1177,7 +1184,7 @@ static void tcdumpmeta(TCFDB *fdb, char *hbuf){
 /* Deserialize meta data from a buffer.
    `fdb' specifies the fixed-length database object.
    `hbuf' specifies the buffer. */
-static void tcloadmeta(TCFDB *fdb, const char *hbuf){
+static void tcfdbloadmeta(TCFDB *fdb, const char *hbuf){
   memcpy(&amp;(fdb-&gt;type), hbuf + FDBTYPEOFF, sizeof(fdb-&gt;type));
   memcpy(&amp;(fdb-&gt;flags), hbuf + FDBFLAGSOFF, sizeof(fdb-&gt;flags));
   uint64_t llnum;
@@ -1426,7 +1433,7 @@ static bool tcfdbopenimpl(TCFDB *fdb, const char *path, int omode){
     fdb-&gt;fsiz = FDBHEADSIZ;
     fdb-&gt;min = 0;
     fdb-&gt;max = 0;
-    tcdumpmeta(fdb, hbuf);
+    tcfdbdumpmeta(fdb, hbuf);
     if(!tcwrite(fd, hbuf, FDBHEADSIZ)){
       tcfdbsetecode(fdb, TCEWRITE, __FILE__, __LINE__, __func__);
       close(fd);
@@ -1445,7 +1452,7 @@ static bool tcfdbopenimpl(TCFDB *fdb, const char *path, int omode){
     return false;
   }
   int type = fdb-&gt;type;
-  tcloadmeta(fdb, hbuf);
+  tcfdbloadmeta(fdb, hbuf);
   if(!(omode &amp; FDBONOLCK)){
     if(memcmp(hbuf, FDBMAGICDATA, strlen(FDBMAGICDATA)) || fdb-&gt;type != type ||
        fdb-&gt;width &lt; 1 || sbuf.st_size &lt; fdb-&gt;fsiz || fdb-&gt;limsiz &lt; FDBHEADSIZ ||
@@ -1928,10 +1935,10 @@ static uint64_t *tcfdbrangeimpl(TCFDB *fdb, int64_t lower, int64_t upper, int ma
    If successful, the return value is true, else, it is false. */
 static bool tcfdboptimizeimpl(TCFDB *fdb, int32_t width, int64_t limsiz){
   assert(fdb);
-  if(width &lt; 1) width = fdb-&gt;width;
-  if(limsiz &lt; 1) limsiz = fdb-&gt;limsiz;
   char *tpath = tcsprintf(&quot;%s%ctmp%c%llu&quot;, fdb-&gt;path, MYEXTCHR, MYEXTCHR, fdb-&gt;inode);
   TCFDB *tfdb = tcfdbnew();
+  if(width &lt; 1) width = fdb-&gt;width;
+  if(limsiz &lt; 1) limsiz = fdb-&gt;limsiz;
   tcfdbtune(tfdb, width, limsiz);
   if(!tcfdbopen(tfdb, tpath, FDBOWRITER | FDBOCREAT | FDBOTRUNC)){
     tcfdbsetecode(fdb, tfdb-&gt;ecode, __FILE__, __LINE__, __func__);</diff>
      <filename>tcfdb.c</filename>
    </modified>
    <modified>
      <diff>@@ -567,7 +567,7 @@ int tcfdbaddint(TCFDB *fdb, int64_t id, int num);
    number of existing records is specified.  If it is `FDBIDNEXT', the number greater by one than
    the maximum ID number of existing records is specified.
    `num' specifies the additional value.
-   If successful, the return value is the summation value, else, it is `NAN'.
+   If successful, the return value is the summation value, else, it is Not-a-Number.
    If the corresponding record exists, the value is treated as a real number and is added to.  If
    no record corresponds, a new record of the additional value is stored. */
 double tcfdbadddouble(TCFDB *fdb, int64_t id, double num);
@@ -656,6 +656,12 @@ void tcfdbsetdbgfd(TCFDB *fdb, int fd);
 int tcfdbdbgfd(TCFDB *fdb);
 
 
+/* Check whether mutual exclusion control is set to a fixed-length database object.
+   `fdb' specifies the fixed-length database object.
+   If mutual exclusion control is set, it is true, else it is false. */
+bool tcfdbhasmutex(TCFDB *fdb);
+
+
 /* Synchronize updating contents on memory of a fixed-length database object.
    `fdb' specifies the fixed-length database object connected as a writer.
    `phys' specifies whether to synchronize physically.
@@ -700,15 +706,15 @@ uint64_t tcfdblimid(TCFDB *fdb);
 
 /* Get the inode number of the database file of a fixed-length database object.
    `fdb' specifies the fixed-length database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 uint64_t tcfdbinode(TCFDB *fdb);
 
 
 /* Get the modification time of the database file of a fixed-length database object.
    `fdb' specifies the fixed-length database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 time_t tcfdbmtime(TCFDB *fdb);
 
 </diff>
      <filename>tcfdb.h</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   if(argc &lt; 2) usage();
   int rv = 0;
   if(!strcmp(argv[1], &quot;create&quot;)){
@@ -176,8 +176,8 @@ static int runcreate(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = proccreate(path, width, limsiz);
   return rv;
 }
@@ -242,8 +242,8 @@ static int runput(int argc, char **argv){
     }
   }
   if(!path || !key || !value) usage();
-  int ksiz, vsiz;
   char *kbuf, *vbuf;
+  int ksiz, vsiz;
   if(sx){
     kbuf = tchexdecode(key, &amp;ksiz);
     vbuf = tchexdecode(value, &amp;vsiz);
@@ -364,7 +364,7 @@ static int runlist(int argc, char **argv){
         omode |= FDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-m&quot;)){
         if(++i &gt;= argc) usage();
-        max = tcatoi(argv[i]);
+        max = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-pv&quot;)){
         pv = true;
       } else if(!strcmp(argv[i], &quot;-px&quot;)){
@@ -418,8 +418,8 @@ static int runoptimize(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = procoptimize(path, width, limsiz, omode);
   return rv;
 }
@@ -505,6 +505,7 @@ static int procinform(const char *path, int omode){
   case TCDBTHASH: type = &quot;hash&quot;; break;
   case TCDBTBTREE: type = &quot;btree&quot;; break;
   case TCDBTFIXED: type = &quot;fixed&quot;; break;
+  case TCDBTTABLE: type = &quot;table&quot;; break;
   }
   printf(&quot;database type: %s\n&quot;, type);
   uint8_t flags = tcfdbflags(fdb);
@@ -758,7 +759,8 @@ static int procimporttsv(const char *path, const char *file, int omode, bool sc)
 
 /* perform version command */
 static int procversion(void){
-  printf(&quot;Tokyo Cabinet version %s (%d:%s)\n&quot;, tcversion, _TC_LIBVER, _TC_FORMATVER);
+  printf(&quot;Tokyo Cabinet version %s (%d:%s) for %s\n&quot;,
+         tcversion, _TC_LIBVER, _TC_FORMATVER, TCSYSNAME);
   printf(&quot;Copyright (C) 2006-2009 Mikio Hirabayashi\n&quot;);
   return 0;
 }</diff>
      <filename>tcfmgr.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tcfdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 #define EXHEADSIZ      256               // expected header size
 
 typedef struct {                         // type of structure for write thread
@@ -99,7 +99,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -238,11 +238,11 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = procwrite(path, tnum, rnum, width, limsiz, omode, rnd);
   return rv;
 }
@@ -277,7 +277,7 @@ static int runread(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procread(path, tnum, omode, wb, rnd);
   return rv;
@@ -310,7 +310,7 @@ static int runremove(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procremove(path, tnum, omode, rnd);
   return rv;
@@ -346,8 +346,8 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
   int rv = procwicked(path, tnum, rnum, omode, nc);
   return rv;
@@ -374,7 +374,7 @@ static int runtypical(int argc, char **argv){
         nc = true;
       } else if(!strcmp(argv[i], &quot;-rr&quot;)){
         if(++i &gt;= argc) usage();
-        rratio = tcatoi(argv[i]);
+        rratio = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -393,11 +393,11 @@ static int runtypical(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = proctypical(path, tnum, rnum, width, limsiz, omode, nc, rratio);
   return rv;
 }</diff>
      <filename>tcfmttest.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tcfdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 #define EXHEADSIZ      256               // expected header size
 
 
@@ -57,7 +57,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -192,10 +192,10 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = procwrite(path, rnum, width, limsiz, mt, omode, rnd);
   return rv;
 }
@@ -288,7 +288,7 @@ static int runrcat(int argc, char **argv){
         omode |= FDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-pn&quot;)){
         if(++i &gt;= argc) usage();
-        pnum = tcatoi(argv[i]);
+        pnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-dai&quot;)){
         dai = true;
       } else if(!strcmp(argv[i], &quot;-dad&quot;)){
@@ -311,10 +311,10 @@ static int runrcat(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int width = wstr ? tcatoi(wstr) : -1;
-  int64_t limsiz = lstr ? strtoll(lstr, NULL, 10) : -1;
+  int width = wstr ? tcatoix(wstr) : -1;
+  int64_t limsiz = lstr ? tcatoix(lstr) : -1;
   int rv = procrcat(path, rnum, width, limsiz, mt, omode, pnum, dai, dad, rl);
   return rv;
 }
@@ -346,7 +346,7 @@ static int runmisc(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procmisc(path, rnum, mt, omode);
   return rv;
@@ -379,7 +379,7 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwicked(path, rnum, mt, omode);
   return rv;
@@ -569,7 +569,7 @@ static int procrcat(const char *path, int rnum, int width, int64_t limsiz,
         break;
       }
     } else if(dad){
-      if(isnan(tcfdbadddouble(fdb, tcfdbkeytoid(kbuf, ksiz), myrand(3)))){
+      if(isnan(tcfdbadddouble(fdb, tcfdbkeytoid(kbuf, ksiz), myrand(30) / 10.0))){
         eprint(fdb, &quot;tcfdbadddouble&quot;);
         err = true;
         break;</diff>
      <filename>tcftest.c</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@
 
 #include &quot;tcutil.h&quot;
 #include &quot;tchdb.h&quot;
+#include &quot;tcbdb.h&quot;
 #include &quot;myconf.h&quot;
 
 #define HDBFILEMODE    00644             // permission of created files
@@ -116,12 +117,12 @@ enum {                                   // enumeration for duplication behavior
 
 
 /* private function prototypes */
-static bool tcseekwrite(TCHDB *hdb, off_t off, const void *buf, size_t size);
-static bool tcseekread(TCHDB *hdb, off_t off, void *buf, size_t size);
-static bool tcseekreadtry(TCHDB *hdb, off_t off, void *buf, size_t size);
-static void tcdumpmeta(TCHDB *hdb, char *hbuf);
-static void tcloadmeta(TCHDB *hdb, const char *hbuf);
 static uint64_t tcgetprime(uint64_t num);
+static bool tchdbseekwrite(TCHDB *hdb, off_t off, const void *buf, size_t size);
+static bool tchdbseekread(TCHDB *hdb, off_t off, void *buf, size_t size);
+static bool tchdbseekreadtry(TCHDB *hdb, off_t off, void *buf, size_t size);
+static void tchdbdumpmeta(TCHDB *hdb, char *hbuf);
+static void tchdbloadmeta(TCHDB *hdb, const char *hbuf);
 static void tchdbclear(TCHDB *hdb);
 static int32_t tchdbpadsize(TCHDB *hdb, uint64_t off);
 static void tchdbsetflag(TCHDB *hdb, int flag, bool sign);
@@ -160,7 +161,8 @@ static char *tchdbgetimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
                           int *sp);
 static int tchdbgetintobuf(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx, uint8_t hash,
                            char *vbuf, int max);
-static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp);
+static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp,
+                              const char **vbp, int *vsp);
 static int tchdbvsizimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx, uint8_t hash);
 static bool tchdbiterinitimpl(TCHDB *hdb);
 static char *tchdbiternextimpl(TCHDB *hdb, int *sp);
@@ -1128,7 +1130,7 @@ bool tchdbtranabort(TCHDB *hdb){
     tchdbsetecode(hdb, TCEREAD, __FILE__, __LINE__, __func__);
     err = false;
   } else {
-    tcloadmeta(hdb, hbuf);
+    tchdbloadmeta(hdb, hbuf);
   }
   hdb-&gt;xfsiz = 0;
   hdb-&gt;fbpnum = 0;
@@ -1239,6 +1241,13 @@ int tchdbdbgfd(TCHDB *hdb){
 }
 
 
+/* Check whether mutual exclusion control is set to a hash database object. */
+bool tchdbhasmutex(TCHDB *hdb){
+  assert(hdb);
+  return hdb-&gt;mmtx != NULL;
+}
+
+
 /* Synchronize updating contents on memory of a hash database object. */
 bool tchdbmemsync(TCHDB *hdb, bool phys){
   assert(hdb);
@@ -1248,7 +1257,7 @@ bool tchdbmemsync(TCHDB *hdb, bool phys){
   }
   bool err = false;
   char hbuf[HDBHEADSIZ];
-  tcdumpmeta(hdb, hbuf);
+  tchdbdumpmeta(hdb, hbuf);
   memcpy(hdb-&gt;map, hbuf, HDBOPAQUEOFF);
   if(phys){
     size_t xmsiz = (hdb-&gt;xmsiz &gt; hdb-&gt;msiz) ? hdb-&gt;xmsiz : hdb-&gt;msiz;
@@ -1462,7 +1471,7 @@ void *tchdbgetnext(TCHDB *hdb, const void *kbuf, int ksiz, int *sp){
     HDBUNLOCKMETHOD(hdb);
     return NULL;
   }
-  char *rv = tchdbgetnextimpl(hdb, kbuf, ksiz, sp);
+  char *rv = tchdbgetnextimpl(hdb, kbuf, ksiz, sp, NULL, NULL);
   HDBUNLOCKMETHOD(hdb);
   return rv;
 }
@@ -1476,6 +1485,25 @@ char *tchdbgetnext2(TCHDB *hdb, const char *kstr){
 }
 
 
+/* Retrieve the key and the value of the next record of a record in a hash database object. */
+char *tchdbgetnext3(TCHDB *hdb, const char *kbuf, int ksiz, int *sp, const char **vbp, int *vsp){
+  assert(hdb &amp;&amp; sp &amp;&amp; vbp &amp;&amp; vsp);
+  if(!HDBLOCKMETHOD(hdb, true)) return NULL;
+  if(hdb-&gt;fd &lt; 0){
+    tchdbsetecode(hdb, TCEINVALID, __FILE__, __LINE__, __func__);
+    HDBUNLOCKMETHOD(hdb);
+    return NULL;
+  }
+  if(hdb-&gt;async &amp;&amp; !tchdbflushdrp(hdb)){
+    HDBUNLOCKMETHOD(hdb);
+    return NULL;
+  }
+  char *rv = tchdbgetnextimpl(hdb, kbuf, ksiz, sp, vbp, vsp);
+  HDBUNLOCKMETHOD(hdb);
+  return rv;
+}
+
+
 /* Process each record atomically of a hash database object. */
 bool tchdbforeach(TCHDB *hdb, TCITER iter, void *op){
   assert(hdb &amp;&amp; iter);
@@ -1523,13 +1551,52 @@ bool tchdbtranvoid(TCHDB *hdb){
  *************************************************************************************************/
 
 
+/* Get a natural prime number not less than a floor number.
+   `num' specified the floor number.
+   The return value is a prime number not less than the floor number. */
+static uint64_t tcgetprime(uint64_t num){
+  uint64_t primes[] = {
+    1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 71, 79, 83,
+    89, 103, 109, 113, 127, 139, 157, 173, 191, 199, 223, 239, 251, 283, 317, 349,
+    383, 409, 443, 479, 509, 571, 631, 701, 761, 829, 887, 953, 1021, 1151, 1279,
+    1399, 1531, 1663, 1789, 1913, 2039, 2297, 2557, 2803, 3067, 3323, 3583, 3833,
+    4093, 4603, 5119, 5623, 6143, 6653, 7159, 7673, 8191, 9209, 10223, 11261,
+    12281, 13309, 14327, 15359, 16381, 18427, 20479, 22511, 24571, 26597, 28669,
+    30713, 32749, 36857, 40949, 45053, 49139, 53239, 57331, 61417, 65521, 73727,
+    81919, 90107, 98299, 106487, 114679, 122869, 131071, 147451, 163819, 180221,
+    196597, 212987, 229373, 245759, 262139, 294911, 327673, 360439, 393209, 425977,
+    458747, 491503, 524287, 589811, 655357, 720887, 786431, 851957, 917503, 982981,
+    1048573, 1179641, 1310719, 1441771, 1572853, 1703903, 1835003, 1966079,
+    2097143, 2359267, 2621431, 2883577, 3145721, 3407857, 3670013, 3932153,
+    4194301, 4718579, 5242877, 5767129, 6291449, 6815741, 7340009, 7864301,
+    8388593, 9437179, 10485751, 11534329, 12582893, 13631477, 14680063, 15728611,
+    16777213, 18874367, 20971507, 23068667, 25165813, 27262931, 29360087, 31457269,
+    33554393, 37748717, 41943023, 46137319, 50331599, 54525917, 58720253, 62914549,
+    67108859, 75497467, 83886053, 92274671, 100663291, 109051903, 117440509,
+    125829103, 134217689, 150994939, 167772107, 184549373, 201326557, 218103799,
+    234881011, 251658227, 268435399, 301989881, 335544301, 369098707, 402653171,
+    436207613, 469762043, 503316469, 536870909, 603979769, 671088637, 738197503,
+    805306357, 872415211, 939524087, 1006632947, 1073741789, 1207959503,
+    1342177237, 1476394991, 1610612711, 1744830457, 1879048183, 2013265907,
+    2576980349, 3092376431, 3710851741, 4718021527, 6133428047, 7973456459,
+    10365493393, 13475141413, 17517683831, 22772988923, 29604885677, 38486351381,
+    50032256819, 65041933867, 84554514043, 109920868241, 0
+  };
+  int i;
+  for(i = 0; primes[i] &gt; 0; i++){
+    if(num &lt;= primes[i]) return primes[i];
+  }
+  return primes[i-1];
+}
+
+
 /* Seek and read data from a file.
    `hdb' specifies the hash database object.
    `off' specifies the offset of the region to seek.
    `buf' specifies the buffer to store into.
    `size' specifies the size of the buffer.
    The return value is true if successful, else, it is false. */
-static bool tcseekwrite(TCHDB *hdb, off_t off, const void *buf, size_t size){
+static bool tchdbseekwrite(TCHDB *hdb, off_t off, const void *buf, size_t size){
   assert(hdb &amp;&amp; off &gt;= 0 &amp;&amp; buf &amp;&amp; size &gt;= 0);
   if(hdb-&gt;tran &amp;&amp; !tchdbwalwrite(hdb, off, size)) return false;
   off_t end = off + size;
@@ -1582,7 +1649,7 @@ static bool tcseekwrite(TCHDB *hdb, off_t off, const void *buf, size_t size){
    `buf' specifies the buffer to store into.
    `size' specifies the size of the buffer.
    The return value is true if successful, else, it is false. */
-static bool tcseekread(TCHDB *hdb, off_t off, void *buf, size_t size){
+static bool tchdbseekread(TCHDB *hdb, off_t off, void *buf, size_t size){
   assert(hdb &amp;&amp; off &gt;= 0 &amp;&amp; buf &amp;&amp; size &gt;= 0);
   if(off + size &lt;= hdb-&gt;xmsiz){
     memcpy(buf, hdb-&gt;map + off, size);
@@ -1625,7 +1692,7 @@ static bool tcseekread(TCHDB *hdb, off_t off, void *buf, size_t size){
    `buf' specifies the buffer to store into.
    `size' specifies the size of the buffer.
    The return value is true if successful, else, it is false. */
-static bool tcseekreadtry(TCHDB *hdb, off_t off, void *buf, size_t size){
+static bool tchdbseekreadtry(TCHDB *hdb, off_t off, void *buf, size_t size){
   assert(hdb &amp;&amp; off &gt;= 0 &amp;&amp; buf &amp;&amp; size &gt;= 0);
   off_t end = off + size;
   if(end &gt; hdb-&gt;fsiz) return false;
@@ -1650,7 +1717,7 @@ static bool tcseekreadtry(TCHDB *hdb, off_t off, void *buf, size_t size){
 /* Serialize meta data into a buffer.
    `hdb' specifies the hash database object.
    `hbuf' specifies the buffer. */
-static void tcdumpmeta(TCHDB *hdb, char *hbuf){
+static void tchdbdumpmeta(TCHDB *hdb, char *hbuf){
   memset(hbuf, 0, HDBHEADSIZ);
   sprintf(hbuf, &quot;%s\n%s:%d\n&quot;, HDBMAGICDATA, _TC_FORMATVER, _TC_LIBVER);
   memcpy(hbuf + HDBTYPEOFF, &amp;(hdb-&gt;type), sizeof(hdb-&gt;type));
@@ -1677,7 +1744,7 @@ static void tcdumpmeta(TCHDB *hdb, char *hbuf){
 /* Deserialize meta data from a buffer.
    `hdb' specifies the hash database object.
    `hbuf' specifies the buffer. */
-static void tcloadmeta(TCHDB *hdb, const char *hbuf){
+static void tchdbloadmeta(TCHDB *hdb, const char *hbuf){
   memcpy(&amp;(hdb-&gt;type), hbuf + HDBTYPEOFF, sizeof(hdb-&gt;type));
   memcpy(&amp;(hdb-&gt;flags), hbuf + HDBFLAGSOFF, sizeof(hdb-&gt;flags));
   memcpy(&amp;(hdb-&gt;apow), hbuf + HDBAPOWOFF, sizeof(hdb-&gt;apow));
@@ -1695,45 +1762,6 @@ static void tcloadmeta(TCHDB *hdb, const char *hbuf){
 }
 
 
-/* Get a natural prime number not less than a floor number.
-   `num' specified the floor number.
-   The return value is a prime number not less than the floor number. */
-static uint64_t tcgetprime(uint64_t num){
-  uint64_t primes[] = {
-    1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 71, 79, 83,
-    89, 103, 109, 113, 127, 139, 157, 173, 191, 199, 223, 239, 251, 283, 317, 349,
-    383, 409, 443, 479, 509, 571, 631, 701, 761, 829, 887, 953, 1021, 1151, 1279,
-    1399, 1531, 1663, 1789, 1913, 2039, 2297, 2557, 2803, 3067, 3323, 3583, 3833,
-    4093, 4603, 5119, 5623, 6143, 6653, 7159, 7673, 8191, 9209, 10223, 11261,
-    12281, 13309, 14327, 15359, 16381, 18427, 20479, 22511, 24571, 26597, 28669,
-    30713, 32749, 36857, 40949, 45053, 49139, 53239, 57331, 61417, 65521, 73727,
-    81919, 90107, 98299, 106487, 114679, 122869, 131071, 147451, 163819, 180221,
-    196597, 212987, 229373, 245759, 262139, 294911, 327673, 360439, 393209, 425977,
-    458747, 491503, 524287, 589811, 655357, 720887, 786431, 851957, 917503, 982981,
-    1048573, 1179641, 1310719, 1441771, 1572853, 1703903, 1835003, 1966079,
-    2097143, 2359267, 2621431, 2883577, 3145721, 3407857, 3670013, 3932153,
-    4194301, 4718579, 5242877, 5767129, 6291449, 6815741, 7340009, 7864301,
-    8388593, 9437179, 10485751, 11534329, 12582893, 13631477, 14680063, 15728611,
-    16777213, 18874367, 20971507, 23068667, 25165813, 27262931, 29360087, 31457269,
-    33554393, 37748717, 41943023, 46137319, 50331599, 54525917, 58720253, 62914549,
-    67108859, 75497467, 83886053, 92274671, 100663291, 109051903, 117440509,
-    125829103, 134217689, 150994939, 167772107, 184549373, 201326557, 218103799,
-    234881011, 251658227, 268435399, 301989881, 335544301, 369098707, 402653171,
-    436207613, 469762043, 503316469, 536870909, 603979769, 671088637, 738197503,
-    805306357, 872415211, 939524087, 1006632947, 1073741789, 1207959503,
-    1342177237, 1476394991, 1610612711, 1744830457, 1879048183, 2013265907,
-    2576980349, 3092376431, 3710851741, 4718021527, 6133428047, 7973456459,
-    10365493393, 13475141413, 17517683831, 22772988923, 29604885677, 38486351381,
-    50032256819, 65041933867, 84554514043, 109920868241, 0
-  };
-  int i;
-  for(i = 0; primes[i] &gt; 0; i++){
-    if(num &lt;= primes[i]) return primes[i];
-  }
-  return primes[i-1];
-}
-
-
 /* Clear all members.
    `hdb' specifies the hash database object. */
 static void tchdbclear(TCHDB *hdb){
@@ -1933,7 +1961,7 @@ static bool tchdbsavefbp(TCHDB *hdb){
   }
   *(wp++) = '\0';
   *(wp++) = '\0';
-  if(!tcseekwrite(hdb, hdb-&gt;msiz, buf, wp - buf)){
+  if(!tchdbseekwrite(hdb, hdb-&gt;msiz, buf, wp - buf)){
     TCFREE(buf);
     return false;
   }
@@ -1948,7 +1976,7 @@ static bool tchdbloadfbp(TCHDB *hdb){
   int bsiz = hdb-&gt;frec - hdb-&gt;msiz;
   char *buf;
   TCMALLOC(buf, bsiz);
-  if(!tcseekread(hdb, hdb-&gt;msiz, buf, bsiz)){
+  if(!tchdbseekread(hdb, hdb-&gt;msiz, buf, bsiz)){
     TCFREE(buf);
     return false;
   }
@@ -2205,7 +2233,7 @@ static bool tchdbwritefb(TCHDB *hdb, uint64_t off, uint32_t rsiz){
   uint32_t lnum = TCHTOIL(rsiz);
   memcpy(wp, &amp;lnum, sizeof(lnum));
   wp += sizeof(lnum);
-  if(!tcseekwrite(hdb, off, rbuf, wp - rbuf)) return false;
+  if(!tchdbseekwrite(hdb, off, rbuf, wp - rbuf)) return false;
   return true;
 }
 
@@ -2306,7 +2334,7 @@ static bool tchdbwriterec(TCHDB *hdb, TCHREC *rec, uint64_t bidx, off_t entoff){
   wp += rec-&gt;vsiz;
   rsiz -= rec-&gt;vsiz;
   memset(wp, 0, rsiz);
-  if(!tcseekwrite(hdb, rec-&gt;off, rbuf, rec-&gt;rsiz)){
+  if(!tchdbseekwrite(hdb, rec-&gt;off, rbuf, rec-&gt;rsiz)){
     if(rbuf != stack) TCFREE(rbuf);
     return false;
   }
@@ -2321,11 +2349,11 @@ static bool tchdbwriterec(TCHDB *hdb, TCHREC *rec, uint64_t bidx, off_t entoff){
     if(hdb-&gt;ba64){
       uint64_t llnum = rec-&gt;off &gt;&gt; hdb-&gt;apow;
       llnum = TCHTOILL(llnum);
-      if(!tcseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
+      if(!tchdbseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
     } else {
       uint32_t lnum = rec-&gt;off &gt;&gt; hdb-&gt;apow;
       lnum = TCHTOIL(lnum);
-      if(!tcseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
+      if(!tchdbseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
     }
   } else {
     tchdbsetbucket(hdb, bidx, rec-&gt;off);
@@ -2343,7 +2371,7 @@ static bool tchdbreadrec(TCHDB *hdb, TCHREC *rec, char *rbuf){
   assert(hdb &amp;&amp; rec &amp;&amp; rbuf);
   TCDODEBUG(hdb-&gt;cnt_readrec++);
   int rsiz = hdb-&gt;runit;
-  if(!tcseekreadtry(hdb, rec-&gt;off, rbuf, rsiz)){
+  if(!tchdbseekreadtry(hdb, rec-&gt;off, rbuf, rsiz)){
     if(!HDBLOCKDB(hdb)) return false;
     rsiz = hdb-&gt;fsiz - rec-&gt;off;
     if(rsiz &gt; hdb-&gt;runit){
@@ -2353,7 +2381,7 @@ static bool tchdbreadrec(TCHDB *hdb, TCHREC *rec, char *rbuf){
       HDBUNLOCKDB(hdb);
       return false;
     }
-    if(!tcseekread(hdb, rec-&gt;off, rbuf, rsiz)){
+    if(!tchdbseekread(hdb, rec-&gt;off, rbuf, rsiz)){
       HDBUNLOCKDB(hdb);
       return false;
     }
@@ -2425,7 +2453,7 @@ static bool tchdbreadrecbody(TCHDB *hdb, TCHREC *rec){
   assert(hdb &amp;&amp; rec);
   int32_t bsiz = rec-&gt;ksiz + rec-&gt;vsiz;
   TCMALLOC(rec-&gt;bbuf, bsiz + 1);
-  if(!tcseekread(hdb, rec-&gt;boff, rec-&gt;bbuf, bsiz)) return false;
+  if(!tchdbseekread(hdb, rec-&gt;boff, rec-&gt;bbuf, bsiz)) return false;
   rec-&gt;kbuf = rec-&gt;bbuf;
   rec-&gt;vbuf = rec-&gt;bbuf + rec-&gt;ksiz;
   return true;
@@ -2457,7 +2485,7 @@ static bool tchdbflushdrp(TCHDB *hdb){
     return true;
   }
   TCDODEBUG(hdb-&gt;cnt_flushdrp++);
-  if(!tcseekwrite(hdb, hdb-&gt;drpoff, TCXSTRPTR(hdb-&gt;drpool), TCXSTRSIZE(hdb-&gt;drpool))){
+  if(!tchdbseekwrite(hdb, hdb-&gt;drpoff, TCXSTRPTR(hdb-&gt;drpool), TCXSTRSIZE(hdb-&gt;drpool))){
     HDBUNLOCKDB(hdb);
     return false;
   }
@@ -2560,7 +2588,7 @@ static bool tchdbwalwrite(TCHDB *hdb, uint64_t off, int64_t size){
   uint32_t lnum = TCHTOIL(size);
   memcpy(wp, &amp;lnum, sizeof(lnum));
   wp += sizeof(lnum);
-  if(!tcseekread(hdb, off, wp, size)){
+  if(!tchdbseekread(hdb, off, wp, size)){
     if(buf != stack) TCFREE(buf);
     return false;
   }
@@ -2779,7 +2807,7 @@ static bool tchdbopenimpl(TCHDB *hdb, const char *path, int omode){
     hdb-&gt;fsiz = HDBHEADSIZ + besiz * hdb-&gt;bnum + fbpsiz;
     hdb-&gt;fsiz += tchdbpadsize(hdb, hdb-&gt;fsiz);
     hdb-&gt;frec = hdb-&gt;fsiz;
-    tcdumpmeta(hdb, hbuf);
+    tchdbdumpmeta(hdb, hbuf);
     bool err = false;
     if(!tcwrite(fd, hbuf, HDBHEADSIZ)) err = true;
     char pbuf[HDBIOBUFSIZ];
@@ -2812,7 +2840,7 @@ static bool tchdbopenimpl(TCHDB *hdb, const char *path, int omode){
     return false;
   }
   int type = hdb-&gt;type;
-  tcloadmeta(hdb, hbuf);
+  tchdbloadmeta(hdb, hbuf);
   if((hdb-&gt;flags &amp; HDBFOPEN) &amp;&amp; tchdbwalrestore(hdb, path)){
     if(lseek(fd, 0, SEEK_SET) == -1){
       tchdbsetecode(hdb, TCESEEK, __FILE__, __LINE__, __func__);
@@ -2824,7 +2852,7 @@ static bool tchdbopenimpl(TCHDB *hdb, const char *path, int omode){
       close(fd);
       return false;
     }
-    tcloadmeta(hdb, hbuf);
+    tchdbloadmeta(hdb, hbuf);
     if(!tchdbwalremove(hdb, path)){
       close(fd);
       return false;
@@ -2897,7 +2925,7 @@ static bool tchdbopenimpl(TCHDB *hdb, const char *path, int omode){
     bool err = false;
     if(!(hdb-&gt;flags &amp; HDBFOPEN) &amp;&amp; !tchdbloadfbp(hdb)) err = true;
     memset(hbuf, 0, 2);
-    if(!tcseekwrite(hdb, hdb-&gt;msiz, hbuf, 2)) err = true;
+    if(!tchdbseekwrite(hdb, hdb-&gt;msiz, hbuf, 2)) err = true;
     if(err){
       TCFREE(hdb-&gt;path);
       TCFREE(hdb-&gt;fbpool);
@@ -3009,6 +3037,7 @@ static bool tchdbputimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
         entoff = rec.off + (sizeof(uint8_t) + sizeof(uint8_t)) +
           (hdb-&gt;ba64 ? sizeof(uint64_t) : sizeof(uint32_t));
       } else {
+        bool rv;
         switch(dmode){
         case HDBPDKEEP:
           tchdbsetecode(hdb, TCEKEEP, __FILE__, __LINE__, __func__);
@@ -3043,12 +3072,12 @@ static bool tchdbputimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
               TCFREE(rec.bbuf);
               return false;
             }
-            bool rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+            rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
             HDBUNLOCKDB(hdb);
             TCFREE(rec.bbuf);
             return rv;
           }
-          bool rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
           TCFREE(rec.bbuf);
           return rv;
         case HDBPDADDINT:
@@ -3063,15 +3092,17 @@ static bool tchdbputimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
           }
           int lnum;
           memcpy(&amp;lnum, rec.vbuf, sizeof(lnum));
-          TCFREE(rec.bbuf);
           if(*(int *)vbuf == 0){
+            TCFREE(rec.bbuf);
             *(int *)vbuf = lnum;
             return true;
           }
           lnum += *(int *)vbuf;
           rec.vbuf = (char *)&amp;lnum;
           *(int *)vbuf = lnum;
-          return tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          TCFREE(rec.bbuf);
+          return rv;
         case HDBPDADDDBL:
           if(rec.vsiz != sizeof(double)){
             tchdbsetecode(hdb, TCEKEEP, __FILE__, __LINE__, __func__);
@@ -3084,15 +3115,17 @@ static bool tchdbputimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
           }
           double dnum;
           memcpy(&amp;dnum, rec.vbuf, sizeof(dnum));
-          TCFREE(rec.bbuf);
           if(*(double *)vbuf == 0.0){
+            TCFREE(rec.bbuf);
             *(double *)vbuf = dnum;
             return true;
           }
           dnum += *(double *)vbuf;
           rec.vbuf = (char *)&amp;dnum;
           *(double *)vbuf = dnum;
-          return tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          TCFREE(rec.bbuf);
+          return rv;
         default:
           break;
         }
@@ -3104,7 +3137,7 @@ static bool tchdbputimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
         rec.vbuf = vbuf;
         if(lock){
           if(!HDBLOCKDB(hdb)) return false;
-          bool rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
+          rv = tchdbwriterec(hdb, &amp;rec, bidx, entoff);
           HDBUNLOCKDB(hdb);
           return rv;
         }
@@ -3238,11 +3271,11 @@ static bool tchdbputasyncimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t b
     if(hdb-&gt;ba64){
       uint64_t llnum = hdb-&gt;fsiz &gt;&gt; hdb-&gt;apow;
       llnum = TCHTOILL(llnum);
-      if(!tcseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
+      if(!tchdbseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
     } else {
       uint32_t lnum = hdb-&gt;fsiz &gt;&gt; hdb-&gt;apow;
       lnum = TCHTOIL(lnum);
-      if(!tcseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
+      if(!tchdbseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
     }
   } else {
     tchdbsetbucket(hdb, bidx, hdb-&gt;fsiz);
@@ -3320,23 +3353,23 @@ static bool tchdboutimpl(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx,
             off_t toff = rec.off + (sizeof(uint8_t) + sizeof(uint8_t) + sizeof(uint64_t));
             uint64_t llnum = right &gt;&gt; hdb-&gt;apow;
             llnum = TCHTOILL(llnum);
-            if(!tcseekwrite(hdb, toff, &amp;llnum, sizeof(uint64_t))) return false;
+            if(!tchdbseekwrite(hdb, toff, &amp;llnum, sizeof(uint64_t))) return false;
           } else {
             off_t toff = rec.off + (sizeof(uint8_t) + sizeof(uint8_t) + sizeof(uint32_t));
             uint32_t lnum = right &gt;&gt; hdb-&gt;apow;
             lnum = TCHTOIL(lnum);
-            if(!tcseekwrite(hdb, toff, &amp;lnum, sizeof(uint32_t))) return false;
+            if(!tchdbseekwrite(hdb, toff, &amp;lnum, sizeof(uint32_t))) return false;
           }
         }
         if(entoff &gt; 0){
           if(hdb-&gt;ba64){
             uint64_t llnum = child &gt;&gt; hdb-&gt;apow;
             llnum = TCHTOILL(llnum);
-            if(!tcseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
+            if(!tchdbseekwrite(hdb, entoff, &amp;llnum, sizeof(uint64_t))) return false;
           } else {
             uint32_t lnum = child &gt;&gt; hdb-&gt;apow;
             lnum = TCHTOIL(lnum);
-            if(!tcseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
+            if(!tchdbseekwrite(hdb, entoff, &amp;lnum, sizeof(uint32_t))) return false;
           }
         } else {
           tchdbsetbucket(hdb, bidx, child);
@@ -3563,9 +3596,12 @@ static int tchdbgetintobuf(TCHDB *hdb, const char *kbuf, int ksiz, uint64_t bidx
    `ksiz' specifies the size of the region of the key.
    `sp' specifies the pointer to the variable into which the size of the region of the return
    value is assigned.
+   `vbp' specifies the pointer to the variable into which the pointer to the value is assigned.
+   `vsp' specifies the pointer to the variable into which the size of the value is assigned.
    If successful, the return value is the pointer to the region of the value of the next
    record. */
-static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp){
+static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp,
+                              const char **vbp, int *vsp){
   assert(hdb &amp;&amp; sp);
   if(!kbuf){
     uint64_t iter = hdb-&gt;frec;
@@ -3576,6 +3612,52 @@ static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp){
       if(!tchdbreadrec(hdb, &amp;rec, rbuf)) return NULL;
       iter += rec.rsiz;
       if(rec.magic == HDBMAGICREC){
+        if(vbp){
+          if(hdb-&gt;zmode){
+            if(!tchdbreadrecbody(hdb, &amp;rec)) return NULL;
+            int zsiz;
+            char *zbuf;
+            if(hdb-&gt;opts &amp; HDBTDEFLATE){
+              zbuf = _tc_inflate(rec.vbuf, rec.vsiz, &amp;zsiz, _TCZMRAW);
+            } else if(hdb-&gt;opts &amp; HDBTBZIP){
+              zbuf = _tc_bzdecompress(rec.vbuf, rec.vsiz, &amp;zsiz);
+            } else if(hdb-&gt;opts &amp; HDBTTCBS){
+              zbuf = tcbsdecode(rec.vbuf, rec.vsiz, &amp;zsiz);
+            } else {
+              zbuf = hdb-&gt;dec(rec.vbuf, rec.vsiz, &amp;zsiz, hdb-&gt;decop);
+            }
+            if(!zbuf){
+              tchdbsetecode(hdb, TCEMISC, __FILE__, __LINE__, __func__);
+              TCFREE(rec.bbuf);
+              return NULL;
+            }
+            char *rv;
+            TCMALLOC(rv, rec.ksiz + zsiz + 1);
+            memcpy(rv, rec.kbuf, rec.ksiz);
+            memcpy(rv + rec.ksiz, zbuf, zsiz);
+            *sp = rec.ksiz;
+            *vbp = rv + rec.ksiz;
+            *vsp = zsiz;
+            TCFREE(zbuf);
+            TCFREE(rec.bbuf);
+            return rv;
+          }
+          if(rec.vbuf){
+            char *rv;
+            TCMALLOC(rv, rec.ksiz + rec.vsiz + 1);
+            memcpy(rv, rec.kbuf, rec.ksiz);
+            memcpy(rv + rec.ksiz, rec.vbuf, rec.vsiz);
+            *sp = rec.ksiz;
+            *vbp = rv + rec.ksiz;
+            *vsp = rec.vsiz;
+            return rv;
+          }
+          if(!tchdbreadrecbody(hdb, &amp;rec)) return NULL;
+          *sp = rec.ksiz;
+          *vbp = rec.vbuf;
+          *vsp = rec.vsiz;
+          return rec.bbuf;
+        }
         if(rec.kbuf){
           *sp = rec.ksiz;
           char *rv;
@@ -3626,6 +3708,52 @@ static char *tchdbgetnextimpl(TCHDB *hdb, const char *kbuf, int ksiz, int *sp){
           if(!tchdbreadrec(hdb, &amp;rec, rbuf)) return NULL;
           iter += rec.rsiz;
           if(rec.magic == HDBMAGICREC){
+            if(vbp){
+              if(hdb-&gt;zmode){
+                if(!tchdbreadrecbody(hdb, &amp;rec)) return NULL;
+                int zsiz;
+                char *zbuf;
+                if(hdb-&gt;opts &amp; HDBTDEFLATE){
+                  zbuf = _tc_inflate(rec.vbuf, rec.vsiz, &amp;zsiz, _TCZMRAW);
+                } else if(hdb-&gt;opts &amp; HDBTBZIP){
+                  zbuf = _tc_bzdecompress(rec.vbuf, rec.vsiz, &amp;zsiz);
+                } else if(hdb-&gt;opts &amp; HDBTTCBS){
+                  zbuf = tcbsdecode(rec.vbuf, rec.vsiz, &amp;zsiz);
+                } else {
+                  zbuf = hdb-&gt;dec(rec.vbuf, rec.vsiz, &amp;zsiz, hdb-&gt;decop);
+                }
+                if(!zbuf){
+                  tchdbsetecode(hdb, TCEMISC, __FILE__, __LINE__, __func__);
+                  TCFREE(rec.bbuf);
+                  return NULL;
+                }
+                char *rv;
+                TCMALLOC(rv, rec.ksiz + zsiz + 1);
+                memcpy(rv, rec.kbuf, rec.ksiz);
+                memcpy(rv + rec.ksiz, zbuf, zsiz);
+                *sp = rec.ksiz;
+                *vbp = rv + rec.ksiz;
+                *vsp = zsiz;
+                TCFREE(zbuf);
+                TCFREE(rec.bbuf);
+                return rv;
+              }
+              if(rec.vbuf){
+                char *rv;
+                TCMALLOC(rv, rec.ksiz + rec.vsiz + 1);
+                memcpy(rv, rec.kbuf, rec.ksiz);
+                memcpy(rv + rec.ksiz, rec.vbuf, rec.vsiz);
+                *sp = rec.ksiz;
+                *vbp = rv + rec.ksiz;
+                *vsp = rec.vsiz;
+                return rv;
+              }
+              if(!tchdbreadrecbody(hdb, &amp;rec)) return NULL;
+              *sp = rec.ksiz;
+              *vbp = rec.vbuf;
+              *vsp = rec.vsiz;
+              return rec.bbuf;
+            }
             if(rec.kbuf){
               *sp = rec.ksiz;
               char *rv;
@@ -3834,6 +3962,12 @@ static bool tchdbiternextintoxstr(TCHDB *hdb, TCXSTR *kxstr, TCXSTR *vxstr){
    If successful, the return value is true, else, it is false. */
 static bool tchdboptimizeimpl(TCHDB *hdb, int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts){
   assert(hdb);
+  char *tpath = tcsprintf(&quot;%s%ctmp%c%llu&quot;, hdb-&gt;path, MYEXTCHR, MYEXTCHR, hdb-&gt;inode);
+  TCHDB *thdb = tchdbnew();
+  thdb-&gt;enc = hdb-&gt;enc;
+  thdb-&gt;encop = hdb-&gt;encop;
+  thdb-&gt;dec = hdb-&gt;dec;
+  thdb-&gt;decop = hdb-&gt;decop;
   if(bnum &lt; 1){
     bnum = hdb-&gt;rnum * 2 + 1;
     if(bnum &lt; HDBDEFBNUM) bnum = HDBDEFBNUM;
@@ -3841,12 +3975,6 @@ static bool tchdboptimizeimpl(TCHDB *hdb, int64_t bnum, int8_t apow, int8_t fpow
   if(apow &lt; 0) apow = hdb-&gt;apow;
   if(fpow &lt; 0) fpow = hdb-&gt;fpow;
   if(opts == UINT8_MAX) opts = hdb-&gt;opts;
-  char *tpath = tcsprintf(&quot;%s%ctmp%c%llu&quot;, hdb-&gt;path, MYEXTCHR, MYEXTCHR, hdb-&gt;inode);
-  TCHDB *thdb = tchdbnew();
-  thdb-&gt;enc = hdb-&gt;enc;
-  thdb-&gt;encop = hdb-&gt;encop;
-  thdb-&gt;dec = hdb-&gt;dec;
-  thdb-&gt;decop = hdb-&gt;decop;
   tchdbtune(thdb, bnum, apow, fpow, opts);
   if(!tchdbopen(thdb, tpath, HDBOWRITER | HDBOCREAT | HDBOTRUNC)){
     tchdbsetecode(hdb, thdb-&gt;ecode, __FILE__, __LINE__, __func__);
@@ -3908,6 +4036,10 @@ static bool tchdboptimizeimpl(TCHDB *hdb, int64_t bnum, int8_t apow, int8_t fpow
     err = true;
   }
   tchdbdel(thdb);
+  if(err){
+    TCFREE(tpath);
+    return false;
+  }
   if(unlink(hdb-&gt;path) == -1){
     tchdbsetecode(hdb, TCEUNLINK, __FILE__, __LINE__, __func__);
     err = true;</diff>
      <filename>tchdb.c</filename>
    </modified>
    <modified>
      <diff>@@ -475,7 +475,7 @@ int tchdbaddint(TCHDB *hdb, const void *kbuf, int ksiz, int num);
    `kbuf' specifies the pointer to the region of the key.
    `ksiz' specifies the size of the region of the key.
    `num' specifies the additional value.
-   If successful, the return value is the summation value, else, it is `NAN'.
+   If successful, the return value is the summation value, else, it is Not-a-Number.
    If the corresponding record exists, the value is treated as a real number and is added to.  If
    no record corresponds, a new record of the additional value is stored. */
 double tchdbadddouble(TCHDB *hdb, const void *kbuf, int ksiz, double num);
@@ -605,6 +605,12 @@ void tchdbsetdbgfd(TCHDB *hdb, int fd);
 int tchdbdbgfd(TCHDB *hdb);
 
 
+/* Check whether mutual exclusion control is set to a hash database object.
+   `hdb' specifies the hash database object.
+   If mutual exclusion control is set, it is true, else it is false. */
+bool tchdbhasmutex(TCHDB *hdb);
+
+
 /* Synchronize updating contents on memory of a hash database object.
    `hdb' specifies the hash database object connected as a writer.
    `phys' specifies whether to synchronize physically.
@@ -648,15 +654,15 @@ uint64_t tchdbxmsiz(TCHDB *hdb);
 
 /* Get the inode number of the database file of a hash database object.
    `hdb' specifies the hash database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 uint64_t tchdbinode(TCHDB *hdb);
 
 
 /* Get the modification time of the database file of a hash database object.
    `hdb' specifies the hash database object.
-   The return value is the inode number of the database file or 0 the object does not connect to
-   any database file. */
+   The return value is the inode number of the database file or 0 if the object does not connect
+   to any database file. */
 time_t tchdbmtime(TCHDB *hdb);
 
 
@@ -731,7 +737,7 @@ void tchdbcodecfunc(TCHDB *hdb, TCCODEC *ep, void **eop, TCCODEC *dp, void **dop
    `ksiz' specifies the size of the region of the key.
    `sp' specifies the pointer to the variable into which the size of the region of the return
    value is assigned.
-   If successful, the return value is the pointer to the region of the value of the next record.
+   If successful, the return value is the pointer to the region of the key of the next record.
    `NULL' is returned if no record corresponds.
    Because an additional zero code is appended at the end of the region of the return value,
    the return value can be treated as a character string.  Because the region of the return
@@ -740,16 +746,32 @@ void tchdbcodecfunc(TCHDB *hdb, TCCODEC *ep, void **eop, TCCODEC *dp, void **dop
 void *tchdbgetnext(TCHDB *hdb, const void *kbuf, int ksiz, int *sp);
 
 
-/* Retrieve the next record of a string record in a hash database object.
+/* Retrieve the next string record in a hash database object.
    `hdb' specifies the hash database object.
    `kstr' specifies the string of the key.  If it is `NULL', the first record is retrieved.
-   If successful, the return value is the string of the value of the next record.  `NULL' is
+   If successful, the return value is the string of the key of the next record.  `NULL' is
    returned if no record corresponds.
    Because the region of the return value is allocated with the `malloc' call, it should be
    released with the `free' call when it is no longer in use. */
 char *tchdbgetnext2(TCHDB *hdb, const char *kstr);
 
 
+/* Retrieve the key and the value of the next record of a record in a hash database object.
+   `hdb' specifies the hash database object.
+   `kbuf' specifies the pointer to the region of the key.
+   `ksiz' specifies the size of the region of the key.
+   `sp' specifies the pointer to the variable into which the size of the region of the return
+   value is assigned.
+   `vbp' specifies the pointer to the variable into which the pointer to the value is assigned.
+   `vsp' specifies the pointer to the variable into which the size of the value is assigned.
+   If successful, the return value is the pointer to the region of the key of the next
+   record.
+   Because the region of the return value is allocated with the `malloc' call, it should be
+   released with the `free' call when it is no longer in use.  The retion pointed to by `vbp'
+   should not be released. */
+char *tchdbgetnext3(TCHDB *hdb, const char *kbuf, int ksiz, int *sp, const char **vbp, int *vsp);
+
+
 /* Process each record atomically of a hash database object.
    `hdb' specifies the hash database object.
    `func' specifies the pointer to the iterator function called for each record.</diff>
      <filename>tchdb.h</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   if(argc &lt; 2) usage();
   int rv = 0;
   if(!strcmp(argv[1], &quot;create&quot;)){
@@ -191,9 +191,9 @@ static int runcreate(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = proccreate(path, bnum, apow, fpow, opts);
   return rv;
 }
@@ -258,8 +258,8 @@ static int runput(int argc, char **argv){
     }
   }
   if(!path || !key || !value) usage();
-  int ksiz, vsiz;
   char *kbuf, *vbuf;
+  int ksiz, vsiz;
   if(sx){
     kbuf = tchexdecode(key, &amp;ksiz);
     vbuf = tchexdecode(value, &amp;vsiz);
@@ -378,7 +378,7 @@ static int runlist(int argc, char **argv){
         omode |= HDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-m&quot;)){
         if(++i &gt;= argc) usage();
-        max = tcatoi(argv[i]);
+        max = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-pv&quot;)){
         pv = true;
       } else if(!strcmp(argv[i], &quot;-px&quot;)){
@@ -448,9 +448,9 @@ static int runoptimize(int argc, char **argv){
     }
   }
   if(!path) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procoptimize(path, bnum, apow, fpow, opts, omode);
   return rv;
 }
@@ -538,6 +538,7 @@ static int procinform(const char *path, int omode){
   case TCDBTHASH: type = &quot;hash&quot;; break;
   case TCDBTBTREE: type = &quot;btree&quot;; break;
   case TCDBTFIXED: type = &quot;fixed&quot;; break;
+  case TCDBTTABLE: type = &quot;table&quot;; break;
   }
   printf(&quot;database type: %s\n&quot;, type);
   uint8_t flags = tchdbflags(hdb);
@@ -802,7 +803,8 @@ static int procimporttsv(const char *path, const char *file, int omode, bool sc)
 
 /* perform version command */
 static int procversion(void){
-  printf(&quot;Tokyo Cabinet version %s (%d:%s)\n&quot;, tcversion, _TC_LIBVER, _TC_FORMATVER);
+  printf(&quot;Tokyo Cabinet version %s (%d:%s) for %s\n&quot;,
+         tcversion, _TC_LIBVER, _TC_FORMATVER, TCSYSNAME);
   printf(&quot;Copyright (C) 2006-2009 Mikio Hirabayashi\n&quot;);
   return 0;
 }</diff>
      <filename>tchmgr.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tchdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 typedef struct {                         // type of structure for write thread
   TCHDB *hdb;
@@ -100,7 +100,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -242,10 +242,10 @@ static int runwrite(int argc, char **argv){
         opts |= HDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -274,12 +274,12 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procwrite(path, tnum, rnum, bnum, apow, fpow, opts, rcnum, xmsiz, omode, as, rnd);
   return rv;
 }
@@ -298,10 +298,10 @@ static int runread(int argc, char **argv){
     if(!path &amp;&amp; argv[i][0] == '-'){
       if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -322,7 +322,7 @@ static int runread(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procread(path, tnum, rcnum, xmsiz, omode, wb, rnd);
   return rv;
@@ -341,10 +341,10 @@ static int runremove(int argc, char **argv){
     if(!path &amp;&amp; argv[i][0] == '-'){
       if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -363,7 +363,7 @@ static int runremove(int argc, char **argv){
     }
   }
   if(!path || !tstr) usage();
-  int tnum = tcatoi(tstr);
+  int tnum = tcatoix(tstr);
   if(tnum &lt; 1) usage();
   int rv = procremove(path, tnum, rcnum, xmsiz, omode, rnd);
   return rv;
@@ -410,8 +410,8 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
   int rv = procwicked(path, tnum, rnum, opts, omode, nc);
   return rv;
@@ -446,10 +446,10 @@ static int runtypical(int argc, char **argv){
         opts |= HDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -458,7 +458,7 @@ static int runtypical(int argc, char **argv){
         nc = true;
       } else if(!strcmp(argv[i], &quot;-rr&quot;)){
         if(++i &gt;= argc) usage();
-        rratio = tcatoi(argv[i]);
+        rratio = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -479,12 +479,12 @@ static int runtypical(int argc, char **argv){
     }
   }
   if(!path || !tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = proctypical(path, tnum, rnum, bnum, apow, fpow, opts, rcnum, xmsiz, omode, nc, rratio);
   return rv;
 }</diff>
      <filename>tchmttest.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #include &lt;tchdb.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 
 /* global variables */
@@ -48,7 +48,7 @@ static int procread(const char *path, bool mt, int rcnum, int xmsiz, int omode,
 static int procremove(const char *path, bool mt, int rcnum, int xmsiz, int omode, bool rnd);
 static int procrcat(const char *path, int rnum, int bnum, int apow, int fpow,
                     bool mt, int opts, int rcnum, int xmsiz, int omode, int pnum,
-                    bool dai, bool dad, bool rl);
+                    bool dai, bool dad, bool rl, bool ru);
 static int procmisc(const char *path, int rnum, bool mt, int opts, int omode);
 static int procwicked(const char *path, int rnum, bool mt, int opts, int omode);
 
@@ -58,7 +58,7 @@ int main(int argc, char **argv){
   g_progname = argv[0];
   g_dbgfd = -1;
   const char *ebuf = getenv(&quot;TCDBGFD&quot;);
-  if(ebuf) g_dbgfd = tcatoi(ebuf);
+  if(ebuf) g_dbgfd = tcatoix(ebuf);
   srand((unsigned int)(tctime() * 1000) % UINT_MAX);
   if(argc &lt; 2) usage();
   int rv = 0;
@@ -92,7 +92,7 @@ static void usage(void){
           g_progname);
   fprintf(stderr, &quot;  %s remove [-mt] [-rc num] [-xm num] [-nl|-nb] [-rnd] path\n&quot;, g_progname);
   fprintf(stderr, &quot;  %s rcat [-mt] [-rc num] [-xm num] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb]&quot;
-          &quot; [-pn num] [-dai|-dad|-rl] path rnum [bnum [apow [fpow]]]\n&quot;, g_progname);
+          &quot; [-pn num] [-dai|-dad|-rl|-ru] path rnum [bnum [apow [fpow]]]\n&quot;, g_progname);
   fprintf(stderr, &quot;  %s misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] path rnum\n&quot;, g_progname);
   fprintf(stderr, &quot;  %s wicked [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] path rnum\n&quot;, g_progname);
   fprintf(stderr, &quot;\n&quot;);
@@ -197,10 +197,10 @@ static int runwrite(int argc, char **argv){
         opts |= HDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -227,11 +227,11 @@ static int runwrite(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procwrite(path, rnum, bnum, apow, fpow, mt, opts, rcnum, xmsiz, omode, as, rnd);
   return rv;
 }
@@ -252,10 +252,10 @@ static int runread(int argc, char **argv){
         mt = true;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -293,10 +293,10 @@ static int runremove(int argc, char **argv){
         mt = true;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
@@ -334,6 +334,7 @@ static int runrcat(int argc, char **argv){
   bool dai = false;
   bool dad = false;
   bool rl = false;
+  bool ru = false;
   for(int i = 2; i &lt; argc; i++){
     if(!path &amp;&amp; argv[i][0] == '-'){
       if(!strcmp(argv[i], &quot;-mt&quot;)){
@@ -350,23 +351,25 @@ static int runrcat(int argc, char **argv){
         opts |= HDBTEXCODEC;
       } else if(!strcmp(argv[i], &quot;-rc&quot;)){
         if(++i &gt;= argc) usage();
-        rcnum = tcatoi(argv[i]);
+        rcnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-xm&quot;)){
         if(++i &gt;= argc) usage();
-        xmsiz = tcatoi(argv[i]);
+        xmsiz = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-nl&quot;)){
         omode |= HDBONOLCK;
       } else if(!strcmp(argv[i], &quot;-nb&quot;)){
         omode |= HDBOLCKNB;
       } else if(!strcmp(argv[i], &quot;-pn&quot;)){
         if(++i &gt;= argc) usage();
-        pnum = tcatoi(argv[i]);
+        pnum = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-dai&quot;)){
         dai = true;
       } else if(!strcmp(argv[i], &quot;-dad&quot;)){
         dad = true;
       } else if(!strcmp(argv[i], &quot;-rl&quot;)){
         rl = true;
+      } else if(!strcmp(argv[i], &quot;-ru&quot;)){
+        ru = true;
       } else {
         usage();
       }
@@ -385,13 +388,13 @@ static int runrcat(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
-  int apow = astr ? tcatoi(astr) : -1;
-  int fpow = fstr ? tcatoi(fstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
+  int apow = astr ? tcatoix(astr) : -1;
+  int fpow = fstr ? tcatoix(fstr) : -1;
   int rv = procrcat(path, rnum, bnum, apow, fpow, mt, opts, rcnum, xmsiz, omode, pnum,
-                    dai, dad, rl);
+                    dai, dad, rl, ru);
   return rv;
 }
 
@@ -433,7 +436,7 @@ static int runmisc(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procmisc(path, rnum, mt, opts, omode);
   return rv;
@@ -477,7 +480,7 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!path || !rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwicked(path, rnum, mt, opts, omode);
   return rv;
@@ -683,11 +686,11 @@ static int procremove(const char *path, bool mt, int rcnum, int xmsiz, int omode
 /* perform rcat command */
 static int procrcat(const char *path, int rnum, int bnum, int apow, int fpow,
                     bool mt, int opts, int rcnum, int xmsiz, int omode, int pnum,
-                    bool dai, bool dad, bool rl){
+                    bool dai, bool dad, bool rl, bool ru){
   iprintf(&quot;&lt;Random Concatenating Test&gt;\n&quot;
           &quot;  path=%s  rnum=%d  bnum=%d  apow=%d  fpow=%d  mt=%d  opts=%d  rcnum=%d  xmsiz=%d&quot;
-          &quot;  omode=%d  pnum=%d  dai=%d  dad=%d  rl=%d\n\n&quot;,
-          path, rnum, bnum, apow, fpow, mt, opts, rcnum, xmsiz, omode, pnum, dai, dad, rl);
+          &quot;  omode=%d  pnum=%d  dai=%d  dad=%d  rl=%d  ru=%d\n\n&quot;,
+          path, rnum, bnum, apow, fpow, mt, opts, rcnum, xmsiz, omode, pnum, dai, dad, rl, ru);
   if(pnum &lt; 1) pnum = rnum;
   bool err = false;
   double stime = tctime();
@@ -718,36 +721,82 @@ static int procrcat(const char *path, int rnum, int bnum, int apow, int fpow,
     err = true;
   }
   for(int i = 1; i &lt;= rnum; i++){
-    char kbuf[RECBUFSIZ];
-    int ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
-    if(dai){
-      if(tchdbaddint(hdb, kbuf, ksiz, myrand(3)) == INT_MIN){
-        eprint(hdb, &quot;tchdbaddint&quot;);
-        err = true;
+    if(ru){
+      char fmt[RECBUFSIZ];
+      sprintf(fmt, &quot;%%0%dd&quot;, myrand(RECBUFSIZ));
+      char kbuf[RECBUFSIZ];
+      int ksiz = sprintf(kbuf, fmt, myrand(pnum));
+      switch(myrand(7)){
+      case 0:
+        if(!tchdbput(hdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(hdb, &quot;tchdbput&quot;);
+          err = true;
+        }
         break;
-      }
-    } else if(dad){
-      if(isnan(tchdbadddouble(hdb, kbuf, ksiz, myrand(3)))){
-        eprint(hdb, &quot;tchdbadddouble&quot;);
-        err = true;
+      case 1:
+        if(!tchdbputkeep(hdb, kbuf, ksiz, kbuf, ksiz) &amp;&amp; tchdbecode(hdb) != TCEKEEP){
+          eprint(hdb, &quot;tchdbputkeep&quot;);
+          err = true;
+        }
         break;
-      }
-    } else if(rl){
-      char vbuf[PATH_MAX];
-      int vsiz = myrand(PATH_MAX);
-      for(int j = 0; j &lt; vsiz; j++){
-        vbuf[j] = myrand(0x100);
-      }
-      if(!tchdbputcat(hdb, kbuf, ksiz, vbuf, vsiz)){
-        eprint(hdb, &quot;tchdbputcat&quot;);
-        err = true;
+      case 2:
+        if(!tchdbout(hdb, kbuf, ksiz) &amp;&amp; tchdbecode(hdb) != TCENOREC){
+          eprint(hdb, &quot;tchdbout&quot;);
+          err = true;
+        }
+        break;
+      case 3:
+        if(tchdbaddint(hdb, kbuf, ksiz, 1) == INT_MIN &amp;&amp; tchdbecode(hdb) != TCEKEEP){
+          eprint(hdb, &quot;tchdbaddint&quot;);
+          err = true;
+        }
+        break;
+      case 4:
+        if(isnan(tchdbadddouble(hdb, kbuf, ksiz, 1.0)) &amp;&amp; tchdbecode(hdb) != TCEKEEP){
+          eprint(hdb, &quot;tchdbadddouble&quot;);
+          err = true;
+        }
+        break;
+      default:
+        if(!tchdbputcat(hdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(hdb, &quot;tchdbputcat&quot;);
+          err = true;
+        }
         break;
       }
+      if(err) break;
     } else {
-      if(!tchdbputcat(hdb, kbuf, ksiz, kbuf, ksiz)){
-        eprint(hdb, &quot;tchdbputcat&quot;);
-        err = true;
-        break;
+      char kbuf[RECBUFSIZ];
+      int ksiz = sprintf(kbuf, &quot;%d&quot;, myrand(pnum));
+      if(dai){
+        if(tchdbaddint(hdb, kbuf, ksiz, myrand(3)) == INT_MIN){
+          eprint(hdb, &quot;tchdbaddint&quot;);
+          err = true;
+          break;
+        }
+      } else if(dad){
+        if(isnan(tchdbadddouble(hdb, kbuf, ksiz, myrand(30) / 10.0))){
+          eprint(hdb, &quot;tchdbadddouble&quot;);
+          err = true;
+          break;
+        }
+      } else if(rl){
+        char vbuf[PATH_MAX];
+        int vsiz = myrand(PATH_MAX);
+        for(int j = 0; j &lt; vsiz; j++){
+          vbuf[j] = myrand(0x100);
+        }
+        if(!tchdbputcat(hdb, kbuf, ksiz, vbuf, vsiz)){
+          eprint(hdb, &quot;tchdbputcat&quot;);
+          err = true;
+          break;
+        }
+      } else {
+        if(!tchdbputcat(hdb, kbuf, ksiz, kbuf, ksiz)){
+          eprint(hdb, &quot;tchdbputcat&quot;);
+          err = true;
+          break;
+        }
       }
     }
     if(rnum &gt; 250 &amp;&amp; i % (rnum / 250) == 0){
@@ -1764,13 +1813,27 @@ static int procwicked(const char *path, int rnum, bool mt, int opts, int omode){
   }
   if(rnum % 50 &gt; 0) iprintf(&quot; (%08d)\n&quot;, rnum);
   int inum = 0;
+  char *cbuf;
   int csiz;
-  char *cbuf = tchdbgetnext(hdb, NULL, -1, &amp;csiz);
+  if(myrand(2) == 0){
+    cbuf = tchdbgetnext(hdb, NULL, -1, &amp;csiz);
+  } else {
+    const char *cvbuf;
+    int cvsiz;
+    cbuf = tchdbgetnext3(hdb, NULL, -1, &amp;csiz, &amp;cvbuf, &amp;cvsiz);
+  }
   while(cbuf){
     inum++;
     iputchar(':');
     int nsiz;
-    char *nbuf = tchdbgetnext(hdb, cbuf, csiz, &amp;nsiz);
+    char *nbuf;
+    if(myrand(2) == 0){
+      nbuf = tchdbgetnext(hdb, cbuf, csiz, &amp;nsiz);
+    } else {
+      const char *cvbuf;
+      int cvsiz;
+      nbuf = tchdbgetnext3(hdb, cbuf, csiz, &amp;nsiz, &amp;cvbuf, &amp;cvsiz);
+    }
     tcfree(cbuf);
     cbuf = nbuf;
     csiz = nsiz;</diff>
      <filename>tchtest.c</filename>
    </modified>
    <modified>
      <diff>@@ -275,7 +275,7 @@ static int runmime(int argc, char **argv){
         bd = true;
       } else if(!strcmp(argv[i], &quot;-part&quot;)){
         if(++i &gt;= argc) usage();
-        part = tcatoi(argv[i]);
+        part = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -577,7 +577,7 @@ static int runhash(int argc, char **argv){
         crc = true;
       } else if(!strcmp(argv[i], &quot;-ch&quot;)){
         if(++i &gt;= argc) usage();
-        ch = tcatoi(argv[i]);
+        ch = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -618,7 +618,7 @@ static int rundate(int argc, char **argv){
         str = argv[i];
       } else if(!strcmp(argv[i], &quot;-jl&quot;)){
         if(++i &gt;= argc) usage();
-        jl = tcatoi(argv[i]);
+        jl = tcatoix(argv[i]);
       } else if(!strcmp(argv[i], &quot;-wf&quot;)){
         wf = true;
       } else if(!strcmp(argv[i], &quot;-rf&quot;)){
@@ -1047,6 +1047,7 @@ static int procconf(int mode){
     break;
   default:
     printf(&quot;myconf(version): %s\n&quot;, tcversion);
+    printf(&quot;myconf(sysname): %s\n&quot;, TCSYSNAME);
     printf(&quot;myconf(libver): %d\n&quot;, _TC_LIBVER);
     printf(&quot;myconf(formatver): %s\n&quot;, _TC_FORMATVER);
     printf(&quot;myconf(prefix): %s\n&quot;, _TC_PREFIX);</diff>
      <filename>tcucodec.c</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 #include &lt;tcutil.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 typedef struct {                         // type of structure for combo thread
   TCMDB *mdb;
@@ -151,10 +151,10 @@ static int runcombo(int argc, char **argv){
     }
   }
   if(!tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
   int rv = proccombo(tnum, rnum, bnum, tr, rnd);
   return rv;
 }
@@ -176,7 +176,7 @@ static int runtypical(int argc, char **argv){
         nc = true;
       } else if(!strcmp(argv[i], &quot;-rr&quot;)){
         if(++i &gt;= argc) usage();
-        rratio = tcatoi(argv[i]);
+        rratio = tcatoix(argv[i]);
       } else {
         usage();
       }
@@ -191,10 +191,10 @@ static int runtypical(int argc, char **argv){
     }
   }
   if(!tstr || !rstr) usage();
-  int tnum = tcatoi(tstr);
-  int rnum = tcatoi(rstr);
+  int tnum = tcatoix(tstr);
+  int rnum = tcatoix(rstr);
   if(tnum &lt; 1 || rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
   int rv = proctypical(tnum, rnum, bnum, tr, nc, rratio);
   return rv;
 }</diff>
      <filename>tcumttest.c</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 #include &lt;tcutil.h&gt;
 #include &quot;myconf.h&quot;
 
-#define RECBUFSIZ      32                // buffer for records
+#define RECBUFSIZ      48                // buffer for records
 
 
 /* global variables */
@@ -145,7 +145,7 @@ static int runxstr(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procxstr(rnum);
   return rv;
@@ -173,9 +173,9 @@ static int runlist(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int anum = astr ? tcatoi(astr) : -1;
+  int anum = astr ? tcatoix(astr) : -1;
   int rv = proclist(rnum, anum, rd);
   return rv;
 }
@@ -217,9 +217,9 @@ static int runmap(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
   int rv = procmap(rnum, bnum, rd, tr, rnd, dmode);
   return rv;
 }
@@ -258,7 +258,7 @@ static int runtree(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = proctree(rnum, rd, tr, rnd, dmode);
   return rv;
@@ -301,9 +301,9 @@ static int runmdb(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
-  int bnum = bstr ? tcatoi(bstr) : -1;
+  int bnum = bstr ? tcatoix(bstr) : -1;
   int rv = procmdb(rnum, bnum, rd, tr, rnd, dmode);
   return rv;
 }
@@ -342,7 +342,7 @@ static int runndb(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procndb(rnum, rd, tr, rnd, dmode);
   return rv;
@@ -362,7 +362,7 @@ static int runmisc(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procmisc(rnum);
   return rv;
@@ -382,7 +382,7 @@ static int runwicked(int argc, char **argv){
     }
   }
   if(!rstr) usage();
-  int rnum = tcatoi(rstr);
+  int rnum = tcatoix(rstr);
   if(rnum &lt; 1) usage();
   int rv = procwicked(rnum);
   return rv;
@@ -800,12 +800,39 @@ static int procmisc(int rnum){
           if(dary[j] != dary[j]) err = true;
         }
       }
+      list = tclistnew3(&quot;hop&quot;, &quot;step&quot;, &quot;jump&quot;, &quot;touchdown&quot;, NULL);
+      if(tclistnum(list) != 4) err = true;
+      tclistdel(list);
+      map = tcmapnew3(&quot;hop&quot;, &quot;step&quot;, &quot;jump&quot;, &quot;touchdown&quot;, NULL);
+      if(tcmaprnum(map) != 2) err = true;
+      tcmapdel(map);
       list = tcstrsplit(&quot;,a,b..c,d,&quot;, &quot;,.&quot;);
       if(tclistnum(list) != 7) err = true;
       buf = tcstrjoin(list, ':');
       if(strcmp(buf, &quot;:a:b::c:d:&quot;)) err = true;
       tcfree(buf);
       tclistdel(list);
+      char zbuf[RECBUFSIZ];
+      memcpy(zbuf, &quot;abc\0def\0ghij\0kl\0m&quot;, 17);
+      list = tcstrsplit2(zbuf, 17);
+      if(tclistnum(list) != 5) err = true;
+      buf = tcstrjoin2(list, &amp;bsiz);
+      if(bsiz != 17 || memcmp(buf, &quot;abc\0def\0ghij\0kl\0m&quot;, 17)) err = true;
+      tcfree(buf);
+      tclistdel(list);
+      map = tcstrsplit3(&quot;abc.def,ghij.kl,&quot;, &quot;,.&quot;);
+      if(tcmaprnum(map) != 2) err = true;
+      buf = tcstrjoin3(map, ':');
+      if(strcmp(buf, &quot;abc:def:ghij:kl&quot;)) err = true;
+      tcfree(buf);
+      tcmapdel(map);
+      memcpy(zbuf, &quot;abc\0def\0ghij\0kl\0m&quot;, 17);
+      map = tcstrsplit4(zbuf, 17);
+      if(tcmaprnum(map) != 2) err = true;
+      buf = tcstrjoin4(map, &amp;bsiz);
+      if(bsiz != 15 || memcmp(buf, &quot;abc\0def\0ghij\0kl&quot;, 15)) err = true;
+      tcfree(buf);
+      tcmapdel(map);
       if(!tcregexmatch(&quot;ABCDEFGHI&quot;, &quot;*(b)c[d-f]*g(h)&quot;)) err = true;
       buf = tcregexreplace(&quot;ABCDEFGHI&quot;, &quot;*(b)c[d-f]*g(h)&quot;, &quot;[\\1][\\2][&amp;]&quot;);
       if(strcmp(buf, &quot;A[B][H][BCDEFGH]I&quot;)) err = true;</diff>
      <filename>tcutest.c</filename>
    </modified>
    <modified>
      <diff>@@ -423,6 +423,23 @@ TCLIST *tclistnew2(int anum){
 }
 
 
+/* Create a list object with initial string elements. */
+TCLIST *tclistnew3(const char *str, ...){
+  TCLIST *list = tclistnew();
+  if(str){
+    tclistpush2(list, str);
+    va_list ap;
+    va_start(ap, str);
+    const char *elem;
+    while((elem = va_arg(ap, char *)) != NULL){
+      tclistpush2(list, elem);
+    }
+    va_end(ap);
+  }
+  return list;
+}
+
+
 /* Copy a list object. */
 TCLIST *tclistdup(const TCLIST *list){
   assert(list);
@@ -900,6 +917,21 @@ void tclistsortex(TCLIST *list, int (*cmp)(const TCLISTDATUM *, const TCLISTDATU
 }
 
 
+/* Invert elements of a list object. */
+void tclistinvert(TCLIST *list){
+  assert(list);
+  TCLISTDATUM *top = list-&gt;array + list-&gt;start;
+  TCLISTDATUM *bot = top + list-&gt;num - 1;
+  while(top &lt; bot){
+    TCLISTDATUM swap = *top;
+    *top = *bot;
+    *bot = swap;
+    top++;
+    bot--;
+  }
+}
+
+
 
 /*************************************************************************************************
  * hash map
@@ -964,6 +996,28 @@ TCMAP *tcmapnew2(uint32_t bnum){
 }
 
 
+/* Create a map object with initial string elements. */
+TCMAP *tcmapnew3(const char *str, ...){
+  TCMAP *map = tcmapnew2(31);
+  if(str){
+    va_list ap;
+    va_start(ap, str);
+    const char *key = str;
+    const char *elem;
+    while((elem = va_arg(ap, char *)) != NULL){
+      if(key){
+        tcmapput2(map, key, elem);
+        key = NULL;
+      } else {
+        key = elem;
+      }
+    }
+    va_end(ap);
+  }
+  return map;
+}
+
+
 /* Copy a map object. */
 TCMAP *tcmapdup(const TCMAP *map){
   assert(map);
@@ -1647,7 +1701,7 @@ void *tcmapdump(const TCMAP *map, int *sp){
 /* Create a map object from a serialized byte array. */
 TCMAP *tcmapload(const void *ptr, int size){
   assert(ptr &amp;&amp; size &gt;= 0);
-  TCMAP *map = tcmapnew();
+  TCMAP *map = tcmapnew2(tclmin(size / 6 + 1, TCMAPBNUM));
   const char *rp = ptr;
   const char *ep = (char *)ptr + size;
   while(rp &lt; ep){
@@ -4590,7 +4644,7 @@ TCLIST *tcstrsplit(const char *str, const char *delims){
 
 
 /* Create a string by joining all elements of a list object. */
-char *tcstrjoin(TCLIST *list, char delim){
+char *tcstrjoin(const TCLIST *list, char delim){
   assert(list);
   int num = TCLISTNUM(list);
   int size = num + 1;
@@ -4612,9 +4666,30 @@ char *tcstrjoin(TCLIST *list, char delim){
 }
 
 
-/* Convert a string with a metric prefix to an integer. */
+/* Convert a string to an integer. */
 int64_t tcatoi(const char *str){
   assert(str);
+  while(*str &gt; '\0' &amp;&amp; *str &lt;= ' '){
+    str++;
+  }
+  int sign = 1;
+  int64_t num = 0;
+  if(*str == '-'){
+    str++;
+    sign = -1;
+  }
+  while(*str != '\0'){
+    if(*str &lt; '0' || *str &gt; '9') break;
+    num = num * 10 + *str - '0';
+    str++;
+  }
+  return num *= sign;
+}
+
+
+/* Convert a string with a metric prefix to an integer. */
+int64_t tcatoix(const char *str){
+  assert(str);
   char *end;
   long double val = strtold(str, &amp;end);
   int inf = isinf(val);
@@ -5128,6 +5203,188 @@ static time_t tcmkgmtime(struct tm *tm){
 
 
 /*************************************************************************************************
+ * miscellaneous utilities (for experts)
+ *************************************************************************************************/
+
+
+/* Create a list object by splitting a region by zero code. */
+TCLIST *tcstrsplit2(const void *ptr, int size){
+  assert(ptr &amp;&amp; size &gt;= 0);
+  TCLIST *list = tclistnew();
+  while(size &gt;= 0){
+    const char *rp = ptr;
+    const char *ep = (const char *)ptr + size;
+    while(rp &lt; ep){
+      if(*rp == '\0') break;
+      rp++;
+    }
+    TCLISTPUSH(list, ptr, rp - (const char *)ptr);
+    rp++;
+    size -= rp - (const char *)ptr;
+    ptr = rp;
+  }
+  return list;
+}
+
+
+/* Create a map object by splitting a string. */
+TCMAP *tcstrsplit3(const char *str, const char *delims){
+  assert(str &amp;&amp; delims);
+  TCMAP *map = tcmapnew2(31);
+  const char *kbuf = NULL;
+  int ksiz = 0;
+  while(true){
+    const char *sp = str;
+    while(*str != '\0' &amp;&amp; !strchr(delims, *str)){
+      str++;
+    }
+    if(kbuf){
+      tcmapput(map, kbuf, ksiz, sp, str - sp);
+      kbuf = NULL;
+    } else {
+      kbuf = sp;
+      ksiz = str - sp;
+    }
+    if(*str == '\0') break;
+    str++;
+  }
+  return map;
+}
+
+
+/* Create a map object by splitting a region by zero code. */
+TCMAP *tcstrsplit4(const void *ptr, int size){
+  assert(ptr &amp;&amp; size &gt;= 0);
+  TCMAP *map = tcmapnew2(tclmin(size / 6 + 1, TCMAPBNUM));
+  const char *kbuf = NULL;
+  int ksiz = 0;
+  while(size &gt;= 0){
+    const char *rp = ptr;
+    const char *ep = (const char *)ptr + size;
+    while(rp &lt; ep){
+      if(*rp == '\0') break;
+      rp++;
+    }
+    if(kbuf){
+      tcmapput(map, kbuf, ksiz, ptr, rp - (const char *)ptr);
+      kbuf = NULL;
+    } else {
+      kbuf = ptr;
+      ksiz = rp - (const char *)ptr;
+    }
+    rp++;
+    size -= rp - (const char *)ptr;
+    ptr = rp;
+  }
+  return map;
+}
+
+
+/* Create a region separated by zero code by joining all elements of a list object. */
+void *tcstrjoin2(const TCLIST *list, int *sp){
+  assert(list &amp;&amp; sp);
+  int num = TCLISTNUM(list);
+  int size = num + 1;
+  for(int i = 0; i &lt; num; i++){
+    size += TCLISTVALSIZ(list, i);
+  }
+  char *buf;
+  TCMALLOC(buf, size);
+  char *wp = buf;
+  for(int i = 0; i &lt; num; i++){
+    if(i &gt; 0) *(wp++) = '\0';
+    int vsiz;
+    const char *vbuf = tclistval(list, i, &amp;vsiz);
+    memcpy(wp, vbuf, vsiz);
+    wp += vsiz;
+  }
+  *wp = '\0';
+  *sp = wp - buf;
+  return buf;
+}
+
+
+/* Create a string by joining all records of a map object. */
+char *tcstrjoin3(const TCMAP *map, char delim){
+  assert(map);
+  int num = (int)TCMAPRNUM(map);
+  int size = num * 2 + 1;
+  TCMAPREC *cur = map-&gt;cur;
+  tcmapiterinit((TCMAP *)map);
+  const char *kbuf;
+  int ksiz;
+  while((kbuf = tcmapiternext((TCMAP *)map, &amp;ksiz)) != NULL){
+    int vsiz;
+    tcmapiterval(kbuf, &amp;vsiz);
+    size += ksiz + vsiz;
+  }
+  char *buf;
+  TCMALLOC(buf, size);
+  char *wp = buf;
+  tcmapiterinit((TCMAP *)map);
+  bool first = true;
+  while((kbuf = tcmapiternext((TCMAP *)map, &amp;ksiz)) != NULL){
+    if(first){
+      first = false;
+    } else {
+      *(wp++) = delim;
+    }
+    memcpy(wp, kbuf, ksiz);
+    wp += ksiz;
+    int vsiz;
+    const char *vbuf = tcmapiterval(kbuf, &amp;vsiz);
+    *(wp++) = delim;
+    memcpy(wp, vbuf, vsiz);
+    wp += vsiz;
+  }
+  *wp = '\0';
+  ((TCMAP *)map)-&gt;cur = cur;
+  return buf;
+}
+
+
+/* Create a region separated by zero code by joining all records of a map object. */
+void *tcstrjoin4(const TCMAP *map, int *sp){
+  assert(map &amp;&amp; sp);
+  int num = (int)TCMAPRNUM(map);
+  int size = num * 2 + 1;
+  TCMAPREC *cur = map-&gt;cur;
+  tcmapiterinit((TCMAP *)map);
+  const char *kbuf;
+  int ksiz;
+  while((kbuf = tcmapiternext((TCMAP *)map, &amp;ksiz)) != NULL){
+    int vsiz;
+    tcmapiterval(kbuf, &amp;vsiz);
+    size += ksiz + vsiz;
+  }
+  char *buf;
+  TCMALLOC(buf, size);
+  char *wp = buf;
+  tcmapiterinit((TCMAP *)map);
+  bool first = true;
+  while((kbuf = tcmapiternext((TCMAP *)map, &amp;ksiz)) != NULL){
+    if(first){
+      first = false;
+    } else {
+      *(wp++) = '\0';
+    }
+    memcpy(wp, kbuf, ksiz);
+    wp += ksiz;
+    int vsiz;
+    const char *vbuf = tcmapiterval(kbuf, &amp;vsiz);
+    *(wp++) = '\0';
+    memcpy(wp, vbuf, vsiz);
+    wp += vsiz;
+  }
+  *wp = '\0';
+  *sp = wp - buf;
+  ((TCMAP *)map)-&gt;cur = cur;
+  return buf;
+}
+
+
+
+/*************************************************************************************************
  * filesystem utilities
  *************************************************************************************************/
 
@@ -6957,9 +7214,12 @@ int tccmplexical(const char *aptr, int asiz, const char *bptr, int bsiz, void *o
 /* Compare two keys as decimal strings of real numbers. */
 int tccmpdecimal(const char *aptr, int asiz, const char *bptr, int bsiz, void *op){
   assert(aptr &amp;&amp; asiz &gt;= 0 &amp;&amp; bptr &amp;&amp; bsiz &gt;= 0);
-  int sign;
   int64_t anum = 0;
-  sign = 1;
+  int sign = 1;
+  while(asiz &gt; 0 &amp;&amp; *aptr &gt; '\0' &amp;&amp; *aptr &lt;= ' '){
+    aptr++;
+    asiz--;
+  }
   if(asiz &gt; 0 &amp;&amp; *aptr == '-'){
     aptr++;
     asiz--;
@@ -6967,12 +7227,16 @@ int tccmpdecimal(const char *aptr, int asiz, const char *bptr, int bsiz, void *o
   }
   for(int i = 0; i &lt; asiz; i++){
     int c = aptr[i];
-    if(c &lt; '0' || c &gt; '9') continue;
+    if(c &lt; '0' || c &gt; '9') break;
     anum = anum * 10 + c - '0';
   }
   anum *= sign;
   int64_t bnum = 0;
   sign = 1;
+  while(bsiz &gt; 0 &amp;&amp; *bptr &gt; '\0' &amp;&amp; *bptr &lt;= ' '){
+    bptr++;
+    bsiz--;
+  }
   if(bsiz &gt; 0 &amp;&amp; *bptr == '-'){
     bptr++;
     bsiz--;
@@ -6980,11 +7244,15 @@ int tccmpdecimal(const char *aptr, int asiz, const char *bptr, int bsiz, void *o
   }
   for(int i = 0; i &lt; bsiz; i++){
     int c = bptr[i];
-    if(c &lt; '0' || c &gt; '9') continue;
+    if(c &lt; '0' || c &gt; '9') break;
     bnum = bnum * 10 + c - '0';
   }
   bnum *= sign;
-  return (anum &lt; bnum) ? -1 : anum &gt; bnum;
+  if(anum &lt; bnum) return -1;
+  if(anum &gt; bnum) return 1;
+  int rv;
+  TCCMPLEXICAL(rv, aptr, asiz, bptr, bsiz);
+  return rv;
 }
 
 
@@ -7239,6 +7507,25 @@ char *tcbwtdecode(const char *ptr, int size, int idx){
 }
 
 
+/* Get the binary logarithm of an integer. */
+long tclog2l(long num){
+  if(num &lt;= 1) return 0;
+  num &gt;&gt;= 1;
+  long rv = 0;
+  while(num &gt; 0){
+    rv++;
+    num &gt;&gt;= 1;
+  }
+  return rv;
+}
+
+
+/* Get the binary logarithm of a real number. */
+double tclog2d(double num){
+  return log(num) / log(2);
+}
+
+
 /* Get the aligned offset of a file offset. */
 uint64_t tcpagealign(uint64_t off){
   int ps = sysconf(_SC_PAGESIZE);</diff>
      <filename>tcutil.c</filename>
    </modified>
    <modified>
      <diff>@@ -297,6 +297,13 @@ TCLIST *tclistnew(void);
 TCLIST *tclistnew2(int anum);
 
 
+/* Create a list object with initial string elements.
+   `str' specifies the string of the first element.
+   The other arguments are other elements.  They should be trailed by a `NULL' argument.
+   The return value is the new list object. */
+TCLIST *tclistnew3(const char *str, ...);
+
+
 /* Copy a list object.
    `list' specifies the list object.
    The return value is the new list object equivalent to the specified object. */
@@ -538,6 +545,11 @@ void tclistsortci(TCLIST *list);
 void tclistsortex(TCLIST *list, int (*cmp)(const TCLISTDATUM *, const TCLISTDATUM *));
 
 
+/* Invert elements of a list object.
+   `list' specifies the list object. */
+void tclistinvert(TCLIST *list);
+
+
 
 /*************************************************************************************************
  * hash map
@@ -576,6 +588,14 @@ TCMAP *tcmapnew(void);
 TCMAP *tcmapnew2(uint32_t bnum);
 
 
+/* Create a map object with initial string elements.
+   `str' specifies the string of the first element.
+   The other arguments are other elements.  They should be trailed by a `NULL' argument.
+   The return value is the new map object.
+   The key and the value of each record are situated one after the other. */
+TCMAP *tcmapnew3(const char *str, ...);
+
+
 /* Copy a map object.
    `map' specifies the map object.
    The return value is the new map object equivalent to the specified object. */
@@ -2221,8 +2241,8 @@ void tcstrucstoutf(const uint16_t *ary, int num, char *str);
    `delim' specifies a string containing delimiting characters.
    The return value is a list object of the split elements.
    If two delimiters are successive, it is assumed that an empty element is between the two.
-   Because the object of the return value is created with the function `tclistnew', it should
-   be deleted with the function `tclistdel' when it is no longer in use. */
+   Because the object of the return value is created with the function `tclistnew', it should be
+   deleted with the function `tclistdel' when it is no longer in use. */
 TCLIST *tcstrsplit(const char *str, const char *delims);
 
 
@@ -2232,7 +2252,15 @@ TCLIST *tcstrsplit(const char *str, const char *delims);
    The return value is the result string.
    Because the region of the return value is allocated with the `malloc' call, it should be
    released with the `free' call when it is no longer in use. */
-char *tcstrjoin(TCLIST *list, char delim);
+char *tcstrjoin(const TCLIST *list, char delim);
+
+
+/* Convert a string to an integer.
+   `str' specifies a string.
+   The return value is the integer.  If the string does not contain numeric expression, 0 is
+   returned.
+   This function is equivalent to `atoll' except that it does not depend on the locale. */
+int64_t tcatoi(const char *str);
 
 
 /* Convert a string with a metric prefix to an integer.
@@ -2241,7 +2269,7 @@ char *tcstrjoin(TCLIST *list, char delim);
    The return value is the integer.  If the string does not contain numeric expression, 0 is
    returned.  If the integer overflows the domain, `INT64_MAX' or `INT64_MIN' is returned
    according to the sign. */
-int64_t tcatoi(const char *str);
+int64_t tcatoix(const char *str);
 
 
 /* Check whether a string matches a regular expression.
@@ -2368,6 +2396,73 @@ int tcdayofweek(int year, int mon, int day);
 
 
 /*************************************************************************************************
+ * miscellaneous utilities (for experts)
+ *************************************************************************************************/
+
+
+/* Create a list object by splitting a region by zero code.
+   `ptr' specifies the pointer to the region.
+   `size' specifies the size of the region.
+   The return value is a list object of the split elements.
+   If two delimiters are successive, it is assumed that an empty element is between the two.
+   Because the object of the return value is created with the function `tclistnew', it should be
+   deleted with the function `tclistdel' when it is no longer in use. */
+TCLIST *tcstrsplit2(const void *ptr, int size);
+
+
+/* Create a map object by splitting a string.
+   `str' specifies the source string where the key and the value of each record are situated one
+   after the other.
+   `delim' specifies a string containing delimiting characters.
+   The return value is a map object of the split records.
+   Because the object of the return value is created with the function `tcmapnew', it should be
+   deleted with the function `tcmapdel' when it is no longer in use. */
+TCMAP *tcstrsplit3(const char *str, const char *delims);
+
+
+/* Create a map object by splitting a region by zero code.
+   `ptr' specifies the pointer to the region where the key and the value of each record are
+   situated one after the other.
+   `size' specifies the size of the region.
+   The return value is a map object of the split records.
+   Because the object of the return value is created with the function `tcmapnew', it should be
+   deleted with the function `tcmapdel' when it is no longer in use. */
+TCMAP *tcstrsplit4(const void *ptr, int size);
+
+
+/* Create a region separated by zero code by joining all elements of a list object.
+   `list' specifies a list object.
+   The return value is the result region.
+   `sp' specifies the pointer to the variable into which the size of the region of the return
+   value is assigned.
+   Because the region of the return value is allocated with the `malloc' call, it should be
+   released with the `free' call when it is no longer in use. */
+void *tcstrjoin2(const TCLIST *list, int *sp);
+
+
+/* Create a string by joining all records of a map object.
+   `map' specifies a map object.
+   `delim' specifies a delimiting character.
+   The return value is the result string where the key and the value of each record are situated
+   one after the other.
+   Because the region of the return value is allocated with the `malloc' call, it should be
+   released with the `free' call when it is no longer in use. */
+char *tcstrjoin3(const TCMAP *map, char delim);
+
+
+/* Create a region separated by zero code by joining all records of a map object.
+   `list' specifies a list object.
+   The return value is the result region, where the key and the value of each record are
+   situated one after the other.
+   `sp' specifies the pointer to the variable into which the size of the region of the return
+   value is assigned.
+   Because the region of the return value is allocated with the `malloc' call, it should be
+   released with the `free' call when it is no longer in use. */
+void *tcstrjoin4(const TCMAP *map, int *sp);
+
+
+
+/*************************************************************************************************
  * filesystem utilities
  *************************************************************************************************/
 
@@ -3060,8 +3155,8 @@ typedef struct {                         /* type of structure for a bit stream o
 
 #include &lt;stdio.h&gt;
 
-#define _TC_VERSION    &quot;1.3.27&quot;
-#define _TC_LIBVER     704
+#define _TC_VERSION    &quot;1.4.0&quot;
+#define _TC_LIBVER     705
 #define _TC_FORMATVER  &quot;1.0&quot;
 
 enum {                                   /* enumeration for error codes */
@@ -3094,7 +3189,8 @@ enum {                                   /* enumeration for error codes */
 enum {                                   /* enumeration for database type */
   TCDBTHASH,                             /* hash table */
   TCDBTBTREE,                            /* B+ tree */
-  TCDBTFIXED                             /* fixed-length */
+  TCDBTFIXED,                            /* fixed-length */
+  TCDBTTABLE                             /* table */
 };
 
 
@@ -3217,6 +3313,18 @@ char *tcbwtencode(const char *ptr, int size, int *idxp);
 char *tcbwtdecode(const char *ptr, int size, int idx);
 
 
+/* Get the binary logarithm of an integer.
+   `num' specifies an integer.
+   The return value is the binary logarithm. */
+long tclog2l(long num);
+
+
+/* Get the binary logarithm of a real number.
+   `num' specifies a real number.
+   The return value is the binary logarithm. */
+double tclog2d(double num);
+
+
 /* Get the aligned offset of a file offset.
    `off' specifies the file offset.
    The return value is the aligned offset. */</diff>
      <filename>tcutil.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cb9f7b515b9cfd162d8be689bdf3bda09116313a</id>
    </parent>
  </parents>
  <author>
    <name>Bob Ippolito</name>
    <email>bob@redivi.com</email>
  </author>
  <url>http://github.com/etrepum/tokyo-cabinet/commit/984bfcff16a1673c8f97cde053dbad6e4ba1fc84</url>
  <id>984bfcff16a1673c8f97cde053dbad6e4ba1fc84</id>
  <committed-date>2009-01-18T19:05:11-08:00</committed-date>
  <authored-date>2009-01-18T19:05:11-08:00</authored-date>
  <message>sync with tokyocabinet-1.4.0.tar.gz</message>
  <tree>9aa978d2d14015205ae9ca4f1ac2b2b1d3be712e</tree>
  <committer>
    <name>Bob Ippolito</name>
    <email>bob@redivi.com</email>
  </committer>
</commit>
