heroku-tokyotyrant 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -0
- data/README.rdoc +231 -0
- data/Rakefile +72 -0
- data/benchmarks/balancer.rb +101 -0
- data/benchmarks/bulk_db.rb +74 -0
- data/benchmarks/bulk_table.rb +87 -0
- data/benchmarks/db.rb +114 -0
- data/benchmarks/table.rb +161 -0
- data/ext/extconf.rb +43 -0
- data/ext/tokyo/bin/tcamgr +0 -0
- data/ext/tokyo/bin/tcamttest +0 -0
- data/ext/tokyo/bin/tcatest +0 -0
- data/ext/tokyo/bin/tcbmgr +0 -0
- data/ext/tokyo/bin/tcbmttest +0 -0
- data/ext/tokyo/bin/tcbtest +0 -0
- data/ext/tokyo/bin/tcfmgr +0 -0
- data/ext/tokyo/bin/tcfmttest +0 -0
- data/ext/tokyo/bin/tcftest +0 -0
- data/ext/tokyo/bin/tchmgr +0 -0
- data/ext/tokyo/bin/tchmttest +0 -0
- data/ext/tokyo/bin/tchtest +0 -0
- data/ext/tokyo/bin/tcrmgr +0 -0
- data/ext/tokyo/bin/tcrmttest +0 -0
- data/ext/tokyo/bin/tcrtest +0 -0
- data/ext/tokyo/bin/tctmgr +0 -0
- data/ext/tokyo/bin/tctmttest +0 -0
- data/ext/tokyo/bin/tcttest +0 -0
- data/ext/tokyo/bin/tcucodec +0 -0
- data/ext/tokyo/bin/tcumttest +0 -0
- data/ext/tokyo/bin/tcutest +0 -0
- data/ext/tokyo/bin/ttserver +0 -0
- data/ext/tokyo/bin/ttulmgr +0 -0
- data/ext/tokyo/bin/ttultest +0 -0
- data/ext/tokyo/include/tcadb.h +548 -0
- data/ext/tokyo/include/tcbdb.h +1101 -0
- data/ext/tokyo/include/tcfdb.h +858 -0
- data/ext/tokyo/include/tchdb.h +871 -0
- data/ext/tokyo/include/tcrdb.h +801 -0
- data/ext/tokyo/include/tctdb.h +1086 -0
- data/ext/tokyo/include/tculog.h +392 -0
- data/ext/tokyo/include/tcutil.h +4184 -0
- data/ext/tokyo/include/ttutil.h +494 -0
- data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.a +0 -0
- data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.a +0 -0
- data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
- data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
- data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
- data/ext/tokyo/lib/ttskeldir.bundle +0 -0
- data/ext/tokyo/lib/ttskelmock.bundle +0 -0
- data/ext/tokyo/lib/ttskelnull.bundle +0 -0
- data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
- data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
- data/ext/tokyo/sbin/ttservctl +163 -0
- data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
- data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
- data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
- data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
- data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
- data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
- data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
- data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
- data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
- data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
- data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
- data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
- data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
- data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
- data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
- data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
- data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
- data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
- data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
- data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
- data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
- data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
- data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
- data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
- data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
- data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
- data/ext/tokyo/share/man/man3/tclist.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
- data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
- data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
- data/ext/tokyo/share/man/man3/tctree.3 +1 -0
- data/ext/tokyo/share/man/man3/tculog.3 +15 -0
- data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
- data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
- data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
- data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
- data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
- data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
- data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
- data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
- data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
- data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
- data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
- data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
- data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
- data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
- data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
- data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
- data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
- data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
- data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
- data/ext/tokyo_tyrant.c +147 -0
- data/ext/tokyo_tyrant.h +48 -0
- data/ext/tokyo_tyrant_db.c +227 -0
- data/ext/tokyo_tyrant_db.h +8 -0
- data/ext/tokyo_tyrant_module.c +453 -0
- data/ext/tokyo_tyrant_module.h +10 -0
- data/ext/tokyo_tyrant_query.c +226 -0
- data/ext/tokyo_tyrant_query.h +9 -0
- data/ext/tokyo_tyrant_table.c +319 -0
- data/ext/tokyo_tyrant_table.h +8 -0
- data/ext/tokyocabinet-1.4.41/COPYING +504 -0
- data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
- data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
- data/ext/tokyocabinet-1.4.41/README +38 -0
- data/ext/tokyocabinet-1.4.41/THANKS +12 -0
- data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
- data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
- data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
- data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
- data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
- data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
- data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
- data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
- data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
- data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
- data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
- data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
- data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
- data/ext/tokyocabinet-1.4.41/configure +7402 -0
- data/ext/tokyocabinet-1.4.41/configure.in +362 -0
- data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
- data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
- data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
- data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
- data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
- data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
- data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
- data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
- data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
- data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
- data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
- data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
- data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
- data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
- data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
- data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
- data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
- data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
- data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
- data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
- data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
- data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
- data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
- data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
- data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
- data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
- data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
- data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
- data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
- data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
- data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
- data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
- data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
- data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
- data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
- data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
- data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
- data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
- data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
- data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
- data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
- data/ext/tokyocabinet-1.4.41/md5.c +381 -0
- data/ext/tokyocabinet-1.4.41/md5.h +101 -0
- data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
- data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
- data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
- data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
- data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
- data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
- data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
- data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
- data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
- data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
- data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
- data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
- data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
- data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
- data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
- data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
- data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
- data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
- data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
- data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
- data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
- data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
- data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
- data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
- data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
- data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
- data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
- data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
- data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/COPYING +504 -0
- data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
- data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
- data/ext/tokyotyrant-1.1.39/README +38 -0
- data/ext/tokyotyrant-1.1.39/THANKS +15 -0
- data/ext/tokyotyrant-1.1.39/configure +6979 -0
- data/ext/tokyotyrant-1.1.39/configure.in +300 -0
- data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
- data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
- data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
- data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
- data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
- data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
- data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
- data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
- data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
- data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
- data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
- data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
- data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
- data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
- data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
- data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
- data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
- data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
- data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
- data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
- data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
- data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
- data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
- data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
- data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
- data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
- data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
- data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
- data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
- data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
- data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
- data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
- data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
- data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
- data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
- data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
- data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
- data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
- data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
- data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
- data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
- data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
- data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
- data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
- data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
- data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
- data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
- data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
- data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
- data/lib/tokyo_tyrant/balancer.rb +189 -0
- data/spec/ext.lua +4 -0
- data/spec/plu_db.rb +538 -0
- data/spec/spec.rb +1 -0
- data/spec/spec_base.rb +17 -0
- data/spec/start_tyrants.sh +36 -0
- data/spec/stop_tyrants.sh +9 -0
- data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
- data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
- data/spec/tokyo_tyrant_query_spec.rb +159 -0
- data/spec/tokyo_tyrant_spec.rb +254 -0
- data/spec/tokyo_tyrant_table_spec.rb +301 -0
- metadata +402 -0
Binary file
|
Binary file
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# Makefile for sample programs of Tokyo Cabinet
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
#================================================================
|
6
|
+
# Setting Variables
|
7
|
+
#================================================================
|
8
|
+
|
9
|
+
|
10
|
+
# Generic settings
|
11
|
+
SHELL = /bin/sh
|
12
|
+
|
13
|
+
# Targets
|
14
|
+
MYBINS = tcutilex tchdbex tcbdbex tcfdbex tctdbex tcadbex tctchat.cgi tctsearch.cgi
|
15
|
+
|
16
|
+
# Building binaries
|
17
|
+
CC = gcc
|
18
|
+
CFLAGS = -I. -I.. -ansi -Wall -pedantic -fsigned-char -O2
|
19
|
+
C99FLAGS = -I. -I.. -std=c99 -Wall -pedantic -fsigned-char -O2
|
20
|
+
LDFLAGS =
|
21
|
+
LIBS = -L. -L.. -ltokyocabinet -lz -lbz2 -lpthread -lm -lc
|
22
|
+
LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:..
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
#================================================================
|
27
|
+
# Suffix rules
|
28
|
+
#================================================================
|
29
|
+
|
30
|
+
|
31
|
+
.SUFFIXES :
|
32
|
+
.SUFFIXES : .c .o
|
33
|
+
|
34
|
+
.c.o :
|
35
|
+
$(CC) -c $(CFLAGS) $<
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
#================================================================
|
40
|
+
# Actions
|
41
|
+
#================================================================
|
42
|
+
|
43
|
+
|
44
|
+
all : $(MYBINS)
|
45
|
+
|
46
|
+
|
47
|
+
clean :
|
48
|
+
rm -rf $(MYBINS) *.exe *.o a.out check.out gmon.out leak.log casket* *.tct *.idx.* *~
|
49
|
+
|
50
|
+
|
51
|
+
static :
|
52
|
+
make LDFLAGS="$(LDFLAGS) -static"
|
53
|
+
|
54
|
+
|
55
|
+
.PHONY : all clean static tctchat.tct tctsearch.tct
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
#================================================================
|
60
|
+
# Building binaries
|
61
|
+
#================================================================
|
62
|
+
|
63
|
+
|
64
|
+
tcutilex : tcutilex.o
|
65
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
66
|
+
|
67
|
+
|
68
|
+
tchdbex : tchdbex.o
|
69
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
70
|
+
|
71
|
+
|
72
|
+
tcbdbex : tcbdbex.o
|
73
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
74
|
+
|
75
|
+
|
76
|
+
tcfdbex : tcfdbex.o
|
77
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
78
|
+
|
79
|
+
|
80
|
+
tctdbex : tctdbex.o
|
81
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
82
|
+
|
83
|
+
|
84
|
+
tcadbex : tcadbex.o
|
85
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
86
|
+
|
87
|
+
|
88
|
+
tctchat.cgi : tctchat.c
|
89
|
+
$(LDENV) $(CC) $(C99FLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
90
|
+
|
91
|
+
|
92
|
+
tctsearch.cgi : tctsearch.c
|
93
|
+
$(LDENV) $(CC) $(C99FLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
94
|
+
|
95
|
+
|
96
|
+
tctchat.tct :
|
97
|
+
rm -rf tctchat.tct*
|
98
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr create tctchat.tct
|
99
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctchat.tct "t"
|
100
|
+
chmod 666 tctchat.tct*
|
101
|
+
|
102
|
+
|
103
|
+
tctsearch.tct :
|
104
|
+
rm -rf tctsearch.tct*
|
105
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr create tctsearch.tct
|
106
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctsearch.tct "text"
|
107
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctsearch.tct "title"
|
108
|
+
../lab/htmltotsv .. | \
|
109
|
+
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr importtsv tctsearch.tct
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
# END OF FILE
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#include <tcutil.h>
|
2
|
+
#include <tcadb.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <stdbool.h>
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
int main(int argc, char **argv){
|
8
|
+
TCADB *adb;
|
9
|
+
char *key, *value;
|
10
|
+
|
11
|
+
/* create the object */
|
12
|
+
adb = tcadbnew();
|
13
|
+
|
14
|
+
/* open the database */
|
15
|
+
if(!tcadbopen(adb, "casket.tch")){
|
16
|
+
fprintf(stderr, "open error\n");
|
17
|
+
}
|
18
|
+
|
19
|
+
/* store records */
|
20
|
+
if(!tcadbput2(adb, "foo", "hop") ||
|
21
|
+
!tcadbput2(adb, "bar", "step") ||
|
22
|
+
!tcadbput2(adb, "baz", "jump")){
|
23
|
+
fprintf(stderr, "put error\n");
|
24
|
+
}
|
25
|
+
|
26
|
+
/* retrieve records */
|
27
|
+
value = tcadbget2(adb, "foo");
|
28
|
+
if(value){
|
29
|
+
printf("%s\n", value);
|
30
|
+
free(value);
|
31
|
+
} else {
|
32
|
+
fprintf(stderr, "get error\n");
|
33
|
+
}
|
34
|
+
|
35
|
+
/* traverse records */
|
36
|
+
tcadbiterinit(adb);
|
37
|
+
while((key = tcadbiternext2(adb)) != NULL){
|
38
|
+
value = tcadbget2(adb, key);
|
39
|
+
if(value){
|
40
|
+
printf("%s:%s\n", key, value);
|
41
|
+
free(value);
|
42
|
+
}
|
43
|
+
free(key);
|
44
|
+
}
|
45
|
+
|
46
|
+
/* close the database */
|
47
|
+
if(!tcadbclose(adb)){
|
48
|
+
fprintf(stderr, "close error\n");
|
49
|
+
}
|
50
|
+
|
51
|
+
/* delete the object */
|
52
|
+
tcadbdel(adb);
|
53
|
+
|
54
|
+
return 0;
|
55
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
#include <tcutil.h>
|
2
|
+
#include <tcbdb.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <stdbool.h>
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
int main(int argc, char **argv){
|
8
|
+
TCBDB *bdb;
|
9
|
+
BDBCUR *cur;
|
10
|
+
int ecode;
|
11
|
+
char *key, *value;
|
12
|
+
|
13
|
+
/* create the object */
|
14
|
+
bdb = tcbdbnew();
|
15
|
+
|
16
|
+
/* open the database */
|
17
|
+
if(!tcbdbopen(bdb, "casket.tcb", BDBOWRITER | BDBOCREAT)){
|
18
|
+
ecode = tcbdbecode(bdb);
|
19
|
+
fprintf(stderr, "open error: %s\n", tcbdberrmsg(ecode));
|
20
|
+
}
|
21
|
+
|
22
|
+
/* store records */
|
23
|
+
if(!tcbdbput2(bdb, "foo", "hop") ||
|
24
|
+
!tcbdbput2(bdb, "bar", "step") ||
|
25
|
+
!tcbdbput2(bdb, "baz", "jump")){
|
26
|
+
ecode = tcbdbecode(bdb);
|
27
|
+
fprintf(stderr, "put error: %s\n", tcbdberrmsg(ecode));
|
28
|
+
}
|
29
|
+
|
30
|
+
/* retrieve records */
|
31
|
+
value = tcbdbget2(bdb, "foo");
|
32
|
+
if(value){
|
33
|
+
printf("%s\n", value);
|
34
|
+
free(value);
|
35
|
+
} else {
|
36
|
+
ecode = tcbdbecode(bdb);
|
37
|
+
fprintf(stderr, "get error: %s\n", tcbdberrmsg(ecode));
|
38
|
+
}
|
39
|
+
|
40
|
+
/* traverse records */
|
41
|
+
cur = tcbdbcurnew(bdb);
|
42
|
+
tcbdbcurfirst(cur);
|
43
|
+
while((key = tcbdbcurkey2(cur)) != NULL){
|
44
|
+
value = tcbdbcurval2(cur);
|
45
|
+
if(value){
|
46
|
+
printf("%s:%s\n", key, value);
|
47
|
+
free(value);
|
48
|
+
}
|
49
|
+
free(key);
|
50
|
+
tcbdbcurnext(cur);
|
51
|
+
}
|
52
|
+
tcbdbcurdel(cur);
|
53
|
+
|
54
|
+
/* close the database */
|
55
|
+
if(!tcbdbclose(bdb)){
|
56
|
+
ecode = tcbdbecode(bdb);
|
57
|
+
fprintf(stderr, "close error: %s\n", tcbdberrmsg(ecode));
|
58
|
+
}
|
59
|
+
|
60
|
+
/* delete the object */
|
61
|
+
tcbdbdel(bdb);
|
62
|
+
|
63
|
+
return 0;
|
64
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#include <tcutil.h>
|
2
|
+
#include <tcfdb.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <stdbool.h>
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
int main(int argc, char **argv){
|
8
|
+
TCFDB *fdb;
|
9
|
+
int ecode;
|
10
|
+
char *key, *value;
|
11
|
+
|
12
|
+
/* create the object */
|
13
|
+
fdb = tcfdbnew();
|
14
|
+
|
15
|
+
/* open the database */
|
16
|
+
if(!tcfdbopen(fdb, "casket.tcf", FDBOWRITER | FDBOCREAT)){
|
17
|
+
ecode = tcfdbecode(fdb);
|
18
|
+
fprintf(stderr, "open error: %s\n", tcfdberrmsg(ecode));
|
19
|
+
}
|
20
|
+
|
21
|
+
/* store records */
|
22
|
+
if(!tcfdbput3(fdb, "1", "one") ||
|
23
|
+
!tcfdbput3(fdb, "12", "twelve") ||
|
24
|
+
!tcfdbput3(fdb, "144", "one forty four")){
|
25
|
+
ecode = tcfdbecode(fdb);
|
26
|
+
fprintf(stderr, "put error: %s\n", tcfdberrmsg(ecode));
|
27
|
+
}
|
28
|
+
|
29
|
+
/* retrieve records */
|
30
|
+
value = tcfdbget3(fdb, "1");
|
31
|
+
if(value){
|
32
|
+
printf("%s\n", value);
|
33
|
+
free(value);
|
34
|
+
} else {
|
35
|
+
ecode = tcfdbecode(fdb);
|
36
|
+
fprintf(stderr, "get error: %s\n", tcfdberrmsg(ecode));
|
37
|
+
}
|
38
|
+
|
39
|
+
/* traverse records */
|
40
|
+
tcfdbiterinit(fdb);
|
41
|
+
while((key = tcfdbiternext3(fdb)) != NULL){
|
42
|
+
value = tcfdbget3(fdb, key);
|
43
|
+
if(value){
|
44
|
+
printf("%s:%s\n", key, value);
|
45
|
+
free(value);
|
46
|
+
}
|
47
|
+
free(key);
|
48
|
+
}
|
49
|
+
|
50
|
+
/* close the database */
|
51
|
+
if(!tcfdbclose(fdb)){
|
52
|
+
ecode = tcfdbecode(fdb);
|
53
|
+
fprintf(stderr, "close error: %s\n", tcfdberrmsg(ecode));
|
54
|
+
}
|
55
|
+
|
56
|
+
/* delete the object */
|
57
|
+
tcfdbdel(fdb);
|
58
|
+
|
59
|
+
return 0;
|
60
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#include <tcutil.h>
|
2
|
+
#include <tchdb.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <stdbool.h>
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
int main(int argc, char **argv){
|
8
|
+
TCHDB *hdb;
|
9
|
+
int ecode;
|
10
|
+
char *key, *value;
|
11
|
+
|
12
|
+
/* create the object */
|
13
|
+
hdb = tchdbnew();
|
14
|
+
|
15
|
+
/* open the database */
|
16
|
+
if(!tchdbopen(hdb, "casket.tch", HDBOWRITER | HDBOCREAT)){
|
17
|
+
ecode = tchdbecode(hdb);
|
18
|
+
fprintf(stderr, "open error: %s\n", tchdberrmsg(ecode));
|
19
|
+
}
|
20
|
+
|
21
|
+
/* store records */
|
22
|
+
if(!tchdbput2(hdb, "foo", "hop") ||
|
23
|
+
!tchdbput2(hdb, "bar", "step") ||
|
24
|
+
!tchdbput2(hdb, "baz", "jump")){
|
25
|
+
ecode = tchdbecode(hdb);
|
26
|
+
fprintf(stderr, "put error: %s\n", tchdberrmsg(ecode));
|
27
|
+
}
|
28
|
+
|
29
|
+
/* retrieve records */
|
30
|
+
value = tchdbget2(hdb, "foo");
|
31
|
+
if(value){
|
32
|
+
printf("%s\n", value);
|
33
|
+
free(value);
|
34
|
+
} else {
|
35
|
+
ecode = tchdbecode(hdb);
|
36
|
+
fprintf(stderr, "get error: %s\n", tchdberrmsg(ecode));
|
37
|
+
}
|
38
|
+
|
39
|
+
/* traverse records */
|
40
|
+
tchdbiterinit(hdb);
|
41
|
+
while((key = tchdbiternext2(hdb)) != NULL){
|
42
|
+
value = tchdbget2(hdb, key);
|
43
|
+
if(value){
|
44
|
+
printf("%s:%s\n", key, value);
|
45
|
+
free(value);
|
46
|
+
}
|
47
|
+
free(key);
|
48
|
+
}
|
49
|
+
|
50
|
+
/* close the database */
|
51
|
+
if(!tchdbclose(hdb)){
|
52
|
+
ecode = tchdbecode(hdb);
|
53
|
+
fprintf(stderr, "close error: %s\n", tchdberrmsg(ecode));
|
54
|
+
}
|
55
|
+
|
56
|
+
/* delete the object */
|
57
|
+
tchdbdel(hdb);
|
58
|
+
|
59
|
+
return 0;
|
60
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#include <tcutil.h>
|
2
|
+
#include <tctdb.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <stdbool.h>
|
5
|
+
#include <stdint.h>
|
6
|
+
#include <string.h>
|
7
|
+
#include <stdio.h>
|
8
|
+
|
9
|
+
/* function prototypes */
|
10
|
+
int main(int argc, char **argv);
|
11
|
+
static void proc(TCTMPL *tmpl, TCMPOOL *mpool);
|
12
|
+
|
13
|
+
/* main routine */
|
14
|
+
int main(int argc, char **argv){
|
15
|
+
TCTMPL *tmpl = tctmplnew();
|
16
|
+
tctmplload2(tmpl, "tctchat.tmpl");
|
17
|
+
TCMPOOL *mpool = tcmpoolnew();
|
18
|
+
proc(tmpl, mpool);
|
19
|
+
tcmpooldel(mpool);
|
20
|
+
tctmpldel(tmpl);
|
21
|
+
return 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
/* process each session */
|
25
|
+
static void proc(TCTMPL *tmpl, TCMPOOL *mpool){
|
26
|
+
TCMAP *params = tcmpoolmapnew(mpool);
|
27
|
+
char *query = getenv("QUERY_STRING");
|
28
|
+
const char *rp = getenv("CONTENT_LENGTH");
|
29
|
+
if(rp){
|
30
|
+
int clen = tclmin(tcatoi(rp), 1024 * 1024);
|
31
|
+
query = tcmpoolmalloc(mpool, clen + 1);
|
32
|
+
if(fread(query, 1, clen, stdin) != clen) clen = 0;
|
33
|
+
query[clen] = '\0';
|
34
|
+
}
|
35
|
+
if(query) tcwwwformdecode(query, params);
|
36
|
+
const char *type = tcstrskipspc(tcmapget4(params, "type", ""));
|
37
|
+
const char *author = tcstrskipspc(tcmapget4(params, "author", ""));
|
38
|
+
const char *text = tcstrskipspc(tcmapget4(params, "text", ""));
|
39
|
+
const char *search = tcstrskipspc(tcmapget4(params, "search", ""));
|
40
|
+
int page = tcatoi(tcmapget4(params, "page", "1"));
|
41
|
+
const char *dbpath = tctmplconf(tmpl, "dbpath");
|
42
|
+
if(!dbpath) dbpath = "tctchat.tct";
|
43
|
+
TCLIST *msgs = tcmpoollistnew(mpool);
|
44
|
+
TCTDB *tdb = tcmpoolpush(mpool, tctdbnew(), (void (*)(void *))tctdbdel);
|
45
|
+
rp = getenv("REQUEST_METHOD");
|
46
|
+
if(rp && !strcmp(rp, "POST") && *author != '\0' && *text != '\0' &&
|
47
|
+
strlen(author) <= 32 && strlen(text) <= 1024){
|
48
|
+
if(!tctdbopen(tdb, dbpath, TDBOWRITER | TDBOCREAT))
|
49
|
+
tclistprintf(msgs, "The database could not be opened (%s).", tctdberrmsg(tctdbecode(tdb)));
|
50
|
+
tctdbsetindex(tdb, "", TDBITDECIMAL | TDBITKEEP);
|
51
|
+
char pkbuf[64];
|
52
|
+
int pksiz = sprintf(pkbuf, "%.0f", tctime() * 1000);
|
53
|
+
TCMAP *cols = tcmpoolmapnew(mpool);
|
54
|
+
tcmapput2(cols, "a", author);
|
55
|
+
tcmapput2(cols, "t", text);
|
56
|
+
tctdbtranbegin(tdb);
|
57
|
+
if(!tctdbputkeep(tdb, pkbuf, pksiz, cols)) tclistprintf(msgs, "The message is ignored.");
|
58
|
+
tctdbtrancommit(tdb);
|
59
|
+
} else {
|
60
|
+
if(!tctdbopen(tdb, dbpath, TDBOREADER))
|
61
|
+
tclistprintf(msgs, "The database could not be opened (%s).", tctdberrmsg(tctdbecode(tdb)));
|
62
|
+
}
|
63
|
+
TCLIST *logs = tcmpoollistnew(mpool);
|
64
|
+
TDBQRY *qry = tcmpoolpush(mpool, tctdbqrynew(tdb), (void (*)(void *))tctdbqrydel);
|
65
|
+
if(*search != '\0') tctdbqryaddcond(qry, "t", TDBQCFTSEX, search);
|
66
|
+
tctdbqrysetorder(qry, "", TDBQONUMDESC);
|
67
|
+
tctdbqrysetlimit(qry, 16, page > 0 ? (page - 1) * 16 : 0);
|
68
|
+
TCLIST *res = tcmpoolpushlist(mpool, tctdbqrysearch(qry));
|
69
|
+
int rnum = tclistnum(res);
|
70
|
+
for(int i = rnum - 1; i >= 0; i--){
|
71
|
+
int pksiz;
|
72
|
+
const char *pkbuf = tclistval(res, i, &pksiz);
|
73
|
+
TCMAP *cols = tcmpoolpushmap(mpool, tctdbget(tdb, pkbuf, pksiz));
|
74
|
+
if(cols){
|
75
|
+
tcmapprintf(cols, "pk", "%s", pkbuf);
|
76
|
+
char date[64];
|
77
|
+
tcdatestrwww(tcatoi(pkbuf) / 1000, INT_MAX, date);
|
78
|
+
tcmapput2(cols, "d", date);
|
79
|
+
const char *astr = tcmapget4(cols, "a", "");
|
80
|
+
tcmapprintf(cols, "c", "c%02u", tcgetcrc(astr, strlen(astr)) % 12 + 1);
|
81
|
+
tclistpushmap(logs, cols);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
TCMAP *vars = tcmpoolmapnew(mpool);
|
85
|
+
if(tclistnum(msgs) > 0) tcmapputlist(vars, "msgs", msgs);
|
86
|
+
if(tclistnum(logs) > 0) tcmapputlist(vars, "logs", logs);
|
87
|
+
tcmapprintf(vars, "author", "%s", author);
|
88
|
+
tcmapprintf(vars, "search", "%s", search);
|
89
|
+
if(page > 1) tcmapprintf(vars, "prev", "%d", page - 1);
|
90
|
+
if(rnum >= 16 && tctdbrnum(tdb) > page * 16) tcmapprintf(vars, "next", "%d", page + 1);
|
91
|
+
char *str = tcmpoolpushptr(mpool, tctmpldump(tmpl, vars));
|
92
|
+
printf("Content-Type: %s\r\n", !strcmp(type, "xml") ? "application/xml" :
|
93
|
+
!strcmp(type, "xhtml") ? "application/xhtml+xml" : "text/html; charset=UTF-8");
|
94
|
+
printf("Cache-Control: no-cache\r\n");
|
95
|
+
printf("\r\n");
|
96
|
+
fwrite(str, 1, strlen(str), stdout);
|
97
|
+
}
|