]> de.git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Merge branch 'master' into mand1nga/update-docs
authormand1nga <mand1nga@xonotic.org>
Mon, 29 Aug 2011 16:05:53 +0000 (13:05 -0300)
committermand1nga <mand1nga@xonotic.org>
Mon, 29 Aug 2011 16:05:53 +0000 (13:05 -0300)
72 files changed:
.gitattributes
Docs/.gitattributes [new file with mode: 0644]
Docs/compile-settings.txt
Docs/egyptsoc/egyptsoc_readme.txt
Docs/egyptsoc/permission.txt
Docs/eventlog.txt
Docs/htmlfiles/weaponimg/weapon-images.txt
Docs/mapdownload.txt
Docs/mapping.txt
Docs/nexuiz.game [deleted file]
Docs/scorelog.txt
all
check-gitattributes.sh
misc/builddeps/dp.linux32/bin/blind_id
misc/builddeps/dp.linux32/include/d0_blind_id/d0_blind_id.h
misc/builddeps/dp.linux32/include/libmodplug/stdafx.h
misc/builddeps/dp.linux32/lib/libd0_blind_id.a
misc/builddeps/dp.linux32/lib/libd0_blind_id.la
misc/builddeps/dp.linux32/lib/libd0_rijndael.a
misc/builddeps/dp.linux32/lib/libd0_rijndael.la
misc/builddeps/dp.linux32/lib/libmodplug.a
misc/builddeps/dp.linux32/lib/libmodplug.la
misc/builddeps/dp.linux32/lib/pkgconfig/d0_blind_id.pc
misc/builddeps/dp.linux32/lib/pkgconfig/d0_rijndael.pc
misc/builddeps/dp.linux32/lib/pkgconfig/libmodplug.pc
misc/builddeps/dp.linux64/bin/blind_id
misc/builddeps/dp.linux64/include/d0_blind_id/d0.h
misc/builddeps/dp.linux64/include/libmodplug/stdafx.h
misc/builddeps/dp.linux64/lib/libd0_blind_id.a
misc/builddeps/dp.linux64/lib/libd0_blind_id.la [changed mode: 0644->0755]
misc/builddeps/dp.linux64/lib/libd0_rijndael.a
misc/builddeps/dp.linux64/lib/libd0_rijndael.la [changed mode: 0644->0755]
misc/builddeps/dp.linux64/lib/libmodplug.a
misc/builddeps/dp.linux64/lib/libmodplug.la
misc/builddeps/dp.linux64/lib/pkgconfig/d0_blind_id.pc
misc/builddeps/dp.linux64/lib/pkgconfig/d0_rijndael.pc
misc/builddeps/dp.linux64/lib/pkgconfig/libmodplug.pc
misc/builddeps/dp.win32/bin/zlib1.dll [new file with mode: 0755]
misc/builddeps/dp.win32/include/zconf.h [new file with mode: 0644]
misc/builddeps/dp.win32/include/zlib.h [new file with mode: 0644]
misc/builddeps/dp.win32/lib/libz.a [new file with mode: 0644]
misc/builddeps/dp.win32/lib/libz.dll.a [new symlink]
misc/builddeps/dp.win32/lib/libzdll.a [new file with mode: 0644]
misc/builddeps/dp.win64/bin/zlib1.dll [new file with mode: 0755]
misc/builddeps/dp.win64/include/zconf.h [new file with mode: 0644]
misc/builddeps/dp.win64/include/zlib.h [new file with mode: 0644]
misc/builddeps/dp.win64/lib/libz.a [new file with mode: 0644]
misc/builddeps/dp.win64/lib/libz.dll.a [new symlink]
misc/builddeps/dp.win64/lib/libzdll.a [new file with mode: 0644]
misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_blind_id.0.dylib
misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_rijndael.0.dylib
misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libmodplug.1.dylib
misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng12.0.dylib [new file with mode: 0755]
misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng14.14.dylib [deleted file]
misc/buildfiles/win32/libd0_blind_id-0.dll
misc/buildfiles/win32/libd0_rijndael-0.dll
misc/buildfiles/win32/libmodplug-1.dll
misc/buildfiles/win32/libpng12.dll [changed mode: 0644->0755]
misc/buildfiles/win64/libd0_blind_id-0.dll
misc/buildfiles/win64/libd0_rijndael-0.dll
misc/buildfiles/win64/libgcc_s_sjlj-1.dll [new file with mode: 0755]
misc/buildfiles/win64/libmodplug-1.dll [changed mode: 0644->0755]
misc/buildfiles/win64/libpng12.dll [new file with mode: 0755]
misc/buildfiles/win64/libpng14.dll [deleted file]
misc/buildfiles/win64/libstdc++-6.dll [new file with mode: 0755]
misc/infrastructure/keygen/crypto-keygen-standalone
misc/tools/WeaponEncounterProfile.pm
misc/tools/weapon-profiler-analyzer.pl
server/.gitattributes [new file with mode: 0644]
server/rcon2irc/rcon2irc.txt
server/readme.txt
server/server.cfg

index ec3bfe3d1054e3a7f5ebd372dee7c3b00e766d3a..bf8bf302160967d1887e0490d3d16b3d6fe1d3a1 100644 (file)
@@ -1,5 +1,4 @@
 * -crlf
-
 *.0 -diff -crlf
 *.1 crlf=input
 *.3 crlf=input
@@ -27,7 +26,7 @@ branch-manager crlf=input
 BSDmakefile crlf=input
 bsp2ent crlf=input
 *.bsp -diff -crlf
-*.cache -diff -crlf
+*.cache crlf=input
 *.cbp -crlf
 *.cbp -diff -crlf
 *.c crlf=input
@@ -44,15 +43,20 @@ COPYING crlf=input
 *.cpp crlf=input
 create crlf=input
 *.cron crlf=input
+crypto-keygen-standalone -diff -crlf
 *.css crlf=input
 *.cvswrappers crlf=input
+*.d0ir crlf=input
 *.d0pk -diff -crlf
-*.db -diff -crlf
+*.db crlf=input
+*.db.* crlf=input
+*.def2ent crlf=input
 *.default crlf=input
 *.def crlf=input
 *.dem -diff -crlf
 *.dev -crlf
 dir -diff -crlf
+*.directory crlf=input
 djpeg -diff -crlf
 *.dll -diff -crlf
 DOCS -diff -crlf
@@ -68,9 +72,13 @@ Doxyfile crlf=input
 *.dylib -diff -crlf
 empty -diff -crlf
 *.EncoderPlugin crlf=input
+*.ent crlf=input
+etc_svc_git-daemon_run crlf=input
 *.flac -diff -crlf
+*.flp -diff -crlf
 *.form crlf=input
 *.framegroups crlf=input
+*.fteqccfail -diff -crlf
 *.game crlf=input
 *.gdb crlf=input
 gendox crlf=input
@@ -92,10 +100,13 @@ git-svn-update crlf=input
 git-update-octopus crlf=input
 *.glp crlf=input
 *.glsl crlf=input
+GPL-2 crlf=input
+GPL-3 crlf=input
 GPL crlf=input
 *.hardwired crlf=input
 *.h crlf=input
 *.hs crlf=input
+*.htaccess crlf=input
 *.html crlf=input
 *.html-part crlf=input
 *.icns -diff -crlf
@@ -108,7 +119,7 @@ GPL crlf=input
 *.info-2 -diff -crlf
 *.info -diff -crlf
 *.inl crlf=input
-*.instantaction crlf=input
+*.iOS crlf=input
 *.iqm -diff -crlf
 *.java crlf=input
 *.jhm crlf=input
@@ -140,25 +151,31 @@ makespr32 crlf=input
 *.mkdir -diff -crlf
 *.mmpz -diff -crlf
 *.modules crlf=input
+*.mp3 -diff -crlf
 *.nib -crlf
 *.obj -crlf
 OFFSETS -diff -crlf
 *.ogg -diff -crlf
 *.options crlf=input
+*.otf -diff -crlf
 pangorc crlf=input
+*.part crlf=input
 *.patch crlf=input
 *.patchsets crlf=input
+*.pbxproj crlf=input
 *.pc crlf=input
-*.pcx -diff -crlf
 *.pfb -diff -crlf
 *.pfm -diff -crlf
+*.php crlf=input
 *.pk3 -diff -crlf
 PkgInfo crlf=input
 *.pl crlf=input
 *.plist crlf=input
 *.pm crlf=input
 *.png -diff -crlf
+*.po crlf=input
 POSITIONS -diff -crlf
+*.pot crlf=input
 *.proj -crlf
 *.properties crlf=input
 *.psd -diff -crlf
@@ -167,17 +184,19 @@ POSITIONS -diff -crlf
 *.qc crlf=input
 *.qdt crlf=input
 *.qh crlf=input
+*.rar -diff -crlf
 *.rb crlf=input
 *.rc2 crlf=input
 *.rc -crlf
 rdjpgcom -diff -crlf
 *.readme crlf=input
 README crlf=input
-*.rtlights -diff -crlf
+*.rtlights crlf=input
 SCHEMA crlf=input
 *.scm crlf=input
 sdl-config crlf=input
 SDL -diff -crlf
+*.sfd -diff -crlf
 *.shader crlf=input
 *.sh crlf=input
 *.skin crlf=input
@@ -196,15 +215,16 @@ TMAP -diff -crlf
 todo crlf=input
 TODO crlf=input
 *.ttf -diff -crlf
-*.TTF -diff -crlf
 *.txt crlf=input
+*.txt.* crlf=input
 update-shaderlists crlf=input
 *.vbs -crlf
 *.vcproj -crlf
+*.vcxproj crlf=input
 versionbuilder crlf=input
+*.vhost crlf=input
 *.wav -diff -crlf
-*.waypoints -diff -crlf
-w crlf=input
+*.waypoints crlf=input
 *.width crlf=input
 *.workspace -crlf
 wrjpgcom -diff -crlf
@@ -214,9 +234,9 @@ wrjpgcom -diff -crlf
 xonotic-map-compiler-autobuild crlf=input
 xonotic-map-compiler crlf=input
 xonotic-map-screenshot crlf=input
-xonotic-osx-agl crlf=input
 xonotic-osx-sdl crlf=input
 *.xpm crlf=input
+*.xrns -diff -crlf
 *.zip -diff -crlf
 zipdiff crlf=input
 *.zym -diff -crlf
diff --git a/Docs/.gitattributes b/Docs/.gitattributes
new file mode 100644 (file)
index 0000000..f96575f
--- /dev/null
@@ -0,0 +1 @@
+*.txt -crlf
index 847f7cb997961472a50d8cdc8a2a071786258b52..851432c55a16299783c2a8cf203bd85022bb48d3 100644 (file)
@@ -1,50 +1,50 @@
-This file contains the q3map2 compile settings used to compile the maps that are part of Nexuiz.
-There are also compile-scripts for some maps (mapname.sh). 
-They can be found in your Nexuiz/data/maps folder
-
-------------
-Standard
-------------
-
-"...q3map2.exe" -meta "...nexuizmap.map"
-"...q3map2.exe" -vis "...nexuizmap.bsp"
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...nexuizmap.bsp"
-
-------------
-Only update the entities.
-------------
-
-"...q3map2.exe" -onlyents "...nexuizmap.map"
-
-------------
-bloodprison.map
-------------
-
-"...q3map2.exe" -meta -samplesize 8 -mv 1000000 -mi 6000000 "...bloodprisonctf.map"
-"...q3map2.exe" -scale 1.2 "...bloodprisonctf.bsp"
-"...q3map2.exe" -vis "...bloodprisonctf.bsp"
-"...q3map2.exe" -light -deluxe -fast -filter -deluxe -patchshadows -samples 3 "...bloodprisonctf.bsp"
-
-------------
-final_rage.map
-------------
-
-"...q3map2.exe" -meta -v -samplesize 8 -skyfix -np 50 "...final_rage.map"
-"...q3map2.exe" -vis -v "...final_rage.map"
-"...q3map2.exe" -light -deluxe -compensate 1.4 -fast -gamma 1.5 -patchshadows -areascale 1.5 -pointscale 2 -v -bounce 3 -bouncegrid "...final_rage.map"
-
-------------
-reslimed.map
-------------
-
-"...q3map2.exe" -meta -patchmeta -v "...reslimed.map"
-"...q3map2.exe" -vis "...reslimed.bsp"
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...reslimed.bsp"
-
-------------
-strength.map
-------------
-
-"...q3map2.exe" -meta "...strength.map"
-"...q3map2.exe" -vis "...strength.bsp"
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...strength.bsp"
+This file contains the q3map2 compile settings used to compile the maps that are part of Nexuiz.\r
+There are also compile-scripts for some maps (mapname.sh). \r
+They can be found in your Nexuiz/data/maps folder\r
+\r
+------------\r
+Standard\r
+------------\r
+\r
+"...q3map2.exe" -meta "...nexuizmap.map"\r
+"...q3map2.exe" -vis "...nexuizmap.bsp"\r
+"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...nexuizmap.bsp"\r
+\r
+------------\r
+Only update the entities.\r
+------------\r
+\r
+"...q3map2.exe" -onlyents "...nexuizmap.map"\r
+\r
+------------\r
+bloodprison.map\r
+------------\r
+\r
+"...q3map2.exe" -meta -samplesize 8 -mv 1000000 -mi 6000000 "...bloodprisonctf.map"\r
+"...q3map2.exe" -scale 1.2 "...bloodprisonctf.bsp"\r
+"...q3map2.exe" -vis "...bloodprisonctf.bsp"\r
+"...q3map2.exe" -light -deluxe -fast -filter -deluxe -patchshadows -samples 3 "...bloodprisonctf.bsp"\r
+\r
+------------\r
+final_rage.map\r
+------------\r
+\r
+"...q3map2.exe" -meta -v -samplesize 8 -skyfix -np 50 "...final_rage.map"\r
+"...q3map2.exe" -vis -v "...final_rage.map"\r
+"...q3map2.exe" -light -deluxe -compensate 1.4 -fast -gamma 1.5 -patchshadows -areascale 1.5 -pointscale 2 -v -bounce 3 -bouncegrid "...final_rage.map"\r
+\r
+------------\r
+reslimed.map\r
+------------\r
+\r
+"...q3map2.exe" -meta -patchmeta -v "...reslimed.map"\r
+"...q3map2.exe" -vis "...reslimed.bsp"\r
+"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...reslimed.bsp"\r
+\r
+------------\r
+strength.map\r
+------------\r
+\r
+"...q3map2.exe" -meta "...strength.map"\r
+"...q3map2.exe" -vis "...strength.bsp"\r
+"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...strength.bsp"\r
index a457e02b3f548bb9615f14ac618298a642bdeb2a..0bed9ea60d55706933ddca9417c3d16e2657ae94 100644 (file)
@@ -1,61 +1,61 @@
-============================================================
-Date:             13th August 2001.
-file:             tp-egyptian.zip
-author:           Sock 
-email:            sock@planetquake.com
-URL:              http://www.planetquake.com/simland
-New URL:          http://www.simonoc.com/pages/materials/tpegypt/index.htm
-Version:          1.5
-
-============================================================
-
-COPYRIGHT NOTICES
------------------
-
-If you use any of these Egyptian shader/textures I kindly ask
-YOU to give me credit for my work within your README file or
-TEXT file distributed with your map/mod.
-
-============================================================
-
-Testing of Shaders
-------------------
-
-* All of the shaders included with this texture pack have been 
-  tested with Q3 point release 1.27g.
-
-============================================================
-
-Instructions for using the Egyptian Texture Pack
----------------------------------------------------
-
-** You must have installed the Q3 editor tools first **
-
-1. Extract the tp-egyptian.zip file in the BASEQ3 directory.
-   This will create 6 texture directory under the
-   BASEQ3/TEXTURES directory as follows :-
-
-   BASEQ3/TEXTURES/EGYPTSOC_FLOOR
-   BASEQ3/TEXTURES/EGYPTSOC_MAT
-   BASEQ3/TEXTURES/EGYPTSOC_SFX
-   BASEQ3/TEXTURES/EGYPTSOC_TRIM
-   BASEQ3/TEXTURES/EGYPTSOC_TRIMD
-   BASEQ3/TEXTURES/EGYPTSOC_WALL
-   
-2. Goto the SCRIPTS sub-directory under the BASEQ3
-   directory and find the following 
-   file :- SHADERLIST.TXT.
-   
-3. Open this file up in a text editor and add the
-   following line at the bottom of the file.
-   
-   EGYPTSOC
-   
-4. Close the file and open Q3Radiant and you should
-   find on the texture menu the 1 new subdirectory.
-
-For a full explaination of each texture/shader please
-refer to the website.
-
-Enjoy
-Sock
+============================================================\r
+Date:             13th August 2001.\r
+file:             tp-egyptian.zip\r
+author:           Sock \r
+email:            sock@planetquake.com\r
+URL:              http://www.planetquake.com/simland\r
+New URL:          http://www.simonoc.com/pages/materials/tpegypt/index.htm\r
+Version:          1.5\r
+\r
+============================================================\r
+\r
+COPYRIGHT NOTICES\r
+-----------------\r
+\r
+If you use any of these Egyptian shader/textures I kindly ask\r
+YOU to give me credit for my work within your README file or\r
+TEXT file distributed with your map/mod.\r
+\r
+============================================================\r
+\r
+Testing of Shaders\r
+------------------\r
+\r
+* All of the shaders included with this texture pack have been \r
+  tested with Q3 point release 1.27g.\r
+\r
+============================================================\r
+\r
+Instructions for using the Egyptian Texture Pack\r
+---------------------------------------------------\r
+\r
+** You must have installed the Q3 editor tools first **\r
+\r
+1. Extract the tp-egyptian.zip file in the BASEQ3 directory.\r
+   This will create 6 texture directory under the\r
+   BASEQ3/TEXTURES directory as follows :-\r
+\r
+   BASEQ3/TEXTURES/EGYPTSOC_FLOOR\r
+   BASEQ3/TEXTURES/EGYPTSOC_MAT\r
+   BASEQ3/TEXTURES/EGYPTSOC_SFX\r
+   BASEQ3/TEXTURES/EGYPTSOC_TRIM\r
+   BASEQ3/TEXTURES/EGYPTSOC_TRIMD\r
+   BASEQ3/TEXTURES/EGYPTSOC_WALL\r
+   \r
+2. Goto the SCRIPTS sub-directory under the BASEQ3\r
+   directory and find the following \r
+   file :- SHADERLIST.TXT.\r
+   \r
+3. Open this file up in a text editor and add the\r
+   following line at the bottom of the file.\r
+   \r
+   EGYPTSOC\r
+   \r
+4. Close the file and open Q3Radiant and you should\r
+   find on the texture menu the 1 new subdirectory.\r
+\r
+For a full explaination of each texture/shader please\r
+refer to the website.\r
+\r
+Enjoy\r
+Sock\r
index 324729d1e6584f30d56e92484b0621836b9c203b..52666e6ffc68be2ea505033d8e5ad3699400016a 100644 (file)
@@ -1,11 +1,11 @@
-Hello, 
-
-greetings from a conference in greece. I just got permission from Simon O'Callaghan to distribute the textures from http://www.simonoc.com/pages/materials/tpegypt/index.htm under the terms of the GPL with future versions of Nexuiz, provided classical attribution is given and that the game documentation includes a link to http://www.simonoc.com/pages/materials.htm so artists can find his stuff. 
-
-Thanks alot Simon! 
-
-This is good news, as some Nexuiz community maps use these textures, albeit as of yet licensed under a GPL-incompatible Creative Commons license. 
-
-Does anybody feel like creating bumpmaps/normalmaps and glossmaps for that set of textures?
-
--- SavageX
+Hello, \r
+\r
+greetings from a conference in greece. I just got permission from Simon O'Callaghan to distribute the textures from http://www.simonoc.com/pages/materials/tpegypt/index.htm under the terms of the GPL with future versions of Nexuiz, provided classical attribution is given and that the game documentation includes a link to http://www.simonoc.com/pages/materials.htm so artists can find his stuff. \r
+\r
+Thanks alot Simon! \r
+\r
+This is good news, as some Nexuiz community maps use these textures, albeit as of yet licensed under a GPL-incompatible Creative Commons license. \r
+\r
+Does anybody feel like creating bumpmaps/normalmaps and glossmaps for that set of textures?\r
+\r
+-- SavageX\r
index 1152b4346959b45dcccb472cb42dd9392164f11c..030ba52f28a4a30c2794979fb849fa57264b8d3a 100644 (file)
-cvars:
-______________
-
-   sv_eventlog                    master switch (default: 0)
-   sv_eventlog_files              print frags, scores and captures for separate files each match (default: 0)
-   sv_eventlog_console            print frags, scores and captures to serverconsole during the match (default: 1)
-   sv_logscores_bots              choose whether bot are included in stats or not (default: 0)
-                                
-   sv_eventlog_files_counter      number of matches logged until now
-   sv_eventlog_files_nameprefix   file name prefix to be used (default: nexuiz)
-   sv_eventlog_files_namesuffix   file name extension to be used (default: .log)
-   sv_eventlog_files_timestamps   prefix log lines in the files with :time events (default: 1)
-
-log format:
-______________
-
-   :logversion:3
-   :gamestart:<gametype>_<mapname>:<matchid>
-   :gameinfo:mutators:LIST:mutator1:mutator2:...
-
-      (note that mutators are listed by their cvar name with g_ removed,
-      unless such a cvar is 1 by default - then the mutator is listed with
-      a no_ prefix if the cvar is 0)
-
-   :gameinfo:end
-   :join:<ID>:<slot>:<ip>:<nickname>
-   :join:<ID>:<slot>:bot:<nickname>
-   :name:<ID>:<nickname>
-   :part:<ID>
-   :team:<ID>:<team>:<jointype>
-   :kill:frag:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
-   :kill:tk:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
-   :kill:suicide:<ID>:<ID>:type=<death type>:items=<itemstring>
-   :kill:accident:<ID>:<ID>:type=<death type>:items=<itemstring>
-   :ctf:steal:<flagcolor>:<ID of attacker>
-   :ctf:dropped:<flagcolor>:<ID of dropper>
-   :ctf:pickup:<flagcolor>:<ID of attacker>
-   :ctf:capture:<flagcolor>:<ID of attacker>
-   :ctf:return:<flagcolor>:<ID of defender>
-   :ctf:returned:<flagcolor>
-   :dom:taken:<previouscolor>:<ID of player>
-   :keyhunt:capture:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:carrierfrag:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:collect:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:destroyed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:destroyed_holdingkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:dropkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:losekey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:push:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :keyhunt:pushed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
-   :scores:<gametype>_<mapname>:<map runtime>
-   :labels:player:<head1><flags>,<head2><flags>,...
-   :player:see-labels:<score1>,<score2>,...:<playtime>:<team>:<ID>:<nickname>
-   :player:see-labels:<score1>,<score2>,...:<playtime>:spectator:<ID>:<nickname>
-   :labels:teamscores:<head1><flags>,<head2><flags>,...
-   :teamscores:see-labels:<score1>,<score2>,...:<team>
-   :end
-   :restart
-   :gameover
-   :vote:suggested:<mapname>:<playerid>
-   :vote:keeptwo:<mapname>:<mapvotes>:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:...:didn't vote:<notvoters>
-   :vote:finished:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:<mapname>:<mapvotes>:...:didn't vote:<notvoters>
-   :vote:suggestion_accepted:<mapname>
-   :vote:vcall:<ID of player>:<vote command display string>
-   :vote:vyes:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
-   :vote:vno:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
-   :vote:vtimeout:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
-   :vote:vstop:<ID of stopper>
-   :vote:vlogin:<ID of player>
-   :vote:vdo:<ID of player>:<do command display string>
-   :time:<YYYY-MM-DD HH:MM:SS>
-   :recordset:<ID of player>:<time in seconds>
-
-   Note that only the :join and :player lines ever contain player names. The
-   :time event only appears in the log files if sv_eventlog_files_timestamps
-   is 1; there is no way to log these time stamps to the console (for console
-   timestamps, set timestamps to 1).
-
-team colors:
-    1 = No Team (Domination)
-    5 = Red Team
-   14 = Blue Team
-   13 = Yellow Team
-   10 = Pink Team
-
-join types:
-    1 = connect
-    2 = auto
-    3 = manual
-    4 = spectating
-    6 = adminmove
-
-label flags:
-   !! = primary sorting key
-   <!! = primary sorting key, lower is better
-   ! = secondary sorting key
-   <! = secondary sorting key, lower is better
-   < = lower is better
-
-itemstring:
-   <weaponid><flags>
-   or
-   <weaponid><flags>|<runes>
-
-   where flags can contain:
-         F = player carries the flag
-         S = player has strength
-         I = player has the shield
-         T = player is typing (console, menu or chat)
-   
-   and weapon IDs are:
-         1 = Laser
-                2 = Shotgun
-                3 = Uzi
-         4 = Mortar
-         5 = Electro
-         6 = Crylink
-         7 = Nex
-         8 = Hagar
-         9 = Rocket Launcher
-        10 = Port-O-Launch
-        11 = MinstaNex
-        12 = Grappling Hook
-        13 = Heavy Laser Assault Cannon
-        14 = T.A.G. Seeker
-
-   runes/curses are stored as a bit mask with the following values:
-         1 = Strength
-         2 = Defense
-         4 = Regeneration
-         8 = Speed
-        16 = Vampire
-      8192 = Weakness
-     16384 = Vulnerability
-     32768 = Venom
-     65536 = Slow
-    131072 = Empathy
-
-death type:
-   either a weapon ID ORed with weapon death flags, or one of:
-     10000 = fallen to death
-     10001 = telefragged
-     10002 = drowned
-     10003 = killed by a trap / fallen into the void
-     10004 = lava
-     10005 = slime
-     10006 = console kill
-     10007 = (MinstaGib) out of ammo
-     10008 = swamp
-     10009 = team change
-     10010 = auto team change
-     10011 = camping protection
-        10012 = player became too fast (should never happen)
-        10013 = health rot
-        10014 = mirror damage
-        10015 = g_touchexplode
-        10100 = turret
-       10150 = spiderbot miniguns
-       10151 = spiderbot rocket
-       10152 = spiderbot, cushed by
-       10300 = custom deathmessage
-
-   weapon death flags are:
-       256 = secondary fire
-          512 = splash damage
-         1024 = bounced projectile
-         2048 = head shot (MinstaNex only)
-         4096 = unused flag
-
-There will be a log analyzer parsing this file format soon. Note that weapon
-IDs are below 10000.
+cvars:\r
+______________\r
+\r
+   sv_eventlog                    master switch (default: 0)\r
+   sv_eventlog_files              print frags, scores and captures for separate files each match (default: 0)\r
+   sv_eventlog_console            print frags, scores and captures to serverconsole during the match (default: 1)\r
+   sv_logscores_bots              choose whether bot are included in stats or not (default: 0)\r
+                                \r
+   sv_eventlog_files_counter      number of matches logged until now\r
+   sv_eventlog_files_nameprefix   file name prefix to be used (default: nexuiz)\r
+   sv_eventlog_files_namesuffix   file name extension to be used (default: .log)\r
+   sv_eventlog_files_timestamps   prefix log lines in the files with :time events (default: 1)\r
+\r
+log format:\r
+______________\r
+\r
+   :logversion:3\r
+   :gamestart:<gametype>_<mapname>:<matchid>\r
+   :gameinfo:mutators:LIST:mutator1:mutator2:...\r
+\r
+      (note that mutators are listed by their cvar name with g_ removed,\r
+      unless such a cvar is 1 by default - then the mutator is listed with\r
+      a no_ prefix if the cvar is 0)\r
+\r
+   :gameinfo:end\r
+   :join:<ID>:<slot>:<ip>:<nickname>\r
+   :join:<ID>:<slot>:bot:<nickname>\r
+   :name:<ID>:<nickname>\r
+   :part:<ID>\r
+   :team:<ID>:<team>:<jointype>\r
+   :kill:frag:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>\r
+   :kill:tk:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>\r
+   :kill:suicide:<ID>:<ID>:type=<death type>:items=<itemstring>\r
+   :kill:accident:<ID>:<ID>:type=<death type>:items=<itemstring>\r
+   :ctf:steal:<flagcolor>:<ID of attacker>\r
+   :ctf:dropped:<flagcolor>:<ID of dropper>\r
+   :ctf:pickup:<flagcolor>:<ID of attacker>\r
+   :ctf:capture:<flagcolor>:<ID of attacker>\r
+   :ctf:return:<flagcolor>:<ID of defender>\r
+   :ctf:returned:<flagcolor>\r
+   :dom:taken:<previouscolor>:<ID of player>\r
+   :keyhunt:capture:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:carrierfrag:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:collect:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:destroyed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:destroyed_holdingkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:dropkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:losekey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:push:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :keyhunt:pushed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>\r
+   :scores:<gametype>_<mapname>:<map runtime>\r
+   :labels:player:<head1><flags>,<head2><flags>,...\r
+   :player:see-labels:<score1>,<score2>,...:<playtime>:<team>:<ID>:<nickname>\r
+   :player:see-labels:<score1>,<score2>,...:<playtime>:spectator:<ID>:<nickname>\r
+   :labels:teamscores:<head1><flags>,<head2><flags>,...\r
+   :teamscores:see-labels:<score1>,<score2>,...:<team>\r
+   :end\r
+   :restart\r
+   :gameover\r
+   :vote:suggested:<mapname>:<playerid>\r
+   :vote:keeptwo:<mapname>:<mapvotes>:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:...:didn't vote:<notvoters>\r
+   :vote:finished:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:<mapname>:<mapvotes>:...:didn't vote:<notvoters>\r
+   :vote:suggestion_accepted:<mapname>\r
+   :vote:vcall:<ID of player>:<vote command display string>\r
+   :vote:vyes:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>\r
+   :vote:vno:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>\r
+   :vote:vtimeout:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>\r
+   :vote:vstop:<ID of stopper>\r
+   :vote:vlogin:<ID of player>\r
+   :vote:vdo:<ID of player>:<do command display string>\r
+   :time:<YYYY-MM-DD HH:MM:SS>\r
+   :recordset:<ID of player>:<time in seconds>\r
+\r
+   Note that only the :join and :player lines ever contain player names. The\r
+   :time event only appears in the log files if sv_eventlog_files_timestamps\r
+   is 1; there is no way to log these time stamps to the console (for console\r
+   timestamps, set timestamps to 1).\r
+\r
+team colors:\r
+    1 = No Team (Domination)\r
+    5 = Red Team\r
+   14 = Blue Team\r
+   13 = Yellow Team\r
+   10 = Pink Team\r
+\r
+join types:\r
+    1 = connect\r
+    2 = auto\r
+    3 = manual\r
+    4 = spectating\r
+    6 = adminmove\r
+\r
+label flags:\r
+   !! = primary sorting key\r
+   <!! = primary sorting key, lower is better\r
+   ! = secondary sorting key\r
+   <! = secondary sorting key, lower is better\r
+   < = lower is better\r
+\r
+itemstring:\r
+   <weaponid><flags>\r
+   or\r
+   <weaponid><flags>|<runes>\r
+\r
+   where flags can contain:\r
+         F = player carries the flag\r
+         S = player has strength\r
+         I = player has the shield\r
+         T = player is typing (console, menu or chat)\r
+   \r
+   and weapon IDs are:\r
+         1 = Laser\r
+                2 = Shotgun\r
+                3 = Uzi\r
+         4 = Mortar\r
+         5 = Electro\r
+         6 = Crylink\r
+         7 = Nex\r
+         8 = Hagar\r
+         9 = Rocket Launcher\r
+        10 = Port-O-Launch\r
+        11 = MinstaNex\r
+        12 = Grappling Hook\r
+        13 = Heavy Laser Assault Cannon\r
+        14 = T.A.G. Seeker\r
+\r
+   runes/curses are stored as a bit mask with the following values:\r
+         1 = Strength\r
+         2 = Defense\r
+         4 = Regeneration\r
+         8 = Speed\r
+        16 = Vampire\r
+      8192 = Weakness\r
+     16384 = Vulnerability\r
+     32768 = Venom\r
+     65536 = Slow\r
+    131072 = Empathy\r
+\r
+death type:\r
+   either a weapon ID ORed with weapon death flags, or one of:\r
+     10000 = fallen to death\r
+     10001 = telefragged\r
+     10002 = drowned\r
+     10003 = killed by a trap / fallen into the void\r
+     10004 = lava\r
+     10005 = slime\r
+     10006 = console kill\r
+     10007 = (MinstaGib) out of ammo\r
+     10008 = swamp\r
+     10009 = team change\r
+     10010 = auto team change\r
+     10011 = camping protection\r
+        10012 = player became too fast (should never happen)\r
+        10013 = health rot\r
+        10014 = mirror damage\r
+        10015 = g_touchexplode\r
+        10100 = turret\r
+       10150 = spiderbot miniguns\r
+       10151 = spiderbot rocket\r
+       10152 = spiderbot, cushed by\r
+       10300 = custom deathmessage\r
+\r
+   weapon death flags are:\r
+       256 = secondary fire\r
+          512 = splash damage\r
+         1024 = bounced projectile\r
+         2048 = head shot (MinstaNex only)\r
+         4096 = unused flag\r
+\r
+There will be a log analyzer parsing this file format soon. Note that weapon\r
+IDs are below 10000.\r
index b8c06a28d6cbedbec528015d940d60f3e46b8b67..1ce898bf370b4d87eef2eff301808d1675c685e9 100644 (file)
@@ -1,14 +1,14 @@
-Made using the included map file (edited to contain the name of the current gun) at fov 90, 1280x768, normal settings except gl_picmip 0.
-
-Partial image cropped out, then edited using ImageMagick with the parameters
-
--level -3%,70%,1 -geometry 209x240
-
-respective
-
--level -3%,70%,1 -geometry 162x80
-
-The crop regions were:
-
-firstperson = bottom 627x310 pixels (later scaled down to 240 height)
-thirdperson = 288x331 pixels, anchored at the right foot of marine (bottom left corner on the image)
+Made using the included map file (edited to contain the name of the current gun) at fov 90, 1280x768, normal settings except gl_picmip 0.\r
+\r
+Partial image cropped out, then edited using ImageMagick with the parameters\r
+\r
+-level -3%,70%,1 -geometry 209x240\r
+\r
+respective\r
+\r
+-level -3%,70%,1 -geometry 162x80\r
+\r
+The crop regions were:\r
+\r
+firstperson = bottom 627x310 pixels (later scaled down to 240 height)\r
+thirdperson = 288x331 pixels, anchored at the right foot of marine (bottom left corner on the image)\r
index d7692000ee90fce5f86bed668a15a427be7fe2a5..66386b0fe6a756940884ab4122e72c4408cf7afd 100644 (file)
@@ -1,98 +1,98 @@
-map download:
-______________
-
-
-CLIENT SIDE:
-
-Should already work without configuration. You can however use the following
-cvars for further tuning:
-
-   cl_curl_enabled              download support enabled (master switch, default: 1)
-   cl_curl_maxdownloads         maximum number of downloads at once (default: 1)
-   cl_curl_maxspeed             maximum total speed in KiB/s (default: 100)
-
-Downloaded packages end up in |Nexuiz/data/dlcache/| or
-|~/.nexuiz/data/dlcache/| and are only used till you exit Nexuiz.
- If you want to play them localy or use them to setup a server of your
-own you can "accept" the packages by moving it one level up - right
-next to your config.cfg.
-
-You should regularily clean up your cache to save space and make the maps
-you really want available from the menu.
-
-
-SERVER SIDE:
-
-First of all, you need a HTTP or FTP server to host your PK3s. You can either
-use some web space provider, or set up your own. For this, use any FTP or HTTP
-server software you want (HTTP: lighttpd, Apache, thttpd; FTP: Filezilla,
-vsftpd). HTTP is to be preferred because it works better for firewalled
-players.
-
-On the server, you need to set up where to download the PK3s of the maps you
-are running. You can either use the cvar
-
-   sv_curl_defaulturl           default download URL
-
-to set it to some site, or put a file named "curl_urls.txt" in the data
-directory of the following format:
-
-   pattern        url
-   pattern        url
-   pattern        url
-   ...
-
-where always the first wildcard pattern match is taken.
-
-   data*          -
-   strale*        http://stralemaps.invalid/
-   *              http://all.the.other.stuff.invalid/id/here.php?pak=
-   foo*           http://wont.get.here.invalid/
-
-The pk3 name will be appended to the URL by DarkPlaces. Note that you NEED to
-append a trailing slash if you refer to a directory. If you specify a "-" as
-URL, the package will not be offered for download.
-
-
-INFORMATION FOR MIRROR/MAP SERVER ADMINS:
-
-The Referer is always set to dp://serverhost:serverport/, the User-Agent
-always starts with "Nexuiz". Look at this sample log line:
-
-141.2.16.3 - - [06/Jun/2006:19:43:14 +0000] "GET /~polzer/temp/nexmaps.php?filename=o-fun.pk3 HTTP/1.1" 302 - "dp://141.2.16.3:26000/" "Nexuiz Linux 21:26:17 Jun  6 2006"
-
-
-If you want to set up a redirection service, here is a sample PHP code for you
-to start from:
-
-<?
-
-function findmap($filename)
-{
-    # insert your database query or whatever you want here
-    if($filename == "foo.pk3")
-        return "http://barserver.invalid/foo.pk3";
-    return FALSE;
-}
-
-function bailout($code, $title, $message)
-{
-    header("HTTP/1.1 $code $title");
-    echo "<html><title>$title</title><h1>$title</h1>$message</html>";
-    exit(0);
-}   
-
-$filename = $_GET['filename'];
-
-$useragent = getenv("HTTP_USER_AGENT");
-if(strpos($useragent, "Nexuiz ") !== 0)
-    bailout(403, "Forbidden", "You're not a Nexuiz client.");
-    
-$url = findmap($filename);
-if(!$url)
-    bailout(404, "Not Found", "Well... try another file name?");
-    
-header("HTTP/1.1 302 Moved Temporarily");
-header("Location: $url");
-
-?>
+map download:\r
+______________\r
+\r
+\r
+CLIENT SIDE:\r
+\r
+Should already work without configuration. You can however use the following\r
+cvars for further tuning:\r
+\r
+   cl_curl_enabled              download support enabled (master switch, default: 1)\r
+   cl_curl_maxdownloads         maximum number of downloads at once (default: 1)\r
+   cl_curl_maxspeed             maximum total speed in KiB/s (default: 100)\r
+\r
+Downloaded packages end up in |Nexuiz/data/dlcache/| or\r
+|~/.nexuiz/data/dlcache/| and are only used till you exit Nexuiz.\r
+ If you want to play them localy or use them to setup a server of your\r
+own you can "accept" the packages by moving it one level up - right\r
+next to your config.cfg.\r
+\r
+You should regularily clean up your cache to save space and make the maps\r
+you really want available from the menu.\r
+\r
+\r
+SERVER SIDE:\r
+\r
+First of all, you need a HTTP or FTP server to host your PK3s. You can either\r
+use some web space provider, or set up your own. For this, use any FTP or HTTP\r
+server software you want (HTTP: lighttpd, Apache, thttpd; FTP: Filezilla,\r
+vsftpd). HTTP is to be preferred because it works better for firewalled\r
+players.\r
+\r
+On the server, you need to set up where to download the PK3s of the maps you\r
+are running. You can either use the cvar\r
+\r
+   sv_curl_defaulturl           default download URL\r
+\r
+to set it to some site, or put a file named "curl_urls.txt" in the data\r
+directory of the following format:\r
+\r
+   pattern        url\r
+   pattern        url\r
+   pattern        url\r
+   ...\r
+\r
+where always the first wildcard pattern match is taken.\r
+\r
+   data*          -\r
+   strale*        http://stralemaps.invalid/\r
+   *              http://all.the.other.stuff.invalid/id/here.php?pak=\r
+   foo*           http://wont.get.here.invalid/\r
+\r
+The pk3 name will be appended to the URL by DarkPlaces. Note that you NEED to\r
+append a trailing slash if you refer to a directory. If you specify a "-" as\r
+URL, the package will not be offered for download.\r
+\r
+\r
+INFORMATION FOR MIRROR/MAP SERVER ADMINS:\r
+\r
+The Referer is always set to dp://serverhost:serverport/, the User-Agent\r
+always starts with "Nexuiz". Look at this sample log line:\r
+\r
+141.2.16.3 - - [06/Jun/2006:19:43:14 +0000] "GET /~polzer/temp/nexmaps.php?filename=o-fun.pk3 HTTP/1.1" 302 - "dp://141.2.16.3:26000/" "Nexuiz Linux 21:26:17 Jun  6 2006"\r
+\r
+\r
+If you want to set up a redirection service, here is a sample PHP code for you\r
+to start from:\r
+\r
+<?\r
+\r
+function findmap($filename)\r
+{\r
+    # insert your database query or whatever you want here\r
+    if($filename == "foo.pk3")\r
+        return "http://barserver.invalid/foo.pk3";\r
+    return FALSE;\r
+}\r
+\r
+function bailout($code, $title, $message)\r
+{\r
+    header("HTTP/1.1 $code $title");\r
+    echo "<html><title>$title</title><h1>$title</h1>$message</html>";\r
+    exit(0);\r
+}   \r
+\r
+$filename = $_GET['filename'];\r
+\r
+$useragent = getenv("HTTP_USER_AGENT");\r
+if(strpos($useragent, "Nexuiz ") !== 0)\r
+    bailout(403, "Forbidden", "You're not a Nexuiz client.");\r
+    \r
+$url = findmap($filename);\r
+if(!$url)\r
+    bailout(404, "Not Found", "Well... try another file name?");\r
+    \r
+header("HTTP/1.1 302 Moved Temporarily");\r
+header("Location: $url");\r
+\r
+?>\r
index ebbb3d689cf49826251fcf303175aebbbfc85501..6a120886718db2b2f6fc949017313c2cb48e627e 100644 (file)
-==============
-=Mapping Help=
-==============
-
-While I can't help you make a map, I can help you get it listed in the menu and
-working in the maplist. :p  The central object is the .mapinfo file, but
-there's much more available.
-
-Table of Contents
------------------
-I        Map Lists & Scripts
-         (get your map listed and working)
-  i.     mapinfo
-  ii.    mapname.cfg
-
-II       Map Image
-
-III      Domination
-
-IV       CTF
-
-V        Rune Match
-
-VI       Race/CTS
-
-VII      Nexball
-
-Appendix A - Advanced mapinfo
-
-Appendix B - Helpful extras
-  i.     Team Colors
-  ii.    Text Colors
-
-Appendix C - Advanced Darkplaces shaders
-
-========================
-=I. Map Lists & Scripts=
-========================
-
-There now is just a single script/cfg file available to you, containing all map
-specific settings:
-
-mapname.mapinfo
-
-The mapinfo is actually required - however, the game is so nice that it
-automatically generates a draft of it for you.
-
-------------------
--The mapinfo file-
-------------------
-
-*cue even more scary music*
-
-The mapinfo file is basically what gets your map listed in the menu, and sets
-up the options needed to change to it. If no mapinfo file exists, the menu
-will automatically generate a rough draft for you on game startup. It will get
-stored into data/data/mapname.mapinfo.
-
-As an example, let's say I make a map called "wazat1.bsp". As long as I'm
-fantasizing, I might as well say this map is so well done I'm actually willing
-to release it for friends, neighbors, fellow forum visitors and other people
-who like me to judge me by. Let's also assume that I want domination,
-deathmatch/team deathmatch and runematch to all be playable on my map.
-
-This is very easy. First, I start the game and exit it again so the game writes
-data/data/wazat1.mapinfo for me. The file may look like:
-
-    title Wazat's Great Map
-    description Bleh.
-    author Unknown
-    _diameter 1966.839355
-    _spawnpoints 5
-    has weapons
-       cdtrack 5
-    gametype dm // defaults: timelimit=20 pointlimit=30 leadlimit=0
-    gametype dom // defaults: timelimit=20 pointlimit=200 teams=2 leadlimit=0
-    gametype rune // defaults: timelimit=20 pointlimit=200 leadlimit=0
-    gametype lms // defaults: timelimit=20 lives=9 leadlimit=0
-    gametype arena // defaults: timelimit=20 pointlimit=10 leadlimit=0
-
-As I see, the menu autodetected that my map may be suitable for deathmatch,
-domination, runematch, last man standing and arena. But I want the map to be
-played in domination, deathmatch, team deathmatch, runematch only, and I also
-want different timelimits/fraglimits, so I will change the "gametype" lines to:
-
-    gametype dom pointlimit=100 timelimit=15
-    gametype rune pointlimit=1000 timelimit=25
-    gametype dm pointlimit=40 timelimit=15
-    gametype tdm pointlimit=50 timelimit=0 teams=2
-
-Also, while I am at it, I should fix the placeholders in the map description lines:
-
-    title Wibble
-    description A large multi level arena map
-    author Wazat
-
-Although not entirely necessary, I will now move the .mapinfo file from
-data/data/maps/wazat1.mapinfo to data/maps/wazat1.mapinfo, so it is at the same
-place as my map. Next time I start the game, my map will be shown supporting
-the right game modes and with the right description in the menu.
-
-Also, note the "has weapons" line. If this line is not there (which happens if
-the map contains no weapon entities other than the Nex), the map will run in
-MinstaGib only and not be shown in the menu normally. So if you look for your
-map and don't find it, add "has weapons" to the mapinfo file, and make sure you
-have weapon entities placed.
-
-There's much more power in a mapinfo file. See Appendix A for more details.
-
-Gametype        | Syntax                                                                                                   | Notes
-----------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------
-Deathmatch      | gametype dm [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |
-Team Deathmatch | gametype tdm [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                | 2, 3, or 4 teams
-Domination      | gametype dom [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                | 2, 3, or 4 teams, only if map has no dom_team ents
-CTF             | gametype ctf [timelimit=...] [pointlimit=...] [caplimit=...] [leadlimit=...]                             | pointlimit if g_ctf_win_mode is 2, otherwise caplimit
-Runematch       | gametype rune [timelimit=...] [pointlimit=...] [leadlimit=...]                                           |
-LMS             | gametype lms [timelimit=...] [lives=...] [leadlimit=...]                                                 |
-Arena           | gametype arena [timelimit=...] [pointlinit=...] [leadlimit=...]                                          |
-Key Hunt        | gametype kh [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                 | 2, 3, or 4 teams
-Assault         | gametype as [timelimit=...]                                                                              | never uses points
-Onslaught       | gametype ons [timelimit=...]                                                                             | never uses points
-Race            | gametype rc [timelimit=...] [qualifying_timelimit=...] [laplimit=...] [teamlaplimit=...] [leadlimit=...] | g_race_teams: teamlaplimit is used instead of laplimit
-CTS             | gametype cts [timelimit=...] [skill=...]                                                                 | never uses points
-CA              | gametype ca [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |
-Nexball         | gametype dm [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |
-
-
-===============
-=II. Map Image=
-===============
-
-So, you've got your map listed in the menu and it plays properly, but the menu
-isn't showing your picture! Or the picture is scaled badly! What manner of man
-would create such an accursed abomination?!
-
-Well... That sounds like something I'd do. :D
-
-And it is really easy: just make a screenshot of the map in action (preferably
-with crosshair and HUD switched off), and place it next to the map as
-mapname.jpg. For best rendering and file size, make the image in 4:3 aspect
-ratio, but scale it to the resolution 256x256 or possibly 512x512. It will look
-skewed in your image editing app, but the menu will show it right, and your
-graphics card LOVES images of such dimension.
-
-
-=================
-=III. Domination=
-=================
-
-In order to get Domination working well in your map, you need to place dom_team
-and dom_controlpoint entites. You *must* have at least 3 dom_team entities - 2
-minimum teams and one blank one (empty netname and no team). You can have up to
-4 teams (5 dom_team entities), and remember: if you set 3 teams, the third team
-must be the yellow one, according to the team order.
-
-Dom Team
---------
-classname  dom_team
-netname    name of team (Red Team). Set to "" or don't define for the required
-           blank team.
-cnt        color of the team. See the "Helpful Extras" section for info.
-model      When this team captures control points, the points turn to this
-           model. If this is the neutral team, points start out as this model.
-noise      Sound to be played on the control point when it's captured. Only
-           players nearby will hear it.
-noise1     Sound to be played to all players when the control point is
-           captured. Also good for an annoncer voice ("Red Team has captured a
-           control point")
-
-Control Points
---------------
-classname  dom_controlpoint
-message    message to be displayed to all players when this point is captured,
-           preceded by the team's name. This defaults to " has captured a control point".
-           You can specify different names for each point, for example " has captured the
-           Lava Room".
-origin     where in the map this point is
-wait       How often this point gives its controlling team frags.
-frags      How many frags this point gives each wait cycle.
-
-Here is an example entry in a .ent file that includes colored text and 3 teams:
-
-{
-"classname" "dom_team"
-"netname" ""
-"model" "models/domination/dom_unclaimed.md3"
-}
-{
-"classname" "dom_team"
-"netname" "^4Blue Team"
-"cnt" "13"
-"noise" ""
-"noise1" "domination/claim.wav"
-"model" "models/domination/dom_blue.md3"
-}
-{
-"classname" "dom_team"
-"netname" "^1Red Team"
-"cnt" "4"
-"noise" ""
-"noise1" "domination/claim.wav"
-"model" "models/domination/dom_red.md3"
-}
-{
-"netname" "^3Yellow Team"
-"cnt" "12"
-"noise" ""
-"noise1" "domination/claim.wav"
-"model" "models/domination/dom_yellow.md3"
-}
-{
-"netname" "^6Pink Team"
-"cnt" "9"
-"noise" ""
-"noise1" "domination/claim.wav"
-"model" "models/domination/dom_pink.md3"
-}
-{
-"classname" "dom_controlpoint"
-"message" " ^3has captured the ^1Hallways"
-"origin" "-206.0 -488.8 -150.0"
-"frags" "3"
-"wait" "5"
-"scale" "1.3"
-}
-{
-"classname" "dom_controlpoint"
-"message" " ^3has captured the ^1Lavaroom"
-"origin" "1457.1  19.9 -110.0"
-"frags" "1"
-"wait" "5"
-}
-{
-"classname" "dom_controlpoint"
-"message" " ^3controls the ^1Nex & Strength"
-"origin" "-259.8 299.3  5"
-"frags" "1"
-"wait" "5"
-}
-{
-"classname" "dom_controlpoint"
-"message" " ^3has captured the ^1Upper Platform"
-"origin" "539.7 1206.0 182.0"
-"frags" "1"
-"wait" "5"
-}
-{
-"classname" "dom_controlpoint"
-"message" " ^3has captured the ^1Teleport Room"
-"origin" "-1000.0 636.2 -16.0"
-"frags" "1"
-"wait" "5"
-}
-
-
-As you can see in the example, there are 5 dom_team ents: one blank, Red, Blue,
-Yellow and Pink. Each control point has a different message (giving it a
-special name), and the one in the hallways gives 3 frags every 5 seconds
-instead of just one, making it more valuable.
-
-If your map contains the required entities for Domination, the menu will
-automatically detect it for supporting Domination. To force the map to get
-re-detected after you add such entities, delete the data/data/mapname.mapinfo
-file - or simply edit it to add the "gametype dom" line.
-
-
-=========
-=IV. CTF=
-=========
-
-Capture the flag needs at least 1 CTF flag per team, and can also make use of
-team spawnpoints.
-
-CTF Flags
----------
-classname  item_flag_team1 or item_flag_team2
-angle      direction the flag will point
-model      model of the flag (default: models/ctf/flag_red.md3 or
-           models/ctf/flag_blue.md3)
-noise      sound played when flag is stolen (default: "ctf/take.wav")
-noise1     sound played when flag is returned by a teammate (default:
-           "ctf/return.wav")
-noise2     sound played when flag is captured (default: "ctf/capture.wav")
-noise3     sound played when flag returns itself (default: "ctf/respawn.wav")
-
-Team Spawnpoints
-----------------
-classname  info_player_team1 or info_player_team2
-*note: These function just like info_player_deathmatch, but for one team only.
-If you don't make team spawnpoints, info_player_deathmatch is used instead.
-
-If your map contains the required entities for CTF, the menu will automatically
-detect it for supporting CTF. To force the map to get re-detected after you add
-such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
-add the "gametype ctf" line.
-
-==============
-=V. Runematch=
-==============
-
-Runematch needs only one type of entity to work: rune spawn points. You will
-need at least one for each rune (5 minimum at the time of this writing), though
-you should probably have more than that in the map. Just give the points a
-classname and origin.
-
-Rune Spawnpoints
-----------------
-classname  runematch_spawn_point
-
-If your map contains the required entities for Runematch, the menu will automatically
-detect it for supporting Runematch. To force the map to get re-detected after you add
-such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
-add the "gametype rune" line.
-
-==============
-=VI. Race/CTS=
-==============
-
-Making a race map is not hard: you need some special spawnpoints, and some checkpoints.
-
-Spawnpoints
------------
-classname  info_player_race
-target     targetname of the checkpoint
-race_place for finish line checkpoints, the place of the point, or -1 to make it qualifying/CTS-only, or unset to let all the other players spawn
-
-Checkpoints
------------
-classname  trigger_race_checkpoint
-targetname some name to target the checkpoint with
-cnt        number of the checkpoint (or 0 for finish line)
-
-Note that checkpoints are brush entities, and they should be somewhat thick and
-cover the full volume the player could use to get past them.
-
-Example of entity placement:
-
-                         ###
-    ---------------------###---
-   /    9999  7  5  3  1>###   \
-  /     9999 8  6  4  2 >###    \
- |     ------------------###     |
-%%%%%%%%                 ###|    |
-%%%%%%%%                 $$$|    |
- | ^ ^ ------------------$$$     |
- \                       $$$ <  /
-  \                      $$$ < /
-   ----------------------$$$---
-                         $$$
-
-###:  classname = trigger_race_checkpoint, cnt = 0, targetname = finish
-$$$:  classname = trigger_race_checkpoint, cnt = 1, targetname = cp1
-%%%:  classname = trigger_race_checkpoint, cnt = 2, targetname = cp2
->:    classname = info_player_race,                 target = finish, angle = 0
-1:    classname = info_player_race,                 target = finish, angle = 0, race_place = 1
-2:    classname = info_player_race,                 target = finish, angle = 0, race_place = 2
-....
-8:    classname = info_player_race,                 target = finish, angle = 0, race_place = 8
-9:    classname = info_player_race,                 target = finish, angle = 0, race_place = 9
-<:    classname = info_player_race,                 target = cp1,    angle = 180
-^:    classname = info_player_race,                 target = cp2,    angle = 90
-
-If your map contains the required entities for Race, the menu will automatically
-detect it for supporting Race. To force the map to get re-detected after you add
-such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
-add the "gametype rc" line.
-
-CTS maps do not use checkpoints with race_place set, so you can leave them out
-for CTS maps.
-
-The skill parameter in the mapinfo entry for CTS shall be in the range from 0 (easy) to 10 (impossible).
-
-=============
-=VI. Nexball=
-=============
-
-There are three required entities: nexball_redgoal, nexball_bluegoal, and one of nexball_basketball
-or nexball_football. There are also optional nexball_yellowgoal and nexball_pinkgoal entities (don't
-add a pink goal when there is no yellow goal on the map, it will crash)
-
-Goals are made just like any other regular triggers. You can use multiple brushes for one trigger,
-but avoid this if possible.
-
-There are also two other goal-like entities, nexball_fault and nexball_bound, the first taking a point
-from the team that hits the trigger with the ball, the second simply returning it. You can spawn the
-ball inside a goal-like trigger, this can be useful for basketball maps with separate teams and a
-common ball spawn.
-The different keys for the entities are documented in entities.def.
-
-The ball is affected by trigger_impulse, but not by trigger_push or teleporters.
-
-You should better avoid patches on the field, as collisions can sometimes get buggy on these.
-
-
-===============================
-=Appendix A - Advanced mapinfo=
-===============================
-
-You now know how to make a basic, bare-bones mapinfo to set up a couple options
-and load your map. However, there's much more you can do!  Consider these
-senarios:
-
-1. The laser has too high of a force for laser jumps and ruins CTF
-2. I don't want players to start out with the shotgun, but with the machinegun
-   instead
-3. The map takes so much server CPU performance that the anti-wallhack can't be
-   made active
-
-Each of these situations can be resolved with ease with a little work in the
-mapinfo file.
-
-To do this, I can add the following lines to my mapinfo file:
-
-    settemp_for_type ctf g_balance_laser_primary_force 200
-    settemp_for_type all g_start_weapon_shotgun 0
-    settemp_for_type all g_start_weapon_uzi 1
-    settemp_for_type all sv_cullentities_trace 0
-
-These "settemp" settings are automatically removed when the map is left and
-another is loaded. As you can see, it is possible to make per-mode temporary
-settings, and global ones.
-
-Similar settings are also possible for the client:
-
-    clientsettemp_for_type all r_shadow_glossexponent 96
-
-Another possibility is to specify fog settings in the mapinfo, for convenience
-in case you set sv_foginterval by it too (to force the fog on the clients):
-
-    fog 0.2 0.25 0.3 0.3 1 1500
-    settemp_for_type all sv_foginterval 5
-
-
-=============================
-=Appendix B - Helpful Extras=
-=============================
-
-----------------
--i. Team Colors-
-----------------
-When you need to set an entity's color or team, use these values:
-
-Red
----
-Team:      5
-Color:     4
-
-Blue
-----
-Team:      14
-Color:     13
-
-Yellow
-------
-Team:      13
-Color:     12
-
-Pink
------
-Team:      10
-Color:     9
-
-
-----------------
--i. Text Colors-
-----------------
-Occasionally you may want to print text in color, such as team names. Here are your options:
-
-1  Red
-2  Green
-3  Yellow
-4  Blue
-5  Cyan
-6  Magenta
-7  White
-8  Grey (transparent)
-9  Grey (solid)
-0  Black
-
-==========================================
-=Appendix C - Advanced Darkplaces shaders=
-==========================================
-
-Shader parameters for DP's own features:
-- dp_reflect <distort> <r> <g> <b> <a>
-  Makes surfaces of this shader reflective with r_water. The reflection is
-  alpha blended on the texture with the given alpha, and modulated by the given
-  color. distort is used in conjunction with the normalmap to simulate a
-  nonplanar water surface.
-- dp_refract <distort> <r> <g> <b>
-  Makes surfaces of this shader refractive with r_water. The refraction
-  replaces the transparency of the texture. distort is used in conjunction with
-  the normalmap to simulate a nonplanar water surface.
-- dp_water <reflectmin> <reflectmax> <refractdistort> <reflectdistort> <refractr> <refractg> <refractb> <reflectr> <reflectg> <reflectb> <alpha>
-  This combines the effects of dp_reflect and dp_refract to simulate a water
-  surface. However, the refraction and the reflection are mixed using a Fresnel
-  equation that makes the amount of reflection slide from reflectmin when
-  looking parallel to the water to reflectmax when looking directly into the
-  water. The result of this reflection/refraction mix is then layered BELOW the
-  texture of the shader, so basically, it "fills up" the alpha values of the
-  water. The alpha value is a multiplicator for the alpha value on the texture
-  - set this to a small value like 0.1 to emphasize the reflection and make
-  the water transparent; but if r_water is 0, alpha isn't used, so the water can
-  be very visible then too.
-
+==============\r
+=Mapping Help=\r
+==============\r
+\r
+While I can't help you make a map, I can help you get it listed in the menu and\r
+working in the maplist. :p  The central object is the .mapinfo file, but\r
+there's much more available.\r
+\r
+Table of Contents\r
+-----------------\r
+I        Map Lists & Scripts\r
+         (get your map listed and working)\r
+  i.     mapinfo\r
+  ii.    mapname.cfg\r
+\r
+II       Map Image\r
+\r
+III      Domination\r
+\r
+IV       CTF\r
+\r
+V        Rune Match\r
+\r
+VI       Race/CTS\r
+\r
+VII      Nexball\r
+\r
+Appendix A - Advanced mapinfo\r
+\r
+Appendix B - Helpful extras\r
+  i.     Team Colors\r
+  ii.    Text Colors\r
+\r
+Appendix C - Advanced Darkplaces shaders\r
+\r
+========================\r
+=I. Map Lists & Scripts=\r
+========================\r
+\r
+There now is just a single script/cfg file available to you, containing all map\r
+specific settings:\r
+\r
+mapname.mapinfo\r
+\r
+The mapinfo is actually required - however, the game is so nice that it\r
+automatically generates a draft of it for you.\r
+\r
+------------------\r
+-The mapinfo file-\r
+------------------\r
+\r
+*cue even more scary music*\r
+\r
+The mapinfo file is basically what gets your map listed in the menu, and sets\r
+up the options needed to change to it. If no mapinfo file exists, the menu\r
+will automatically generate a rough draft for you on game startup. It will get\r
+stored into data/data/mapname.mapinfo.\r
+\r
+As an example, let's say I make a map called "wazat1.bsp". As long as I'm\r
+fantasizing, I might as well say this map is so well done I'm actually willing\r
+to release it for friends, neighbors, fellow forum visitors and other people\r
+who like me to judge me by. Let's also assume that I want domination,\r
+deathmatch/team deathmatch and runematch to all be playable on my map.\r
+\r
+This is very easy. First, I start the game and exit it again so the game writes\r
+data/data/wazat1.mapinfo for me. The file may look like:\r
+\r
+    title Wazat's Great Map\r
+    description Bleh.\r
+    author Unknown\r
+    _diameter 1966.839355\r
+    _spawnpoints 5\r
+    has weapons\r
+       cdtrack 5\r
+    gametype dm // defaults: timelimit=20 pointlimit=30 leadlimit=0\r
+    gametype dom // defaults: timelimit=20 pointlimit=200 teams=2 leadlimit=0\r
+    gametype rune // defaults: timelimit=20 pointlimit=200 leadlimit=0\r
+    gametype lms // defaults: timelimit=20 lives=9 leadlimit=0\r
+    gametype arena // defaults: timelimit=20 pointlimit=10 leadlimit=0\r
+\r
+As I see, the menu autodetected that my map may be suitable for deathmatch,\r
+domination, runematch, last man standing and arena. But I want the map to be\r
+played in domination, deathmatch, team deathmatch, runematch only, and I also\r
+want different timelimits/fraglimits, so I will change the "gametype" lines to:\r
+\r
+    gametype dom pointlimit=100 timelimit=15\r
+    gametype rune pointlimit=1000 timelimit=25\r
+    gametype dm pointlimit=40 timelimit=15\r
+    gametype tdm pointlimit=50 timelimit=0 teams=2\r
+\r
+Also, while I am at it, I should fix the placeholders in the map description lines:\r
+\r
+    title Wibble\r
+    description A large multi level arena map\r
+    author Wazat\r
+\r
+Although not entirely necessary, I will now move the .mapinfo file from\r
+data/data/maps/wazat1.mapinfo to data/maps/wazat1.mapinfo, so it is at the same\r
+place as my map. Next time I start the game, my map will be shown supporting\r
+the right game modes and with the right description in the menu.\r
+\r
+Also, note the "has weapons" line. If this line is not there (which happens if\r
+the map contains no weapon entities other than the Nex), the map will run in\r
+MinstaGib only and not be shown in the menu normally. So if you look for your\r
+map and don't find it, add "has weapons" to the mapinfo file, and make sure you\r
+have weapon entities placed.\r
+\r
+There's much more power in a mapinfo file. See Appendix A for more details.\r
+\r
+Gametype        | Syntax                                                                                                   | Notes\r
+----------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------\r
+Deathmatch      | gametype dm [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |\r
+Team Deathmatch | gametype tdm [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                | 2, 3, or 4 teams\r
+Domination      | gametype dom [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                | 2, 3, or 4 teams, only if map has no dom_team ents\r
+CTF             | gametype ctf [timelimit=...] [pointlimit=...] [caplimit=...] [leadlimit=...]                             | pointlimit if g_ctf_win_mode is 2, otherwise caplimit\r
+Runematch       | gametype rune [timelimit=...] [pointlimit=...] [leadlimit=...]                                           |\r
+LMS             | gametype lms [timelimit=...] [lives=...] [leadlimit=...]                                                 |\r
+Arena           | gametype arena [timelimit=...] [pointlinit=...] [leadlimit=...]                                          |\r
+Key Hunt        | gametype kh [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                 | 2, 3, or 4 teams\r
+Assault         | gametype as [timelimit=...]                                                                              | never uses points\r
+Onslaught       | gametype ons [timelimit=...]                                                                             | never uses points\r
+Race            | gametype rc [timelimit=...] [qualifying_timelimit=...] [laplimit=...] [teamlaplimit=...] [leadlimit=...] | g_race_teams: teamlaplimit is used instead of laplimit\r
+CTS             | gametype cts [timelimit=...] [skill=...]                                                                 | never uses points\r
+CA              | gametype ca [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |\r
+Nexball         | gametype dm [timelimit=...] [pointlimit=...] [leadlimit=...]                                             |\r
+\r
+\r
+===============\r
+=II. Map Image=\r
+===============\r
+\r
+So, you've got your map listed in the menu and it plays properly, but the menu\r
+isn't showing your picture! Or the picture is scaled badly! What manner of man\r
+would create such an accursed abomination?!\r
+\r
+Well... That sounds like something I'd do. :D\r
+\r
+And it is really easy: just make a screenshot of the map in action (preferably\r
+with crosshair and HUD switched off), and place it next to the map as\r
+mapname.jpg. For best rendering and file size, make the image in 4:3 aspect\r
+ratio, but scale it to the resolution 256x256 or possibly 512x512. It will look\r
+skewed in your image editing app, but the menu will show it right, and your\r
+graphics card LOVES images of such dimension.\r
+\r
+\r
+=================\r
+=III. Domination=\r
+=================\r
+\r
+In order to get Domination working well in your map, you need to place dom_team\r
+and dom_controlpoint entites. You *must* have at least 3 dom_team entities - 2\r
+minimum teams and one blank one (empty netname and no team). You can have up to\r
+4 teams (5 dom_team entities), and remember: if you set 3 teams, the third team\r
+must be the yellow one, according to the team order.\r
+\r
+Dom Team\r
+--------\r
+classname  dom_team\r
+netname    name of team (Red Team). Set to "" or don't define for the required\r
+           blank team.\r
+cnt        color of the team. See the "Helpful Extras" section for info.\r
+model      When this team captures control points, the points turn to this\r
+           model. If this is the neutral team, points start out as this model.\r
+noise      Sound to be played on the control point when it's captured. Only\r
+           players nearby will hear it.\r
+noise1     Sound to be played to all players when the control point is\r
+           captured. Also good for an annoncer voice ("Red Team has captured a\r
+           control point")\r
+\r
+Control Points\r
+--------------\r
+classname  dom_controlpoint\r
+message    message to be displayed to all players when this point is captured,\r
+           preceded by the team's name. This defaults to " has captured a control point".\r
+           You can specify different names for each point, for example " has captured the\r
+           Lava Room".\r
+origin     where in the map this point is\r
+wait       How often this point gives its controlling team frags.\r
+frags      How many frags this point gives each wait cycle.\r
+\r
+Here is an example entry in a .ent file that includes colored text and 3 teams:\r
+\r
+{\r
+"classname" "dom_team"\r
+"netname" ""\r
+"model" "models/domination/dom_unclaimed.md3"\r
+}\r
+{\r
+"classname" "dom_team"\r
+"netname" "^4Blue Team"\r
+"cnt" "13"\r
+"noise" ""\r
+"noise1" "domination/claim.wav"\r
+"model" "models/domination/dom_blue.md3"\r
+}\r
+{\r
+"classname" "dom_team"\r
+"netname" "^1Red Team"\r
+"cnt" "4"\r
+"noise" ""\r
+"noise1" "domination/claim.wav"\r
+"model" "models/domination/dom_red.md3"\r
+}\r
+{\r
+"netname" "^3Yellow Team"\r
+"cnt" "12"\r
+"noise" ""\r
+"noise1" "domination/claim.wav"\r
+"model" "models/domination/dom_yellow.md3"\r
+}\r
+{\r
+"netname" "^6Pink Team"\r
+"cnt" "9"\r
+"noise" ""\r
+"noise1" "domination/claim.wav"\r
+"model" "models/domination/dom_pink.md3"\r
+}\r
+{\r
+"classname" "dom_controlpoint"\r
+"message" " ^3has captured the ^1Hallways"\r
+"origin" "-206.0 -488.8 -150.0"\r
+"frags" "3"\r
+"wait" "5"\r
+"scale" "1.3"\r
+}\r
+{\r
+"classname" "dom_controlpoint"\r
+"message" " ^3has captured the ^1Lavaroom"\r
+"origin" "1457.1  19.9 -110.0"\r
+"frags" "1"\r
+"wait" "5"\r
+}\r
+{\r
+"classname" "dom_controlpoint"\r
+"message" " ^3controls the ^1Nex & Strength"\r
+"origin" "-259.8 299.3  5"\r
+"frags" "1"\r
+"wait" "5"\r
+}\r
+{\r
+"classname" "dom_controlpoint"\r
+"message" " ^3has captured the ^1Upper Platform"\r
+"origin" "539.7 1206.0 182.0"\r
+"frags" "1"\r
+"wait" "5"\r
+}\r
+{\r
+"classname" "dom_controlpoint"\r
+"message" " ^3has captured the ^1Teleport Room"\r
+"origin" "-1000.0 636.2 -16.0"\r
+"frags" "1"\r
+"wait" "5"\r
+}\r
+\r
+\r
+As you can see in the example, there are 5 dom_team ents: one blank, Red, Blue,\r
+Yellow and Pink. Each control point has a different message (giving it a\r
+special name), and the one in the hallways gives 3 frags every 5 seconds\r
+instead of just one, making it more valuable.\r
+\r
+If your map contains the required entities for Domination, the menu will\r
+automatically detect it for supporting Domination. To force the map to get\r
+re-detected after you add such entities, delete the data/data/mapname.mapinfo\r
+file - or simply edit it to add the "gametype dom" line.\r
+\r
+\r
+=========\r
+=IV. CTF=\r
+=========\r
+\r
+Capture the flag needs at least 1 CTF flag per team, and can also make use of\r
+team spawnpoints.\r
+\r
+CTF Flags\r
+---------\r
+classname  item_flag_team1 or item_flag_team2\r
+angle      direction the flag will point\r
+model      model of the flag (default: models/ctf/flag_red.md3 or\r
+           models/ctf/flag_blue.md3)\r
+noise      sound played when flag is stolen (default: "ctf/take.wav")\r
+noise1     sound played when flag is returned by a teammate (default:\r
+           "ctf/return.wav")\r
+noise2     sound played when flag is captured (default: "ctf/capture.wav")\r
+noise3     sound played when flag returns itself (default: "ctf/respawn.wav")\r
+\r
+Team Spawnpoints\r
+----------------\r
+classname  info_player_team1 or info_player_team2\r
+*note: These function just like info_player_deathmatch, but for one team only.\r
+If you don't make team spawnpoints, info_player_deathmatch is used instead.\r
+\r
+If your map contains the required entities for CTF, the menu will automatically\r
+detect it for supporting CTF. To force the map to get re-detected after you add\r
+such entities, delete the data/data/mapname.mapinfo file - or simply edit it to\r
+add the "gametype ctf" line.\r
+\r
+==============\r
+=V. Runematch=\r
+==============\r
+\r
+Runematch needs only one type of entity to work: rune spawn points. You will\r
+need at least one for each rune (5 minimum at the time of this writing), though\r
+you should probably have more than that in the map. Just give the points a\r
+classname and origin.\r
+\r
+Rune Spawnpoints\r
+----------------\r
+classname  runematch_spawn_point\r
+\r
+If your map contains the required entities for Runematch, the menu will automatically\r
+detect it for supporting Runematch. To force the map to get re-detected after you add\r
+such entities, delete the data/data/mapname.mapinfo file - or simply edit it to\r
+add the "gametype rune" line.\r
+\r
+==============\r
+=VI. Race/CTS=\r
+==============\r
+\r
+Making a race map is not hard: you need some special spawnpoints, and some checkpoints.\r
+\r
+Spawnpoints\r
+-----------\r
+classname  info_player_race\r
+target     targetname of the checkpoint\r
+race_place for finish line checkpoints, the place of the point, or -1 to make it qualifying/CTS-only, or unset to let all the other players spawn\r
+\r
+Checkpoints\r
+-----------\r
+classname  trigger_race_checkpoint\r
+targetname some name to target the checkpoint with\r
+cnt        number of the checkpoint (or 0 for finish line)\r
+\r
+Note that checkpoints are brush entities, and they should be somewhat thick and\r
+cover the full volume the player could use to get past them.\r
+\r
+Example of entity placement:\r
+\r
+                         ###\r
+    ---------------------###---\r
+   /    9999  7  5  3  1>###   \\r
+  /     9999 8  6  4  2 >###    \\r
+ |     ------------------###     |\r
+%%%%%%%%                 ###|    |\r
+%%%%%%%%                 $$$|    |\r
+ | ^ ^ ------------------$$$     |\r
+ \                       $$$ <  /\r
+  \                      $$$ < /\r
+   ----------------------$$$---\r
+                         $$$\r
+\r
+###:  classname = trigger_race_checkpoint, cnt = 0, targetname = finish\r
+$$$:  classname = trigger_race_checkpoint, cnt = 1, targetname = cp1\r
+%%%:  classname = trigger_race_checkpoint, cnt = 2, targetname = cp2\r
+>:    classname = info_player_race,                 target = finish, angle = 0\r
+1:    classname = info_player_race,                 target = finish, angle = 0, race_place = 1\r
+2:    classname = info_player_race,                 target = finish, angle = 0, race_place = 2\r
+....\r
+8:    classname = info_player_race,                 target = finish, angle = 0, race_place = 8\r
+9:    classname = info_player_race,                 target = finish, angle = 0, race_place = 9\r
+<:    classname = info_player_race,                 target = cp1,    angle = 180\r
+^:    classname = info_player_race,                 target = cp2,    angle = 90\r
+\r
+If your map contains the required entities for Race, the menu will automatically\r
+detect it for supporting Race. To force the map to get re-detected after you add\r
+such entities, delete the data/data/mapname.mapinfo file - or simply edit it to\r
+add the "gametype rc" line.\r
+\r
+CTS maps do not use checkpoints with race_place set, so you can leave them out\r
+for CTS maps.\r
+\r
+The skill parameter in the mapinfo entry for CTS shall be in the range from 0 (easy) to 10 (impossible).\r
+\r
+=============\r
+=VI. Nexball=\r
+=============\r
+\r
+There are three required entities: nexball_redgoal, nexball_bluegoal, and one of nexball_basketball\r
+or nexball_football. There are also optional nexball_yellowgoal and nexball_pinkgoal entities (don't\r
+add a pink goal when there is no yellow goal on the map, it will crash)\r
+\r
+Goals are made just like any other regular triggers. You can use multiple brushes for one trigger,\r
+but avoid this if possible.\r
+\r
+There are also two other goal-like entities, nexball_fault and nexball_bound, the first taking a point\r
+from the team that hits the trigger with the ball, the second simply returning it. You can spawn the\r
+ball inside a goal-like trigger, this can be useful for basketball maps with separate teams and a\r
+common ball spawn.\r
+The different keys for the entities are documented in entities.def.\r
+\r
+The ball is affected by trigger_impulse, but not by trigger_push or teleporters.\r
+\r
+You should better avoid patches on the field, as collisions can sometimes get buggy on these.\r
+\r
+\r
+===============================\r
+=Appendix A - Advanced mapinfo=\r
+===============================\r
+\r
+You now know how to make a basic, bare-bones mapinfo to set up a couple options\r
+and load your map. However, there's much more you can do!  Consider these\r
+senarios:\r
+\r
+1. The laser has too high of a force for laser jumps and ruins CTF\r
+2. I don't want players to start out with the shotgun, but with the machinegun\r
+   instead\r
+3. The map takes so much server CPU performance that the anti-wallhack can't be\r
+   made active\r
+\r
+Each of these situations can be resolved with ease with a little work in the\r
+mapinfo file.\r
+\r
+To do this, I can add the following lines to my mapinfo file:\r
+\r
+    settemp_for_type ctf g_balance_laser_primary_force 200\r
+    settemp_for_type all g_start_weapon_shotgun 0\r
+    settemp_for_type all g_start_weapon_uzi 1\r
+    settemp_for_type all sv_cullentities_trace 0\r
+\r
+These "settemp" settings are automatically removed when the map is left and\r
+another is loaded. As you can see, it is possible to make per-mode temporary\r
+settings, and global ones.\r
+\r
+Similar settings are also possible for the client:\r
+\r
+    clientsettemp_for_type all r_shadow_glossexponent 96\r
+\r
+Another possibility is to specify fog settings in the mapinfo, for convenience\r
+in case you set sv_foginterval by it too (to force the fog on the clients):\r
+\r
+    fog 0.2 0.25 0.3 0.3 1 1500\r
+    settemp_for_type all sv_foginterval 5\r
+\r
+\r
+=============================\r
+=Appendix B - Helpful Extras=\r
+=============================\r
+\r
+----------------\r
+-i. Team Colors-\r
+----------------\r
+When you need to set an entity's color or team, use these values:\r
+\r
+Red\r
+---\r
+Team:      5\r
+Color:     4\r
+\r
+Blue\r
+----\r
+Team:      14\r
+Color:     13\r
+\r
+Yellow\r
+------\r
+Team:      13\r
+Color:     12\r
+\r
+Pink\r
+-----\r
+Team:      10\r
+Color:     9\r
+\r
+\r
+----------------\r
+-i. Text Colors-\r
+----------------\r
+Occasionally you may want to print text in color, such as team names. Here are your options:\r
+\r
+1  Red\r
+2  Green\r
+3  Yellow\r
+4  Blue\r
+5  Cyan\r
+6  Magenta\r
+7  White\r
+8  Grey (transparent)\r
+9  Grey (solid)\r
+0  Black\r
+\r
+==========================================\r
+=Appendix C - Advanced Darkplaces shaders=\r
+==========================================\r
+\r
+Shader parameters for DP's own features:\r
+- dp_reflect <distort> <r> <g> <b> <a>\r
+  Makes surfaces of this shader reflective with r_water. The reflection is\r
+  alpha blended on the texture with the given alpha, and modulated by the given\r
+  color. distort is used in conjunction with the normalmap to simulate a\r
+  nonplanar water surface.\r
+- dp_refract <distort> <r> <g> <b>\r
+  Makes surfaces of this shader refractive with r_water. The refraction\r
+  replaces the transparency of the texture. distort is used in conjunction with\r
+  the normalmap to simulate a nonplanar water surface.\r
+- dp_water <reflectmin> <reflectmax> <refractdistort> <reflectdistort> <refractr> <refractg> <refractb> <reflectr> <reflectg> <reflectb> <alpha>\r
+  This combines the effects of dp_reflect and dp_refract to simulate a water\r
+  surface. However, the refraction and the reflection are mixed using a Fresnel\r
+  equation that makes the amount of reflection slide from reflectmin when\r
+  looking parallel to the water to reflectmax when looking directly into the\r
+  water. The result of this reflection/refraction mix is then layered BELOW the\r
+  texture of the shader, so basically, it "fills up" the alpha values of the\r
+  water. The alpha value is a multiplicator for the alpha value on the texture\r
+  - set this to a small value like 0.1 to emphasize the reflection and make\r
+  the water transparent; but if r_water is 0, alpha isn't used, so the water can\r
+  be very visible then too.\r
+\r
diff --git a/Docs/nexuiz.game b/Docs/nexuiz.game
deleted file mode 100644 (file)
index 470ae59..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
-<game
-  name="Nexuiz"
-  basegame="data"
-  enginepath="~/nexuizsvn/trunk"
-  engine="nexuiz-linux-sdl"
-  gametools="~/ZeroRadiant/install/games"
-  gamename="nexuiz"
-  prefix=".nexuiz"
-  shaderpath="scripts/"
-  default_scale="0.5"
-/>
index a1e4a0735fa9beb9a1f8f189bdb8c07813736d7b..b894bd6961b231f04400466d615b4ce8b789d67a 100644 (file)
@@ -1,44 +1,44 @@
-cvars:
-______________
-
-   sv_logscores_console                print scores to serverconsole after each match (default: 0, set to 1 to enable)
-   sv_logscores_file           print scores to a file after each match (default: 0)
-   sv_logscores_filename       filename of the output file if sv_logscores_file is enabled (default: "scores.log",
-                                 the file will be stored in Nexuiz/data/data or ~/.nexuiz/data/data)
-   sv_logscores_bots           choose whether bot are included in stats or not (default: 0)
-
-
-commands:
-______________
-
-   printstats                  print current scores to file/console (requires sv_logscores_console and/or 
-                                 sv_logscores_file to be enabled)
-
-
-log format:
-______________
-
-example:
-   
-   :scores:dm_nexdm01:131
-   :player:1:7:129:1:GrooveMachine
-   :player:1:4:129:1:DanceWithMe
-   :player:10:1:130:3:Player
-   :end
-   
-   start of a new section:     :scores:<gametype>_<mapname>:<map runtime>              (if the dump was triggered
-                                  by "printstats", the line starts with :status:)
-   player entry:               :player:<frags>:<deaths>:<playtime>:<team>:<nickname>   (playername might contain ":",
-                                  so be sure your parser doesn't split them, playtime is messured in seconds)
-   section end:                        :end
-
-team colors:
-   Red Team    =  5
-   Blue Team   = 14
-   Yellow Team = 13
-   Pink Team   = 10
-
-   other team numbers may appear in free for all games
-
-   for an example parser (written in php, thanks to tChr) have a look at:
-      http://excalibur.nvg.ntnu.no/nexuiz/statsparser
+cvars:\r
+______________\r
+\r
+   sv_logscores_console                print scores to serverconsole after each match (default: 0, set to 1 to enable)\r
+   sv_logscores_file           print scores to a file after each match (default: 0)\r
+   sv_logscores_filename       filename of the output file if sv_logscores_file is enabled (default: "scores.log",\r
+                                 the file will be stored in Nexuiz/data/data or ~/.nexuiz/data/data)\r
+   sv_logscores_bots           choose whether bot are included in stats or not (default: 0)\r
+\r
+\r
+commands:\r
+______________\r
+\r
+   printstats                  print current scores to file/console (requires sv_logscores_console and/or \r
+                                 sv_logscores_file to be enabled)\r
+\r
+\r
+log format:\r
+______________\r
+\r
+example:\r
+   \r
+   :scores:dm_nexdm01:131\r
+   :player:1:7:129:1:GrooveMachine\r
+   :player:1:4:129:1:DanceWithMe\r
+   :player:10:1:130:3:Player\r
+   :end\r
+   \r
+   start of a new section:     :scores:<gametype>_<mapname>:<map runtime>              (if the dump was triggered\r
+                                  by "printstats", the line starts with :status:)\r
+   player entry:               :player:<frags>:<deaths>:<playtime>:<team>:<nickname>   (playername might contain ":",\r
+                                  so be sure your parser doesn't split them, playtime is messured in seconds)\r
+   section end:                        :end\r
+\r
+team colors:\r
+   Red Team    =  5\r
+   Blue Team   = 14\r
+   Yellow Team = 13\r
+   Pink Team   = 10\r
+\r
+   other team numbers may appear in free for all games\r
+\r
+   for an example parser (written in php, thanks to tChr) have a look at:\r
+      http://excalibur.nvg.ntnu.no/nexuiz/statsparser\r
diff --git a/all b/all
index 9af0b7c4db9ad5be1d24b378aa8c7ce1e5f6580c..fc966598fc79f6f975f306999a8e6c5ae0f7b008 100755 (executable)
--- a/all
+++ b/all
@@ -1668,8 +1668,8 @@ case "$cmd" in
                rm -f Xonotic/key_15.d0pk
                {
                        verbose cd Xonotic/mapping
-                       verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20110701.tar.bz2
-                       verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20110701-win32-7z.exe
+                       verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20110819.tar.bz2
+                       verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20110819-win32-7z.exe
                        for X in *-7z.exe; do
                                7za x "$X"
                                rm -f "$X"
@@ -1887,7 +1887,7 @@ case "$cmd" in
                                        versionstr="$versionstr$RELEASETYPE"
                                        ;;
                        esac
-                       if [ $gv -lt 900 ]; then
+                       if [ $gv -lt 9900 ]; then
                                # pre-1.0: compatible with any other pre-1.0
                                verbose sed "
                                        s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
index e461a7cfb8b25e98e46323fb3347904b68be5aa3..bb3022c4cf29ff9512026bf84ba9c81ec97a7e21 100755 (executable)
@@ -9,14 +9,20 @@ ISTEXT=" crlf=input"
 LF="
 "
 eol=`cat .gitattributes`
-find . -name .git -prune -o \( -type f -print \) | {
+find . -name .git -prune -o -name xonotic-nexcompat.pk3dir -prune -o \( -type f -print \) | {
        unseen=`echo "$eol" | cut -d ' ' -f 1 | grep .`
        neweol=
        while IFS= read -r LINE; do
                nam=${LINE##*/}
                case "$nam" in
+                       *.txt.*)
+                               nam="*.txt.*"
+                               ;;
+                       *.db.*)
+                               nam="*.db.*"
+                               ;;
                        *.*)
-                               nam=*.${nam##*.}
+                               nam="*.${nam##*.}"
                                ;;
                esac
                t=`file -b --mime-type "$LINE"`
index 80cb77b6f80a4c2c434a9a83011ccb02f10c4663..4cb7e5887ffa4b76f1a7534a8dc9ad0b04c0ac32 100755 (executable)
Binary files a/misc/builddeps/dp.linux32/bin/blind_id and b/misc/builddeps/dp.linux32/bin/blind_id differ
index 8f4da00799347d188c325e76c0e33971e5e4c194..4723e761f6d77e21696b1bc45919d5611678bdc2 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $Format:commit %H$
- * $Id: a5ce51adb7f65e09a28a49ba8f96767ea1529d70 $
+ * $Id: bea924581e2a7daf61a2fe20ab360ed1f05f5aaa $
  */
 
 #ifndef __D0_BLIND_ID_H__
index 6631b8b0b6c3af98d642316b78a30c97b5a9424f..0330170735ed0651855a8eeac2f782561a3d09f8 100644 (file)
@@ -35,6 +35,7 @@
 #include <mmsystem.h>
 #include <stdio.h>
 #include <malloc.h>
+#include <stdint.h>
 
 #define srandom(_seed)  srand(_seed)
 #define random()        rand()
 
 inline void ProcessPlugins(int n) {}
 
+#define strncasecmp(a,b,c)  strncmp(a,b,c)
+#define strcasecmp(a,b) strcmp(a,b)
+#define strnicmp(a,b,c)                strncasecmp(a,b,c)
+#define HAVE_SINF 1
+
 #else
 
 #include <stdlib.h>
index 8569902d7d114f5d59b316b1a34070a233479ba3..9b9d4a83d24a7659020917d7ee60153591128b17 100644 (file)
Binary files a/misc/builddeps/dp.linux32/lib/libd0_blind_id.a and b/misc/builddeps/dp.linux32/lib/libd0_blind_id.a differ
index baa4ef7bfaed56ea5c68e95207f1638f9f1dfb8d..a847c12d19f16bacf80fe5c7c10ea9818ff5b907 100755 (executable)
@@ -1,20 +1,26 @@
 # libd0_blind_id.la - a libtool library file
-# Generated by ltmain.sh - GNU libtool 1.5.26 Debian 1.5.26-4+lenny1 (1.1220.2.493 2008/02/01 16:58:18)
+# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='libd0_blind_id.so.0'
+dlname=''
 
 # Names of this library.
-library_names='libd0_blind_id.so.0.0.0 libd0_blind_id.so.0 libd0_blind_id.so'
+library_names=''
 
 # The name of the static archive.
 old_library='libd0_blind_id.a'
 
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
 # Libraries that this one depends upon.
-dependency_libs=' /usr/lib/libgmp.la'
+dependency_libs=' -L/tmp/Darkplaces.build.linux32.deps/lib /tmp/gg/lib/libgmp.la'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
 
 # Version information for libd0_blind_id.
 current=0
@@ -32,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/usr/local/lib'
+libdir='/tmp/d0c/lib'
index be2ccc6c4d4288c04f595e48446c58cd91d3ac16..93ce7dea2dab26178330d6deff9da867e1f4ae31 100644 (file)
Binary files a/misc/builddeps/dp.linux32/lib/libd0_rijndael.a and b/misc/builddeps/dp.linux32/lib/libd0_rijndael.a differ
index d138b30b589788322a7bce0b1dfef2bba2d0338f..8ac188184d68e537365b98c438b8e0e14305fa50 100755 (executable)
@@ -1,20 +1,26 @@
 # libd0_rijndael.la - a libtool library file
-# Generated by ltmain.sh - GNU libtool 1.5.26 Debian 1.5.26-4+lenny1 (1.1220.2.493 2008/02/01 16:58:18)
+# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='libd0_rijndael.so.0'
+dlname=''
 
 # Names of this library.
-library_names='libd0_rijndael.so.0.0.0 libd0_rijndael.so.0 libd0_rijndael.so'
+library_names=''
 
 # The name of the static archive.
 old_library='libd0_rijndael.a'
 
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
 # Libraries that this one depends upon.
-dependency_libs=' /usr/lib/libgmp.la'
+dependency_libs=' -L/tmp/Darkplaces.build.linux32.deps/lib /tmp/gg/lib/libgmp.la'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
 
 # Version information for libd0_rijndael.
 current=0
@@ -32,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/usr/local/lib'
+libdir='/tmp/d0c/lib'
index 15f2367ce7ce063b301c7e6dae8a36b8b5b8ed79..1dd2be66eacbb62c6f60bd318eee1a618b0627c7 100644 (file)
Binary files a/misc/builddeps/dp.linux32/lib/libmodplug.a and b/misc/builddeps/dp.linux32/lib/libmodplug.a differ
index fc28b9f8767421d09fff061690fa3683f595cbbd..19a7883658048db0ba9395f9da722ac5c438837e 100755 (executable)
@@ -1,5 +1,5 @@
 # libmodplug.la - a libtool library file
-# Generated by ltmain.sh (GNU libtool) 2.2.6b
+# Generated by libtool (GNU libtool) 2.4
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/tmp/m/lib'
+libdir='/usr/local/lib'
index 8d5601524571e8502daa0e14bbffe57f824021b9..a86ad65f5ced8aa964b2e6b94afd74d5186a87bc 100644 (file)
@@ -1,4 +1,4 @@
-prefix=/home/rpolzer/xonotic/misc/builddeps/dp.linux32
+prefix=/tmp/d0c
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
@@ -6,6 +6,6 @@ includedir=${prefix}/include
 Name: Blind-ID
 Description: Library for user identification using RSA blind signatures
 Requires: 
-Version: 0.1
+Version: 0.3
 Libs: -L${libdir} -ld0_blind_id
 Cflags: -I${includedir}/d0_blind_id
index 7582fb83dc075f711dac46eeecdc0d44a806c172..cbef8c45061394d80d6cd13e0e7263e9cb2db615 100644 (file)
@@ -1,4 +1,4 @@
-prefix=/home/rpolzer/xonotic/misc/builddeps/dp.linux32
+prefix=/tmp/d0c
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
@@ -6,6 +6,6 @@ includedir=${prefix}/include
 Name: Rijndael
 Description: Library for Rijndael encryption
 Requires: 
-Version: 0.1
+Version: 0.3
 Libs: -L${libdir} -ld0_rijndael
 Cflags: -I${includedir}/d0_blind_id
index 3fe032cfa65251c890b9cf1b71bc7f5f8f0d415f..6639185c85fe0fba0dc5dec4d37bd3a7f8030053 100644 (file)
@@ -1,11 +1,11 @@
-prefix=/tmp/m
+prefix=/usr/local
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 
 Name: libmodplug
 Description: The ModPlug mod file playing library.
-Version: 0.8.8.1
+Version: 0.8.8.4
 Requires: 
 Libs: -L${libdir} -lmodplug 
 Libs.private: -lstdc++ -lm
index e448345dfe367548b24acde27be3a764c2b06494..2486a6ecd4f1918ef3fc2c7f02d3a3c055c790d2 100755 (executable)
Binary files a/misc/builddeps/dp.linux64/bin/blind_id and b/misc/builddeps/dp.linux64/bin/blind_id differ
index 56a7a0b343ae2e5bd68a4fde07ee3f8e2959faf9..f6082d261f65b6a40606122f50c92b2d4f564a18 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $Format:commit %H$
- * $Id: 8bcedf6746fc5fd1cd5709800f5ce5bcb5532a87 $
+ * $Id: 9a7b912057b836675f4e24f08514cad53fa46d2a $
  */
 
 #ifndef __D0_H__
index 6631b8b0b6c3af98d642316b78a30c97b5a9424f..0330170735ed0651855a8eeac2f782561a3d09f8 100644 (file)
@@ -35,6 +35,7 @@
 #include <mmsystem.h>
 #include <stdio.h>
 #include <malloc.h>
+#include <stdint.h>
 
 #define srandom(_seed)  srand(_seed)
 #define random()        rand()
 
 inline void ProcessPlugins(int n) {}
 
+#define strncasecmp(a,b,c)  strncmp(a,b,c)
+#define strcasecmp(a,b) strcmp(a,b)
+#define strnicmp(a,b,c)                strncasecmp(a,b,c)
+#define HAVE_SINF 1
+
 #else
 
 #include <stdlib.h>
index 02c4bb0a170ef3d82d661e269a099d42f47fd0fd..517bdfb30b01ea83b2d03aa7400bc6b474b7bbfa 100644 (file)
Binary files a/misc/builddeps/dp.linux64/lib/libd0_blind_id.a and b/misc/builddeps/dp.linux64/lib/libd0_blind_id.a differ
old mode 100644 (file)
new mode 100755 (executable)
index 57cca0a..0d3b486
@@ -5,10 +5,10 @@
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='libd0_blind_id.so.0'
+dlname=''
 
 # Names of this library.
-library_names='libd0_blind_id.so.0.0.0 libd0_blind_id.so.0 libd0_blind_id.so'
+library_names=''
 
 # The name of the static archive.
 old_library='libd0_blind_id.a'
@@ -17,7 +17,7 @@ old_library='libd0_blind_id.a'
 inherited_linker_flags=''
 
 # Libraries that this one depends upon.
-dependency_libs=' /usr/lib64/libgmp.la'
+dependency_libs=' -L/tmp/Darkplaces.build.linux64.deps/lib /tmp/g/lib/libgmp.la'
 
 # Names of additional weak libraries provided by this library
 weak_library_names=''
@@ -28,7 +28,7 @@ age=0
 revision=0
 
 # Is this an already installed library?
-installed=no
+installed=yes
 
 # Should we warn about portability when linking against -modules?
 shouldnotlink=no
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/usr/local/lib'
+libdir='/tmp/d0c/lib'
index 9330ae62dffb7313ac2800823ab1fd8c25761929..c46e5753381cbd535c46b95b6aae9e3c935cc79f 100644 (file)
Binary files a/misc/builddeps/dp.linux64/lib/libd0_rijndael.a and b/misc/builddeps/dp.linux64/lib/libd0_rijndael.a differ
old mode 100644 (file)
new mode 100755 (executable)
index 8b0a000..729015d
@@ -5,10 +5,10 @@
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='libd0_rijndael.so.0'
+dlname=''
 
 # Names of this library.
-library_names='libd0_rijndael.so.0.0.0 libd0_rijndael.so.0 libd0_rijndael.so'
+library_names=''
 
 # The name of the static archive.
 old_library='libd0_rijndael.a'
@@ -17,7 +17,7 @@ old_library='libd0_rijndael.a'
 inherited_linker_flags=''
 
 # Libraries that this one depends upon.
-dependency_libs=' /usr/lib64/libgmp.la'
+dependency_libs=' -L/tmp/Darkplaces.build.linux64.deps/lib /tmp/g/lib/libgmp.la'
 
 # Names of additional weak libraries provided by this library
 weak_library_names=''
@@ -28,7 +28,7 @@ age=0
 revision=0
 
 # Is this an already installed library?
-installed=no
+installed=yes
 
 # Should we warn about portability when linking against -modules?
 shouldnotlink=no
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/usr/local/lib'
+libdir='/tmp/d0c/lib'
index b63641a94ee2e91b0c3113011985f94483a2d868..855386e8776fd616753be1c8a0ba715bdbd63d09 100644 (file)
Binary files a/misc/builddeps/dp.linux64/lib/libmodplug.a and b/misc/builddeps/dp.linux64/lib/libmodplug.a differ
index fc28b9f8767421d09fff061690fa3683f595cbbd..19a7883658048db0ba9395f9da722ac5c438837e 100755 (executable)
@@ -1,5 +1,5 @@
 # libmodplug.la - a libtool library file
-# Generated by ltmain.sh (GNU libtool) 2.2.6b
+# Generated by libtool (GNU libtool) 2.4
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/tmp/m/lib'
+libdir='/usr/local/lib'
index 2aa42ed92b27d985799308cda2c5e5b1671cc131..a86ad65f5ced8aa964b2e6b94afd74d5186a87bc 100644 (file)
@@ -1,4 +1,4 @@
-prefix=/home/rpolzer/Games/Xonotic/misc/builddeps/dp.linux64
+prefix=/tmp/d0c
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
@@ -6,6 +6,6 @@ includedir=${prefix}/include
 Name: Blind-ID
 Description: Library for user identification using RSA blind signatures
 Requires: 
-Version: 0.1
+Version: 0.3
 Libs: -L${libdir} -ld0_blind_id
 Cflags: -I${includedir}/d0_blind_id
index a2965d20e9b9608be69f7f06454acdcfadcb1c70..cbef8c45061394d80d6cd13e0e7263e9cb2db615 100644 (file)
@@ -1,4 +1,4 @@
-prefix=/home/rpolzer/Games/Xonotic/misc/builddeps/dp.linux64
+prefix=/tmp/d0c
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
@@ -6,6 +6,6 @@ includedir=${prefix}/include
 Name: Rijndael
 Description: Library for Rijndael encryption
 Requires: 
-Version: 0.1
+Version: 0.3
 Libs: -L${libdir} -ld0_rijndael
 Cflags: -I${includedir}/d0_blind_id
index 3fe032cfa65251c890b9cf1b71bc7f5f8f0d415f..6639185c85fe0fba0dc5dec4d37bd3a7f8030053 100644 (file)
@@ -1,11 +1,11 @@
-prefix=/tmp/m
+prefix=/usr/local
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 
 Name: libmodplug
 Description: The ModPlug mod file playing library.
-Version: 0.8.8.1
+Version: 0.8.8.4
 Requires: 
 Libs: -L${libdir} -lmodplug 
 Libs.private: -lstdc++ -lm
diff --git a/misc/builddeps/dp.win32/bin/zlib1.dll b/misc/builddeps/dp.win32/bin/zlib1.dll
new file mode 100755 (executable)
index 0000000..6a2d389
Binary files /dev/null and b/misc/builddeps/dp.win32/bin/zlib1.dll differ
diff --git a/misc/builddeps/dp.win32/include/zconf.h b/misc/builddeps/dp.win32/include/zconf.h
new file mode 100644 (file)
index 0000000..02ce56c
--- /dev/null
@@ -0,0 +1,428 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  define compress              z_compress
+#  define compress2             z_compress2
+#  define compressBound         z_compressBound
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
+#  define gz_strwinerror        z_gz_strwinerror
+#  define gzbuffer              z_gzbuffer
+#  define gzclearerr            z_gzclearerr
+#  define gzclose               z_gzclose
+#  define gzclose_r             z_gzclose_r
+#  define gzclose_w             z_gzclose_w
+#  define gzdirect              z_gzdirect
+#  define gzdopen               z_gzdopen
+#  define gzeof                 z_gzeof
+#  define gzerror               z_gzerror
+#  define gzflush               z_gzflush
+#  define gzgetc                z_gzgetc
+#  define gzgets                z_gzgets
+#  define gzoffset              z_gzoffset
+#  define gzoffset64            z_gzoffset64
+#  define gzopen                z_gzopen
+#  define gzopen64              z_gzopen64
+#  define gzprintf              z_gzprintf
+#  define gzputc                z_gzputc
+#  define gzputs                z_gzputs
+#  define gzread                z_gzread
+#  define gzrewind              z_gzrewind
+#  define gzseek                z_gzseek
+#  define gzseek64              z_gzseek64
+#  define gzsetparams           z_gzsetparams
+#  define gztell                z_gztell
+#  define gztell64              z_gztell64
+#  define gzungetc              z_gzungetc
+#  define gzwrite               z_gzwrite
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  define uncompress            z_uncompress
+#  define zError                z_zError
+#  define zcalloc               z_zcalloc
+#  define zcfree                z_zcfree
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  define gzFile                z_gzFile
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+#  include <sys/types.h>    /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+#  undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+#  include <unistd.h>       /* for SEEK_* and off_t */
+#  ifdef VMS
+#    include <unixio.h>     /* for off_t */
+#  endif
+#  ifndef z_off_t
+#    define z_off_t off_t
+#  endif
+#endif
+
+#ifndef SEEK_SET
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
+#if defined(__OS400__)
+#  define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+#  define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/misc/builddeps/dp.win32/include/zlib.h b/misc/builddeps/dp.win32/include/zlib.h
new file mode 100644 (file)
index 0000000..bfbba83
--- /dev/null
@@ -0,0 +1,1613 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+  version 1.2.5, April 19th, 2010
+
+  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+
+  The data format used by the zlib library is described by RFCs (Request for
+  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+    The 'zlib' compression library provides in-memory compression and
+  decompression functions, including integrity checks of the uncompressed data.
+  This version of the library supports only one compression method (deflation)
+  but other algorithms will be added later and will have the same stream
+  interface.
+
+    Compression can be done in a single step if the buffers are large enough,
+  or can be done by repeated calls of the compression function.  In the latter
+  case, the application must provide more input and/or consume the output
+  (providing more output space) before each call.
+
+    The compressed data format used by default by the in-memory functions is
+  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+  around a deflate stream, which is itself documented in RFC 1951.
+
+    The library also supports reading and writing files in gzip (.gz) format
+  with an interface similar to that of stdio using the functions that start
+  with "gz".  The gzip format is different from the zlib format.  gzip is a
+  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+    This library can optionally read and write gzip streams in memory as well.
+
+    The zlib format was designed to be compact and fast for use in memory
+  and on communications channels.  The gzip format was designed for single-
+  file compression on file systems, has a larger header than zlib to maintain
+  directory information, and uses a different, slower check method than zlib.
+
+    The library does not install any signal handler.  The decoder checks
+  the consistency of the compressed data, so the library should never crash
+  even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+    Bytef    *next_in;  /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total nb of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total nb of bytes output so far */
+
+    char     *msg;      /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: binary or text */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+     gzip header information passed to and from zlib routines.  See RFC 1952
+  for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+    int     text;       /* true if compressed data believed to be text */
+    uLong   time;       /* modification time */
+    int     xflags;     /* extra flags (not used when writing a gzip file) */
+    int     os;         /* operating system */
+    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
+    uInt    extra_max;  /* space at extra (only when reading header) */
+    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    uInt    name_max;   /* space at name (only when reading header) */
+    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    uInt    comm_max;   /* space at comment (only when reading header) */
+    int     hcrc;       /* true if there was or will be a header crc */
+    int     done;       /* true when done reading gzip header (not used
+                           when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+     The application must update next_in and avail_in when avail_in has dropped
+   to zero.  It must update next_out and avail_out when avail_out has dropped
+   to zero.  The application must initialize zalloc, zfree and opaque before
+   calling the init function.  All other fields are set by the compression
+   library and must not be updated by the application.
+
+     The opaque value provided by the application will be passed as the first
+   parameter for calls of zalloc and zfree.  This can be useful for custom
+   memory management.  The compression library attaches no meaning to the
+   opaque value.
+
+     zalloc must return Z_NULL if there is not enough memory for the object.
+   If zlib is used in a multi-threaded application, zalloc and zfree must be
+   thread safe.
+
+     On 16-bit systems, the functions zalloc and zfree must be able to allocate
+   exactly 65536 bytes, but will not be required to allocate more than this if
+   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
+   returned by zalloc for objects of exactly 65536 bytes *must* have their
+   offset normalized to zero.  The default allocation function provided by this
+   library ensures this (see zutil.c).  To reduce memory requirements and avoid
+   any allocation of 64K objects, at the expense of compression ratio, compile
+   the library with -DMAX_WBITS=14 (see zconf.h).
+
+     The fields total_in and total_out can be used for statistics or progress
+   reports.  After compression, total_in holds the total size of the
+   uncompressed data and may be saved for use in the decompressor (particularly
+   if the decompressor wants to decompress everything in a single step).
+*/
+
+                        /* constants */
+
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+#define Z_BLOCK         5
+#define Z_TREES         6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_RLE                 3
+#define Z_FIXED               4
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_TEXT     1
+#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+                        /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+   If the first character differs, the library code actually used is not
+   compatible with the zlib.h header file used by the application.  This check
+   is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+     Initializes the internal stream state for compression.  The fields
+   zalloc, zfree and opaque must be initialized before by the caller.  If
+   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+   allocation functions.
+
+     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+   1 gives best speed, 9 gives best compression, 0 gives no compression at all
+   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
+   requests a default compromise between speed and compression (currently
+   equivalent to level 6).
+
+     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if level is not a valid compression level, or
+   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
+   if there is no error message.  deflateInit does not perform any compression:
+   this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+    deflate compresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+    The detailed semantics are as follows.  deflate performs one or both of the
+  following actions:
+
+  - Compress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in and avail_in are updated and
+    processing will resume at this point for the next call of deflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  This action is forced if the parameter flush is non zero.
+    Forcing flush frequently degrades the compression ratio, so this parameter
+    should be set only when necessary (in interactive applications).  Some
+    output may be provided even if flush is not set.
+
+    Before the call of deflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating avail_in or avail_out accordingly; avail_out should
+  never be zero before the call.  The application can consume the compressed
+  output when it wants, for example when the output buffer is full (avail_out
+  == 0), or after each call of deflate().  If deflate returns Z_OK and with
+  zero avail_out, it must be called again after making room in the output
+  buffer because there might be more output pending.
+
+    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+  decide how much data to accumulate before producing output, in order to
+  maximize compression.
+
+    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+  flushed to the output buffer and the output is aligned on a byte boundary, so
+  that the decompressor can get all input data available so far.  (In
+  particular avail_in is zero after the call if enough output space has been
+  provided before the call.) Flushing may degrade compression for some
+  compression algorithms and so it should be used only when necessary.  This
+  completes the current deflate block and follows it with an empty stored block
+  that is three bits plus filler bits to the next byte, followed by four bytes
+  (00 00 ff ff).
+
+    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+  output buffer, but the output is not aligned to a byte boundary.  All of the
+  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+  This completes the current deflate block and follows it with an empty fixed
+  codes block that is 10 bits long.  This assures that enough bytes are output
+  in order for the decompressor to finish the block before the empty fixed code
+  block.
+
+    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+  seven bits of the current block are held to be written as the next byte after
+  the next deflate block is completed.  In this case, the decompressor may not
+  be provided enough bits at this point in order to complete decompression of
+  the data provided so far to the compressor.  It may need to wait for the next
+  block to be emitted.  This is for advanced applications that need to control
+  the emission of deflate blocks.
+
+    If flush is set to Z_FULL_FLUSH, all output is flushed as with
+  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+  restart from this point if previous compressed data has been damaged or if
+  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
+  compression.
+
+    If deflate returns with avail_out == 0, this function must be called again
+  with the same value of the flush parameter and more output space (updated
+  avail_out), until the flush is complete (deflate returns with non-zero
+  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+  avail_out is greater than six to avoid repeated flush markers due to
+  avail_out == 0 on return.
+
+    If the parameter flush is set to Z_FINISH, pending input is processed,
+  pending output is flushed and deflate returns with Z_STREAM_END if there was
+  enough output space; if deflate returns with Z_OK, this function must be
+  called again with Z_FINISH and more output space (updated avail_out) but no
+  more input data, until it returns with Z_STREAM_END or an error.  After
+  deflate has returned Z_STREAM_END, the only possible operations on the stream
+  are deflateReset or deflateEnd.
+
+    Z_FINISH can be used immediately after deflateInit if all the compression
+  is to be done in a single step.  In this case, avail_out must be at least the
+  value returned by deflateBound (see below).  If deflate does not return
+  Z_STREAM_END, then it must be called again as described above.
+
+    deflate() sets strm->adler to the adler32 checksum of all input read
+  so far (that is, total_in bytes).
+
+    deflate() may update strm->data_type if it can make a good guess about
+  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
+  binary.  This field is only for information purposes and does not affect the
+  compression algorithm in any manner.
+
+    deflate() returns Z_OK if some progress has been made (more input
+  processed or more output produced), Z_STREAM_END if all input has been
+  consumed and all output has been produced (only when flush is set to
+  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
+  fatal, and deflate() can be called again with more input and more output
+  space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+   prematurely (some input or output was discarded).  In the error case, msg
+   may be set but then points to a static string (which must not be
+   deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+     Initializes the internal stream state for decompression.  The fields
+   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
+   exact value depends on the compression method), inflateInit determines the
+   compression method from the zlib header and allocates all data structures
+   accordingly; otherwise the allocation will be deferred to the first call of
+   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+   use default allocation functions.
+
+     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit() does not process any header information -- that is deferred
+   until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+    inflate decompresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+  The detailed semantics are as follows.  inflate performs one or both of the
+  following actions:
+
+  - Decompress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in is updated and processing will
+    resume at this point for the next call of inflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  inflate() provides as much output as possible, until there is
+    no more input data or no more space in the output buffer (see below about
+    the flush parameter).
+
+    Before the call of inflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating the next_* and avail_* values accordingly.  The
+  application can consume the uncompressed output when it wants, for example
+  when the output buffer is full (avail_out == 0), or after each call of
+  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
+  called again after making room in the output buffer because there might be
+  more output pending.
+
+    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
+  output as possible to the output buffer.  Z_BLOCK requests that inflate()
+  stop if and when it gets to the next deflate block boundary.  When decoding
+  the zlib or gzip format, this will cause inflate() to return immediately
+  after the header and before the first block.  When doing a raw inflate,
+  inflate() will go ahead and process the first block, and will return when it
+  gets to the end of that block, or when it runs out of data.
+
+    The Z_BLOCK option assists in appending to or combining deflate streams.
+  Also to assist in this, on return inflate() will set strm->data_type to the
+  number of unused bits in the last byte taken from strm->next_in, plus 64 if
+  inflate() is currently decoding the last block in the deflate stream, plus
+  128 if inflate() returned immediately after decoding an end-of-block code or
+  decoding the complete header up to just before the first byte of the deflate
+  stream.  The end-of-block will not be indicated until all of the uncompressed
+  data from that block has been written to strm->next_out.  The number of
+  unused bits may in general be greater than seven, except when bit 7 of
+  data_type is set, in which case the number of unused bits will be less than
+  eight.  data_type is set as noted here every time inflate() returns for all
+  flush options, and so can be used to determine the amount of currently
+  consumed input in bits.
+
+    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+  end of each deflate block header is reached, before any actual data in that
+  block is decoded.  This allows the caller to determine the length of the
+  deflate block header for later use in random access within a deflate block.
+  256 is added to the value of strm->data_type when inflate() returns
+  immediately after reaching the end of the deflate block header.
+
+    inflate() should normally be called until it returns Z_STREAM_END or an
+  error.  However if all decompression is to be performed in a single step (a
+  single call of inflate), the parameter flush should be set to Z_FINISH.  In
+  this case all pending input is processed and all pending output is flushed;
+  avail_out must be large enough to hold all the uncompressed data.  (The size
+  of the uncompressed data may have been saved by the compressor for this
+  purpose.) The next operation on this stream must be inflateEnd to deallocate
+  the decompression state.  The use of Z_FINISH is never required, but can be
+  used to inform inflate that a faster approach may be used for the single
+  inflate() call.
+
+     In this implementation, inflate() always flushes as much output as
+  possible to the output buffer, and always uses the faster approach on the
+  first call.  So the only effect of the flush parameter in this implementation
+  is on the return value of inflate(), as noted below, or when it returns early
+  because Z_BLOCK or Z_TREES is used.
+
+     If a preset dictionary is needed after this call (see inflateSetDictionary
+  below), inflate sets strm->adler to the adler32 checksum of the dictionary
+  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+  strm->adler to the adler32 checksum of all output produced so far (that is,
+  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+  below.  At the end of the stream, inflate() checks that its computed adler32
+  checksum is equal to that saved by the compressor and returns Z_STREAM_END
+  only if the checksum is correct.
+
+    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+  deflate data.  The header type is detected automatically, if requested when
+  initializing with inflateInit2().  Any information contained in the gzip
+  header is not retained, so applications that need that information should
+  instead use raw inflate, see inflateInit2() below, or inflateBack() and
+  perform their own processing of the gzip header and trailer.
+
+    inflate() returns Z_OK if some progress has been made (more input processed
+  or more output produced), Z_STREAM_END if the end of the compressed data has
+  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+  corrupted (input stream not conforming to the zlib format or incorrect check
+  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
+  inflate() can be called again with more input and more output space to
+  continue decompressing.  If Z_DATA_ERROR is returned, the application may
+  then call inflateSync() to look for a good compression block if a partial
+  recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+   was inconsistent.  In the error case, msg may be set but then points to a
+   static string (which must not be deallocated).
+*/
+
+
+                        /* Advanced functions */
+
+/*
+    The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+                                     int  level,
+                                     int  method,
+                                     int  windowBits,
+                                     int  memLevel,
+                                     int  strategy));
+
+     This is another version of deflateInit with more compression options.  The
+   fields next_in, zalloc, zfree and opaque must be initialized before by the
+   caller.
+
+     The method parameter is the compression method.  It must be Z_DEFLATED in
+   this version of the library.
+
+     The windowBits parameter is the base two logarithm of the window size
+   (the size of the history buffer).  It should be in the range 8..15 for this
+   version of the library.  Larger values of this parameter result in better
+   compression at the expense of memory usage.  The default value is 15 if
+   deflateInit is used instead.
+
+     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
+   determines the window size.  deflate() will then generate raw deflate data
+   with no zlib header or trailer, and will not compute an adler32 check value.
+
+     windowBits can also be greater than 15 for optional gzip encoding.  Add
+   16 to windowBits to write a simple gzip header and trailer around the
+   compressed data instead of a zlib wrapper.  The gzip header will have no
+   file name, no extra data, no comment, no modification time (set to zero), no
+   header crc, and the operating system will be set to 255 (unknown).  If a
+   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+     The memLevel parameter specifies how much memory should be allocated
+   for the internal compression state.  memLevel=1 uses minimum memory but is
+   slow and reduces compression ratio; memLevel=9 uses maximum memory for
+   optimal speed.  The default value is 8.  See zconf.h for total memory usage
+   as a function of windowBits and memLevel.
+
+     The strategy parameter is used to tune the compression algorithm.  Use the
+   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+   string match), or Z_RLE to limit match distances to one (run-length
+   encoding).  Filtered data consists mostly of small values with a somewhat
+   random distribution.  In this case, the compression algorithm is tuned to
+   compress them better.  The effect of Z_FILTERED is to force more Huffman
+   coding and less string matching; it is somewhat intermediate between
+   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
+   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
+   strategy parameter only affects the compression ratio but not the
+   correctness of the compressed output even if it is not set appropriately.
+   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+   decoder for special applications.
+
+     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
+   set to null if there is no error message.  deflateInit2 does not perform any
+   compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the compression dictionary from the given byte sequence
+   without producing any compressed output.  This function must be called
+   immediately after deflateInit, deflateInit2 or deflateReset, before any call
+   of deflate.  The compressor and decompressor must use exactly the same
+   dictionary (see inflateSetDictionary).
+
+     The dictionary should consist of strings (byte sequences) that are likely
+   to be encountered later in the data to be compressed, with the most commonly
+   used strings preferably put towards the end of the dictionary.  Using a
+   dictionary is most useful when the data to be compressed is short and can be
+   predicted with good accuracy; the data can then be compressed better than
+   with the default empty dictionary.
+
+     Depending on the size of the compression data structures selected by
+   deflateInit or deflateInit2, a part of the dictionary may in effect be
+   discarded, for example if the dictionary is larger than the window size
+   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
+   useful should be put at the end of the dictionary, not at the front.  In
+   addition, the current implementation of deflate will use at most the window
+   size minus 262 bytes of the provided dictionary.
+
+     Upon return of this function, strm->adler is set to the adler32 value
+   of the dictionary; the decompressor may later use this value to determine
+   which dictionary has been used by the compressor.  (The adler32 value
+   applies to the whole dictionary even if only a subset of the dictionary is
+   actually used by the compressor.) If a raw deflate was requested, then the
+   adler32 value is not computed and strm->adler is not set.
+
+     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent (for example if deflate has already been called for this stream
+   or if the compression method is bsort).  deflateSetDictionary does not
+   perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when several compression strategies will be
+   tried, for example when there are several ways of pre-processing the input
+   data with a filter.  The streams that will be discarded should then be freed
+   by calling deflateEnd.  Note that deflateCopy duplicates the internal
+   compression state which can be quite large, so this strategy is slow and can
+   consume lots of memory.
+
+     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to deflateEnd followed by deflateInit,
+   but does not free and reallocate all the internal compression state.  The
+   stream will keep the same compression level and any other attributes that
+   may have been set by deflateInit2.
+
+     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+                                      int level,
+                                      int strategy));
+/*
+     Dynamically update the compression level and compression strategy.  The
+   interpretation of level and strategy is as in deflateInit2.  This can be
+   used to switch between compression and straight copy of the input data, or
+   to switch to a different kind of input data requiring a different strategy.
+   If the compression level is changed, the input available so far is
+   compressed with the old level (and may be flushed); the new level will take
+   effect only at the next call of deflate().
+
+     Before the call of deflateParams, the stream state must be set as for
+   a call of deflate(), since the currently available input may have to be
+   compressed and flushed.  In particular, strm->avail_out must be non-zero.
+
+     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+   strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+                                    int good_length,
+                                    int max_lazy,
+                                    int nice_length,
+                                    int max_chain));
+/*
+     Fine tune deflate's internal compression parameters.  This should only be
+   used by someone who understands the algorithm used by zlib's deflate for
+   searching for the best matching string, and even then only by the most
+   fanatic optimizer trying to squeeze out the last compressed bit for their
+   specific input data.  Read the deflate.c source code for the meaning of the
+   max_lazy, good_length, nice_length, and max_chain parameters.
+
+     deflateTune() can be called after deflateInit() or deflateInit2(), and
+   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+                                       uLong sourceLen));
+/*
+     deflateBound() returns an upper bound on the compressed size after
+   deflation of sourceLen bytes.  It must be called after deflateInit() or
+   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
+   to allocate an output buffer for deflation in a single pass, and so would be
+   called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     deflatePrime() inserts bits in the deflate output stream.  The intent
+   is that this function is used to start off the deflate output with the bits
+   leftover from a previous deflate stream when appending to it.  As such, this
+   function can only be used for raw deflate, and must be used before the first
+   deflate() call after a deflateInit2() or deflateReset().  bits must be less
+   than or equal to 16, and that many of the least significant bits of value
+   will be inserted in the output.
+
+     deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     deflateSetHeader() provides gzip header information for when a gzip
+   stream is requested by deflateInit2().  deflateSetHeader() may be called
+   after deflateInit2() or deflateReset() and before the first call of
+   deflate().  The text, time, os, extra field, name, and comment information
+   in the provided gz_header structure are written to the gzip header (xflag is
+   ignored -- the extra flags are set according to the compression level).  The
+   caller must assure that, if not Z_NULL, name and comment are terminated with
+   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+   available there.  If hcrc is true, a gzip header crc is included.  Note that
+   the current versions of the command-line version of gzip (up through version
+   1.3.x) do not support header crc's, and will report that it is a "multi-part
+   gzip file" and give up.
+
+     If deflateSetHeader is not used, the default gzip header has text false,
+   the time set to zero, and os set to 255, with no extra, name, or comment
+   fields.  The gzip header is returned to the default state by deflateReset().
+
+     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+                                     int  windowBits));
+
+     This is another version of inflateInit with an extra parameter.  The
+   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+   before by the caller.
+
+     The windowBits parameter is the base two logarithm of the maximum window
+   size (the size of the history buffer).  It should be in the range 8..15 for
+   this version of the library.  The default value is 15 if inflateInit is used
+   instead.  windowBits must be greater than or equal to the windowBits value
+   provided to deflateInit2() while compressing, or it must be equal to 15 if
+   deflateInit2() was not used.  If a compressed stream with a larger window
+   size is given as input, inflate() will return with the error code
+   Z_DATA_ERROR instead of trying to allocate a larger window.
+
+     windowBits can also be zero to request that inflate use the window size in
+   the zlib header of the compressed stream.
+
+     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
+   determines the window size.  inflate() will then process raw deflate data,
+   not looking for a zlib or gzip header, not generating a check value, and not
+   looking for any check values for comparison at the end of the stream.  This
+   is for use with other formats that use the deflate compressed data format
+   such as zip.  Those formats provide their own check values.  If a custom
+   format is developed using the raw deflate format for compressed data, it is
+   recommended that a check value such as an adler32 or a crc32 be applied to
+   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
+   most applications, the zlib format should be used as is.  Note that comments
+   above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+     windowBits can also be greater than 15 for optional gzip decoding.  Add
+   32 to windowBits to enable zlib and gzip decoding with automatic header
+   detection, or add 16 to decode only the gzip format (the zlib format will
+   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
+   crc32 instead of an adler32.
+
+     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit2 does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit2() does not process any header information -- that is
+   deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the decompression dictionary from the given uncompressed byte
+   sequence.  This function must be called immediately after a call of inflate,
+   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
+   can be determined from the adler32 value returned by that call of inflate.
+   The compressor and decompressor must use exactly the same dictionary (see
+   deflateSetDictionary).  For raw inflate, this function can be called
+   immediately after inflateInit2() or inflateReset() and before any call of
+   inflate() to set the dictionary.  The application must insure that the
+   dictionary that was used for compression is provided.
+
+     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+   expected one (incorrect adler32 value).  inflateSetDictionary does not
+   perform any decompression: this will be done by subsequent calls of
+   inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+     Skips invalid compressed data until a full flush point (see above the
+   description of deflate with Z_FULL_FLUSH) can be found, or until all
+   available input is skipped.  No output is provided.
+
+     inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+   if no more input was provided, Z_DATA_ERROR if no flush point has been
+   found, or Z_STREAM_ERROR if the stream structure was inconsistent.  In the
+   success case, the application may save the current current value of total_in
+   which indicates where valid compressed data was found.  In the error case,
+   the application may repeatedly call inflateSync, providing more input each
+   time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when randomly accessing a large stream.  The
+   first pass through the stream can periodically record the inflate state,
+   allowing restarting inflate at those points when randomly accessing the
+   stream.
+
+     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to inflateEnd followed by inflateInit,
+   but does not free and reallocate all the internal decompression state.  The
+   stream will keep attributes that may have been set by inflateInit2.
+
+     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+                                      int windowBits));
+/*
+     This function is the same as inflateReset, but it also permits changing
+   the wrap and window size requests.  The windowBits parameter is interpreted
+   the same as it is for inflateInit2.
+
+     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+   the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     This function inserts bits in the inflate input stream.  The intent is
+   that this function is used to start inflating at a bit position in the
+   middle of a byte.  The provided bits will be used before any bytes are used
+   from next_in.  This function should only be used with raw inflate, and
+   should be used before the first inflate() call after inflateInit2() or
+   inflateReset().  bits must be less than or equal to 16, and that many of the
+   least significant bits of value will be inserted in the input.
+
+     If bits is negative, then the input stream bit buffer is emptied.  Then
+   inflatePrime() can be called again to put bits in the buffer.  This is used
+   to clear out bits leftover after feeding inflate a block description prior
+   to feeding inflate codes.
+
+     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+     This function returns two values, one in the lower 16 bits of the return
+   value, and the other in the remaining upper bits, obtained by shifting the
+   return value down 16 bits.  If the upper value is -1 and the lower value is
+   zero, then inflate() is currently decoding information outside of a block.
+   If the upper value is -1 and the lower value is non-zero, then inflate is in
+   the middle of a stored block, with the lower value equaling the number of
+   bytes from the input remaining to copy.  If the upper value is not -1, then
+   it is the number of bits back from the current bit position in the input of
+   the code (literal or length/distance pair) currently being processed.  In
+   that case the lower value is the number of bytes already emitted for that
+   code.
+
+     A code is being processed if inflate is waiting for more input to complete
+   decoding of the code, or if it has completed decoding but is waiting for
+   more output space to write the literal or match data.
+
+     inflateMark() is used to mark locations in the input data for random
+   access, which may be at bit positions, and to note those cases where the
+   output of a code may span boundaries of random access blocks.  The current
+   location in the input stream can be determined from avail_in and data_type
+   as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+     inflateMark returns the value noted above or -1 << 16 if the provided
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     inflateGetHeader() requests that gzip header information be stored in the
+   provided gz_header structure.  inflateGetHeader() may be called after
+   inflateInit2() or inflateReset(), and before the first call of inflate().
+   As inflate() processes the gzip stream, head->done is zero until the header
+   is completed, at which time head->done is set to one.  If a zlib stream is
+   being decoded, then head->done is set to -1 to indicate that there will be
+   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
+   used to force inflate() to return immediately after header processing is
+   complete and before any actual data is decompressed.
+
+     The text, time, xflags, and os fields are filled in with the gzip header
+   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
+   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+   contains the maximum number of bytes to write to extra.  Once done is true,
+   extra_len contains the actual extra field length, and extra contains the
+   extra field, or that field truncated if extra_max is less than extra_len.
+   If name is not Z_NULL, then up to name_max characters are written there,
+   terminated with a zero unless the length is greater than name_max.  If
+   comment is not Z_NULL, then up to comm_max characters are written there,
+   terminated with a zero unless the length is greater than comm_max.  When any
+   of extra, name, or comment are not Z_NULL and the respective field is not
+   present in the header, then that field is set to Z_NULL to signal its
+   absence.  This allows the use of deflateSetHeader() with the returned
+   structure to duplicate the header.  However if those fields are set to
+   allocated memory, then the application will need to save those pointers
+   elsewhere so that they can be eventually freed.
+
+     If inflateGetHeader is not used, then the header information is simply
+   discarded.  The header is always checked for validity, including the header
+   CRC if present.  inflateReset() will reset the process to discard the header
+   information.  The application would need to call inflateGetHeader() again to
+   retrieve the header from the next gzip stream.
+
+     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+                                        unsigned char FAR *window));
+
+     Initialize the internal stream state for decompression using inflateBack()
+   calls.  The fields zalloc, zfree and opaque in strm must be initialized
+   before the call.  If zalloc and zfree are Z_NULL, then the default library-
+   derived memory allocation routines are used.  windowBits is the base two
+   logarithm of the window size, in the range 8..15.  window is a caller
+   supplied buffer of that size.  Except for special applications where it is
+   assured that deflate was used with small window sizes, windowBits must be 15
+   and a 32K byte window must be supplied to be able to decompress general
+   deflate streams.
+
+     See inflateBack() for the usage of these routines.
+
+     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+   the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+   allocated, or Z_VERSION_ERROR if the version of the library does not match
+   the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+                                    in_func in, void FAR *in_desc,
+                                    out_func out, void FAR *out_desc));
+/*
+     inflateBack() does a raw inflate with a single call using a call-back
+   interface for input and output.  This is more efficient than inflate() for
+   file i/o applications in that it avoids copying between the output and the
+   sliding window by simply making the window itself the output buffer.  This
+   function trusts the application to not change the output buffer passed by
+   the output function, at least until inflateBack() returns.
+
+     inflateBackInit() must be called first to allocate the internal state
+   and to initialize the state with the user-provided window buffer.
+   inflateBack() may then be used multiple times to inflate a complete, raw
+   deflate stream with each call.  inflateBackEnd() is then called to free the
+   allocated state.
+
+     A raw deflate stream is one with no zlib or gzip header or trailer.
+   This routine would normally be used in a utility that reads zip or gzip
+   files and writes out uncompressed files.  The utility would decode the
+   header and process the trailer on its own, hence this routine expects only
+   the raw deflate stream to decompress.  This is different from the normal
+   behavior of inflate(), which expects either a zlib or gzip header and
+   trailer around the deflate stream.
+
+     inflateBack() uses two subroutines supplied by the caller that are then
+   called by inflateBack() for input and output.  inflateBack() calls those
+   routines until it reads a complete deflate stream and writes out all of the
+   uncompressed data, or until it encounters an error.  The function's
+   parameters and return types are defined above in the in_func and out_func
+   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
+   number of bytes of provided input, and a pointer to that input in buf.  If
+   there is no input available, in() must return zero--buf is ignored in that
+   case--and inflateBack() will return a buffer error.  inflateBack() will call
+   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
+   should return zero on success, or non-zero on failure.  If out() returns
+   non-zero, inflateBack() will return with an error.  Neither in() nor out()
+   are permitted to change the contents of the window provided to
+   inflateBackInit(), which is also the buffer that out() uses to write from.
+   The length written by out() will be at most the window size.  Any non-zero
+   amount of input may be provided by in().
+
+     For convenience, inflateBack() can be provided input on the first call by
+   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
+   in() will be called.  Therefore strm->next_in must be initialized before
+   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
+   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
+   must also be initialized, and then if strm->avail_in is not zero, input will
+   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
+
+     The in_desc and out_desc parameters of inflateBack() is passed as the
+   first parameter of in() and out() respectively when they are called.  These
+   descriptors can be optionally used to pass any information that the caller-
+   supplied in() and out() functions need to do their job.
+
+     On return, inflateBack() will set strm->next_in and strm->avail_in to
+   pass back any unused input that was provided by the last in() call.  The
+   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+   in the deflate stream (in which case strm->msg is set to indicate the nature
+   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+   In the case of Z_BUF_ERROR, an input or output error can be distinguished
+   using strm->next_in which will be Z_NULL only if in() returned an error.  If
+   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+   non-zero.  (in() will always be called before out(), so strm->next_in is
+   assured to be defined if out() returns non-zero.) Note that inflateBack()
+   cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+     All memory allocated by inflateBackInit() is freed.
+
+     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+   state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+     1.0: size of uInt
+     3.2: size of uLong
+     5.4: size of voidpf (pointer)
+     7.6: size of z_off_t
+
+    Compiler, assembler, and debug options:
+     8: DEBUG
+     9: ASMV or ASMINF -- use ASM code
+     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+     11: 0 (reserved)
+
+    One-time table building (smaller code, but not thread-safe if true):
+     12: BUILDFIXED -- build static block decoding tables when needed
+     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+     14,15: 0 (reserved)
+
+    Library content (indicates missing functionality):
+     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+                          deflate code when not needed)
+     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+                    and decode gzip streams (to avoid linking crc code)
+     18-19: 0 (reserved)
+
+    Operation variations (changes in library functionality):
+     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+     21: FASTEST -- deflate algorithm with only one, lowest compression level
+     22,23: 0 (reserved)
+
+    The sprintf variant used by gzprintf (zero is best):
+     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+    Remainder:
+     27-31: 0 (reserved)
+ */
+
+
+                        /* utility functions */
+
+/*
+     The following utility functions are implemented on top of the basic
+   stream-oriented functions.  To simplify the interface, some default options
+   are assumed (compression level and memory usage, standard memory allocation
+   functions).  The source code of these utility functions can be modified if
+   you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
+                                 const Bytef *source, uLong sourceLen));
+/*
+     Compresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
+                                  const Bytef *source, uLong sourceLen,
+                                  int level));
+/*
+     Compresses the source buffer into the destination buffer.  The level
+   parameter has the same meaning as in deflateInit.  sourceLen is the byte
+   length of the source buffer.  Upon entry, destLen is the total size of the
+   destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+   Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+     compressBound() returns an upper bound on the compressed size after
+   compress() or compress2() on sourceLen bytes.  It would be used before a
+   compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
+                                   const Bytef *source, uLong sourceLen));
+/*
+     Decompresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be large enough to hold the entire
+   uncompressed data.  (The size of the uncompressed data must have been saved
+   previously by the compressor and transmitted to the decompressor by some
+   mechanism outside the scope of this compression library.) Upon exit, destLen
+   is the actual size of the uncompressed buffer.
+
+     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+                        /* gzip file access functions */
+
+/*
+     This library supports reading and writing files in gzip (.gz) format with
+   an interface similar to that of stdio, using the functions that start with
+   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
+   wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef voidp gzFile;       /* opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
+   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+   for fixed code compression as in "wb9F".  (See the description of
+   deflateInit2 for more information about the strategy parameter.) Also "a"
+   can be used instead of "w" to request that the gzip stream that will be
+   written be appended to the file.  "+" will result in an error, since reading
+   and writing to the same gzip file is not supported.
+
+     gzopen can be used to read a file which is not in gzip format; in this
+   case gzread will directly read from the file without decompression.
+
+     gzopen returns NULL if the file could not be opened, if there was
+   insufficient memory to allocate the gzFile state, or if an invalid mode was
+   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+   errno can be checked to determine if the reason gzopen failed was that the
+   file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
+   are obtained from calls like open, dup, creat, pipe or fileno (if the file
+   has been previously opened with fopen).  The mode parameter is as in gzopen.
+
+     The next call of gzclose on the returned gzFile will also close the file
+   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+   mode);.  The duplicated descriptor should be saved to avoid a leak, since
+   gzdopen does not close fd if it fails.
+
+     gzdopen returns NULL if there was insufficient memory to allocate the
+   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
+   used until the next gz* read, write, seek, or close operation, so gzdopen
+   will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+     Set the internal buffer size used by this library's functions.  The
+   default buffer size is 8192 bytes.  This function must be called after
+   gzopen() or gzdopen(), and before any other calls that read or write the
+   file.  The buffer memory allocation is always deferred to the first read or
+   write.  Two buffers are allocated, either both of the specified size when
+   writing, or one of the specified size and the other twice that size when
+   reading.  A larger buffer size of, for example, 64K or 128K bytes will
+   noticeably increase the speed of decompression (reading).
+
+     The new buffer size also affects the maximum length for gzprintf().
+
+     gzbuffer() returns 0 on success, or -1 on failure, such as being called
+   too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+     Dynamically update the compression level or strategy.  See the description
+   of deflateInit2 for the meaning of these parameters.
+
+     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+   opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+     Reads the given number of uncompressed bytes from the compressed file.  If
+   the input file was not in gzip format, gzread copies the given number of
+   bytes into the buffer.
+
+     After reaching the end of a gzip stream in the input, gzread will continue
+   to read, looking for another gzip stream, or failing that, reading the rest
+   of the input file directly without decompression.  The entire input file
+   will be read if gzread is called until it returns less than the requested
+   len.
+
+     gzread returns the number of uncompressed bytes actually read, less than
+   len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+                                voidpc buf, unsigned len));
+/*
+     Writes the given number of uncompressed bytes into the compressed file.
+   gzwrite returns the number of uncompressed bytes written or 0 in case of
+   error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+     Converts, formats, and writes the arguments to the compressed file under
+   control of the format string, as in fprintf.  gzprintf returns the number of
+   uncompressed bytes actually written, or 0 in case of error.  The number of
+   uncompressed bytes written is limited to 8191, or one less than the buffer
+   size given to gzbuffer().  The caller should assure that this limit is not
+   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
+   nothing written.  In this case, there may also be a buffer overflow with
+   unpredictable consequences, which is possible only if zlib was compiled with
+   the insecure functions sprintf() or vsprintf() because the secure snprintf()
+   or vsnprintf() functions were not available.  This can be determined using
+   zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+     Writes the given null-terminated string to the compressed file, excluding
+   the terminating null character.
+
+     gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+     Reads bytes from the compressed file until len-1 characters are read, or a
+   newline character is read and transferred to buf, or an end-of-file
+   condition is encountered.  If any characters are read or if len == 1, the
+   string is terminated with a null character.  If no characters are read due
+   to an end-of-file or len < 1, then the buffer is left untouched.
+
+     gzgets returns buf which is a null-terminated string, or it returns NULL
+   for end-of-file or in case of error.  If there was an error, the contents at
+   buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+     Writes c, converted to an unsigned char, into the compressed file.  gzputc
+   returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+     Reads one byte from the compressed file.  gzgetc returns this byte or -1
+   in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+     Push one character back onto the stream to be read as the first character
+   on the next read.  At least one character of push-back is allowed.
+   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
+   fail if c is -1, and may fail if a character has been pushed but not read
+   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
+   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
+   The pushed character will be discarded if the stream is repositioned with
+   gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+     Flushes all pending output into the compressed file.  The parameter flush
+   is as in the deflate() function.  The return value is the zlib error number
+   (see function gzerror below).  gzflush is only permitted when writing.
+
+     If the flush parameter is Z_FINISH, the remaining data is written and the
+   gzip stream is completed in the output.  If gzwrite() is called again, a new
+   gzip stream will be started in the output.  gzread() is able to read such
+   concatented gzip streams.
+
+     gzflush should be called only when strictly necessary because it will
+   degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+                                   z_off_t offset, int whence));
+
+     Sets the starting position for the next gzread or gzwrite on the given
+   compressed file.  The offset represents a number of bytes in the
+   uncompressed data stream.  The whence parameter is defined as in lseek(2);
+   the value SEEK_END is not supported.
+
+     If the file is opened for reading, this function is emulated but can be
+   extremely slow.  If the file is opened for writing, only forward seeks are
+   supported; gzseek then compresses a sequence of zeroes up to the new
+   starting position.
+
+     gzseek returns the resulting offset location as measured in bytes from
+   the beginning of the uncompressed stream, or -1 in case of error, in
+   particular if the file is opened for writing and the new starting position
+   would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
+/*
+     Rewinds the given file. This function is supported only for reading.
+
+     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
+
+     Returns the starting position for the next gzread or gzwrite on the given
+   compressed file.  This position represents a number of bytes in the
+   uncompressed data stream, and is zero when starting, even if appending or
+   reading a gzip stream from the middle of a file using gzdopen().
+
+     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+     Returns the current offset in the file being read or written.  This offset
+   includes the count of bytes that precede the gzip stream, for example when
+   appending or when using gzdopen() for reading.  When reading, the offset
+   does not include as yet unused buffered input.  This information can be used
+   for a progress indicator.  On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+     Returns true (1) if the end-of-file indicator has been set while reading,
+   false (0) otherwise.  Note that the end-of-file indicator is set only if the
+   read tried to go past the end of the input, but came up short.  Therefore,
+   just like feof(), gzeof() may return false even if there is no more data to
+   read, in the event that the last read request was for the exact number of
+   bytes remaining in the input file.  This will happen if the input file size
+   is an exact multiple of the buffer size.
+
+     If gzeof() returns true, then the read functions will return no more data,
+   unless the end-of-file indicator is reset by gzclearerr() and the input file
+   has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+     Returns true (1) if file is being copied directly while reading, or false
+   (0) if file is a gzip stream being decompressed.  This state can change from
+   false to true while reading the input file if the end of a gzip stream is
+   reached, but is followed by data that is not another gzip stream.
+
+     If the input file is empty, gzdirect() will return true, since the input
+   does not contain a gzip stream.
+
+     If gzdirect() is used immediately after gzopen() or gzdopen() it will
+   cause buffers to be allocated to allow reading the file to determine if it
+   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
+   gzdirect().
+*/
+
+ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
+/*
+     Flushes all pending output if necessary, closes the compressed file and
+   deallocates the (de)compression state.  Note that once file is closed, you
+   cannot call gzerror with file, since its structures have been deallocated.
+   gzclose must not be called more than once on the same file, just as free
+   must not be called more than once on the same allocation.
+
+     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+   file operation error, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+     Same as gzclose(), but gzclose_r() is only for use when reading, and
+   gzclose_w() is only for use when writing or appending.  The advantage to
+   using these instead of gzclose() is that they avoid linking in zlib
+   compression or decompression code that is not used when only reading or only
+   writing respectively.  If gzclose() is used, then both compression and
+   decompression code will be included the application when linking to a static
+   zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+     Returns the error message for the last error which occurred on the given
+   compressed file.  errnum is set to zlib error number.  If an error occurred
+   in the file system and not in the compression library, errnum is set to
+   Z_ERRNO and the application may consult errno to get the exact error code.
+
+     The application must not modify the returned string.  Future calls to
+   this function may invalidate the previously returned string.  If file is
+   closed, then the string previously returned by gzerror will no longer be
+   available.
+
+     gzerror() should be used to distinguish errors from end-of-file for those
+   functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+     Clears the error and end-of-file flags for file.  This is analogous to the
+   clearerr() function in stdio.  This is useful for continuing to read a gzip
+   file that is being written concurrently.
+*/
+
+
+                        /* checksum functions */
+
+/*
+     These functions are not related to compression but are exported
+   anyway because they might be useful in applications using the compression
+   library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+   return the updated checksum.  If buf is Z_NULL, this function returns the
+   required initial value for the checksum.
+
+     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+   much faster.
+
+   Usage example:
+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+                                          z_off_t len2));
+
+     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
+   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
+   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
+/*
+     Update a running CRC-32 with the bytes buf[0..len-1] and return the
+   updated CRC-32.  If buf is Z_NULL, this function returns the required
+   initial value for the for the crc.  Pre- and post-conditioning (one's
+   complement) is performed within this function so it shouldn't be done by the
+   application.
+
+   Usage example:
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+     Combine two CRC-32 check values into one.  For two sequences of bytes,
+   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
+   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+   len2.
+*/
+
+
+                        /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
+                                      int windowBits, int memLevel,
+                                      int strategy, const char *version,
+                                      int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
+                                      const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+                                         unsigned char FAR *window,
+                                         const char *version,
+                                         int stream_size));
+#define deflateInit(strm, level) \
+        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+        inflateBackInit_((strm), (windowBits), (window), \
+                                            ZLIB_VERSION, sizeof(z_stream))
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+#  define gzopen gzopen64
+#  define gzseek gzseek64
+#  define gztell gztell64
+#  define gzoffset gzoffset64
+#  define adler32_combine adler32_combine64
+#  define crc32_combine crc32_combine64
+#  ifdef _LARGEFILE64_SOURCE
+     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#  endif
+#else
+   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+    struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char   * ZEXPORT zError           OF((int));
+ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
+ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/misc/builddeps/dp.win32/lib/libz.a b/misc/builddeps/dp.win32/lib/libz.a
new file mode 100644 (file)
index 0000000..6a6056d
Binary files /dev/null and b/misc/builddeps/dp.win32/lib/libz.a differ
diff --git a/misc/builddeps/dp.win32/lib/libz.dll.a b/misc/builddeps/dp.win32/lib/libz.dll.a
new file mode 120000 (symlink)
index 0000000..d68f850
--- /dev/null
@@ -0,0 +1 @@
+libzdll.a
\ No newline at end of file
diff --git a/misc/builddeps/dp.win32/lib/libzdll.a b/misc/builddeps/dp.win32/lib/libzdll.a
new file mode 100644 (file)
index 0000000..2991368
Binary files /dev/null and b/misc/builddeps/dp.win32/lib/libzdll.a differ
diff --git a/misc/builddeps/dp.win64/bin/zlib1.dll b/misc/builddeps/dp.win64/bin/zlib1.dll
new file mode 100755 (executable)
index 0000000..1ab7bdc
Binary files /dev/null and b/misc/builddeps/dp.win64/bin/zlib1.dll differ
diff --git a/misc/builddeps/dp.win64/include/zconf.h b/misc/builddeps/dp.win64/include/zconf.h
new file mode 100644 (file)
index 0000000..02ce56c
--- /dev/null
@@ -0,0 +1,428 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  define compress              z_compress
+#  define compress2             z_compress2
+#  define compressBound         z_compressBound
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
+#  define gz_strwinerror        z_gz_strwinerror
+#  define gzbuffer              z_gzbuffer
+#  define gzclearerr            z_gzclearerr
+#  define gzclose               z_gzclose
+#  define gzclose_r             z_gzclose_r
+#  define gzclose_w             z_gzclose_w
+#  define gzdirect              z_gzdirect
+#  define gzdopen               z_gzdopen
+#  define gzeof                 z_gzeof
+#  define gzerror               z_gzerror
+#  define gzflush               z_gzflush
+#  define gzgetc                z_gzgetc
+#  define gzgets                z_gzgets
+#  define gzoffset              z_gzoffset
+#  define gzoffset64            z_gzoffset64
+#  define gzopen                z_gzopen
+#  define gzopen64              z_gzopen64
+#  define gzprintf              z_gzprintf
+#  define gzputc                z_gzputc
+#  define gzputs                z_gzputs
+#  define gzread                z_gzread
+#  define gzrewind              z_gzrewind
+#  define gzseek                z_gzseek
+#  define gzseek64              z_gzseek64
+#  define gzsetparams           z_gzsetparams
+#  define gztell                z_gztell
+#  define gztell64              z_gztell64
+#  define gzungetc              z_gzungetc
+#  define gzwrite               z_gzwrite
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  define uncompress            z_uncompress
+#  define zError                z_zError
+#  define zcalloc               z_zcalloc
+#  define zcfree                z_zcfree
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  define gzFile                z_gzFile
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+#  include <sys/types.h>    /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+#  undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+#  include <unistd.h>       /* for SEEK_* and off_t */
+#  ifdef VMS
+#    include <unixio.h>     /* for off_t */
+#  endif
+#  ifndef z_off_t
+#    define z_off_t off_t
+#  endif
+#endif
+
+#ifndef SEEK_SET
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
+#if defined(__OS400__)
+#  define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+#  define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/misc/builddeps/dp.win64/include/zlib.h b/misc/builddeps/dp.win64/include/zlib.h
new file mode 100644 (file)
index 0000000..bfbba83
--- /dev/null
@@ -0,0 +1,1613 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+  version 1.2.5, April 19th, 2010
+
+  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+
+  The data format used by the zlib library is described by RFCs (Request for
+  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+    The 'zlib' compression library provides in-memory compression and
+  decompression functions, including integrity checks of the uncompressed data.
+  This version of the library supports only one compression method (deflation)
+  but other algorithms will be added later and will have the same stream
+  interface.
+
+    Compression can be done in a single step if the buffers are large enough,
+  or can be done by repeated calls of the compression function.  In the latter
+  case, the application must provide more input and/or consume the output
+  (providing more output space) before each call.
+
+    The compressed data format used by default by the in-memory functions is
+  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+  around a deflate stream, which is itself documented in RFC 1951.
+
+    The library also supports reading and writing files in gzip (.gz) format
+  with an interface similar to that of stdio using the functions that start
+  with "gz".  The gzip format is different from the zlib format.  gzip is a
+  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+    This library can optionally read and write gzip streams in memory as well.
+
+    The zlib format was designed to be compact and fast for use in memory
+  and on communications channels.  The gzip format was designed for single-
+  file compression on file systems, has a larger header than zlib to maintain
+  directory information, and uses a different, slower check method than zlib.
+
+    The library does not install any signal handler.  The decoder checks
+  the consistency of the compressed data, so the library should never crash
+  even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+    Bytef    *next_in;  /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total nb of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total nb of bytes output so far */
+
+    char     *msg;      /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: binary or text */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+     gzip header information passed to and from zlib routines.  See RFC 1952
+  for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+    int     text;       /* true if compressed data believed to be text */
+    uLong   time;       /* modification time */
+    int     xflags;     /* extra flags (not used when writing a gzip file) */
+    int     os;         /* operating system */
+    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
+    uInt    extra_max;  /* space at extra (only when reading header) */
+    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    uInt    name_max;   /* space at name (only when reading header) */
+    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    uInt    comm_max;   /* space at comment (only when reading header) */
+    int     hcrc;       /* true if there was or will be a header crc */
+    int     done;       /* true when done reading gzip header (not used
+                           when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+     The application must update next_in and avail_in when avail_in has dropped
+   to zero.  It must update next_out and avail_out when avail_out has dropped
+   to zero.  The application must initialize zalloc, zfree and opaque before
+   calling the init function.  All other fields are set by the compression
+   library and must not be updated by the application.
+
+     The opaque value provided by the application will be passed as the first
+   parameter for calls of zalloc and zfree.  This can be useful for custom
+   memory management.  The compression library attaches no meaning to the
+   opaque value.
+
+     zalloc must return Z_NULL if there is not enough memory for the object.
+   If zlib is used in a multi-threaded application, zalloc and zfree must be
+   thread safe.
+
+     On 16-bit systems, the functions zalloc and zfree must be able to allocate
+   exactly 65536 bytes, but will not be required to allocate more than this if
+   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
+   returned by zalloc for objects of exactly 65536 bytes *must* have their
+   offset normalized to zero.  The default allocation function provided by this
+   library ensures this (see zutil.c).  To reduce memory requirements and avoid
+   any allocation of 64K objects, at the expense of compression ratio, compile
+   the library with -DMAX_WBITS=14 (see zconf.h).
+
+     The fields total_in and total_out can be used for statistics or progress
+   reports.  After compression, total_in holds the total size of the
+   uncompressed data and may be saved for use in the decompressor (particularly
+   if the decompressor wants to decompress everything in a single step).
+*/
+
+                        /* constants */
+
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+#define Z_BLOCK         5
+#define Z_TREES         6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_RLE                 3
+#define Z_FIXED               4
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_TEXT     1
+#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+                        /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+   If the first character differs, the library code actually used is not
+   compatible with the zlib.h header file used by the application.  This check
+   is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+     Initializes the internal stream state for compression.  The fields
+   zalloc, zfree and opaque must be initialized before by the caller.  If
+   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+   allocation functions.
+
+     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+   1 gives best speed, 9 gives best compression, 0 gives no compression at all
+   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
+   requests a default compromise between speed and compression (currently
+   equivalent to level 6).
+
+     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if level is not a valid compression level, or
+   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
+   if there is no error message.  deflateInit does not perform any compression:
+   this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+    deflate compresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+    The detailed semantics are as follows.  deflate performs one or both of the
+  following actions:
+
+  - Compress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in and avail_in are updated and
+    processing will resume at this point for the next call of deflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  This action is forced if the parameter flush is non zero.
+    Forcing flush frequently degrades the compression ratio, so this parameter
+    should be set only when necessary (in interactive applications).  Some
+    output may be provided even if flush is not set.
+
+    Before the call of deflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating avail_in or avail_out accordingly; avail_out should
+  never be zero before the call.  The application can consume the compressed
+  output when it wants, for example when the output buffer is full (avail_out
+  == 0), or after each call of deflate().  If deflate returns Z_OK and with
+  zero avail_out, it must be called again after making room in the output
+  buffer because there might be more output pending.
+
+    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+  decide how much data to accumulate before producing output, in order to
+  maximize compression.
+
+    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+  flushed to the output buffer and the output is aligned on a byte boundary, so
+  that the decompressor can get all input data available so far.  (In
+  particular avail_in is zero after the call if enough output space has been
+  provided before the call.) Flushing may degrade compression for some
+  compression algorithms and so it should be used only when necessary.  This
+  completes the current deflate block and follows it with an empty stored block
+  that is three bits plus filler bits to the next byte, followed by four bytes
+  (00 00 ff ff).
+
+    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+  output buffer, but the output is not aligned to a byte boundary.  All of the
+  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+  This completes the current deflate block and follows it with an empty fixed
+  codes block that is 10 bits long.  This assures that enough bytes are output
+  in order for the decompressor to finish the block before the empty fixed code
+  block.
+
+    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+  seven bits of the current block are held to be written as the next byte after
+  the next deflate block is completed.  In this case, the decompressor may not
+  be provided enough bits at this point in order to complete decompression of
+  the data provided so far to the compressor.  It may need to wait for the next
+  block to be emitted.  This is for advanced applications that need to control
+  the emission of deflate blocks.
+
+    If flush is set to Z_FULL_FLUSH, all output is flushed as with
+  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+  restart from this point if previous compressed data has been damaged or if
+  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
+  compression.
+
+    If deflate returns with avail_out == 0, this function must be called again
+  with the same value of the flush parameter and more output space (updated
+  avail_out), until the flush is complete (deflate returns with non-zero
+  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+  avail_out is greater than six to avoid repeated flush markers due to
+  avail_out == 0 on return.
+
+    If the parameter flush is set to Z_FINISH, pending input is processed,
+  pending output is flushed and deflate returns with Z_STREAM_END if there was
+  enough output space; if deflate returns with Z_OK, this function must be
+  called again with Z_FINISH and more output space (updated avail_out) but no
+  more input data, until it returns with Z_STREAM_END or an error.  After
+  deflate has returned Z_STREAM_END, the only possible operations on the stream
+  are deflateReset or deflateEnd.
+
+    Z_FINISH can be used immediately after deflateInit if all the compression
+  is to be done in a single step.  In this case, avail_out must be at least the
+  value returned by deflateBound (see below).  If deflate does not return
+  Z_STREAM_END, then it must be called again as described above.
+
+    deflate() sets strm->adler to the adler32 checksum of all input read
+  so far (that is, total_in bytes).
+
+    deflate() may update strm->data_type if it can make a good guess about
+  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
+  binary.  This field is only for information purposes and does not affect the
+  compression algorithm in any manner.
+
+    deflate() returns Z_OK if some progress has been made (more input
+  processed or more output produced), Z_STREAM_END if all input has been
+  consumed and all output has been produced (only when flush is set to
+  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
+  fatal, and deflate() can be called again with more input and more output
+  space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+   prematurely (some input or output was discarded).  In the error case, msg
+   may be set but then points to a static string (which must not be
+   deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+     Initializes the internal stream state for decompression.  The fields
+   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
+   exact value depends on the compression method), inflateInit determines the
+   compression method from the zlib header and allocates all data structures
+   accordingly; otherwise the allocation will be deferred to the first call of
+   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+   use default allocation functions.
+
+     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit() does not process any header information -- that is deferred
+   until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+    inflate decompresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+  The detailed semantics are as follows.  inflate performs one or both of the
+  following actions:
+
+  - Decompress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in is updated and processing will
+    resume at this point for the next call of inflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  inflate() provides as much output as possible, until there is
+    no more input data or no more space in the output buffer (see below about
+    the flush parameter).
+
+    Before the call of inflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating the next_* and avail_* values accordingly.  The
+  application can consume the uncompressed output when it wants, for example
+  when the output buffer is full (avail_out == 0), or after each call of
+  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
+  called again after making room in the output buffer because there might be
+  more output pending.
+
+    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
+  output as possible to the output buffer.  Z_BLOCK requests that inflate()
+  stop if and when it gets to the next deflate block boundary.  When decoding
+  the zlib or gzip format, this will cause inflate() to return immediately
+  after the header and before the first block.  When doing a raw inflate,
+  inflate() will go ahead and process the first block, and will return when it
+  gets to the end of that block, or when it runs out of data.
+
+    The Z_BLOCK option assists in appending to or combining deflate streams.
+  Also to assist in this, on return inflate() will set strm->data_type to the
+  number of unused bits in the last byte taken from strm->next_in, plus 64 if
+  inflate() is currently decoding the last block in the deflate stream, plus
+  128 if inflate() returned immediately after decoding an end-of-block code or
+  decoding the complete header up to just before the first byte of the deflate
+  stream.  The end-of-block will not be indicated until all of the uncompressed
+  data from that block has been written to strm->next_out.  The number of
+  unused bits may in general be greater than seven, except when bit 7 of
+  data_type is set, in which case the number of unused bits will be less than
+  eight.  data_type is set as noted here every time inflate() returns for all
+  flush options, and so can be used to determine the amount of currently
+  consumed input in bits.
+
+    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+  end of each deflate block header is reached, before any actual data in that
+  block is decoded.  This allows the caller to determine the length of the
+  deflate block header for later use in random access within a deflate block.
+  256 is added to the value of strm->data_type when inflate() returns
+  immediately after reaching the end of the deflate block header.
+
+    inflate() should normally be called until it returns Z_STREAM_END or an
+  error.  However if all decompression is to be performed in a single step (a
+  single call of inflate), the parameter flush should be set to Z_FINISH.  In
+  this case all pending input is processed and all pending output is flushed;
+  avail_out must be large enough to hold all the uncompressed data.  (The size
+  of the uncompressed data may have been saved by the compressor for this
+  purpose.) The next operation on this stream must be inflateEnd to deallocate
+  the decompression state.  The use of Z_FINISH is never required, but can be
+  used to inform inflate that a faster approach may be used for the single
+  inflate() call.
+
+     In this implementation, inflate() always flushes as much output as
+  possible to the output buffer, and always uses the faster approach on the
+  first call.  So the only effect of the flush parameter in this implementation
+  is on the return value of inflate(), as noted below, or when it returns early
+  because Z_BLOCK or Z_TREES is used.
+
+     If a preset dictionary is needed after this call (see inflateSetDictionary
+  below), inflate sets strm->adler to the adler32 checksum of the dictionary
+  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+  strm->adler to the adler32 checksum of all output produced so far (that is,
+  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+  below.  At the end of the stream, inflate() checks that its computed adler32
+  checksum is equal to that saved by the compressor and returns Z_STREAM_END
+  only if the checksum is correct.
+
+    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+  deflate data.  The header type is detected automatically, if requested when
+  initializing with inflateInit2().  Any information contained in the gzip
+  header is not retained, so applications that need that information should
+  instead use raw inflate, see inflateInit2() below, or inflateBack() and
+  perform their own processing of the gzip header and trailer.
+
+    inflate() returns Z_OK if some progress has been made (more input processed
+  or more output produced), Z_STREAM_END if the end of the compressed data has
+  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+  corrupted (input stream not conforming to the zlib format or incorrect check
+  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
+  inflate() can be called again with more input and more output space to
+  continue decompressing.  If Z_DATA_ERROR is returned, the application may
+  then call inflateSync() to look for a good compression block if a partial
+  recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+   was inconsistent.  In the error case, msg may be set but then points to a
+   static string (which must not be deallocated).
+*/
+
+
+                        /* Advanced functions */
+
+/*
+    The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+                                     int  level,
+                                     int  method,
+                                     int  windowBits,
+                                     int  memLevel,
+                                     int  strategy));
+
+     This is another version of deflateInit with more compression options.  The
+   fields next_in, zalloc, zfree and opaque must be initialized before by the
+   caller.
+
+     The method parameter is the compression method.  It must be Z_DEFLATED in
+   this version of the library.
+
+     The windowBits parameter is the base two logarithm of the window size
+   (the size of the history buffer).  It should be in the range 8..15 for this
+   version of the library.  Larger values of this parameter result in better
+   compression at the expense of memory usage.  The default value is 15 if
+   deflateInit is used instead.
+
+     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
+   determines the window size.  deflate() will then generate raw deflate data
+   with no zlib header or trailer, and will not compute an adler32 check value.
+
+     windowBits can also be greater than 15 for optional gzip encoding.  Add
+   16 to windowBits to write a simple gzip header and trailer around the
+   compressed data instead of a zlib wrapper.  The gzip header will have no
+   file name, no extra data, no comment, no modification time (set to zero), no
+   header crc, and the operating system will be set to 255 (unknown).  If a
+   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+     The memLevel parameter specifies how much memory should be allocated
+   for the internal compression state.  memLevel=1 uses minimum memory but is
+   slow and reduces compression ratio; memLevel=9 uses maximum memory for
+   optimal speed.  The default value is 8.  See zconf.h for total memory usage
+   as a function of windowBits and memLevel.
+
+     The strategy parameter is used to tune the compression algorithm.  Use the
+   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+   string match), or Z_RLE to limit match distances to one (run-length
+   encoding).  Filtered data consists mostly of small values with a somewhat
+   random distribution.  In this case, the compression algorithm is tuned to
+   compress them better.  The effect of Z_FILTERED is to force more Huffman
+   coding and less string matching; it is somewhat intermediate between
+   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
+   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
+   strategy parameter only affects the compression ratio but not the
+   correctness of the compressed output even if it is not set appropriately.
+   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+   decoder for special applications.
+
+     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
+   set to null if there is no error message.  deflateInit2 does not perform any
+   compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the compression dictionary from the given byte sequence
+   without producing any compressed output.  This function must be called
+   immediately after deflateInit, deflateInit2 or deflateReset, before any call
+   of deflate.  The compressor and decompressor must use exactly the same
+   dictionary (see inflateSetDictionary).
+
+     The dictionary should consist of strings (byte sequences) that are likely
+   to be encountered later in the data to be compressed, with the most commonly
+   used strings preferably put towards the end of the dictionary.  Using a
+   dictionary is most useful when the data to be compressed is short and can be
+   predicted with good accuracy; the data can then be compressed better than
+   with the default empty dictionary.
+
+     Depending on the size of the compression data structures selected by
+   deflateInit or deflateInit2, a part of the dictionary may in effect be
+   discarded, for example if the dictionary is larger than the window size
+   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
+   useful should be put at the end of the dictionary, not at the front.  In
+   addition, the current implementation of deflate will use at most the window
+   size minus 262 bytes of the provided dictionary.
+
+     Upon return of this function, strm->adler is set to the adler32 value
+   of the dictionary; the decompressor may later use this value to determine
+   which dictionary has been used by the compressor.  (The adler32 value
+   applies to the whole dictionary even if only a subset of the dictionary is
+   actually used by the compressor.) If a raw deflate was requested, then the
+   adler32 value is not computed and strm->adler is not set.
+
+     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent (for example if deflate has already been called for this stream
+   or if the compression method is bsort).  deflateSetDictionary does not
+   perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when several compression strategies will be
+   tried, for example when there are several ways of pre-processing the input
+   data with a filter.  The streams that will be discarded should then be freed
+   by calling deflateEnd.  Note that deflateCopy duplicates the internal
+   compression state which can be quite large, so this strategy is slow and can
+   consume lots of memory.
+
+     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to deflateEnd followed by deflateInit,
+   but does not free and reallocate all the internal compression state.  The
+   stream will keep the same compression level and any other attributes that
+   may have been set by deflateInit2.
+
+     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+                                      int level,
+                                      int strategy));
+/*
+     Dynamically update the compression level and compression strategy.  The
+   interpretation of level and strategy is as in deflateInit2.  This can be
+   used to switch between compression and straight copy of the input data, or
+   to switch to a different kind of input data requiring a different strategy.
+   If the compression level is changed, the input available so far is
+   compressed with the old level (and may be flushed); the new level will take
+   effect only at the next call of deflate().
+
+     Before the call of deflateParams, the stream state must be set as for
+   a call of deflate(), since the currently available input may have to be
+   compressed and flushed.  In particular, strm->avail_out must be non-zero.
+
+     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+   strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+                                    int good_length,
+                                    int max_lazy,
+                                    int nice_length,
+                                    int max_chain));
+/*
+     Fine tune deflate's internal compression parameters.  This should only be
+   used by someone who understands the algorithm used by zlib's deflate for
+   searching for the best matching string, and even then only by the most
+   fanatic optimizer trying to squeeze out the last compressed bit for their
+   specific input data.  Read the deflate.c source code for the meaning of the
+   max_lazy, good_length, nice_length, and max_chain parameters.
+
+     deflateTune() can be called after deflateInit() or deflateInit2(), and
+   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+                                       uLong sourceLen));
+/*
+     deflateBound() returns an upper bound on the compressed size after
+   deflation of sourceLen bytes.  It must be called after deflateInit() or
+   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
+   to allocate an output buffer for deflation in a single pass, and so would be
+   called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     deflatePrime() inserts bits in the deflate output stream.  The intent
+   is that this function is used to start off the deflate output with the bits
+   leftover from a previous deflate stream when appending to it.  As such, this
+   function can only be used for raw deflate, and must be used before the first
+   deflate() call after a deflateInit2() or deflateReset().  bits must be less
+   than or equal to 16, and that many of the least significant bits of value
+   will be inserted in the output.
+
+     deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     deflateSetHeader() provides gzip header information for when a gzip
+   stream is requested by deflateInit2().  deflateSetHeader() may be called
+   after deflateInit2() or deflateReset() and before the first call of
+   deflate().  The text, time, os, extra field, name, and comment information
+   in the provided gz_header structure are written to the gzip header (xflag is
+   ignored -- the extra flags are set according to the compression level).  The
+   caller must assure that, if not Z_NULL, name and comment are terminated with
+   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+   available there.  If hcrc is true, a gzip header crc is included.  Note that
+   the current versions of the command-line version of gzip (up through version
+   1.3.x) do not support header crc's, and will report that it is a "multi-part
+   gzip file" and give up.
+
+     If deflateSetHeader is not used, the default gzip header has text false,
+   the time set to zero, and os set to 255, with no extra, name, or comment
+   fields.  The gzip header is returned to the default state by deflateReset().
+
+     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+                                     int  windowBits));
+
+     This is another version of inflateInit with an extra parameter.  The
+   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+   before by the caller.
+
+     The windowBits parameter is the base two logarithm of the maximum window
+   size (the size of the history buffer).  It should be in the range 8..15 for
+   this version of the library.  The default value is 15 if inflateInit is used
+   instead.  windowBits must be greater than or equal to the windowBits value
+   provided to deflateInit2() while compressing, or it must be equal to 15 if
+   deflateInit2() was not used.  If a compressed stream with a larger window
+   size is given as input, inflate() will return with the error code
+   Z_DATA_ERROR instead of trying to allocate a larger window.
+
+     windowBits can also be zero to request that inflate use the window size in
+   the zlib header of the compressed stream.
+
+     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
+   determines the window size.  inflate() will then process raw deflate data,
+   not looking for a zlib or gzip header, not generating a check value, and not
+   looking for any check values for comparison at the end of the stream.  This
+   is for use with other formats that use the deflate compressed data format
+   such as zip.  Those formats provide their own check values.  If a custom
+   format is developed using the raw deflate format for compressed data, it is
+   recommended that a check value such as an adler32 or a crc32 be applied to
+   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
+   most applications, the zlib format should be used as is.  Note that comments
+   above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+     windowBits can also be greater than 15 for optional gzip decoding.  Add
+   32 to windowBits to enable zlib and gzip decoding with automatic header
+   detection, or add 16 to decode only the gzip format (the zlib format will
+   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
+   crc32 instead of an adler32.
+
+     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit2 does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit2() does not process any header information -- that is
+   deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the decompression dictionary from the given uncompressed byte
+   sequence.  This function must be called immediately after a call of inflate,
+   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
+   can be determined from the adler32 value returned by that call of inflate.
+   The compressor and decompressor must use exactly the same dictionary (see
+   deflateSetDictionary).  For raw inflate, this function can be called
+   immediately after inflateInit2() or inflateReset() and before any call of
+   inflate() to set the dictionary.  The application must insure that the
+   dictionary that was used for compression is provided.
+
+     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+   expected one (incorrect adler32 value).  inflateSetDictionary does not
+   perform any decompression: this will be done by subsequent calls of
+   inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+     Skips invalid compressed data until a full flush point (see above the
+   description of deflate with Z_FULL_FLUSH) can be found, or until all
+   available input is skipped.  No output is provided.
+
+     inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+   if no more input was provided, Z_DATA_ERROR if no flush point has been
+   found, or Z_STREAM_ERROR if the stream structure was inconsistent.  In the
+   success case, the application may save the current current value of total_in
+   which indicates where valid compressed data was found.  In the error case,
+   the application may repeatedly call inflateSync, providing more input each
+   time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when randomly accessing a large stream.  The
+   first pass through the stream can periodically record the inflate state,
+   allowing restarting inflate at those points when randomly accessing the
+   stream.
+
+     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to inflateEnd followed by inflateInit,
+   but does not free and reallocate all the internal decompression state.  The
+   stream will keep attributes that may have been set by inflateInit2.
+
+     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+                                      int windowBits));
+/*
+     This function is the same as inflateReset, but it also permits changing
+   the wrap and window size requests.  The windowBits parameter is interpreted
+   the same as it is for inflateInit2.
+
+     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+   the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     This function inserts bits in the inflate input stream.  The intent is
+   that this function is used to start inflating at a bit position in the
+   middle of a byte.  The provided bits will be used before any bytes are used
+   from next_in.  This function should only be used with raw inflate, and
+   should be used before the first inflate() call after inflateInit2() or
+   inflateReset().  bits must be less than or equal to 16, and that many of the
+   least significant bits of value will be inserted in the input.
+
+     If bits is negative, then the input stream bit buffer is emptied.  Then
+   inflatePrime() can be called again to put bits in the buffer.  This is used
+   to clear out bits leftover after feeding inflate a block description prior
+   to feeding inflate codes.
+
+     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+     This function returns two values, one in the lower 16 bits of the return
+   value, and the other in the remaining upper bits, obtained by shifting the
+   return value down 16 bits.  If the upper value is -1 and the lower value is
+   zero, then inflate() is currently decoding information outside of a block.
+   If the upper value is -1 and the lower value is non-zero, then inflate is in
+   the middle of a stored block, with the lower value equaling the number of
+   bytes from the input remaining to copy.  If the upper value is not -1, then
+   it is the number of bits back from the current bit position in the input of
+   the code (literal or length/distance pair) currently being processed.  In
+   that case the lower value is the number of bytes already emitted for that
+   code.
+
+     A code is being processed if inflate is waiting for more input to complete
+   decoding of the code, or if it has completed decoding but is waiting for
+   more output space to write the literal or match data.
+
+     inflateMark() is used to mark locations in the input data for random
+   access, which may be at bit positions, and to note those cases where the
+   output of a code may span boundaries of random access blocks.  The current
+   location in the input stream can be determined from avail_in and data_type
+   as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+     inflateMark returns the value noted above or -1 << 16 if the provided
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     inflateGetHeader() requests that gzip header information be stored in the
+   provided gz_header structure.  inflateGetHeader() may be called after
+   inflateInit2() or inflateReset(), and before the first call of inflate().
+   As inflate() processes the gzip stream, head->done is zero until the header
+   is completed, at which time head->done is set to one.  If a zlib stream is
+   being decoded, then head->done is set to -1 to indicate that there will be
+   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
+   used to force inflate() to return immediately after header processing is
+   complete and before any actual data is decompressed.
+
+     The text, time, xflags, and os fields are filled in with the gzip header
+   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
+   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+   contains the maximum number of bytes to write to extra.  Once done is true,
+   extra_len contains the actual extra field length, and extra contains the
+   extra field, or that field truncated if extra_max is less than extra_len.
+   If name is not Z_NULL, then up to name_max characters are written there,
+   terminated with a zero unless the length is greater than name_max.  If
+   comment is not Z_NULL, then up to comm_max characters are written there,
+   terminated with a zero unless the length is greater than comm_max.  When any
+   of extra, name, or comment are not Z_NULL and the respective field is not
+   present in the header, then that field is set to Z_NULL to signal its
+   absence.  This allows the use of deflateSetHeader() with the returned
+   structure to duplicate the header.  However if those fields are set to
+   allocated memory, then the application will need to save those pointers
+   elsewhere so that they can be eventually freed.
+
+     If inflateGetHeader is not used, then the header information is simply
+   discarded.  The header is always checked for validity, including the header
+   CRC if present.  inflateReset() will reset the process to discard the header
+   information.  The application would need to call inflateGetHeader() again to
+   retrieve the header from the next gzip stream.
+
+     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+                                        unsigned char FAR *window));
+
+     Initialize the internal stream state for decompression using inflateBack()
+   calls.  The fields zalloc, zfree and opaque in strm must be initialized
+   before the call.  If zalloc and zfree are Z_NULL, then the default library-
+   derived memory allocation routines are used.  windowBits is the base two
+   logarithm of the window size, in the range 8..15.  window is a caller
+   supplied buffer of that size.  Except for special applications where it is
+   assured that deflate was used with small window sizes, windowBits must be 15
+   and a 32K byte window must be supplied to be able to decompress general
+   deflate streams.
+
+     See inflateBack() for the usage of these routines.
+
+     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+   the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+   allocated, or Z_VERSION_ERROR if the version of the library does not match
+   the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+                                    in_func in, void FAR *in_desc,
+                                    out_func out, void FAR *out_desc));
+/*
+     inflateBack() does a raw inflate with a single call using a call-back
+   interface for input and output.  This is more efficient than inflate() for
+   file i/o applications in that it avoids copying between the output and the
+   sliding window by simply making the window itself the output buffer.  This
+   function trusts the application to not change the output buffer passed by
+   the output function, at least until inflateBack() returns.
+
+     inflateBackInit() must be called first to allocate the internal state
+   and to initialize the state with the user-provided window buffer.
+   inflateBack() may then be used multiple times to inflate a complete, raw
+   deflate stream with each call.  inflateBackEnd() is then called to free the
+   allocated state.
+
+     A raw deflate stream is one with no zlib or gzip header or trailer.
+   This routine would normally be used in a utility that reads zip or gzip
+   files and writes out uncompressed files.  The utility would decode the
+   header and process the trailer on its own, hence this routine expects only
+   the raw deflate stream to decompress.  This is different from the normal
+   behavior of inflate(), which expects either a zlib or gzip header and
+   trailer around the deflate stream.
+
+     inflateBack() uses two subroutines supplied by the caller that are then
+   called by inflateBack() for input and output.  inflateBack() calls those
+   routines until it reads a complete deflate stream and writes out all of the
+   uncompressed data, or until it encounters an error.  The function's
+   parameters and return types are defined above in the in_func and out_func
+   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
+   number of bytes of provided input, and a pointer to that input in buf.  If
+   there is no input available, in() must return zero--buf is ignored in that
+   case--and inflateBack() will return a buffer error.  inflateBack() will call
+   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
+   should return zero on success, or non-zero on failure.  If out() returns
+   non-zero, inflateBack() will return with an error.  Neither in() nor out()
+   are permitted to change the contents of the window provided to
+   inflateBackInit(), which is also the buffer that out() uses to write from.
+   The length written by out() will be at most the window size.  Any non-zero
+   amount of input may be provided by in().
+
+     For convenience, inflateBack() can be provided input on the first call by
+   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
+   in() will be called.  Therefore strm->next_in must be initialized before
+   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
+   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
+   must also be initialized, and then if strm->avail_in is not zero, input will
+   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
+
+     The in_desc and out_desc parameters of inflateBack() is passed as the
+   first parameter of in() and out() respectively when they are called.  These
+   descriptors can be optionally used to pass any information that the caller-
+   supplied in() and out() functions need to do their job.
+
+     On return, inflateBack() will set strm->next_in and strm->avail_in to
+   pass back any unused input that was provided by the last in() call.  The
+   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+   in the deflate stream (in which case strm->msg is set to indicate the nature
+   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+   In the case of Z_BUF_ERROR, an input or output error can be distinguished
+   using strm->next_in which will be Z_NULL only if in() returned an error.  If
+   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+   non-zero.  (in() will always be called before out(), so strm->next_in is
+   assured to be defined if out() returns non-zero.) Note that inflateBack()
+   cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+     All memory allocated by inflateBackInit() is freed.
+
+     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+   state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+     1.0: size of uInt
+     3.2: size of uLong
+     5.4: size of voidpf (pointer)
+     7.6: size of z_off_t
+
+    Compiler, assembler, and debug options:
+     8: DEBUG
+     9: ASMV or ASMINF -- use ASM code
+     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+     11: 0 (reserved)
+
+    One-time table building (smaller code, but not thread-safe if true):
+     12: BUILDFIXED -- build static block decoding tables when needed
+     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+     14,15: 0 (reserved)
+
+    Library content (indicates missing functionality):
+     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+                          deflate code when not needed)
+     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+                    and decode gzip streams (to avoid linking crc code)
+     18-19: 0 (reserved)
+
+    Operation variations (changes in library functionality):
+     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+     21: FASTEST -- deflate algorithm with only one, lowest compression level
+     22,23: 0 (reserved)
+
+    The sprintf variant used by gzprintf (zero is best):
+     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+    Remainder:
+     27-31: 0 (reserved)
+ */
+
+
+                        /* utility functions */
+
+/*
+     The following utility functions are implemented on top of the basic
+   stream-oriented functions.  To simplify the interface, some default options
+   are assumed (compression level and memory usage, standard memory allocation
+   functions).  The source code of these utility functions can be modified if
+   you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
+                                 const Bytef *source, uLong sourceLen));
+/*
+     Compresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
+                                  const Bytef *source, uLong sourceLen,
+                                  int level));
+/*
+     Compresses the source buffer into the destination buffer.  The level
+   parameter has the same meaning as in deflateInit.  sourceLen is the byte
+   length of the source buffer.  Upon entry, destLen is the total size of the
+   destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+   Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+     compressBound() returns an upper bound on the compressed size after
+   compress() or compress2() on sourceLen bytes.  It would be used before a
+   compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
+                                   const Bytef *source, uLong sourceLen));
+/*
+     Decompresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be large enough to hold the entire
+   uncompressed data.  (The size of the uncompressed data must have been saved
+   previously by the compressor and transmitted to the decompressor by some
+   mechanism outside the scope of this compression library.) Upon exit, destLen
+   is the actual size of the uncompressed buffer.
+
+     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+                        /* gzip file access functions */
+
+/*
+     This library supports reading and writing files in gzip (.gz) format with
+   an interface similar to that of stdio, using the functions that start with
+   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
+   wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef voidp gzFile;       /* opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
+   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+   for fixed code compression as in "wb9F".  (See the description of
+   deflateInit2 for more information about the strategy parameter.) Also "a"
+   can be used instead of "w" to request that the gzip stream that will be
+   written be appended to the file.  "+" will result in an error, since reading
+   and writing to the same gzip file is not supported.
+
+     gzopen can be used to read a file which is not in gzip format; in this
+   case gzread will directly read from the file without decompression.
+
+     gzopen returns NULL if the file could not be opened, if there was
+   insufficient memory to allocate the gzFile state, or if an invalid mode was
+   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+   errno can be checked to determine if the reason gzopen failed was that the
+   file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
+   are obtained from calls like open, dup, creat, pipe or fileno (if the file
+   has been previously opened with fopen).  The mode parameter is as in gzopen.
+
+     The next call of gzclose on the returned gzFile will also close the file
+   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+   mode);.  The duplicated descriptor should be saved to avoid a leak, since
+   gzdopen does not close fd if it fails.
+
+     gzdopen returns NULL if there was insufficient memory to allocate the
+   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
+   used until the next gz* read, write, seek, or close operation, so gzdopen
+   will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+     Set the internal buffer size used by this library's functions.  The
+   default buffer size is 8192 bytes.  This function must be called after
+   gzopen() or gzdopen(), and before any other calls that read or write the
+   file.  The buffer memory allocation is always deferred to the first read or
+   write.  Two buffers are allocated, either both of the specified size when
+   writing, or one of the specified size and the other twice that size when
+   reading.  A larger buffer size of, for example, 64K or 128K bytes will
+   noticeably increase the speed of decompression (reading).
+
+     The new buffer size also affects the maximum length for gzprintf().
+
+     gzbuffer() returns 0 on success, or -1 on failure, such as being called
+   too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+     Dynamically update the compression level or strategy.  See the description
+   of deflateInit2 for the meaning of these parameters.
+
+     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+   opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+     Reads the given number of uncompressed bytes from the compressed file.  If
+   the input file was not in gzip format, gzread copies the given number of
+   bytes into the buffer.
+
+     After reaching the end of a gzip stream in the input, gzread will continue
+   to read, looking for another gzip stream, or failing that, reading the rest
+   of the input file directly without decompression.  The entire input file
+   will be read if gzread is called until it returns less than the requested
+   len.
+
+     gzread returns the number of uncompressed bytes actually read, less than
+   len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+                                voidpc buf, unsigned len));
+/*
+     Writes the given number of uncompressed bytes into the compressed file.
+   gzwrite returns the number of uncompressed bytes written or 0 in case of
+   error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+     Converts, formats, and writes the arguments to the compressed file under
+   control of the format string, as in fprintf.  gzprintf returns the number of
+   uncompressed bytes actually written, or 0 in case of error.  The number of
+   uncompressed bytes written is limited to 8191, or one less than the buffer
+   size given to gzbuffer().  The caller should assure that this limit is not
+   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
+   nothing written.  In this case, there may also be a buffer overflow with
+   unpredictable consequences, which is possible only if zlib was compiled with
+   the insecure functions sprintf() or vsprintf() because the secure snprintf()
+   or vsnprintf() functions were not available.  This can be determined using
+   zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+     Writes the given null-terminated string to the compressed file, excluding
+   the terminating null character.
+
+     gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+     Reads bytes from the compressed file until len-1 characters are read, or a
+   newline character is read and transferred to buf, or an end-of-file
+   condition is encountered.  If any characters are read or if len == 1, the
+   string is terminated with a null character.  If no characters are read due
+   to an end-of-file or len < 1, then the buffer is left untouched.
+
+     gzgets returns buf which is a null-terminated string, or it returns NULL
+   for end-of-file or in case of error.  If there was an error, the contents at
+   buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+     Writes c, converted to an unsigned char, into the compressed file.  gzputc
+   returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+     Reads one byte from the compressed file.  gzgetc returns this byte or -1
+   in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+     Push one character back onto the stream to be read as the first character
+   on the next read.  At least one character of push-back is allowed.
+   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
+   fail if c is -1, and may fail if a character has been pushed but not read
+   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
+   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
+   The pushed character will be discarded if the stream is repositioned with
+   gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+     Flushes all pending output into the compressed file.  The parameter flush
+   is as in the deflate() function.  The return value is the zlib error number
+   (see function gzerror below).  gzflush is only permitted when writing.
+
+     If the flush parameter is Z_FINISH, the remaining data is written and the
+   gzip stream is completed in the output.  If gzwrite() is called again, a new
+   gzip stream will be started in the output.  gzread() is able to read such
+   concatented gzip streams.
+
+     gzflush should be called only when strictly necessary because it will
+   degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+                                   z_off_t offset, int whence));
+
+     Sets the starting position for the next gzread or gzwrite on the given
+   compressed file.  The offset represents a number of bytes in the
+   uncompressed data stream.  The whence parameter is defined as in lseek(2);
+   the value SEEK_END is not supported.
+
+     If the file is opened for reading, this function is emulated but can be
+   extremely slow.  If the file is opened for writing, only forward seeks are
+   supported; gzseek then compresses a sequence of zeroes up to the new
+   starting position.
+
+     gzseek returns the resulting offset location as measured in bytes from
+   the beginning of the uncompressed stream, or -1 in case of error, in
+   particular if the file is opened for writing and the new starting position
+   would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
+/*
+     Rewinds the given file. This function is supported only for reading.
+
+     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
+
+     Returns the starting position for the next gzread or gzwrite on the given
+   compressed file.  This position represents a number of bytes in the
+   uncompressed data stream, and is zero when starting, even if appending or
+   reading a gzip stream from the middle of a file using gzdopen().
+
+     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+     Returns the current offset in the file being read or written.  This offset
+   includes the count of bytes that precede the gzip stream, for example when
+   appending or when using gzdopen() for reading.  When reading, the offset
+   does not include as yet unused buffered input.  This information can be used
+   for a progress indicator.  On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+     Returns true (1) if the end-of-file indicator has been set while reading,
+   false (0) otherwise.  Note that the end-of-file indicator is set only if the
+   read tried to go past the end of the input, but came up short.  Therefore,
+   just like feof(), gzeof() may return false even if there is no more data to
+   read, in the event that the last read request was for the exact number of
+   bytes remaining in the input file.  This will happen if the input file size
+   is an exact multiple of the buffer size.
+
+     If gzeof() returns true, then the read functions will return no more data,
+   unless the end-of-file indicator is reset by gzclearerr() and the input file
+   has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+     Returns true (1) if file is being copied directly while reading, or false
+   (0) if file is a gzip stream being decompressed.  This state can change from
+   false to true while reading the input file if the end of a gzip stream is
+   reached, but is followed by data that is not another gzip stream.
+
+     If the input file is empty, gzdirect() will return true, since the input
+   does not contain a gzip stream.
+
+     If gzdirect() is used immediately after gzopen() or gzdopen() it will
+   cause buffers to be allocated to allow reading the file to determine if it
+   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
+   gzdirect().
+*/
+
+ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
+/*
+     Flushes all pending output if necessary, closes the compressed file and
+   deallocates the (de)compression state.  Note that once file is closed, you
+   cannot call gzerror with file, since its structures have been deallocated.
+   gzclose must not be called more than once on the same file, just as free
+   must not be called more than once on the same allocation.
+
+     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+   file operation error, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+     Same as gzclose(), but gzclose_r() is only for use when reading, and
+   gzclose_w() is only for use when writing or appending.  The advantage to
+   using these instead of gzclose() is that they avoid linking in zlib
+   compression or decompression code that is not used when only reading or only
+   writing respectively.  If gzclose() is used, then both compression and
+   decompression code will be included the application when linking to a static
+   zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+     Returns the error message for the last error which occurred on the given
+   compressed file.  errnum is set to zlib error number.  If an error occurred
+   in the file system and not in the compression library, errnum is set to
+   Z_ERRNO and the application may consult errno to get the exact error code.
+
+     The application must not modify the returned string.  Future calls to
+   this function may invalidate the previously returned string.  If file is
+   closed, then the string previously returned by gzerror will no longer be
+   available.
+
+     gzerror() should be used to distinguish errors from end-of-file for those
+   functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+     Clears the error and end-of-file flags for file.  This is analogous to the
+   clearerr() function in stdio.  This is useful for continuing to read a gzip
+   file that is being written concurrently.
+*/
+
+
+                        /* checksum functions */
+
+/*
+     These functions are not related to compression but are exported
+   anyway because they might be useful in applications using the compression
+   library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+   return the updated checksum.  If buf is Z_NULL, this function returns the
+   required initial value for the checksum.
+
+     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+   much faster.
+
+   Usage example:
+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+                                          z_off_t len2));
+
+     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
+   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
+   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
+/*
+     Update a running CRC-32 with the bytes buf[0..len-1] and return the
+   updated CRC-32.  If buf is Z_NULL, this function returns the required
+   initial value for the for the crc.  Pre- and post-conditioning (one's
+   complement) is performed within this function so it shouldn't be done by the
+   application.
+
+   Usage example:
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+     Combine two CRC-32 check values into one.  For two sequences of bytes,
+   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
+   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+   len2.
+*/
+
+
+                        /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
+                                      int windowBits, int memLevel,
+                                      int strategy, const char *version,
+                                      int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
+                                      const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+                                         unsigned char FAR *window,
+                                         const char *version,
+                                         int stream_size));
+#define deflateInit(strm, level) \
+        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+        inflateBackInit_((strm), (windowBits), (window), \
+                                            ZLIB_VERSION, sizeof(z_stream))
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+#  define gzopen gzopen64
+#  define gzseek gzseek64
+#  define gztell gztell64
+#  define gzoffset gzoffset64
+#  define adler32_combine adler32_combine64
+#  define crc32_combine crc32_combine64
+#  ifdef _LARGEFILE64_SOURCE
+     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#  endif
+#else
+   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+    struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char   * ZEXPORT zError           OF((int));
+ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
+ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/misc/builddeps/dp.win64/lib/libz.a b/misc/builddeps/dp.win64/lib/libz.a
new file mode 100644 (file)
index 0000000..ff95c74
Binary files /dev/null and b/misc/builddeps/dp.win64/lib/libz.a differ
diff --git a/misc/builddeps/dp.win64/lib/libz.dll.a b/misc/builddeps/dp.win64/lib/libz.dll.a
new file mode 120000 (symlink)
index 0000000..d68f850
--- /dev/null
@@ -0,0 +1 @@
+libzdll.a
\ No newline at end of file
diff --git a/misc/builddeps/dp.win64/lib/libzdll.a b/misc/builddeps/dp.win64/lib/libzdll.a
new file mode 100644 (file)
index 0000000..c10a88f
Binary files /dev/null and b/misc/builddeps/dp.win64/lib/libzdll.a differ
index 5aa3108d68cb18724286fe7d11eee0aec2cb0da4..7f44955b7d69079f4acabbbd4076607961f1f872 100755 (executable)
Binary files a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_blind_id.0.dylib and b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_blind_id.0.dylib differ
index 0eb35278dbfde25e63f300b5ac6e7df345e48b42..3dfdd101ea96c76e55d773a41b197273b35e5233 100755 (executable)
Binary files a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_rijndael.0.dylib and b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_rijndael.0.dylib differ
index 49879252599005240b638c7a4953fbe1a0d2b661..9a8b51e1a7b9b6e870e26bd4c9e6fa02622a5377 100755 (executable)
Binary files a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libmodplug.1.dylib and b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libmodplug.1.dylib differ
diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng12.0.dylib b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng12.0.dylib
new file mode 100755 (executable)
index 0000000..af640a0
Binary files /dev/null and b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng12.0.dylib differ
diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng14.14.dylib b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng14.14.dylib
deleted file mode 100755 (executable)
index db3c57f..0000000
Binary files a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libpng14.14.dylib and /dev/null differ
index 336ec695be7e3598d6041c0e84c26dba1db65811..315b8f1cde42557ad30069ac2aa7e8dc1d28216d 100644 (file)
Binary files a/misc/buildfiles/win32/libd0_blind_id-0.dll and b/misc/buildfiles/win32/libd0_blind_id-0.dll differ
index 808b0cfe74a22f55c5d1c0d35574a8f6b0501de7..ccbf90e5ba3a1c34927899912b9e0c99d9d2a89e 100644 (file)
Binary files a/misc/buildfiles/win32/libd0_rijndael-0.dll and b/misc/buildfiles/win32/libd0_rijndael-0.dll differ
index c1c8482ce3660651caecea719609fe06891e5ce7..fd8511a0082d2f78d525a31eaa67de75d6a4f349 100755 (executable)
Binary files a/misc/buildfiles/win32/libmodplug-1.dll and b/misc/buildfiles/win32/libmodplug-1.dll differ
old mode 100644 (file)
new mode 100755 (executable)
index db30450..6e55f4c
Binary files a/misc/buildfiles/win32/libpng12.dll and b/misc/buildfiles/win32/libpng12.dll differ
index 1f2d5ca4759aa0b824b64b28b036b39ebcc270c4..4367bff4334f9150a983dbe106399fae1bab7dbe 100755 (executable)
Binary files a/misc/buildfiles/win64/libd0_blind_id-0.dll and b/misc/buildfiles/win64/libd0_blind_id-0.dll differ
index 372e919020155cc30ff1928cf20926f86e0d3266..c7f9ba880eddd115ceb1573df8deab001f940dcc 100755 (executable)
Binary files a/misc/buildfiles/win64/libd0_rijndael-0.dll and b/misc/buildfiles/win64/libd0_rijndael-0.dll differ
diff --git a/misc/buildfiles/win64/libgcc_s_sjlj-1.dll b/misc/buildfiles/win64/libgcc_s_sjlj-1.dll
new file mode 100755 (executable)
index 0000000..c188bb1
Binary files /dev/null and b/misc/buildfiles/win64/libgcc_s_sjlj-1.dll differ
old mode 100644 (file)
new mode 100755 (executable)
index e19b19d..fbd7f70
Binary files a/misc/buildfiles/win64/libmodplug-1.dll and b/misc/buildfiles/win64/libmodplug-1.dll differ
diff --git a/misc/buildfiles/win64/libpng12.dll b/misc/buildfiles/win64/libpng12.dll
new file mode 100755 (executable)
index 0000000..99a0a93
Binary files /dev/null and b/misc/buildfiles/win64/libpng12.dll differ
diff --git a/misc/buildfiles/win64/libpng14.dll b/misc/buildfiles/win64/libpng14.dll
deleted file mode 100644 (file)
index a0787e2..0000000
Binary files a/misc/buildfiles/win64/libpng14.dll and /dev/null differ
diff --git a/misc/buildfiles/win64/libstdc++-6.dll b/misc/buildfiles/win64/libstdc++-6.dll
new file mode 100755 (executable)
index 0000000..7987513
Binary files /dev/null and b/misc/buildfiles/win64/libstdc++-6.dll differ
index 852b24bc485aad736b17fabedc21cfb53f6ce8b3..af632f45820c4647ddbd9f81b3bb5cdfa13e5223 100755 (executable)
Binary files a/misc/infrastructure/keygen/crypto-keygen-standalone and b/misc/infrastructure/keygen/crypto-keygen-standalone differ
index 4218be62325c11a21c888b41504d95e0b1b33f39..9dbd80cacbddd773288617a2e14b6a854da15779 100644 (file)
@@ -17,6 +17,7 @@ sub load($)
        my ($self) = @_;
        $self->{stats} = {};
        $self->{mapstats} = {};
+       $self->{typestats} = {};
        $self->{addrstats} = {};
        $self->{allstats} = {};
        open my $fh, "<", $self->{fn}
@@ -53,7 +54,12 @@ sub load($)
                        if $targweapon ne int $targweapon;
                $attackerweapon = int $self->weaponid_from_name($attackerweapon)
                        if $attackerweapon ne int $attackerweapon;
-               $self->{stats}->{$addr}{$map}{$attackerweapon}{$targweapon} += $value;
+               $map =~ /(.*?)_(.*)/
+                       or do { warn "invalid map name: $map"; next; };
+               (my $type, $map) = ($1, $2);
+               $self->{stats}->{$addr}{$type}{$map}{$attackerweapon}{$targweapon} += $value;
+               $self->{typestats}->{$type}{$attackerweapon}{$targweapon} += $value;
+               $self->{typemapstats}->{$type}{$map}{$attackerweapon}{$targweapon} += $value;
                $self->{mapstats}->{$map}{$attackerweapon}{$targweapon} += $value;
                $self->{addrstats}->{$addr}{$attackerweapon}{$targweapon} += $value;
                $self->{allstats}->{$attackerweapon}{$targweapon} += $value;
@@ -82,14 +88,19 @@ sub save($)
 
 sub event($$$$$$)
 {
-       my ($self, $addr, $map, $attackerweapon, $targweapon, $type) = @_;
+       my ($self, $addr, $map, $attackerweapon, $targweapon, $value) = @_;
        return if $map eq '';
-       if($type > 0)
+       if($value > 0)
        {
-               $self->{stats}->{$addr}{$map}{$attackerweapon}{$targweapon} += $type;
-               $self->{mapstats}->{$map}{$attackerweapon}{$targweapon} += $type;
-               $self->{addrstats}->{$addr}{$attackerweapon}{$targweapon} += $type;
-               $self->{allstats}->{$attackerweapon}{$targweapon} += $type;
+               $map =~ /(.*?)_(.*)/
+                       or do { warn "invalid map name: $map"; return; };
+               (my $type, $map) = ($1, $2);
+               $self->{stats}->{$addr}{$type}{$map}{$attackerweapon}{$targweapon} += $value;
+               $self->{typemapstats}->{$type}{$map}{$attackerweapon}{$targweapon} += $value;
+               $self->{typestats}->{$type}{$attackerweapon}{$targweapon} += $value;
+               $self->{mapstats}->{$map}{$attackerweapon}{$targweapon} += $value;
+               $self->{addrstats}->{$addr}{$attackerweapon}{$targweapon} += $value;
+               $self->{allstats}->{$attackerweapon}{$targweapon} += $value;
        }
 }
 
@@ -97,23 +108,39 @@ sub allstats($$)
 {
        my ($self, $callback) = @_;
        # send global stats
-       $callback->(undef, undef, $self->{allstats});
+       $callback->(undef, undef, undef, $self->{allstats});
        # send per-host stats
        while(my ($k, $v) = each %{$self->{addrstats}})
        {
-               $callback->($k, undef, $v);
+               $callback->($k, undef, undef, $v);
+       }
+       # send per-type stats
+       while(my ($k, $v) = each %{$self->{typestats}})
+       {
+               $callback->(undef, $k, undef, $v);
+       }
+       # send per-type-map stats
+       while(my ($k1, $v1) = each %{$self->{typemapstats}})
+       {
+               while(my ($k2, $v2) = each %$v1)
+               {
+                       $callback->(undef, $k1, $k2, $v2);
+               }
        }
        # send per-map stats
        while(my ($k, $v) = each %{$self->{mapstats}})
        {
-               $callback->(undef, $k, $v);
+               $callback->(undef, undef, $k, $v);
        }
        # send single stats
        while(my ($k1, $v1) = each %{$self->{stats}})
        {
                while(my ($k2, $v2) = each %$v1)
                {
-                       $callback->($k1, $k2, $v2);
+                       while(my ($k3, $v3) = each %$v2)
+                       {
+                               $callback->($k1, $k2, $k3, $v3);
+                       }
                }
        }
 }
index dcab0a22cd0bf6eca57fcfd153a7e15192844cca..95d7eb1f772c33092bb3d10fe9829c15a6364a87 100755 (executable)
@@ -128,7 +128,7 @@ sub Evaluate($)
        my %allweps;
        while(my ($k, $v) = each %$matrix)
        {
-               for(my ($k2, $v2) = each %$v)
+               while(my ($k2, $v2) = each %$v)
                {
                        next if $k eq $k2;
                        next if !$v2;
@@ -191,10 +191,11 @@ sub out_text($@)
        }
        elsif($event eq 'startmatrix')
        {
-               my ($addr, $map, @columns) = @data;
+               my ($addr, $type, $map, @columns) = @data;
                $addr ||= 'any';
                $map ||= 'any';
-               print "For server @{[$addr || 'any']} map @{[$map || 'any']}:\n";
+               $type ||= 'any';
+               print "For server $addr type $type map $map:\n";
        }
        elsif($event eq 'startrow')
        {
@@ -242,10 +243,11 @@ sub out_html($@)
        }
        elsif($event eq 'startmatrix')
        {
-               my ($addr, $map, @columns) = @data;
+               my ($addr, $type, $map, @columns) = @data;
                $addr ||= 'any';
+               $type ||= 'any';
                $map ||= 'any';
-               print "<h2>For server @{[$addr || 'any']} map @{[$map || 'any']}:</h2>\n";
+               print "<h2>For server $addr type $type map $map</h2>\n";
                print "<table><tr><th>Weapon</th><th>Rating</th>\n";
                printf '<th><img width=70 height=80 src="http://svn.icculus.org/*checkout*/nexuiz/trunk/Docs/htmlfiles/weaponimg/thirdperson-%s.png" alt="%s"></th>', $stats->weaponid_to_model($_), $stats->weaponid_to_name($_) for @columns;
                print "</tr>\n";
@@ -292,18 +294,51 @@ sub out_html($@)
        }
 }
 
-my $out = $ENV{html} ? \&out_html : \&out_text;
+my $out_html_cache_fh;
+sub out_html_cache($@)
+{
+       my ($event, @data) = @_;
+       if($event eq 'startmatrix')
+       {
+               # open out file
+               my ($addr, $type, $map, @columns) = @data;
+               if(!defined $addr)
+               {
+                       $type ||= ':any';
+                       $map ||= ':any';
+                       mkdir "$type";
+                       open $out_html_cache_fh, ">", "$type/$map"
+                               or warn "open $type/$map: $!";
+                       select $out_html_cache_fh;
+               }
+       }
+       out_html($event, @data)
+               if defined $out_html_cache_fh;
+       if($event eq 'endmatrix')
+       {
+               # close out file
+               select STDOUT;
+               close $out_html_cache_fh
+                       if defined $out_html_cache_fh;
+               undef $out_html_cache_fh;
+       }
+}
+
+my $out =
+       $ENV{html_cache} ? \&out_html_cache :
+       $ENV{html}       ? \&out_html       :
+       \&out_text;
 
 LoadData();
 $out->(start => ());
 $stats->allstats(sub
 {
-       my ($addr, $map, $data) = @_;
+       my ($addr, $type, $map, $data) = @_;
        my $values = Evaluate $data;
        my $valid = defined [values %$values]->[0];
        my @weapons_sorted = sort { $valid ? $values->{$b} <=> $values->{$a} : $a <=> $b } keys %$values;
        my $min = undef;
-       $out->(startmatrix => ($addr, $map, @weapons_sorted));
+       $out->(startmatrix => ($addr, $type, $map, @weapons_sorted));
        for my $row(@weapons_sorted)
        {
                $out->(startrow => $row, ($valid ? $values->{$row} : undef));
diff --git a/server/.gitattributes b/server/.gitattributes
new file mode 100644 (file)
index 0000000..f96575f
--- /dev/null
@@ -0,0 +1 @@
+*.txt -crlf
index 4625aaa1547b68724fbf0892ef2430ec7f2cdb31..245bd9ec2330b525b668b2f029585dbcdc65ad36 100644 (file)
@@ -1,96 +1,96 @@
-rcon2irc - IRC gateway for Xonotic servers, using rcon authorization
-
-
-Quick installation guide:
-
-1. Set up rcon access on your Xonotic server, by adding some line like
-     rcon_password hackme
-   in your server.cfg. This password gives anyone FULL access to your server,
-   so do not give it away! This IRC gateway does not work with a
-   rcon_restricted_password.
-
-2. Copy rcon2irc-example.conf to another name (e.g. rcon2irc.conf), and edit
-   the settings to match your setup. At the very least:
-   - change dp_server to the IP (or IP:port) of your Xonotic server
-   - change dp_password to the rcon password set above
-   - change irc_server to the IRC server to connect to
-   - change irc_nick to the nick name to use
-   - change irc_channel to the channel to join
-   
-3. Run it:
-     perl rcon2irc.pl rcon2irc.conf
-   You may possibly want to run it in nohup so you can disconnect from your ssh
-   connection, like this:
-     nohup perl rcon2irc.pl rcon2irc.conf &
-   Logging will then go to a file nohup.out in the same directory. Another way
-   to run it permanently and to see its output is to run it inside a screen(1).
-
-
-Features:
-
-- Show results of matches in the IRC channel
-
-- Act as a gateway to allow chat between Xonotic server and IRC users, useful
-  for making the server more interesting to the public, but also useful as a
-  mere helper for the server admin to watch what's happening in game (like, if
-  people complain about a problem):
-  - Any line written in game using say (not say_team) goes to the IRC channel.
-  - Any line written in the channel, prefixed by the bot's nick name and a :,
-    goes into the Xonotic game.
-  - Example:
-    View in game:
-      XSAX LTU: GREAT WIN AHAHAHAHAHAHAHAHAH))
-      (RedAlert) stop teamkilling!
-      .ThreeHeadedMonkey.: I am behind you!
-    View on IRC, assuming the IRC gateway has the nick noobXon and is voiced:
-      <+noobXon> <XSAX LTU> GREAT WIN AHAHAHAHAHAHAHAHAH))
-      <+noobXon> <.ThreeHeadedMonkey.> I am behind you!
-
-- Notify about free slots on the server. Example:
-    * noobXon is full!
-    * noobXon can be joined again (2 free slots); join now: xonotic +connect 172.23.42.54!
-    <+noobXon> ctf_capturecity_v2r1 has begun (2 free slots); join now: xonotic +connect 172.23.42.54
-
-- Display scores at the end of a match in the IRC channel. Example:
-    <+noobXon> ctf_capturecity_v2r1 ended: 301:78 Nicole 115, elsteer BLD {Y} 77,
-               CensoredNickname 57, 0grueN# 29, Bigus 23, ZeroA 36, ricer 22,
-               Treey@suse8 12, cZaR6RUSS7 8, BrightDev1l 0
-
-- Authenticate to the IRC services by Nickserv or Quakenet protocol, so the
-  server bot can be set up to always get voice when entering the channel, and
-  in case of Nickserv, make sure nobody else prevents it from using its
-  configured nick. Other authentication protocols can often be set up using
-  configuration, and if not, as plugin.
-
-- Support for /whois queries: the server hostname is put into the real name
-  field for /whois, so people can see how to find the server in the server
-  list.
-
-- Plugin interface for plugins written in Perl. See included rbiserver.pl for
-  an example.
-
-
-License:
-
-Copyright (c) 2008 Rudolf "divVerent" Polzer
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+rcon2irc - IRC gateway for Xonotic servers, using rcon authorization\r
+\r
+\r
+Quick installation guide:\r
+\r
+1. Set up rcon access on your Xonotic server, by adding some line like\r
+     rcon_password hackme\r
+   in your server.cfg. This password gives anyone FULL access to your server,\r
+   so do not give it away! This IRC gateway does not work with a\r
+   rcon_restricted_password.\r
+\r
+2. Copy rcon2irc-example.conf to another name (e.g. rcon2irc.conf), and edit\r
+   the settings to match your setup. At the very least:\r
+   - change dp_server to the IP (or IP:port) of your Xonotic server\r
+   - change dp_password to the rcon password set above\r
+   - change irc_server to the IRC server to connect to\r
+   - change irc_nick to the nick name to use\r
+   - change irc_channel to the channel to join\r
+   \r
+3. Run it:\r
+     perl rcon2irc.pl rcon2irc.conf\r
+   You may possibly want to run it in nohup so you can disconnect from your ssh\r
+   connection, like this:\r
+     nohup perl rcon2irc.pl rcon2irc.conf &\r
+   Logging will then go to a file nohup.out in the same directory. Another way\r
+   to run it permanently and to see its output is to run it inside a screen(1).\r
+\r
+\r
+Features:\r
+\r
+- Show results of matches in the IRC channel\r
+\r
+- Act as a gateway to allow chat between Xonotic server and IRC users, useful\r
+  for making the server more interesting to the public, but also useful as a\r
+  mere helper for the server admin to watch what's happening in game (like, if\r
+  people complain about a problem):\r
+  - Any line written in game using say (not say_team) goes to the IRC channel.\r
+  - Any line written in the channel, prefixed by the bot's nick name and a :,\r
+    goes into the Xonotic game.\r
+  - Example:\r
+    View in game:\r
+      XSAX LTU: GREAT WIN AHAHAHAHAHAHAHAHAH))\r
+      (RedAlert) stop teamkilling!\r
+      .ThreeHeadedMonkey.: I am behind you!\r
+    View on IRC, assuming the IRC gateway has the nick noobXon and is voiced:\r
+      <+noobXon> <XSAX LTU> GREAT WIN AHAHAHAHAHAHAHAHAH))\r
+      <+noobXon> <.ThreeHeadedMonkey.> I am behind you!\r
+\r
+- Notify about free slots on the server. Example:\r
+    * noobXon is full!\r
+    * noobXon can be joined again (2 free slots); join now: xonotic +connect 172.23.42.54!\r
+    <+noobXon> ctf_capturecity_v2r1 has begun (2 free slots); join now: xonotic +connect 172.23.42.54\r
+\r
+- Display scores at the end of a match in the IRC channel. Example:\r
+    <+noobXon> ctf_capturecity_v2r1 ended: 301:78 Nicole 115, elsteer BLD {Y} 77,\r
+               CensoredNickname 57, 0grueN# 29, Bigus 23, ZeroA 36, ricer 22,\r
+               Treey@suse8 12, cZaR6RUSS7 8, BrightDev1l 0\r
+\r
+- Authenticate to the IRC services by Nickserv or Quakenet protocol, so the\r
+  server bot can be set up to always get voice when entering the channel, and\r
+  in case of Nickserv, make sure nobody else prevents it from using its\r
+  configured nick. Other authentication protocols can often be set up using\r
+  configuration, and if not, as plugin.\r
+\r
+- Support for /whois queries: the server hostname is put into the real name\r
+  field for /whois, so people can see how to find the server in the server\r
+  list.\r
+\r
+- Plugin interface for plugins written in Perl. See included rbiserver.pl for\r
+  an example.\r
+\r
+\r
+License:\r
+\r
+Copyright (c) 2008 Rudolf "divVerent" Polzer\r
+\r
+Permission is hereby granted, free of charge, to any person\r
+obtaining a copy of this software and associated documentation\r
+files (the "Software"), to deal in the Software without\r
+restriction, including without limitation the rights to use,\r
+copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the\r
+Software is furnished to do so, subject to the following\r
+conditions:\r
+\r
+The above copyright notice and this permission notice shall be\r
+included in all copies or substantial portions of the Software.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+OTHER DEALINGS IN THE SOFTWARE.\r
index 50b44c17de80e32fe2f57c02ab662b14bc00552b..7fdc1a9e0fbbee06e089dbbc00c9d60eee19d480 100644 (file)
@@ -1,52 +1,52 @@
-This subdirectory contains scripts and a config file that can be used
-to start a dedicated Xonotic server on linux, mac or windows systems
-and also some tools that help with maintaining your server.
-
-You will need to copy the right script for your system into your
-Xonotic main directory, where the normal binaries are.  You then need
-to copy and ADJUST the config file which is called server.cfg.  You
-can copy it either into the Xonotic/data directory where the big
-data*.pk3 file is or when running on linux or mac you can as well copy
-it into a special directory named '~/.xonotic/data'.  After you have
-setup everything and have adjusted the config file you can start the
-server by running the server script.
-
-Please make sure your server is always uptodate!  Just signup the
-Xonotic release mailinglist to get informed about new releases.
-https://lists.sourceforge.net/lists/listinfo/xonotic-releases
-
-An important thing is to make sure that your firewall does allow
-players to connect to your server.  This typicly means you will have
-to open or forward the port (see the line that sets the variable port
-in your config.cfg for the right port number, default is 26000) to the
-computer running your server.  How to do this does depend on your
-computer and network setup.
-
-If you plan to install custom maps on your server you should read the
-file Xonotic/Docs/mapdownload.txt to learn how to setup automatic map
-download.
-
-In case you want to rename the server.cfg file, e.g. because you want
-to run several servers on one machine, you have to edit the script and
-change the name there too.
-
-A very useful tool for running and controlling a server is the
-application 'gnu screen'.  It should be available for all usual
-operating systems.  You can find some hints about its usage here:
-http://jmcpherson.org/screen.html
-
-The options in the config file are only the most interesting and
-important ones.  You can get a list of all available commands and
-variables with 'cmdlist' and 'cvarlist' in the server console.
-
-rcon.pl is a perl script that implements rcon which can be used to
-remotely control your server.
-
-rcon2irc is a Xonotic server to irc gateway.  It allows you to watch
-and communicate with active players on your server via irc.  Read its
-rcon2irc.txt to learn how to setup and use it!
-
-help.cfg is a Xonotic config file providing a simple help message
-system.  It prints all the messages from a list, one after the other
-with an configureable delay between them.  Great to provide beginners
-with some hints.
+This subdirectory contains scripts and a config file that can be used\r
+to start a dedicated Xonotic server on linux, mac or windows systems\r
+and also some tools that help with maintaining your server.\r
+\r
+You will need to copy the right script for your system into your\r
+Xonotic main directory, where the normal binaries are.  You then need\r
+to copy and ADJUST the config file which is called server.cfg.  You\r
+can copy it either into the Xonotic/data directory where the big\r
+data*.pk3 file is or when running on linux or mac you can as well copy\r
+it into a special directory named '~/.xonotic/data'.  After you have\r
+setup everything and have adjusted the config file you can start the\r
+server by running the server script.\r
+\r
+Please make sure your server is always uptodate!  Just signup the\r
+Xonotic release mailinglist to get informed about new releases.\r
+https://lists.sourceforge.net/lists/listinfo/xonotic-releases\r
+\r
+An important thing is to make sure that your firewall does allow\r
+players to connect to your server.  This typicly means you will have\r
+to open or forward the port (see the line that sets the variable port\r
+in your config.cfg for the right port number, default is 26000) to the\r
+computer running your server.  How to do this does depend on your\r
+computer and network setup.\r
+\r
+If you plan to install custom maps on your server you should read the\r
+file Xonotic/Docs/mapdownload.txt to learn how to setup automatic map\r
+download.\r
+\r
+In case you want to rename the server.cfg file, e.g. because you want\r
+to run several servers on one machine, you have to edit the script and\r
+change the name there too.\r
+\r
+A very useful tool for running and controlling a server is the\r
+application 'gnu screen'.  It should be available for all usual\r
+operating systems.  You can find some hints about its usage here:\r
+http://jmcpherson.org/screen.html\r
+\r
+The options in the config file are only the most interesting and\r
+important ones.  You can get a list of all available commands and\r
+variables with 'cmdlist' and 'cvarlist' in the server console.\r
+\r
+rcon.pl is a perl script that implements rcon which can be used to\r
+remotely control your server.\r
+\r
+rcon2irc is a Xonotic server to irc gateway.  It allows you to watch\r
+and communicate with active players on your server via irc.  Read its\r
+rcon2irc.txt to learn how to setup and use it!\r
+\r
+help.cfg is a Xonotic config file providing a simple help message\r
+system.  It prints all the messages from a list, one after the other\r
+with an configureable delay between them.  Great to provide beginners\r
+with some hints.\r
index f27800d4debeda5e39df02da2ffc5fe6564e14ec..2f7a55869535e1f754519e7c91df0d12e2ffa428 100644 (file)
@@ -57,7 +57,7 @@
 //rcon_restricted_password ""  // put here the password for a "restricted" rcon user (see below)
 
 //bot_number 0 // number of bots to add
-//skill 1      // the bots skill level
+//skill 4      // the bots skill level
 //minplayers 0 // add bots if less then that number of players playing. MAKE SURE ITS LESS THEN maxplayers or people will get blocked by bots!
 //g_maxplayers 0 // above this player count, only allow spectators
 //bot_prefix [BOT]     // prepend this to all botnames
 
 
 
+
+/////////////////////////////////////////////////////////////////////
+// Settings you MIGHT want to change for PRIVACY reasons.
+//
+// The settings here may impact your or your players' privacy and serve to
+// optimize the game for further releases.
+//
+// Change them, or comment them out to turn them off.
+
+// This line sends the following data to our servers:
+// - Date and time
+// - Your server IP address
+// - Your server ID hash, which is a fingerprint of the public key of your
+//   server and does not impact security of your private key (use "crypto_keys"
+//   on the console to show it)
+// - Your server name ("hostname")
+// - Current game type
+// - Current map
+// - Balance settings you have modified from defaults (only those that make
+//   your server "impure")
+// - For each weapon pairing (A, B), separately for player-player, player-bot,
+//   bot-player, bot-bot pairings:
+//   - Number of hits of players/bots holding A against players/bots holding B
+//   - Number of frags of players/bots holding A against players/bots holding B
+//   - Total damage of players/bots holding A against players/bots holding B
+//
+// We use this data to:
+// - Optimize the game balance for future releases
+// - Identify problems in the bot AI and improving it
+// - Find settings that make servers "impure" that should not, so we can
+//   whitelist them in future releases
+//
+// We will or might publish:
+// - Global weapon pairing statistics for players vs players, or bots vs bots,
+//   or any vs any, on a selection of servers
+// - Per-gametype and per-map weapon pairing statistics players vs players, or
+//   bots vs bots, or any vs any, on a selection of servers
+// - Lists of commonly changed cvars, together with counts on how often they
+//   are modified
+//
+// No information about the players on the server is sent, so as a server admin
+// you need no permission of your players for this.
+//
+// No information about your server will be published - all published data sets
+// will include data from multiple servers.
+//   
+sv_weaponstats_file http://www.xonotic.org/weaponbalance/
+
+
+
+
 /////////////////////////////////////////////////////////////////////
 // Some more advanced settings.  You probably are not interested in changing them at all.
 
 /////////////////////////////////////////////////////////////////////
 // "Obvious" mutators that are allowed on a "pure" server
 //g_minstagib 0        // set to 1 for MinstaGib
-g_weapon_stay 0 // set to 1, 2 or 3 for different weapon-stay modes (1 = traditional, 2 = no ammo but allow throwing, 3 = ghost weapon stay)
+//g_weapon_stay 0 // set to 1, 2 or 3 for different weapon-stay modes (1 = traditional, 2 = no ammo but allow throwing, 3 = ghost weapon stay)
+
+
 
 
 /////////////////////////////////////////////////////////////////////