Fossil SCM
Add the --with-miniz configuration option (with the complete miniz source code.) Add the globalState TH1 command and fixes to the TH1 expr command.
Commit
66ae70a54b206566a331efc2f11007306dbf5f7e
Parent
fc8d8546ffabbdc…
62 files changed
+6
-1
+6
-1
+6
-1
+1
-3
+1
-3
+1
-3
+5
-1
+5
-1
+5
-1
+4
-1
+4
-1
+4
-1
+49
-4
+49
-4
+49
-4
+1
-1
+1
-1
+1
-1
+1
-41
+1
-41
+1
-41
+2251
+2251
+2251
+5
-2
+5
-2
+5
-2
+6
-1
+6
-1
+6
-1
+1
-445
+1
-445
+1
-445
+1
-1
+1
-1
+1
-1
+115
-5
+101
-121
+61
-1
+115
-5
+139
-142
+139
-142
+139
-142
+178
-112
+178
-112
+178
-112
+1
-1
+1
-1
+1
-1
-47
-47
-47
+1
-1
+1
-4
+1
-3
-3
~
Makefile.classic
~
Makefile.classic
~
Makefile.classic
~
Makefile.in
~
Makefile.in
~
Makefile.in
~
auto.def
~
auto.def
~
auto.def
~
src/blob.c
~
src/blob.c
~
src/blob.c
~
src/gzip.c
~
src/gzip.c
~
src/gzip.c
~
src/main.c
~
src/main.c
~
src/main.c
~
src/main.mk
~
src/main.mk
~
src/main.mk
~
src/makemake.tcl
~
src/makemake.tcl
~
src/makemake.tcl
~
src/miniz.c
~
src/miniz.c
~
src/miniz.c
~
src/sqlcmd.c
~
src/sqlcmd.c
~
src/sqlcmd.c
~
src/tar.c
~
src/tar.c
~
src/tar.c
~
src/th.c
~
src/th.c
~
src/th.c
~
src/th_main.c
~
src/th_main.c
~
src/th_main.c
~
src/zip.c
~
src/zip.c
~
src/zip.c
~
test/th1.test
~
test/th1.test
~
test/th1.test
~
test/th1.test
~
win/Makefile.mingw
~
win/Makefile.mingw
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.mingw.mistachkin
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
win/Makefile.msc
~
win/Makefile.msc
~
win/fossil.rc
~
win/fossil.rc
~
win/fossil.rc
~
www/changes.wiki
~
www/changes.wiki
~
www/changes.wiki
~
www/changes.wiki
+6
-1
| --- a/Makefile.classic | ||
| +++ b/Makefile.classic | ||
| @@ -19,4 +19,9 @@ | ||
| 19 | 19 | OBJDIR = ./bld |
| 20 | 20 | |
| 21 | 21 | #### C Compiler and options for use in building executables that |
| 22 | -# will run on t | |
| 22 | +# will run on the platform that is doing the build. This is used | |
| 23 | +# to compile code-generator programs as part of the build process. | |
| 24 | +# See TCC below use the included miniz library | |
| 25 | +#MINIZ unless the miniz | |
| 26 | +# library in the source tree is being used. There are no other | |
| 27 | +# $(FOSSI |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on t |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on the platform that is doing the build. This is used |
| 23 | # to compile code-generator programs as part of the build process. |
| 24 | # See TCC below use the included miniz library |
| 25 | #MINIZ unless the miniz |
| 26 | # library in the source tree is being used. There are no other |
| 27 | # $(FOSSI |
+6
-1
| --- a/Makefile.classic | ||
| +++ b/Makefile.classic | ||
| @@ -19,4 +19,9 @@ | ||
| 19 | 19 | OBJDIR = ./bld |
| 20 | 20 | |
| 21 | 21 | #### C Compiler and options for use in building executables that |
| 22 | -# will run on t | |
| 22 | +# will run on the platform that is doing the build. This is used | |
| 23 | +# to compile code-generator programs as part of the build process. | |
| 24 | +# See TCC below use the included miniz library | |
| 25 | +#MINIZ unless the miniz | |
| 26 | +# library in the source tree is being used. There are no other | |
| 27 | +# $(FOSSI |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on t |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on the platform that is doing the build. This is used |
| 23 | # to compile code-generator programs as part of the build process. |
| 24 | # See TCC below use the included miniz library |
| 25 | #MINIZ unless the miniz |
| 26 | # library in the source tree is being used. There are no other |
| 27 | # $(FOSSI |
+6
-1
| --- a/Makefile.classic | ||
| +++ b/Makefile.classic | ||
| @@ -19,4 +19,9 @@ | ||
| 19 | 19 | OBJDIR = ./bld |
| 20 | 20 | |
| 21 | 21 | #### C Compiler and options for use in building executables that |
| 22 | -# will run on t | |
| 22 | +# will run on the platform that is doing the build. This is used | |
| 23 | +# to compile code-generator programs as part of the build process. | |
| 24 | +# See TCC below use the included miniz library | |
| 25 | +#MINIZ unless the miniz | |
| 26 | +# library in the source tree is being used. There are no other | |
| 27 | +# $(FOSSI |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on t |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -19,4 +19,9 @@ | |
| 19 | OBJDIR = ./bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on the platform that is doing the build. This is used |
| 23 | # to compile code-generator programs as part of the build process. |
| 24 | # See TCC below use the included miniz library |
| 25 | #MINIZ unless the miniz |
| 26 | # library in the source tree is being used. There are no other |
| 27 | # $(FOSSI |
No diff available
No diff available
No diff available
M
auto.def
+1
-3
| --- a/auto.def | ||
| +++ b/auto.def | ||
| @@ -1,4 +1,2 @@ | ||
| 1 | 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | -pthreadzlib:pathCFLAGS -I$zlibpath | |
| 3 | -Flineedit=1line editingif {[opine editingi} | |
| 4 | -if {! | |
| 2 | +pthread |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthreadzlib:pathCFLAGS -I$zlibpath |
| 3 | Flineedit=1line editingif {[opine editingi} |
| 4 | if {! |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthread |
M
auto.def
+1
-3
| --- a/auto.def | ||
| +++ b/auto.def | ||
| @@ -1,4 +1,2 @@ | ||
| 1 | 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | -pthreadzlib:pathCFLAGS -I$zlibpath | |
| 3 | -Flineedit=1line editingif {[opine editingi} | |
| 4 | -if {! | |
| 2 | +pthread |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthreadzlib:pathCFLAGS -I$zlibpath |
| 3 | Flineedit=1line editingif {[opine editingi} |
| 4 | if {! |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthread |
M
auto.def
+1
-3
| --- a/auto.def | ||
| +++ b/auto.def | ||
| @@ -1,4 +1,2 @@ | ||
| 1 | 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | -pthreadzlib:pathCFLAGS -I$zlibpath | |
| 3 | -Flineedit=1line editingif {[opine editingi} | |
| 4 | -if {! | |
| 2 | +pthread |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthreadzlib:pathCFLAGS -I$zlibpath |
| 3 | Flineedit=1line editingif {[opine editingi} |
| 4 | if {! |
| --- a/auto.def | |
| +++ b/auto.def | |
| @@ -1,4 +1,2 @@ | |
| 1 | DFlineedit=1line editingif {[optstrglob7.1-D_XOPEN_SOURCE=500hooks=0if {[pthread_create pthread]} { |
| 2 | pthread |
+5
-1
| --- a/src/blob.c | ||
| +++ b/src/blob.c | ||
| @@ -18,7 +18,11 @@ | ||
| 18 | 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | 19 | } |
| 20 | 20 | nWrote |
| 21 | - if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote | |
| 21 | + if(nWrote, 0) >= 0 ){ | |
| 22 | + 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote | |
| 23 | + i0c=='\\nWrote | |
| 24 | + i#elsee, 0) >= 0 ){ | |
| 25 | + 0fwrinWrote | |
| 22 | 26 | if(nWrote, 0) >= 0 ){ |
| 23 | 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | 28 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote |
| 22 | if(nWrote, 0) >= 0 ){ |
| 23 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nWrote, 0) >= 0 ){ |
| 22 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 23 | i0c=='\\nWrote |
| 24 | i#elsee, 0) >= 0 ){ |
| 25 | 0fwrinWrote |
| 26 | if(nWrote, 0) >= 0 ){ |
| 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 28 | i0c=='\\nWrote |
+5
-1
| --- a/src/blob.c | ||
| +++ b/src/blob.c | ||
| @@ -18,7 +18,11 @@ | ||
| 18 | 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | 19 | } |
| 20 | 20 | nWrote |
| 21 | - if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote | |
| 21 | + if(nWrote, 0) >= 0 ){ | |
| 22 | + 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote | |
| 23 | + i0c=='\\nWrote | |
| 24 | + i#elsee, 0) >= 0 ){ | |
| 25 | + 0fwrinWrote | |
| 22 | 26 | if(nWrote, 0) >= 0 ){ |
| 23 | 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | 28 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote |
| 22 | if(nWrote, 0) >= 0 ){ |
| 23 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nWrote, 0) >= 0 ){ |
| 22 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 23 | i0c=='\\nWrote |
| 24 | i#elsee, 0) >= 0 ){ |
| 25 | 0fwrinWrote |
| 26 | if(nWrote, 0) >= 0 ){ |
| 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 28 | i0c=='\\nWrote |
+5
-1
| --- a/src/blob.c | ||
| +++ b/src/blob.c | ||
| @@ -18,7 +18,11 @@ | ||
| 18 | 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | 19 | } |
| 20 | 20 | nWrote |
| 21 | - if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote | |
| 21 | + if(nWrote, 0) >= 0 ){ | |
| 22 | + 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote | |
| 23 | + i0c=='\\nWrote | |
| 24 | + i#elsee, 0) >= 0 ){ | |
| 25 | + 0fwrinWrote | |
| 22 | 26 | if(nWrote, 0) >= 0 ){ |
| 23 | 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | 28 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nclude "miniz.h" i#elsee, 0) >= 0<zlib.h>0fwrinWrote |
| 22 | if(nWrote, 0) >= 0 ){ |
| 23 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 24 | i0c=='\\nWrote |
| --- a/src/blob.c | |
| +++ b/src/blob.c | |
| @@ -18,7 +18,11 @@ | |
| 18 | ** freed using fossil_freemallocedreturn pBlob && pBlob->aData &&; |
| 19 | } |
| 20 | nWrote |
| 21 | if(nWrote, 0) >= 0 ){ |
| 22 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 23 | i0c=='\\nWrote |
| 24 | i#elsee, 0) >= 0 ){ |
| 25 | 0fwrinWrote |
| 26 | if(nWrote, 0) >= 0 ){ |
| 27 | 0fwrit1, nWroteint blob_is_==nn) if symlinks are not supported'\\nWrote |
| 28 | i0c=='\\nWrote |
+4
-1
| --- a/src/gzip.c | ||
| +++ b/src/gzip.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | */ |
| 24 | 24 | #include "config.h" |
| 25 | 25 | #include <assert.h> |
| 26 | -#include <zlib.h>tate information for the GZIP file under construction. | |
| 26 | +#if defined(FOSSIL_ENABLE_MINIZ) | |
| 27 | +# define MINIZ_HEADER_FILE_ONLY | |
| 28 | +# include "miniz.c" | |
| 29 | +#elsetate information for the GZIP file under construction. | |
| 27 | 30 | */ |
| 28 | 31 | struct gzip_state { |
| 29 | 32 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #include <zlib.h>tate information for the GZIP file under construction. |
| 27 | */ |
| 28 | struct gzip_state { |
| 29 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #if defined(FOSSIL_ENABLE_MINIZ) |
| 27 | # define MINIZ_HEADER_FILE_ONLY |
| 28 | # include "miniz.c" |
| 29 | #elsetate information for the GZIP file under construction. |
| 30 | */ |
| 31 | struct gzip_state { |
| 32 | int eState; /* 0: idle 1: header 2: compressing */ |
+4
-1
| --- a/src/gzip.c | ||
| +++ b/src/gzip.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | */ |
| 24 | 24 | #include "config.h" |
| 25 | 25 | #include <assert.h> |
| 26 | -#include <zlib.h>tate information for the GZIP file under construction. | |
| 26 | +#if defined(FOSSIL_ENABLE_MINIZ) | |
| 27 | +# define MINIZ_HEADER_FILE_ONLY | |
| 28 | +# include "miniz.c" | |
| 29 | +#elsetate information for the GZIP file under construction. | |
| 27 | 30 | */ |
| 28 | 31 | struct gzip_state { |
| 29 | 32 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #include <zlib.h>tate information for the GZIP file under construction. |
| 27 | */ |
| 28 | struct gzip_state { |
| 29 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #if defined(FOSSIL_ENABLE_MINIZ) |
| 27 | # define MINIZ_HEADER_FILE_ONLY |
| 28 | # include "miniz.c" |
| 29 | #elsetate information for the GZIP file under construction. |
| 30 | */ |
| 31 | struct gzip_state { |
| 32 | int eState; /* 0: idle 1: header 2: compressing */ |
+4
-1
| --- a/src/gzip.c | ||
| +++ b/src/gzip.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | */ |
| 24 | 24 | #include "config.h" |
| 25 | 25 | #include <assert.h> |
| 26 | -#include <zlib.h>tate information for the GZIP file under construction. | |
| 26 | +#if defined(FOSSIL_ENABLE_MINIZ) | |
| 27 | +# define MINIZ_HEADER_FILE_ONLY | |
| 28 | +# include "miniz.c" | |
| 29 | +#elsetate information for the GZIP file under construction. | |
| 27 | 30 | */ |
| 28 | 31 | struct gzip_state { |
| 29 | 32 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #include <zlib.h>tate information for the GZIP file under construction. |
| 27 | */ |
| 28 | struct gzip_state { |
| 29 | int eState; /* 0: idle 1: header 2: compressing */ |
| --- a/src/gzip.c | |
| +++ b/src/gzip.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include <assert.h> |
| 26 | #if defined(FOSSIL_ENABLE_MINIZ) |
| 27 | # define MINIZ_HEADER_FILE_ONLY |
| 28 | # include "miniz.c" |
| 29 | #elsetate information for the GZIP file under construction. |
| 30 | */ |
| 31 | struct gzip_state { |
| 32 | int eState; /* 0: idle 1: header 2: compressing */ |
+49
-4
| --- a/src/main.c | ||
| +++ b/src/main.c | ||
| @@ -16,7 +16,13 @@ | ||
| 16 | 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | 17 | ){ |
| 18 | 18 | int upr, lwr, cnt, m, i; |
| 19 | - int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); | |
| 19 | + int n = strlen(zName); | |
| 20 | + lwr = iBegin; | |
| 21 | + upr = nMap-1; | |
| 22 | + while( lwr<=upr ){ | |
| 23 | + int mid, c; | |
| 24 | + mid = (upr+lwr)/2; | |
| 25 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 20 | 26 | if( c==0 ){ |
| 21 | 27 | *pIndex = mid; |
| 22 | 28 | return 0; |
| @@ -645,9 +651,48 @@ | ||
| 645 | 651 | upr = nMap-1; |
| 646 | 652 | while( lwr<=upr ){ |
| 647 | 653 | int mid, c; |
| 648 | - nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want | |
| 649 | - *SSL/ | |
| 650 | - const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 654 | + mid = (upr+lwr)/2; | |
| 655 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 656 | + if( c==0 ){ | |
| 657 | + *pIndex = mid; | |
| 658 | + return 0; | |
| 659 | + }else if( c<0 ){ | |
| 660 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 661 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 662 | + Stmt loop; | |
| 663 | + Fossil version", "version?verbose=1"); | |
| 664 | + blob_zero(&versionInfo); | |
| 665 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 666 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 667 | + "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want | |
| 668 | + ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ | |
| 669 | +global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, | |
| 670 | +** return 1. If the command is ambiguous return 2; | |
| 671 | +** | |
| 672 | +** The NameMap structure and the tables we are searching against are | |
| 673 | +** defined in the page_index.h header file which is automatically | |
| 674 | +** generated by mkindex.c programname_search(ame, /* The name we are looking for */ | |
| 675 | + const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ | |
| 676 | +){ | |
| 677 | + int upr, lwr, cnt, m, i; | |
| 678 | + int n = strlen(zName); | |
| 679 | + lwr = iBegin; | |
| 680 | + upr = nMap-1; | |
| 681 | + while( lwr<=upr ){ | |
| 682 | + int mid, c; | |
| 683 | + mid = (upr+lwr)/2; | |
| 684 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 685 | + if( c==0 ){ | |
| 686 | + *pIndex = mid; | |
| 687 | + return 0; | |
| 688 | + }else if( c<0 ){ | |
| 689 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 690 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 691 | + Stmt loop; | |
| 692 | + Fossil version", "version?verbose=1"); | |
| 693 | + blob_zero(&versionInfo); | |
| 694 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 695 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 651 | 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); |
| 20 | if( c==0 ){ |
| 21 | *pIndex = mid; |
| 22 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 645 | upr = nMap-1; |
| 646 | while( lwr<=upr ){ |
| 647 | int mid, c; |
| 648 | nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want |
| 649 | *SSL/ |
| 650 | const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 651 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n = strlen(zName); |
| 20 | lwr = iBegin; |
| 21 | upr = nMap-1; |
| 22 | while( lwr<=upr ){ |
| 23 | int mid, c; |
| 24 | mid = (upr+lwr)/2; |
| 25 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 26 | if( c==0 ){ |
| 27 | *pIndex = mid; |
| 28 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 651 | upr = nMap-1; |
| 652 | while( lwr<=upr ){ |
| 653 | int mid, c; |
| 654 | mid = (upr+lwr)/2; |
| 655 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 656 | if( c==0 ){ |
| 657 | *pIndex = mid; |
| 658 | return 0; |
| 659 | }else if( c<0 ){ |
| 660 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 661 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 662 | Stmt loop; |
| 663 | Fossil version", "version?verbose=1"); |
| 664 | blob_zero(&versionInfo); |
| 665 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 666 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 667 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 668 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 669 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, |
| 670 | ** return 1. If the command is ambiguous return 2; |
| 671 | ** |
| 672 | ** The NameMap structure and the tables we are searching against are |
| 673 | ** defined in the page_index.h header file which is automatically |
| 674 | ** generated by mkindex.c programname_search(ame, /* The name we are looking for */ |
| 675 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 676 | ){ |
| 677 | int upr, lwr, cnt, m, i; |
| 678 | int n = strlen(zName); |
| 679 | lwr = iBegin; |
| 680 | upr = nMap-1; |
| 681 | while( lwr<=upr ){ |
| 682 | int mid, c; |
| 683 | mid = (upr+lwr)/2; |
| 684 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 685 | if( c==0 ){ |
| 686 | *pIndex = mid; |
| 687 | return 0; |
| 688 | }else if( c<0 ){ |
| 689 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 690 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 691 | Stmt loop; |
| 692 | Fossil version", "version?verbose=1"); |
| 693 | blob_zero(&versionInfo); |
| 694 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 695 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
+49
-4
| --- a/src/main.c | ||
| +++ b/src/main.c | ||
| @@ -16,7 +16,13 @@ | ||
| 16 | 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | 17 | ){ |
| 18 | 18 | int upr, lwr, cnt, m, i; |
| 19 | - int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); | |
| 19 | + int n = strlen(zName); | |
| 20 | + lwr = iBegin; | |
| 21 | + upr = nMap-1; | |
| 22 | + while( lwr<=upr ){ | |
| 23 | + int mid, c; | |
| 24 | + mid = (upr+lwr)/2; | |
| 25 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 20 | 26 | if( c==0 ){ |
| 21 | 27 | *pIndex = mid; |
| 22 | 28 | return 0; |
| @@ -645,9 +651,48 @@ | ||
| 645 | 651 | upr = nMap-1; |
| 646 | 652 | while( lwr<=upr ){ |
| 647 | 653 | int mid, c; |
| 648 | - nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want | |
| 649 | - *SSL/ | |
| 650 | - const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 654 | + mid = (upr+lwr)/2; | |
| 655 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 656 | + if( c==0 ){ | |
| 657 | + *pIndex = mid; | |
| 658 | + return 0; | |
| 659 | + }else if( c<0 ){ | |
| 660 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 661 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 662 | + Stmt loop; | |
| 663 | + Fossil version", "version?verbose=1"); | |
| 664 | + blob_zero(&versionInfo); | |
| 665 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 666 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 667 | + "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want | |
| 668 | + ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ | |
| 669 | +global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, | |
| 670 | +** return 1. If the command is ambiguous return 2; | |
| 671 | +** | |
| 672 | +** The NameMap structure and the tables we are searching against are | |
| 673 | +** defined in the page_index.h header file which is automatically | |
| 674 | +** generated by mkindex.c programname_search(ame, /* The name we are looking for */ | |
| 675 | + const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ | |
| 676 | +){ | |
| 677 | + int upr, lwr, cnt, m, i; | |
| 678 | + int n = strlen(zName); | |
| 679 | + lwr = iBegin; | |
| 680 | + upr = nMap-1; | |
| 681 | + while( lwr<=upr ){ | |
| 682 | + int mid, c; | |
| 683 | + mid = (upr+lwr)/2; | |
| 684 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 685 | + if( c==0 ){ | |
| 686 | + *pIndex = mid; | |
| 687 | + return 0; | |
| 688 | + }else if( c<0 ){ | |
| 689 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 690 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 691 | + Stmt loop; | |
| 692 | + Fossil version", "version?verbose=1"); | |
| 693 | + blob_zero(&versionInfo); | |
| 694 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 695 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 651 | 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); |
| 20 | if( c==0 ){ |
| 21 | *pIndex = mid; |
| 22 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 645 | upr = nMap-1; |
| 646 | while( lwr<=upr ){ |
| 647 | int mid, c; |
| 648 | nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want |
| 649 | *SSL/ |
| 650 | const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 651 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n = strlen(zName); |
| 20 | lwr = iBegin; |
| 21 | upr = nMap-1; |
| 22 | while( lwr<=upr ){ |
| 23 | int mid, c; |
| 24 | mid = (upr+lwr)/2; |
| 25 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 26 | if( c==0 ){ |
| 27 | *pIndex = mid; |
| 28 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 651 | upr = nMap-1; |
| 652 | while( lwr<=upr ){ |
| 653 | int mid, c; |
| 654 | mid = (upr+lwr)/2; |
| 655 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 656 | if( c==0 ){ |
| 657 | *pIndex = mid; |
| 658 | return 0; |
| 659 | }else if( c<0 ){ |
| 660 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 661 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 662 | Stmt loop; |
| 663 | Fossil version", "version?verbose=1"); |
| 664 | blob_zero(&versionInfo); |
| 665 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 666 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 667 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 668 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 669 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, |
| 670 | ** return 1. If the command is ambiguous return 2; |
| 671 | ** |
| 672 | ** The NameMap structure and the tables we are searching against are |
| 673 | ** defined in the page_index.h header file which is automatically |
| 674 | ** generated by mkindex.c programname_search(ame, /* The name we are looking for */ |
| 675 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 676 | ){ |
| 677 | int upr, lwr, cnt, m, i; |
| 678 | int n = strlen(zName); |
| 679 | lwr = iBegin; |
| 680 | upr = nMap-1; |
| 681 | while( lwr<=upr ){ |
| 682 | int mid, c; |
| 683 | mid = (upr+lwr)/2; |
| 684 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 685 | if( c==0 ){ |
| 686 | *pIndex = mid; |
| 687 | return 0; |
| 688 | }else if( c<0 ){ |
| 689 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 690 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 691 | Stmt loop; |
| 692 | Fossil version", "version?verbose=1"); |
| 693 | blob_zero(&versionInfo); |
| 694 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 695 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
+49
-4
| --- a/src/main.c | ||
| +++ b/src/main.c | ||
| @@ -16,7 +16,13 @@ | ||
| 16 | 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | 17 | ){ |
| 18 | 18 | int upr, lwr, cnt, m, i; |
| 19 | - int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); | |
| 19 | + int n = strlen(zName); | |
| 20 | + lwr = iBegin; | |
| 21 | + upr = nMap-1; | |
| 22 | + while( lwr<=upr ){ | |
| 23 | + int mid, c; | |
| 24 | + mid = (upr+lwr)/2; | |
| 25 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 20 | 26 | if( c==0 ){ |
| 21 | 27 | *pIndex = mid; |
| 22 | 28 | return 0; |
| @@ -645,9 +651,48 @@ | ||
| 645 | 651 | upr = nMap-1; |
| 646 | 652 | while( lwr<=upr ){ |
| 647 | 653 | int mid, c; |
| 648 | - nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want | |
| 649 | - *SSL/ | |
| 650 | - const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 654 | + mid = (upr+lwr)/2; | |
| 655 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 656 | + if( c==0 ){ | |
| 657 | + *pIndex = mid; | |
| 658 | + return 0; | |
| 659 | + }else if( c<0 ){ | |
| 660 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 661 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 662 | + Stmt loop; | |
| 663 | + Fossil version", "version?verbose=1"); | |
| 664 | + blob_zero(&versionInfo); | |
| 665 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 666 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 667 | + "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want | |
| 668 | + ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ | |
| 669 | +global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, | |
| 670 | +** return 1. If the command is ambiguous return 2; | |
| 671 | +** | |
| 672 | +** The NameMap structure and the tables we are searching against are | |
| 673 | +** defined in the page_index.h header file which is automatically | |
| 674 | +** generated by mkindex.c programname_search(ame, /* The name we are looking for */ | |
| 675 | + const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ | |
| 676 | +){ | |
| 677 | + int upr, lwr, cnt, m, i; | |
| 678 | + int n = strlen(zName); | |
| 679 | + lwr = iBegin; | |
| 680 | + upr = nMap-1; | |
| 681 | + while( lwr<=upr ){ | |
| 682 | + int mid, c; | |
| 683 | + mid = (upr+lwr)/2; | |
| 684 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 685 | + if( c==0 ){ | |
| 686 | + *pIndex = mid; | |
| 687 | + return 0; | |
| 688 | + }else if( c<0 ){ | |
| 689 | + upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" | |
| 690 | + " WHERE compile_optionsall available details.const char *P("verbose"i{ | |
| 691 | + Stmt loop; | |
| 692 | + Fossil version", "version?verbose=1"); | |
| 693 | + blob_zero(&versionInfo); | |
| 694 | + blob_appendf(&venyTrac"now"SqlTrace int}; | |
| 695 | + "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; | |
| 651 | 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n nclude "zlib.h"fossil_strcmp(zName, aMap[mid].zName); |
| 20 | if( c==0 ){ |
| 21 | *pIndex = mid; |
| 22 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 645 | upr = nMap-1; |
| 646 | while( lwr<=upr ){ |
| 647 | int mid, c; |
| 648 | nt upr, lwr, cnt, nyTrac"now"verbose"if( verbsers/...". We want |
| 649 | *SSL/ |
| 650 | const NameMap *anst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 651 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 652 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 653 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
| --- a/src/main.c | |
| +++ b/src/main.c | |
| @@ -16,7 +16,13 @@ | |
| 16 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 17 | ){ |
| 18 | int upr, lwr, cnt, m, i; |
| 19 | int n = strlen(zName); |
| 20 | lwr = iBegin; |
| 21 | upr = nMap-1; |
| 22 | while( lwr<=upr ){ |
| 23 | int mid, c; |
| 24 | mid = (upr+lwr)/2; |
| 25 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 26 | if( c==0 ){ |
| 27 | *pIndex = mid; |
| 28 | return 0; |
| @@ -645,9 +651,48 @@ | |
| 651 | upr = nMap-1; |
| 652 | while( lwr<=upr ){ |
| 653 | int mid, c; |
| 654 | mid = (upr+lwr)/2; |
| 655 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 656 | if( c==0 ){ |
| 657 | *pIndex = mid; |
| 658 | return 0; |
| 659 | }else if( c<0 ){ |
| 660 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 661 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 662 | Stmt loop; |
| 663 | Fossil version", "version?verbose=1"); |
| 664 | blob_zero(&versionInfo); |
| 665 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 666 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 667 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 668 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 669 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } If no match is found, |
| 670 | ** return 1. If the command is ambiguous return 2; |
| 671 | ** |
| 672 | ** The NameMap structure and the tables we are searching against are |
| 673 | ** defined in the page_index.h header file which is automatically |
| 674 | ** generated by mkindex.c programname_search(ame, /* The name we are looking for */ |
| 675 | const NameMap *aMap, /* Search i/* Number of slotswer bound on the arOUT: The index in aMap[] of the match */ |
| 676 | ){ |
| 677 | int upr, lwr, cnt, m, i; |
| 678 | int n = strlen(zName); |
| 679 | lwr = iBegin; |
| 680 | upr = nMap-1; |
| 681 | while( lwr<=upr ){ |
| 682 | int mid, c; |
| 683 | mid = (upr+lwr)/2; |
| 684 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 685 | if( c==0 ){ |
| 686 | *pIndex = mid; |
| 687 | return 0; |
| 688 | }else if( c<0 ){ |
| 689 | upr = mid - 1useAttachglobal_confiMainDbType;/* "configdb",figDbType; /* "configdb", tions" |
| 690 | " WHERE compile_optionsall available details.const char *P("verbose"i{ |
| 691 | Stmt loop; |
| 692 | Fossil version", "version?verbose=1"); |
| 693 | blob_zero(&versionInfo); |
| 694 | blob_appendf(&venyTrac"now"SqlTrace int}; |
| 695 | "---- g.fAnyTrac"now"verbose"if( verboseFlag !* to skip the fi "---- g.fAnyTra , substr(pconst char *zUrl = dint !=0- g.fAnyTrac"nfAnyTrac"now"}; |
| 696 | "---- g.fAnyTralld(szFile)file_size(%s) = %def _WIN32def _WIN32"repo:C:/Users/...". We want |
| 697 | ** to skip the first 6 characters on unix anchar *zOpenRevision; /* Check-in version to during database open3 ){ |
| 698 | global_confiMainDbn 0. If no match is foun/CMD(Only pages } if( file_isdir(g.argv[arg])==1 ){ |
+1
-1
| --- a/src/main.mk | ||
| +++ b/src/main.mk | ||
| @@ -1 +1 @@ | ||
| 1 | -rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a | |
| 1 | +rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
+1
-1
| --- a/src/main.mk | ||
| +++ b/src/main.mk | ||
| @@ -1 +1 @@ | ||
| 1 | -rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a | |
| 1 | +rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
+1
-1
| --- a/src/main.mk | ||
| +++ b/src/main.mk | ||
| @@ -1 +1 @@ | ||
| 1 | -rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a | |
| 1 | +rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:a |
| --- a/src/main.mk | |
| +++ b/src/main.mk | |
| @@ -1 +1 @@ | |
| 1 | rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2.h:bag_.c:$(OBJDIR)/bag.hblob.h:_timelincachaptchrg_.c:h :$(OBJDIR)/cgi.h:.h :.h :$(OBJDIR)/clone.h :delta_.c:h oh_timelincachap_.c:achcachcachAPPNAME$(OBJDIR)/diff.h:h::h::h glob.h:graph.h:OBJDIR)/http.h :h _.c:artifact.hconfig.hdiff_diff.hdir_dir.hfinfo_finfo.hlogin.hquery_query.h_report.h_status.h_tag.h_user.hjson_wiki.h :.h :.h:h :merge.h _.c:h:$(OBJDIR)/name.h::.h :port.h:$(OBJDIR)/rss.h :$(OBJDIR)/schema.h_.c:$(OBJDIR)/shun.h:$(OBJDIR)/skins.h:.h:$(OBJDIR)/stash.h:OBJDIR)/stystyle.hrgoh_timelincachatag_.c:$(OBJDIR)/tag.h::h_.c:.h :.h :.h_.c::_.c:h :wiki.h: winhttpnhttp.h :rgoh_timelincachaptsetup.h $(SRCDIR)/th.h addncachaptchagcach_.c:achcachcachAPPNAMEallrepallrepbagncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2rgoh_timelincacbisebrowsbrowschcachcachheckheckouheckoulearsigomonfigurbncachaptchagcach_.biffrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2ocncachaptchagcach_.coencodenevevenevtimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2hagcachcache_.cexexnffinfousefsncachaptchagcach_.c:argoh_timelincacgrgoh_timelincacgrapgzipncachaptchagcach_.c:achcachcachAPPNAME) httncachaptchagcach_.c:achcachcachAPPNslncachaptchagcach_.c:achtransiminf_.c:achcachcachAPPrgojsoimelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2_.c:achcachcachjson__.c:ajson_json_finfjson_logjson_re_.c:acstatusstatusjson__.c:userjson_userncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2eafncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2adctrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRoksliknifesncachaptchagcach_.c:achergergerge3ncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2namatpivopivopivot.c >rintfncachaptchagcach_.c:argoh_timelincachagexpc:achcachcachAPPNAME) ) $(EXTRAOBJsql2chemearlincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2chaptchagcachcackinsncachaptchagcach_.c:qlrgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2sylstystylyncncachaptchagcach_.c:achcachcachAPPNAME) tagncachaptchagcach_rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2arncachaptchagcach_.taktktkt.c >ktktkktrgonicodrlncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2serncachaptchagcach_.c:achcachcachAPPNilncachaptchagcach_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2filvvrwiki.c >ncachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql2agcachcache_.c:xferncachaptchagcach_.c:achcachcachAPPNAME) xferxferzipncachaptchagcach_.rgoh_timelincachaptchagcachcache_.c:achcachcachAPPNAME) ) $(EXTRAOBJsql20 |
+1
-41
| --- a/src/makemake.tcl | ||
| +++ b/src/makemake.tcl | ||
| @@ -13,44 +13,4 @@ | ||
| 13 | 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | 14 | !en $extra_h($s) s" |
| 15 | 15 | }sqlite3} |
| 16 | -} $extra_h($s) 0] { | |
| 17 | -EXTRAOBJ = \ | |
| 18 | - \ | |
| 19 | - \ | |
| 20 | - $(OBJDIR)/th.o \ | |
| 21 | - \ | |
| 22 | - tcl.o \ | |
| 23 | - ] -I$(ZINCDIR)cluded iopenssl | |
| 24 | -!endifn incl | |
| 25 | -!endifn included iopenssl | |
| 26 | -!en) | |
| 27 | -MKINDEXmkindex)version | |
| 28 | -CAT luded iop included iopenssl | |
| 29 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 30 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 31 | -!e included iopenssl | |
| 32 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 33 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 34 | -CAT luded iop includ -lzPEXTRAOBJ = \ | |
| 35 | - \ | |
| 36 | - \ | |
| 37 | - $(OBJDIR)/th.o \ | |
| 38 | - \ | |
| 39 | - tcl.o \ | |
| 40 | - | |
| 41 | - | |
| 42 | -openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl | |
| 43 | -!endiSS included iopenssl | |
| 44 | -!eTC$(ZLIB)writeln " \\zlib included iopenssl | |
| 45 | -!endifn included iopenssl | |
| 46 | -!en) | |
| 47 | -MKINDEXmkindex)version | |
| 48 | -CAT luded iop included iopenssl | |
| 49 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 50 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 51 | -!e included iopenssl | |
| 52 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 53 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 54 | -CAT luded iop included } | |
| 55 | -}$(SRCDIR)/th.h" | |
| 56 | -#append mhar | |
| 16 | +} $extra_h($s) 0 |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0] { |
| 17 | EXTRAOBJ = \ |
| 18 | \ |
| 19 | \ |
| 20 | $(OBJDIR)/th.o \ |
| 21 | \ |
| 22 | tcl.o \ |
| 23 | ] -I$(ZINCDIR)cluded iopenssl |
| 24 | !endifn incl |
| 25 | !endifn included iopenssl |
| 26 | !en) |
| 27 | MKINDEXmkindex)version |
| 28 | CAT luded iop included iopenssl |
| 29 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 30 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 31 | !e included iopenssl |
| 32 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 33 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 34 | CAT luded iop includ -lzPEXTRAOBJ = \ |
| 35 | \ |
| 36 | \ |
| 37 | $(OBJDIR)/th.o \ |
| 38 | \ |
| 39 | tcl.o \ |
| 40 | |
| 41 | |
| 42 | openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl |
| 43 | !endiSS included iopenssl |
| 44 | !eTC$(ZLIB)writeln " \\zlib included iopenssl |
| 45 | !endifn included iopenssl |
| 46 | !en) |
| 47 | MKINDEXmkindex)version |
| 48 | CAT luded iop included iopenssl |
| 49 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 50 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 51 | !e included iopenssl |
| 52 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 53 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 54 | CAT luded iop included } |
| 55 | }$(SRCDIR)/th.h" |
| 56 | #append mhar |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0 |
+1
-41
| --- a/src/makemake.tcl | ||
| +++ b/src/makemake.tcl | ||
| @@ -13,44 +13,4 @@ | ||
| 13 | 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | 14 | !en $extra_h($s) s" |
| 15 | 15 | }sqlite3} |
| 16 | -} $extra_h($s) 0] { | |
| 17 | -EXTRAOBJ = \ | |
| 18 | - \ | |
| 19 | - \ | |
| 20 | - $(OBJDIR)/th.o \ | |
| 21 | - \ | |
| 22 | - tcl.o \ | |
| 23 | - ] -I$(ZINCDIR)cluded iopenssl | |
| 24 | -!endifn incl | |
| 25 | -!endifn included iopenssl | |
| 26 | -!en) | |
| 27 | -MKINDEXmkindex)version | |
| 28 | -CAT luded iop included iopenssl | |
| 29 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 30 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 31 | -!e included iopenssl | |
| 32 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 33 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 34 | -CAT luded iop includ -lzPEXTRAOBJ = \ | |
| 35 | - \ | |
| 36 | - \ | |
| 37 | - $(OBJDIR)/th.o \ | |
| 38 | - \ | |
| 39 | - tcl.o \ | |
| 40 | - | |
| 41 | - | |
| 42 | -openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl | |
| 43 | -!endiSS included iopenssl | |
| 44 | -!eTC$(ZLIB)writeln " \\zlib included iopenssl | |
| 45 | -!endifn included iopenssl | |
| 46 | -!en) | |
| 47 | -MKINDEXmkindex)version | |
| 48 | -CAT luded iop included iopenssl | |
| 49 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 50 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 51 | -!e included iopenssl | |
| 52 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 53 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 54 | -CAT luded iop included } | |
| 55 | -}$(SRCDIR)/th.h" | |
| 56 | -#append mhar | |
| 16 | +} $extra_h($s) 0 |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0] { |
| 17 | EXTRAOBJ = \ |
| 18 | \ |
| 19 | \ |
| 20 | $(OBJDIR)/th.o \ |
| 21 | \ |
| 22 | tcl.o \ |
| 23 | ] -I$(ZINCDIR)cluded iopenssl |
| 24 | !endifn incl |
| 25 | !endifn included iopenssl |
| 26 | !en) |
| 27 | MKINDEXmkindex)version |
| 28 | CAT luded iop included iopenssl |
| 29 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 30 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 31 | !e included iopenssl |
| 32 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 33 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 34 | CAT luded iop includ -lzPEXTRAOBJ = \ |
| 35 | \ |
| 36 | \ |
| 37 | $(OBJDIR)/th.o \ |
| 38 | \ |
| 39 | tcl.o \ |
| 40 | |
| 41 | |
| 42 | openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl |
| 43 | !endiSS included iopenssl |
| 44 | !eTC$(ZLIB)writeln " \\zlib included iopenssl |
| 45 | !endifn included iopenssl |
| 46 | !en) |
| 47 | MKINDEXmkindex)version |
| 48 | CAT luded iop included iopenssl |
| 49 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 50 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 51 | !e included iopenssl |
| 52 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 53 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 54 | CAT luded iop included } |
| 55 | }$(SRCDIR)/th.h" |
| 56 | #append mhar |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0 |
+1
-41
| --- a/src/makemake.tcl | ||
| +++ b/src/makemake.tcl | ||
| @@ -13,44 +13,4 @@ | ||
| 13 | 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | 14 | !en $extra_h($s) s" |
| 15 | 15 | }sqlite3} |
| 16 | -} $extra_h($s) 0] { | |
| 17 | -EXTRAOBJ = \ | |
| 18 | - \ | |
| 19 | - \ | |
| 20 | - $(OBJDIR)/th.o \ | |
| 21 | - \ | |
| 22 | - tcl.o \ | |
| 23 | - ] -I$(ZINCDIR)cluded iopenssl | |
| 24 | -!endifn incl | |
| 25 | -!endifn included iopenssl | |
| 26 | -!en) | |
| 27 | -MKINDEXmkindex)version | |
| 28 | -CAT luded iop included iopenssl | |
| 29 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 30 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 31 | -!e included iopenssl | |
| 32 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 33 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 34 | -CAT luded iop includ -lzPEXTRAOBJ = \ | |
| 35 | - \ | |
| 36 | - \ | |
| 37 | - $(OBJDIR)/th.o \ | |
| 38 | - \ | |
| 39 | - tcl.o \ | |
| 40 | - | |
| 41 | - | |
| 42 | -openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl | |
| 43 | -!endiSS included iopenssl | |
| 44 | -!eTC$(ZLIB)writeln " \\zlib included iopenssl | |
| 45 | -!endifn included iopenssl | |
| 46 | -!en) | |
| 47 | -MKINDEXmkindex)version | |
| 48 | -CAT luded iop included iopenssl | |
| 49 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 50 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl | |
| 51 | -!e included iopenssl | |
| 52 | -!endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude | |
| 53 | -SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion | |
| 54 | -CAT luded iop included } | |
| 55 | -}$(SRCDIR)/th.h" | |
| 56 | -#append mhar | |
| 16 | +} $extra_h($s) 0 |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0] { |
| 17 | EXTRAOBJ = \ |
| 18 | \ |
| 19 | \ |
| 20 | $(OBJDIR)/th.o \ |
| 21 | \ |
| 22 | tcl.o \ |
| 23 | ] -I$(ZINCDIR)cluded iopenssl |
| 24 | !endifn incl |
| 25 | !endifn included iopenssl |
| 26 | !en) |
| 27 | MKINDEXmkindex)version |
| 28 | CAT luded iop included iopenssl |
| 29 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 30 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 31 | !e included iopenssl |
| 32 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 33 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 34 | CAT luded iop includ -lzPEXTRAOBJ = \ |
| 35 | \ |
| 36 | \ |
| 37 | $(OBJDIR)/th.o \ |
| 38 | \ |
| 39 | tcl.o \ |
| 40 | |
| 41 | |
| 42 | openssl: zlibzlibSSL /I$(ZINCDIR) included iopenssl |
| 43 | !endiSS included iopenssl |
| 44 | !eTC$(ZLIB)writeln " \\zlib included iopenssl |
| 45 | !endifn included iopenssl |
| 46 | !en) |
| 47 | MKINDEXmkindex)version |
| 48 | CAT luded iop included iopenssl |
| 49 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 50 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSluded iopenssl |
| 51 | !e included iopenssl |
| 52 | !endifno-asmallVC-WIN32ms\do_ms.batms\nt.maklude |
| 53 | SSLLIBPERLDIR =sqlsqlsqlsqlsql2hooksHOOKSENABLE \sion |
| 54 | CAT luded iop included } |
| 55 | }$(SRCDIR)/th.h" |
| 56 | #append mhar |
| --- a/src/makemake.tcl | |
| +++ b/src/makemake.tcl | |
| @@ -13,44 +13,4 @@ | |
| 13 | #append mhargs " ENABLE \ included iopenssl |
| 14 | !en $extra_h($s) s" |
| 15 | }sqlite3} |
| 16 | } $extra_h($s) 0 |
+2251
| --- a/src/miniz.c | ||
| +++ b/src/miniz.c | ||
| @@ -0,0 +1,2251 @@ | ||
| 1 | +/* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 2 | + See "unlicense" statement at the end of this file. | |
| 3 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 4 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 5 | + | |
| 6 | + Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define | |
| 7 | + MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). | |
| 8 | + | |
| 9 | + * Change History | |
| 10 | + 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. | |
| 11 | +void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); | |
| 12 | +void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); | |
| 13 | + | |
| 14 | +// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. | |
| 15 | +typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); | |
| 16 | + | |
| 17 | +// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; | |
| 18 | + | |
| 19 | + if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; | |
| 20 | + pState->m_has_flushed |= (flush == MZ_FINISH); | |
| 21 | + | |
| 22 | + if ((flush == MZ_FINISH) && (first_call)) | |
| 23 | + { | |
| 24 | + // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. | |
| 25 | + decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; | |
| 26 | + in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; | |
| 27 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); | |
| 28 | + pState->m_last_status = status; | |
| 29 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; | |
| 30 | + pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 31 | + pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; | |
| 32 | + | |
| 33 | + if (status < 0) | |
| 34 | + return MZ_DATA_ERROR; | |
| 35 | + else if (status != TINFL_STATUS_DONE) | |
| 36 | + { | |
| 37 | + pState->m_last_status = TINFL_STATUS_FAILED; | |
| 38 | + return MZ_BUF_ERROR; | |
| 39 | + } | |
| 40 | + return MZ_STREAM_END; | |
| 41 | + } | |
| 42 | + // flush != MZ_FINISH then we must assume there's more input. | |
| 43 | + if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; | |
| 44 | + | |
| 45 | + if (pState->m_dict_avail) | |
| 46 | + { | |
| 47 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 48 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 49 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 50 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 51 | + return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 52 | + } | |
| 53 | + | |
| 54 | + for ( ; ; ) | |
| 55 | + { | |
| 56 | + in_bytes = pStream->avail_in; | |
| 57 | + out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; | |
| 58 | + | |
| 59 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); | |
| 60 | + pState->m_last_status = status; | |
| 61 | + | |
| 62 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; | |
| 63 | + pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 64 | + | |
| 65 | + pState->m_dict_avail = (mz_uint)out_bytes; | |
| 66 | + | |
| 67 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 68 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 69 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 70 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 71 | + | |
| 72 | + if (status < 0) | |
| 73 | + return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). | |
| 74 | + else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) | |
| 75 | + return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. | |
| 76 | + else if (flush == MZ_FINISH) | |
| 77 | + { | |
| 78 | + // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. | |
| 79 | + if (status == TINFL_STATUS_DONE) | |
| 80 | + return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; | |
| 81 | + // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. | |
| 82 | + else if (!pStream->avail_out) | |
| 83 | + return MZ_BUF_ERROR; | |
| 84 | + } | |
| 85 | + else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) | |
| 86 | + break; | |
| 87 | + } | |
| 88 | + | |
| 89 | + return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 90 | +} | |
| 91 | + | |
| 92 | +int mz_inflateEnd(mz_streamp pStream) | |
| 93 | +{ | |
| 94 | + if (!pStream) | |
| 95 | + return MZ_STREAM_ERROR; | |
| 96 | + if (pStream->state) | |
| 97 | + { | |
| 98 | + pStream->zfree(pStream->opaque, pStream->state); | |
| 99 | + pStream->state = NULL; | |
| 100 | + } | |
| 101 | + return MZ_OK; | |
| 102 | +} | |
| 103 | + | |
| 104 | +int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) | |
| 105 | +{ | |
| 106 | + mz_stream stream; | |
| 107 | + int status; | |
| 108 | + memset(&stream, 0, sizeof(stream)); | |
| 109 | + | |
| 110 | + // In case mz_ulong is 64-bits (argh I hate longs). | |
| 111 | + if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; | |
| 112 | + | |
| 113 | + stream.next_in = pSource; | |
| 114 | + stream.avail_in = (mz_uint32)source_len; | |
| 115 | + stream.next_out = pDest; | |
| 116 | + stream.avail_out = (mz_uint32)*pDest_len; | |
| 117 | + | |
| 118 | + status = mz_inflateInit(&stream); | |
| 119 | + if (status != MZ_OK) | |
| 120 | + return status; | |
| 121 | + | |
| 122 | + status = mz_inflate(&stream, MZ_FINISH); | |
| 123 | + if (status != MZ_STREAM_END) | |
| 124 | + { | |
| 125 | + mz_inflateEnd(&stream); | |
| 126 | + return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; | |
| 127 | + } | |
| 128 | + *pDest_len = stream.total_out; | |
| 129 | + | |
| 130 | + return mz_inflateEnd(&stream); | |
| 131 | +} | |
| 132 | + | |
| 133 | +const char *mz_error(int err) | |
| 134 | +{ | |
| 135 | + static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = | |
| 136 | + { | |
| 137 | + { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, | |
| 138 | + { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 139 | + }; | |
| 140 | + mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; | |
| 141 | + return NULL; | |
| 142 | +} | |
| 143 | + | |
| 144 | +#endif //MINIZ_NO_ZLIB_APIS | |
| 145 | + | |
| 146 | +// ------------------- Low-level Decompression (completely independent from all compression API's) | |
| 147 | + | |
| 148 | +#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) | |
| 149 | +#define TINFL_MEMSET(p, c, l) memset(p, c, l) | |
| 150 | + | |
| 151 | +#define TINFL_CR_BEGIN switch(r->m_state) { case 0: | |
| 152 | +#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END | |
| 153 | +#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END | |
| 154 | +#define TINFL_CR_FINISH } | |
| 155 | + | |
| 156 | +// TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never | |
| 157 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. | |
| 158 | +#define TINFL_GET_BYTE(state_index, c) do { \ | |
| 159 | + if (pIn_buf_cur >= pIn_buf_end) { \ | |
| 160 | + for ( ; ; ) { \ | |
| 161 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ | |
| 162 | + TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ | |
| 163 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 164 | + c = *pIn_buf_cur++; \ | |
| 165 | + break; \ | |
| 166 | + } \ | |
| 167 | + } else { \ | |
| 168 | + c = 0; \ | |
| 169 | + break; \ | |
| 170 | + } \ | |
| 171 | + } \ | |
| 172 | + } else c = *pIn_buf_cur++; } MZ_MACRO_END | |
| 173 | + | |
| 174 | +#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) | |
| 175 | +#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 176 | +#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 177 | + | |
| 178 | +// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. | |
| 179 | +// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a | |
| 180 | +// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the | |
| 181 | +// bit buffer contains >=15 bits (deflate's max. Huffman code size). | |
| 182 | +#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ | |
| 183 | + do { \ | |
| 184 | + temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ | |
| 185 | + if (temp >= 0) { \ | |
| 186 | + code_len = temp >> 9; \ | |
| 187 | + if ((code_len) && (num_bits >= code_len)) \ | |
| 188 | + break; \ | |
| 189 | + } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ | |
| 190 | + code_len = TINFL_FAST_LOOKUP_BITS; \ | |
| 191 | + do { \ | |
| 192 | + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ | |
| 193 | + } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ | |
| 194 | + } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ | |
| 195 | + } while (num_bits < 15); | |
| 196 | + | |
| 197 | +// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read | |
| 198 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 199 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 200 | +// The slow path is only executed at the very end of the input buffer. | |
| 201 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 202 | + int temp; mz_uint code_len, c; \ | |
| 203 | + if (num_bits < 15) { \ | |
| 204 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 205 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 206 | + } else { \ | |
| 207 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 208 | + } \ | |
| 209 | + } \ | |
| 210 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 211 | + code_len = temp >> 9, temp &= 511; \ | |
| 212 | + else { \ | |
| 213 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 214 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 215 | + | |
| 216 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 217 | +{ | |
| 218 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 219 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 220 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 221 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 222 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 223 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 224 | + | |
| 225 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 226 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 227 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 228 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 229 | + | |
| 230 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 231 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 232 | + | |
| 233 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 234 | + TINFL_CR_BEGIN | |
| 235 | + | |
| 236 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 237 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 238 | + { | |
| 239 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 240 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 241 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 242 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 243 | + } | |
| 244 | + | |
| 245 | + do | |
| 246 | + { | |
| 247 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 248 | + if (r->m_type == 0) | |
| 249 | + { | |
| 250 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 251 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 252 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 253 | + while ((counter) && (num_bits)) | |
| 254 | + { | |
| 255 | + TINFL_GET_BITS(51, dist, 8); | |
| 256 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 257 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 258 | + counter--; | |
| 259 | + } | |
| 260 | + while (counter) | |
| 261 | + { | |
| 262 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 263 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 264 | + { | |
| 265 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 266 | + { | |
| 267 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 268 | + } | |
| 269 | + else | |
| 270 | + { | |
| 271 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 272 | + } | |
| 273 | + } | |
| 274 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 275 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 276 | + } | |
| 277 | + } | |
| 278 | + else if (r->m_type == 3) | |
| 279 | + { | |
| 280 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 281 | + } | |
| 282 | + else | |
| 283 | + { | |
| 284 | + if (r->m_type == 1) | |
| 285 | + { | |
| 286 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 287 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 288 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 289 | + } | |
| 290 | + else | |
| 291 | + { | |
| 292 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 293 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 294 | + r->m_table_sizes[2] = 19; | |
| 295 | + } | |
| 296 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 297 | + { | |
| 298 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 299 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 300 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 301 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 302 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 303 | + if ((65536 != total) && (used_syms > 1)) | |
| 304 | + { | |
| 305 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 306 | + } | |
| 307 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 308 | + { | |
| 309 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 310 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 311 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 312 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 313 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 314 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 315 | + { | |
| 316 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 317 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 318 | + } | |
| 319 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 320 | + } | |
| 321 | + if (r->m_type == 2) | |
| 322 | + { | |
| 323 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 324 | + { | |
| 325 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 326 | + if ((dist == 16) && (!counter)) | |
| 327 | + { | |
| 328 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 329 | + } | |
| 330 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 331 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 332 | + } | |
| 333 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 334 | + { | |
| 335 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 336 | + } | |
| 337 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 338 | + } | |
| 339 | + } | |
| 340 | + for ( ; ; ) | |
| 341 | + { | |
| 342 | + mz_uint8 *pSrc; | |
| 343 | + for ( ; ; ) | |
| 344 | + { | |
| 345 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 346 | + { | |
| 347 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 348 | + if (counter >= 256) | |
| 349 | + break; | |
| 350 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 351 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 352 | + } | |
| 353 | + else | |
| 354 | + { | |
| 355 | + int sym2; mz_uint code_len; | |
| 356 | +#if TINFL_USE_64BIT_BITBUF | |
| 357 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 358 | +#else | |
| 359 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 360 | +#endif | |
| 361 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 362 | + code_len = sym2 >> 9; | |
| 363 | + else | |
| 364 | + { | |
| 365 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 366 | + } | |
| 367 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 368 | + if (counter & 256) | |
| 369 | + break; | |
| 370 | + | |
| 371 | +#if !TINFL_USE_64BIT_BITBUF | |
| 372 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 373 | +#endif | |
| 374 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 375 | + code_len = sym2 >> 9; | |
| 376 | + else | |
| 377 | + { | |
| 378 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 379 | + } | |
| 380 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 381 | + | |
| 382 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 383 | + if (sym2 & 256) | |
| 384 | + { | |
| 385 | + pOut_buf_cur++; | |
| 386 | + counter = sym2; | |
| 387 | + break; | |
| 388 | + } | |
| 389 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 390 | + pOut_buf_cur += 2; | |
| 391 | + } | |
| 392 | + } | |
| 393 | + if ((counter &= 511) == 256) break; | |
| 394 | + | |
| 395 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 396 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 397 | + | |
| 398 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 399 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 400 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 401 | + | |
| 402 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 403 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 404 | + { | |
| 405 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 406 | + } | |
| 407 | + | |
| 408 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 409 | + | |
| 410 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 411 | + { | |
| 412 | + while (counter--) | |
| 413 | + { | |
| 414 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 415 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 416 | + } | |
| 417 | + continue; | |
| 418 | + } | |
| 419 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 420 | + else if ((counter >= 9) && (counter <= dist)) | |
| 421 | + { | |
| 422 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 423 | + do | |
| 424 | + { | |
| 425 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 426 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 427 | + pOut_buf_cur += 8; | |
| 428 | + } while ((pSrc += 8) < pSrc_end); | |
| 429 | + if ((counter &= 7) < 3) | |
| 430 | + { | |
| 431 | + if (counter) | |
| 432 | + { | |
| 433 | + pOut_buf_cur[0] = pSrc[0]; | |
| 434 | + if (counter > 1) | |
| 435 | + pOut_buf_cur[1] = pSrc[1]; | |
| 436 | + pOut_buf_cur += counter; | |
| 437 | + } | |
| 438 | + continue; | |
| 439 | + } | |
| 440 | + } | |
| 441 | +#endif | |
| 442 | + do | |
| 443 | + { | |
| 444 | + pOut_buf_cur[0] = pSrc[0]; | |
| 445 | + pOut_buf_cur[1] = pSrc[1]; | |
| 446 | + pOut_buf_cur[2] = pSrc[2]; | |
| 447 | + pOut_buf_cur += 3; pSrc += 3; | |
| 448 | + } while ((int)(counter -= 3) > 2); | |
| 449 | + if ((int)counter > 0) | |
| 450 | + { | |
| 451 | + pOut_buf_cur[0] = pSrc[0]; | |
| 452 | + if ((int)counter > 1) | |
| 453 | + pOut_buf_cur[1] = pSrc[1]; | |
| 454 | + pOut_buf_cur += counter; | |
| 455 | + } | |
| 456 | + } | |
| 457 | + } | |
| 458 | + } while (!(r->m_final & 1)); | |
| 459 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 460 | + { | |
| 461 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 462 | + } | |
| 463 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 464 | + TINFL_CR_FINISH | |
| 465 | + | |
| 466 | +common_exit: | |
| 467 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 468 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 469 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 470 | + { | |
| 471 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 472 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 473 | + while (buf_len) | |
| 474 | + { | |
| 475 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 476 | + { | |
| 477 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 478 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 479 | + } | |
| 480 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 481 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 482 | + } | |
| 483 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 484 | + } | |
| 485 | + return status; | |
| 486 | +} | |
| 487 | + | |
| 488 | +// Higher level helper functions. | |
| 489 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 490 | +{ | |
| 491 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 492 | + *pOut_len = 0; | |
| 493 | + tinfl_init(&decomp); | |
| 494 | + for ( ; ; ) | |
| 495 | + { | |
| 496 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 497 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 498 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 499 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 500 | + { | |
| 501 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 502 | + } | |
| 503 | + src_buf_ofs += src_buf_size; | |
| 504 | + *pOut_len += dst_buf_size; | |
| 505 | + if (status == TINFL_STATUS_DONE) break; | |
| 506 | + new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, | |
| 507 | + 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 508 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 509 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 510 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 511 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 512 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 513 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 514 | + | |
| 515 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 516 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 517 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 518 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 519 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 520 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 521 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 522 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 523 | + 7,7,7,7,7,7,7,7 }; | |
| 524 | + | |
| 525 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 526 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 527 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 528 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 529 | + | |
| 530 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 531 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 532 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 533 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 534 | + | |
| 535 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 536 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 537 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 538 | +{ | |
| 539 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 540 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 541 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 542 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 543 | + { | |
| 544 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 545 | + mz_uint offsets[256], cur_ofs = 0; | |
| 546 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 547 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 548 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 549 | + } | |
| 550 | + return pCur_syms; | |
| 551 | +} | |
| 552 | + | |
| 553 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 554 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 555 | +{ | |
| 556 | + int root, leaf, next, avbl, used, dpth; | |
| 557 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 558 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 559 | + for (next=1; next < n-1; next++) | |
| 560 | + { | |
| 561 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 562 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 563 | + } | |
| 564 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 565 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 566 | + while (avbl>0) | |
| 567 | + { | |
| 568 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 569 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 570 | + avbl = 2*used; dpth++; used = 0; | |
| 571 | + } | |
| 572 | +} | |
| 573 | + | |
| 574 | +// Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 575 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 576 | + { | |
| 577 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 578 | + mz_uint offsets[256], cur_ofs = 0; | |
| 579 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 580 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 581 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 582 | + } | |
| 583 | + return pCur_syms; | |
| 584 | +} | |
| 585 | + | |
| 586 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 587 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 588 | +{ | |
| 589 | + int root, leaf, next, avbl, used, dpth; | |
| 590 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 591 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 592 | + for (next=1; next < n-1; next++) | |
| 593 | + { | |
| 594 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 595 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 596 | + } | |
| 597 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 598 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 599 | + while (avbl>0) | |
| 600 | + { | |
| 601 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 602 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 603 | + avbl = 2*used; dpth++; used = 0; | |
| 604 | + } | |
| 605 | +} | |
| 606 | + | |
| 607 | +// Limits canonical Huffman code table's max code size. | |
| 608 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 609 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 610 | +{ | |
| 611 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 612 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 613 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 614 | + while (total != (1UL << max_code_size)) | |
| 615 | + { | |
| 616 | + pNum_codes[max_code_size]--; | |
| 617 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 618 | + total--; | |
| 619 | + } | |
| 620 | +} | |
| 621 | + | |
| 622 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 623 | +{ | |
| 624 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 625 | + if (static_table) | |
| 626 | + { | |
| 627 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 628 | + } | |
| 629 | + else | |
| 630 | + { | |
| 631 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 632 | + int num_used_syms = 0; | |
| 633 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 634 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 635 | + | |
| 636 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 637 | + | |
| 638 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 639 | + | |
| 640 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 641 | + | |
| 642 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 643 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 644 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 645 | + } | |
| 646 | + | |
| 647 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 648 | + | |
| 649 | + for (i = 0; i < table_len; i++) | |
| 650 | + { | |
| 651 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 652 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 653 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 654 | + } | |
| 655 | +} | |
| 656 | + | |
| 657 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 658 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 659 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 660 | + while (d->m_bits_in >= 8) { \ | |
| 661 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 662 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 663 | + d->m_bit_buffer >>= 8; \ | |
| 664 | + d->m_bits_in -= 8; \ | |
| 665 | + } \ | |
| 666 | +} MZ_MACRO_END | |
| 667 | + | |
| 668 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 669 | + if (rle_repeat_count < 3) { \ | |
| 670 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 671 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 672 | + } else { \ | |
| 673 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 674 | +} rle_repeat_count = 0; } } | |
| 675 | + | |
| 676 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 677 | + if (rle_z_count < 3) { \ | |
| 678 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 679 | + } else if (rle_z_count <= 10) { \ | |
| 680 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 681 | + } else { \ | |
| 682 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 683 | +} rle_z_count = 0; } } | |
| 684 | + | |
| 685 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 686 | + | |
| 687 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 688 | +{ | |
| 689 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); | |
| 690 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 691 | + | |
| 692 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 693 | + { | |
| 694 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 695 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 696 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 697 | + } | |
| 698 | +} | |
| 699 | + | |
| 700 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 701 | +{ | |
| 702 | + mz_uint i; | |
| 703 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 704 | + | |
| 705 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 706 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 707 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 708 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 709 | + | |
| 710 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 711 | + | |
| 712 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 713 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 714 | + | |
| 715 | + TDEFL_PUT_BITS(1, 2); | |
| 716 | +} | |
| 717 | + | |
| 718 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 719 | + | |
| 720 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 721 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 722 | +{ | |
| 723 | + mz_uint flags; | |
| 724 | + mz_uint8 *pLZ_codes; | |
| 725 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 726 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 727 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 728 | + mz_uint bits_in = d->m_bits_in; | |
| 729 | + | |
| 730 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 731 | + | |
| 732 | + flags = 1; | |
| 733 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 734 | + { | |
| 735 | + if (flags == 1) | |
| 736 | + flags = *pLZ_codes++ | 0x100; | |
| 737 | + | |
| 738 | + if (flags & 1) | |
| 739 | + { | |
| 740 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 741 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 742 | + | |
| 743 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 744 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 745 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 746 | + | |
| 747 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 748 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 749 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 750 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 751 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 752 | + sym = (match_dist < 512) ? s0 : s1; | |
| 753 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 754 | + | |
| 755 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 757 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 758 | + } | |
| 759 | + else | |
| 760 | + { | |
| 761 | + mz_uint lit = *pLZ_codes++; | |
| 762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 764 | + | |
| 765 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 766 | + { | |
| 767 | + flags >>= 1; | |
| 768 | + lit = *pLZ_codes++; | |
| 769 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 770 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 771 | + | |
| 772 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 773 | + { | |
| 774 | + flags >>= 1; | |
| 775 | + lit = *pLZ_codes++; | |
| 776 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 777 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 778 | + } | |
| 779 | + } | |
| 780 | + } | |
| 781 | + | |
| 782 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 783 | + return MZ_FALSE; | |
| 784 | + | |
| 785 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 786 | + pOutput_buf += (bits_in >> 3); | |
| 787 | + bit_buffer >>= (bits_in & ~7); | |
| 788 | + bits_in &= 7; | |
| 789 | + } | |
| 790 | + | |
| 791 | +#undef TDEFL_PUT_BITS_FAST | |
| 792 | + | |
| 793 | + d->m_pOutput_buf = pOutput_buf; | |
| 794 | + d->m_bits_in = 0; | |
| 795 | + d->m_bit_buffer = 0; | |
| 796 | + | |
| 797 | + while (bits_in) | |
| 798 | + { | |
| 799 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 800 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 801 | + bit_buffer >>= n; | |
| 802 | + bits_in -= n; | |
| 803 | + } | |
| 804 | + | |
| 805 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 806 | + | |
| 807 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 808 | +} | |
| 809 | +#else | |
| 810 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 811 | +{ | |
| 812 | + mz_uint flags; | |
| 813 | + mz_uint8 *pLZ_codes; | |
| 814 | + | |
| 815 | + flags = 1; | |
| 816 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 817 | + { | |
| 818 | + if (flags == 1) | |
| 819 | + flags = *pLZ_codes++ | 0x100; | |
| 820 | + if (flags & 1) | |
| 821 | + { | |
| 822 | + mz_uint sym, num_extra_bits; | |
| 823 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 824 | + | |
| 825 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 826 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 827 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 828 | + | |
| 829 | + if (match_dist < 512) | |
| 830 | + { | |
| 831 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 832 | + } | |
| 833 | + else | |
| 834 | + { | |
| 835 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 836 | + } | |
| 837 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 838 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 839 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 840 | + } | |
| 841 | + else | |
| 842 | + { | |
| 843 | + mz_uint lit = *pLZ_codes++; | |
| 844 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 845 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 846 | + } | |
| 847 | + } | |
| 848 | + | |
| 849 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 850 | + | |
| 851 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 852 | +} | |
| 853 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 854 | + | |
| 855 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 856 | +{ | |
| 857 | + if (static_block) | |
| 858 | + tdefl_start_static_block(d); | |
| 859 | + else | |
| 860 | + tdefl_start_dynamic_block(d); | |
| 861 | + return tdefl_compress_lz_codes(d); | |
| 862 | +} | |
| 863 | + | |
| 864 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 865 | +{ | |
| 866 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 867 | + mz_uint8 *pSaved_output_buf; | |
| 868 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 869 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 870 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 871 | + | |
| 872 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 873 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 874 | + | |
| 875 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 876 | + d->m_output_flush_ofs = 0; | |
| 877 | + d->m_output_flush_remaining = 0; | |
| 878 | + | |
| 879 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 880 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 881 | + | |
| 882 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 883 | + { | |
| 884 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 885 | + } | |
| 886 | + | |
| 887 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 888 | + | |
| 889 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 890 | + | |
| 891 | + if (!use_raw_block) | |
| 892 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 893 | + | |
| 894 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 895 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 896 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 897 | + { | |
| 898 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 899 | + TDEFL_PUT_BITS(0, 2); | |
| 900 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 901 | + for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) | |
| 902 | + { | |
| 903 | + TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); | |
| 904 | + } | |
| 905 | + for (i = 0; i < d->m_total_lz_bytes; ++i) | |
| 906 | + { | |
| 907 | + TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); | |
| 908 | + } | |
| 909 | + } | |
| 910 | + // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. | |
| 911 | + else if (!comp_block_succeeded) | |
| 912 | + { | |
| 913 | + d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 914 | + tdefl_compress_block(d, MZ_TRUE); | |
| 915 | + } | |
| 916 | + | |
| 917 | + if (flush) | |
| 918 | + { | |
| 919 | + if (flush == TDEFL_FINISH) | |
| 920 | + { | |
| 921 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 922 | + if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } | |
| 923 | + } | |
| 924 | + else | |
| 925 | + { | |
| 926 | + mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } | |
| 927 | + } | |
| 928 | + } | |
| 929 | + | |
| 930 | + MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 931 | + | |
| 932 | + memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); | |
| 933 | + memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); | |
| 934 | + | |
| 935 | + d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; | |
| 936 | + | |
| 937 | + if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) | |
| 938 | + { | |
| 939 | + if (d->m_pPut_buf_func) | |
| 940 | + { | |
| 941 | + *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; | |
| 942 | + if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) | |
| 943 | + return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); | |
| 944 | + } | |
| 945 | + else if (pOutput_buf_start == d->m_output_buf) | |
| 946 | + { | |
| 947 | + int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); | |
| 948 | + memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); | |
| 949 | + d->m_out_buf_ofs += bytes_to_copy; | |
| 950 | + if ((n -= bytes_to_copy) != 0) | |
| 951 | + { | |
| 952 | + d->m_output_flush_ofs = bytes_to_copy; | |
| 953 | + d->m_output_flush_remaining = n; | |
| 954 | + } | |
| 955 | + } | |
| 956 | + else | |
| 957 | + { | |
| 958 | + d->m_out_buf_ofs += n; | |
| 959 | + } | |
| 960 | + } | |
| 961 | + | |
| 962 | + return d->m_output_flush_remaining; | |
| 963 | +} | |
| 964 | + | |
| 965 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 966 | +#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) | |
| 967 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 968 | +{ | |
| 969 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 970 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 971 | + const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; | |
| 972 | + mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); | |
| 973 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 974 | + for ( ; ; ) | |
| 975 | + { | |
| 976 | + for ( ; ; ) | |
| 977 | + { | |
| 978 | + if (--num_probes_left == 0) return; | |
| 979 | + #define TDEFL_PROBE \ | |
| 980 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 981 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 982 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 983 | + if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; | |
| 984 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 985 | + } | |
| 986 | + if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; | |
| 987 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && | |
| 988 | + (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); | |
| 989 | + if (!probe_len) | |
| 990 | + { | |
| 991 | + *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; | |
| 992 | + } | |
| 993 | + else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) | |
| 994 | + { | |
| 995 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; | |
| 996 | + c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); | |
| 997 | + } | |
| 998 | + } | |
| 999 | +} | |
| 1000 | +#else | |
| 1001 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 1002 | +{ | |
| 1003 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 1004 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 1005 | + const mz_uint8 *s = d->m_dict + pos, *p, *q; | |
| 1006 | + mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; | |
| 1007 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 1008 | + for ( ; ; ) | |
| 1009 | + { | |
| 1010 | + for ( ; ; ) | |
| 1011 | + { | |
| 1012 | + if (--num_probes_left == 0) return; | |
| 1013 | + #define TDEFL_PROBE \ | |
| 1014 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 1015 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 1016 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 1017 | + if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; | |
| 1018 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 1019 | + } | |
| 1020 | + if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; | |
| 1021 | + if (probe_len > match_len) | |
| 1022 | + { | |
| 1023 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; | |
| 1024 | + c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; | |
| 1025 | + } | |
| 1026 | + } | |
| 1027 | +} | |
| 1028 | +#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1029 | + | |
| 1030 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN | |
| 1031 | +static mz_bool tdefl_compress_fast(tdefl_compressor *d) | |
| 1032 | +{ | |
| 1033 | + // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. | |
| 1034 | + mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; | |
| 1035 | + mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; | |
| 1036 | + mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1037 | + | |
| 1038 | + while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) | |
| 1039 | + { | |
| 1040 | + const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; | |
| 1041 | + mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1042 | + mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); | |
| 1043 | + d->m_src_buf_left -= num_bytes_to_process; | |
| 1044 | + lookahead_size += num_bytes_to_process; | |
| 1045 | + | |
| 1046 | + while (num_bytes_to_process) | |
| 1047 | + { | |
| 1048 | + mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); | |
| 1049 | + memcpy(d->m_dict + dst_pos, d->m_pSrc, n); | |
| 1050 | + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) | |
| 1051 | + memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); | |
| 1052 | + d->m_pSrc += n; | |
| 1053 | + dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1054 | + num_bytes_to_process -= n; | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | + dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); | |
| 1058 | + if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; | |
| 1059 | + | |
| 1060 | + while (lookahead_size >= 4) | |
| 1061 | + { | |
| 1062 | + mz_uint cur_match_dist, cur_match_len = 1; | |
| 1063 | + mz_uint8 *pCur_dict = d->m_dict + cur_pos; | |
| 1064 | + mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; | |
| 1065 | + mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; | |
| 1066 | + mz_uint probe_pos = d->m_hash[hash]; | |
| 1067 | + d->m_hash[hash] = (mz_uint16)lookahead_pos; | |
| 1068 | + | |
| 1069 | + if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) | |
| 1070 | + { | |
| 1071 | + const mz_uint16 *p = (const mz_uint16 *)pCur_dict; | |
| 1072 | + const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); | |
| 1073 | + mz_uint32 probe_len = 32; | |
| 1074 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, | |
| 1075 | + { | |
| 1076 | + *pMatch_dis with the input because_capacity = 128;ver | |
| 1077 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads | |
| 1078 | +} | |
| 1079 | + | |
| 1080 | +int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ | |
| 1081 | + r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ | |
| 1082 | +) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ | |
| 1083 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 1084 | + c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ | |
| 1085 | + n} \ | |
| 1086 | + m.avail_out = (mz_uint c = 0; \ | |
| 1087 | + break; \) ); | |
| 1088 | + cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); | |
| 1089 | + counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } | |
| 1090 | + while (pI expects the decompressor to never read | |
| 1091 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 1092 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 1093 | +// The slow path is only executed at the very end of the input buffer. | |
| 1094 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 1095 | + int temp; mz_uint code_len, c; \ | |
| 1096 | + if (num_bits < 15) { \ | |
| 1097 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 1098 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 1099 | + } else { \ | |
| 1100 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 1101 | + } \ | |
| 1102 | + } \ | |
| 1103 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 1104 | + code_len = temp >> 9, temp &= 511; \ | |
| 1105 | + else { \ | |
| 1106 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 1107 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 1108 | + | |
| 1109 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 1110 | +{ | |
| 1111 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1112 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1113 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1114 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1115 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1116 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1117 | + | |
| 1118 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1119 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1120 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1121 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1122 | + | |
| 1123 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1124 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1125 | + | |
| 1126 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1127 | + TINFL_CR_BEGIN | |
| 1128 | + | |
| 1129 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1130 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1131 | + { | |
| 1132 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1133 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1134 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1135 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1136 | + } | |
| 1137 | + | |
| 1138 | + do | |
| 1139 | + { | |
| 1140 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1141 | + if (r->m_type == 0) | |
| 1142 | + { | |
| 1143 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1144 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1145 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1146 | + while ((counter) && (num_bits)) | |
| 1147 | + { | |
| 1148 | + TINFL_GET_BITS(51, dist, 8); | |
| 1149 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1150 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1151 | + counter--; | |
| 1152 | + } | |
| 1153 | + while (counter) | |
| 1154 | + { | |
| 1155 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1156 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1157 | + { | |
| 1158 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1159 | + { | |
| 1160 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1161 | + } | |
| 1162 | + else | |
| 1163 | + { | |
| 1164 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1165 | + } | |
| 1166 | + } | |
| 1167 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1168 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1169 | + } | |
| 1170 | + } | |
| 1171 | + else if (r->m_type == 3) | |
| 1172 | + { | |
| 1173 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1174 | + } | |
| 1175 | + else | |
| 1176 | + { | |
| 1177 | + if (r->m_type == 1) | |
| 1178 | + { | |
| 1179 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1180 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1181 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1182 | + } | |
| 1183 | + else | |
| 1184 | + { | |
| 1185 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1186 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1187 | + r->m_table_sizes[2] = 19; | |
| 1188 | + } | |
| 1189 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1190 | + { | |
| 1191 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1192 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1193 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1194 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1195 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1196 | + if ((65536 != total) && (used_syms > 1)) | |
| 1197 | + { | |
| 1198 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1199 | + } | |
| 1200 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1201 | + { | |
| 1202 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1203 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1204 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1205 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1206 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1207 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1208 | + { | |
| 1209 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1210 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1211 | + } | |
| 1212 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1213 | + } | |
| 1214 | + if (r->m_type == 2) | |
| 1215 | + { | |
| 1216 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1217 | + { | |
| 1218 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 1219 | + if ((dist == 16) && (!counter)) | |
| 1220 | + { | |
| 1221 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 1222 | + } | |
| 1223 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 1224 | + TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 1225 | + }; | |
| 1226 | + mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1227 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1228 | + } | |
| 1229 | + else | |
| 1230 | + z_uint code_len; | |
| 1231 | +#if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 1232 | + } | |
| 1233 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 1234 | + { | |
| 1235 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 1236 | + } | |
| 1237 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 1238 | + } | |
| 1239 | + } | |
| 1240 | + for ( ; ; ) | |
| 1241 | + { | |
| 1242 | + mz_uint8 *pSrc; | |
| 1243 | + for ( ; ; ) | |
| 1244 | + { | |
| 1245 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 1246 | + { | |
| 1247 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 1248 | + if (counter >= 256) | |
| 1249 | + break; | |
| 1250 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1251 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1252 | + } | |
| 1253 | + else | |
| 1254 | + { | |
| 1255 | + int sym2; mz_uint code_len; | |
| 1256 | +#if TINFL_USE_64BIT_BITBUF | |
| 1257 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 1258 | +#else | |
| 1259 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1260 | +#endif | |
| 1261 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1262 | + code_len = sym2 >> 9; | |
| 1263 | + else | |
| 1264 | + { | |
| 1265 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1266 | + } | |
| 1267 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 1268 | + if (counter & 256) | |
| 1269 | + break; | |
| 1270 | + | |
| 1271 | +#if !TINFL_USE_64BIT_BITBUF | |
| 1272 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1273 | +#endif | |
| 1274 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1275 | + code_len = sym2 >> 9; | |
| 1276 | + else | |
| 1277 | + { | |
| 1278 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1279 | + } | |
| 1280 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 1281 | + | |
| 1282 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 1283 | + if (sym2 & 256) | |
| 1284 | + { | |
| 1285 | + pOut_buf_cur++; | |
| 1286 | + counter = sym2; | |
| 1287 | + break; | |
| 1288 | + } | |
| 1289 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 1290 | + pOut_buf_cur += 2; | |
| 1291 | + } | |
| 1292 | + } | |
| 1293 | + if ((counter &= 511) == 256) break; | |
| 1294 | + | |
| 1295 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 1296 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 1297 | + | |
| 1298 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 1299 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 1300 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 1301 | + | |
| 1302 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 1303 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 1304 | + { | |
| 1305 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 1306 | + } | |
| 1307 | + | |
| 1308 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 1309 | + | |
| 1310 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 1311 | + { | |
| 1312 | + while (counter--) | |
| 1313 | + { | |
| 1314 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1315 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 1316 | + } | |
| 1317 | + continue; | |
| 1318 | + } | |
| 1319 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1320 | + else if ((counter >= 9) && (counter <= dist)) | |
| 1321 | + { | |
| 1322 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 1323 | + do | |
| 1324 | + { | |
| 1325 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 1326 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 1327 | + pOut_buf_cur += 8; | |
| 1328 | + } while ((pSrc += 8) < pSrc_end); | |
| 1329 | + if ((counter &= 7) < 3) | |
| 1330 | + { | |
| 1331 | + if (counter) | |
| 1332 | + { | |
| 1333 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1334 | + if (counter > 1) | |
| 1335 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1336 | + pOut_buf_cur += counter; | |
| 1337 | + } | |
| 1338 | + continue; | |
| 1339 | + } | |
| 1340 | + } | |
| 1341 | +#endif | |
| 1342 | + do | |
| 1343 | + { | |
| 1344 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1345 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1346 | + pOut_buf_cur[2] = pSrc[2]; | |
| 1347 | + pOut_buf_cur += 3; pSrc += 3; | |
| 1348 | + } while ((int)(counter -= 3) > 2); | |
| 1349 | + if ((int)counter > 0) | |
| 1350 | + { | |
| 1351 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1352 | + if ((int)counter > 1) | |
| 1353 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1354 | + pOut_buf_cur += counter; | |
| 1355 | + } | |
| 1356 | + } | |
| 1357 | + } | |
| 1358 | + } while (!(r->m_final & 1)); | |
| 1359 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1360 | + { | |
| 1361 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 1362 | + } | |
| 1363 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 1364 | + TINFL_CR_FINISH | |
| 1365 | + | |
| 1366 | +common_exit: | |
| 1367 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 1368 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 1369 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 1370 | + { | |
| 1371 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 1372 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 1373 | + while (buf_len) | |
| 1374 | + { | |
| 1375 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 1376 | + { | |
| 1377 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 1378 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 1379 | + } | |
| 1380 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 1381 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 1382 | + } | |
| 1383 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 1384 | + } | |
| 1385 | + return status; | |
| 1386 | +} | |
| 1387 | + | |
| 1388 | +// Higher level helper functions. | |
| 1389 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 1390 | +{ | |
| 1391 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 1392 | + *pOut_len = 0; | |
| 1393 | + tinfl_init(&decomp); | |
| 1394 | + for ( ; ; ) | |
| 1395 | + { | |
| 1396 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 1397 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 1398 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1399 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 1400 | + { | |
| 1401 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1402 | + } | |
| 1403 | + src_buf_ofs += src_buf_size; | |
| 1404 | + *pOut_len += dst_buf_size; | |
| 1405 | + if (status == TINFL_STATUS_DONE) break; | |
| 1406 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 1407 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 1408 | + if (!pNew_buf) | |
| 1409 | + { | |
| 1410 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1411 | + } | |
| 1412 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 1413 | + } | |
| 1414 | + return pBuf; | |
| 1415 | +} | |
| 1416 | + | |
| 1417 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 1418 | +{ | |
| 1419 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 1420 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1421 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 1422 | +} | |
| 1423 | + | |
| 1424 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 1425 | +{ | |
| 1426 | + int result = 0; | |
| 1427 | + tinfl_decompressor decomp; | |
| 1428 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 1429 | + if (!pDict) | |
| 1430 | + return TINFL_STATUS_FAILED; | |
| 1431 | + tinfl_init(&decomp); | |
| 1432 | + for ( ; ; ) | |
| 1433 | + { | |
| 1434 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 1435 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 1436 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 1437 | + in_buf_ofs += in_buf_size; | |
| 1438 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 1439 | + break; | |
| 1440 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 1441 | + { | |
| 1442 | + result = (status == TINFL_STATUS_DONE); | |
| 1443 | + break; | |
| 1444 | + } | |
| 1445 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 1446 | + } | |
| 1447 | + MZ_FREE(pDict); | |
| 1448 | + *pIn_buf_size = in_buf_ofs; | |
| 1449 | + return result; | |
| 1450 | +} | |
| 1451 | + | |
| 1452 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 1453 | + | |
| 1454 | +// Purposely making these tables static for faster init and thread safety. | |
| 1455 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 1456 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 1457 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 1458 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 1459 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 1460 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 1461 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 1462 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 1463 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 1464 | + | |
| 1465 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 1466 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 1467 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 1468 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 1469 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 1470 | + | |
| 1471 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 1472 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 1473 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 1474 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1475 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1476 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 1477 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1478 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1479 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1480 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1481 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1482 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1483 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 1484 | + | |
| 1485 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 1486 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 1487 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1488 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1489 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1490 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1491 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1492 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1493 | + 7,7,7,7,7,7,7,7 }; | |
| 1494 | + | |
| 1495 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 1496 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 1497 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 1498 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 1499 | + | |
| 1500 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 1501 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 1502 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 1503 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 1504 | + | |
| 1505 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 1506 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 1507 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 1508 | +{ | |
| 1509 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 1510 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 1511 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 1512 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 1513 | + { | |
| 1514 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 1515 | + mz_uint offsets[256], cur_ofs = 0; | |
| 1516 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 1517 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 1518 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 1519 | + } | |
| 1520 | + return pCur_syms; | |
| 1521 | +} | |
| 1522 | + | |
| 1523 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 1524 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 1525 | +{ | |
| 1526 | + int root, leaf, next, avbl, used, dpth; | |
| 1527 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 1528 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 1529 | + for (next=1; next < n-1; next++) | |
| 1530 | + { | |
| 1531 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 1532 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 1533 | + } | |
| 1534 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 1535 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 1536 | + while (avbl>0) | |
| 1537 | + { | |
| 1538 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 1539 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 1540 | + avbl = 2*used; dpth++; used = 0; | |
| 1541 | + } | |
| 1542 | +} | |
| 1543 | + | |
| 1544 | +// Limits canonical Huffman code table's max code size. | |
| 1545 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 1546 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 1547 | +{ | |
| 1548 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 1549 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 1550 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 1551 | + while (total != (1UL << max_code_size)) | |
| 1552 | + { | |
| 1553 | + pNum_codes[max_code_size]--; | |
| 1554 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 1555 | + total--; | |
| 1556 | + } | |
| 1557 | +} | |
| 1558 | + | |
| 1559 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 1560 | +{ | |
| 1561 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 1562 | + if (static_table) | |
| 1563 | + { | |
| 1564 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 1565 | + } | |
| 1566 | + else | |
| 1567 | + { | |
| 1568 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 1569 | + int num_used_syms = 0; | |
| 1570 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 1571 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 1572 | + | |
| 1573 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 1574 | + | |
| 1575 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 1576 | + | |
| 1577 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 1578 | + | |
| 1579 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 1580 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 1581 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 1582 | + } | |
| 1583 | + | |
| 1584 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 1585 | + | |
| 1586 | + for (i = 0; i < table_len; i++) | |
| 1587 | + { | |
| 1588 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 1589 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 1590 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 1591 | + } | |
| 1592 | +} | |
| 1593 | + | |
| 1594 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 1595 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 1596 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 1597 | + while (d->m_bits_in >= 8) { \ | |
| 1598 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 1599 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 1600 | + d->m_bit_buffer >>= 8; \ | |
| 1601 | + d->m_bits_in -= 8; \ | |
| 1602 | + } \ | |
| 1603 | +} MZ_MACRO_END | |
| 1604 | + | |
| 1605 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 1606 | + if (rle_repeat_count < 3) { \ | |
| 1607 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 1608 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 1609 | + } else { \ | |
| 1610 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 1611 | +} rle_repeat_count = 0; } } | |
| 1612 | + | |
| 1613 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 1614 | + if (rle_z_count < 3) { \ | |
| 1615 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 1616 | + } else if (rle_z_count <= 10) { \ | |
| 1617 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 1618 | + } else { \ | |
| 1619 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 1620 | +} rle_z_count = 0; } } | |
| 1621 | + | |
| 1622 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 1623 | + | |
| 1624 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 1625 | +{ | |
| 1626 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; | |
| 1627 | + mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; | |
| 1628 | + | |
| 1629 | + d->m_huff_count[0][256] = 1; | |
| 1630 | + | |
| 1631 | + tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); | |
| 1632 | + tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); | |
| 1633 | + | |
| 1634 | + for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; | |
| 1635 | + for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; | |
| 1636 | + | |
| 1637 | + memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); | |
| 1638 | + memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); | |
| 1639 | + total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; | |
| 1640 | + | |
| 1641 | + memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1642 | + for (i = 0; i < total_code_sizes_to_pack; i++) | |
| 1643 | + { | |
| 1644 | + mz_uint8 code_size = code_sizes_to_pack[i]; | |
| 1645 | + if (!code_size) | |
| 1646 | + { | |
| 1647 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1648 | + if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1649 | + } | |
| 1650 | + else | |
| 1651 | + { | |
| 1652 | + TDEFL_RLE_ZERO_CODE_SIZE(); | |
| 1653 | + if (code_size != prev_code_size) | |
| 1654 | + { | |
| 1655 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1656 | + d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; | |
| 1657 | + } | |
| 1658 | + else if (++rle_repeat_count == 6) | |
| 1659 | + { | |
| 1660 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1661 | + } | |
| 1662 | + } | |
| 1663 | + prev_code_size = code_size; | |
| 1664 | + } | |
| 1665 | + if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1666 | + | |
| 1667 | + tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); | |
| 1668 | + | |
| 1669 | + TDEFL_PUT_BITS(2, 2); | |
| 1670 | + | |
| 1671 | + TDEFL_PUT_BITS(num_lit_codes - 257, 5); | |
| 1672 | + TDEFL_PUT_BITS(num_dist_codes - 1, 5); | |
| 1673 | + | |
| 1674 | + for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; | |
| 1675 | + num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); | |
| 1676 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 1677 | + | |
| 1678 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 1679 | + { | |
| 1680 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1681 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 1682 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 1683 | + } | |
| 1684 | +} | |
| 1685 | + | |
| 1686 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 1687 | +{ | |
| 1688 | + mz_uint i; | |
| 1689 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 1690 | + | |
| 1691 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 1692 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 1693 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 1694 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 1695 | + | |
| 1696 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 1697 | + | |
| 1698 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 1699 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 1700 | + | |
| 1701 | + TDEFL_PUT_BITS(1, 2); | |
| 1702 | +} | |
| 1703 | + | |
| 1704 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 1705 | + | |
| 1706 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1707 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1708 | +{ | |
| 1709 | + mz_uint flags; | |
| 1710 | + mz_uint8 *pLZ_codes; | |
| 1711 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 1712 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 1713 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 1714 | + mz_uint bits_in = d->m_bits_in; | |
| 1715 | + | |
| 1716 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 1717 | + | |
| 1718 | + flags = 1; | |
| 1719 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 1720 | + { | |
| 1721 | + if (flags == 1) | |
| 1722 | + flags = *pLZ_codes++ | 0x100; | |
| 1723 | + | |
| 1724 | + if (flags & 1) | |
| 1725 | + { | |
| 1726 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 1727 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 1728 | + | |
| 1729 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1730 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1731 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1732 | + | |
| 1733 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 1734 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 1735 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 1736 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 1737 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1738 | + sym = (match_dist < 512) ? s0 : s1; | |
| 1739 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 1740 | + | |
| 1741 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1742 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1743 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1744 | + } | |
| 1745 | + else | |
| 1746 | + { | |
| 1747 | + mz_uint lit = *pLZ_codes++; | |
| 1748 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1749 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1750 | + | |
| 1751 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1752 | + { | |
| 1753 | + flags >>= 1; | |
| 1754 | + lit = *pLZ_codes++; | |
| 1755 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1757 | + | |
| 1758 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1759 | + { | |
| 1760 | + flags >>= 1; | |
| 1761 | + lit = *pLZ_codes++; | |
| 1762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1764 | + } | |
| 1765 | + } | |
| 1766 | + } | |
| 1767 | + | |
| 1768 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 1769 | + return MZ_FALSE; | |
| 1770 | + | |
| 1771 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 1772 | + pOutput_buf += (bits_in >> 3); | |
| 1773 | + bit_buffer >>= (bits_in & ~7); | |
| 1774 | + bits_in &= 7; | |
| 1775 | + } | |
| 1776 | + | |
| 1777 | +#undef TDEFL_PUT_BITS_FAST | |
| 1778 | + | |
| 1779 | + d->m_pOutput_buf = pOutput_buf; | |
| 1780 | + d->m_bits_in = 0; | |
| 1781 | + d->m_bit_buffer = 0; | |
| 1782 | + | |
| 1783 | + while (bits_in) | |
| 1784 | + { | |
| 1785 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 1786 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 1787 | + bit_buffer >>= n; | |
| 1788 | + bits_in -= n; | |
| 1789 | + } | |
| 1790 | + | |
| 1791 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1792 | + | |
| 1793 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1794 | +} | |
| 1795 | +#else | |
| 1796 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1797 | +{ | |
| 1798 | + mz_uint flags; | |
| 1799 | + mz_uint8 *pLZ_codes; | |
| 1800 | + | |
| 1801 | + flags = 1; | |
| 1802 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 1803 | + { | |
| 1804 | + if (flags == 1) | |
| 1805 | + flags = *pLZ_codes++ | 0x100; | |
| 1806 | + if (flags & 1) | |
| 1807 | + { | |
| 1808 | + mz_uint sym, num_extra_bits; | |
| 1809 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 1810 | + | |
| 1811 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1812 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1813 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1814 | + | |
| 1815 | + if (match_dist < 512) | |
| 1816 | + { | |
| 1817 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 1818 | + } | |
| 1819 | + else | |
| 1820 | + { | |
| 1821 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1822 | + } | |
| 1823 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1824 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1825 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1826 | + } | |
| 1827 | + else | |
| 1828 | + { | |
| 1829 | + mz_uint lit = *pLZ_codes++; | |
| 1830 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1831 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1832 | + } | |
| 1833 | + } | |
| 1834 | + | |
| 1835 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1836 | + | |
| 1837 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1838 | +} | |
| 1839 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1840 | + | |
| 1841 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 1842 | +{ | |
| 1843 | + if (static_block) | |
| 1844 | + tdefl_start_static_block(d); | |
| 1845 | + else | |
| 1846 | + tdefl_start_dynamic_block(d); | |
| 1847 | + return tdefl_compress_lz_codes(d); | |
| 1848 | +} | |
| 1849 | + | |
| 1850 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 1851 | +{ | |
| 1852 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 1853 | + mz_uint8 *pSaved_output_buf; | |
| 1854 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 1855 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 1856 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 1857 | + | |
| 1858 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 1859 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 1860 | + | |
| 1861 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 1862 | + d->m_output_flush_ofs = 0; | |
| 1863 | + d->m_output_flush_remaining = 0; | |
| 1864 | + | |
| 1865 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 1866 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 1867 | + | |
| 1868 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 1869 | + { | |
| 1870 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 1871 | + } | |
| 1872 | + | |
| 1873 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 1874 | + | |
| 1875 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 1876 | + | |
| 1877 | + if (!use_raw_block) | |
| 1878 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 1879 | + | |
| 1880 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 1881 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 1882 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 1883 | + { | |
| 1884 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 1885 | + TDEFL_PUT_BITS(0, 2); | |
| 1886 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 1887 | + See "unlicense" statement at the end of this file. | |
| 1888 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 1889 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 1890 | + | |
| 1891 | + Most API's defined in miniz.c are optionaljority of prev. users so I'm | |
| 1892 | + op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1893 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1894 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1895 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1896 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1897 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1898 | + | |
| 1899 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1900 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1901 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1902 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1903 | + | |
| 1904 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1905 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1906 | + | |
| 1907 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1908 | + TINFL_CR_BEGIN | |
| 1909 | + | |
| 1910 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1911 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1912 | + { | |
| 1913 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1914 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1915 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1916 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1917 | + } | |
| 1918 | + | |
| 1919 | + do | |
| 1920 | + { | |
| 1921 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1922 | + if (r->m_type == 0) | |
| 1923 | + { | |
| 1924 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1925 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1926 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1927 | + while ((counter) && (num_bits)) | |
| 1928 | + { | |
| 1929 | + TINFL_GET_BITS(51, dist, 8); | |
| 1930 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1931 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1932 | + counter--; | |
| 1933 | + } | |
| 1934 | + while (counter) | |
| 1935 | + { | |
| 1936 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1937 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1938 | + { | |
| 1939 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1940 | + { | |
| 1941 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1942 | + } | |
| 1943 | + else | |
| 1944 | + { | |
| 1945 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1946 | + } | |
| 1947 | + } | |
| 1948 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1949 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1950 | + } | |
| 1951 | + } | |
| 1952 | + else if (r->m_type == 3) | |
| 1953 | + { | |
| 1954 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1955 | + } | |
| 1956 | + else | |
| 1957 | + { | |
| 1958 | + if (r->m_type == 1) | |
| 1959 | + { | |
| 1960 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1961 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1962 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1963 | + } | |
| 1964 | + else | |
| 1965 | + { | |
| 1966 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1967 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1968 | + r->m_table_sizes[2] = 19; | |
| 1969 | + } | |
| 1970 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1971 | + { | |
| 1972 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1973 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1974 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1975 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1976 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1977 | + if ((65536 != total) && (used_syms > 1)) | |
| 1978 | + { | |
| 1979 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1980 | + } | |
| 1981 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1982 | + { | |
| 1983 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1984 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1985 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1986 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1987 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1988 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1989 | + { | |
| 1990 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1991 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1992 | + } | |
| 1993 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1994 | + } | |
| 1995 | + if (r->m_type == 2) | |
| 1996 | + { | |
| 1997 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1998 | + { | |
| 1999 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 2000 | + if ((dist == 16) && (!counter)) | |
| 2001 | + { | |
| 2002 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 2003 | + } | |
| 2004 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 2005 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 2006 | + } | |
| 2007 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 2008 | + { | |
| 2009 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 2010 | + } | |
| 2011 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 2012 | + } | |
| 2013 | + } | |
| 2014 | + for ( ; ; ) | |
| 2015 | + { | |
| 2016 | + mz_uint8 *pSrc; | |
| 2017 | + for ( ; ; ) | |
| 2018 | + { | |
| 2019 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 2020 | + { | |
| 2021 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 2022 | + if (counter >= 256) | |
| 2023 | + break; | |
| 2024 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2025 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 2026 | + } | |
| 2027 | + else | |
| 2028 | + { | |
| 2029 | + int sym2; mz_uint code_len; | |
| 2030 | +#if TINFL_USE_64BIT_BITBUF | |
| 2031 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 2032 | +#else | |
| 2033 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2034 | +#endif | |
| 2035 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2036 | + code_len = sym2 >> 9; | |
| 2037 | + else | |
| 2038 | + { | |
| 2039 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2040 | + } | |
| 2041 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 2042 | + if (counter & 256) | |
| 2043 | + break; | |
| 2044 | + | |
| 2045 | +#if !TINFL_USE_64BIT_BITBUF | |
| 2046 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2047 | +#endif | |
| 2048 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2049 | + code_len = sym2 >> 9; | |
| 2050 | + else | |
| 2051 | + { | |
| 2052 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2053 | + } | |
| 2054 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 2055 | + | |
| 2056 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 2057 | + if (sym2 & 256) | |
| 2058 | + { | |
| 2059 | + pOut_buf_cur++; | |
| 2060 | + counter = sym2; | |
| 2061 | + break; | |
| 2062 | + } | |
| 2063 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 2064 | + pOut_buf_cur += 2; | |
| 2065 | + } | |
| 2066 | + } | |
| 2067 | + if ((counter &= 511) == 256) break; | |
| 2068 | + | |
| 2069 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 2070 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 2071 | + | |
| 2072 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 2073 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 2074 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 2075 | + | |
| 2076 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 2077 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 2078 | + { | |
| 2079 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 2080 | + } | |
| 2081 | + | |
| 2082 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 2083 | + | |
| 2084 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 2085 | + { | |
| 2086 | + while (counter--) | |
| 2087 | + { | |
| 2088 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2089 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 2090 | + } | |
| 2091 | + continue; | |
| 2092 | + } | |
| 2093 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 2094 | + else if ((counter >= 9) && (counter <= dist)) | |
| 2095 | + { | |
| 2096 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 2097 | + do | |
| 2098 | + { | |
| 2099 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 2100 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 2101 | + pOut_buf_cur += 8; | |
| 2102 | + } while ((pSrc += 8) < pSrc_end); | |
| 2103 | + if ((counter &= 7) < 3) | |
| 2104 | + { | |
| 2105 | + if (counter) | |
| 2106 | + { | |
| 2107 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2108 | + if (counter > 1) | |
| 2109 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2110 | + pOut_buf_cur += counter; | |
| 2111 | + } | |
| 2112 | + continue; | |
| 2113 | + } | |
| 2114 | + } | |
| 2115 | +#endif | |
| 2116 | + do | |
| 2117 | + { | |
| 2118 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2119 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2120 | + pOut_buf_cur[2] = pSrc[2]; | |
| 2121 | + pOut_buf_cur += 3; pSrc += 3; | |
| 2122 | + } while ((int)(counter -= 3) > 2); | |
| 2123 | + if ((int)counter > 0) | |
| 2124 | + { | |
| 2125 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2126 | + if ((int)counter > 1) | |
| 2127 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2128 | + pOut_buf_cur += counter; | |
| 2129 | + } | |
| 2130 | + } | |
| 2131 | + } | |
| 2132 | + } while (!(r->m_final & 1)); | |
| 2133 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 2134 | + { | |
| 2135 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 2136 | + } | |
| 2137 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 2138 | + TINFL_CR_FINISH | |
| 2139 | + | |
| 2140 | +common_exit: | |
| 2141 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 2142 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 2143 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 2144 | + { | |
| 2145 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 2146 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 2147 | + while (buf_len) | |
| 2148 | + { | |
| 2149 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 2150 | + { | |
| 2151 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 2152 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 2153 | + } | |
| 2154 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 2155 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 2156 | + } | |
| 2157 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 2158 | + } | |
| 2159 | + return status; | |
| 2160 | +} | |
| 2161 | + | |
| 2162 | +// Higher level helper functions. | |
| 2163 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 2164 | +{ | |
| 2165 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 2166 | + *pOut_len = 0; | |
| 2167 | + tinfl_init(&decomp); | |
| 2168 | + for ( ; ; ) | |
| 2169 | + { | |
| 2170 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 2171 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 2172 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2173 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 2174 | + { | |
| 2175 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2176 | + } | |
| 2177 | + src_buf_ofs += src_buf_size; | |
| 2178 | + *pOut_len += dst_buf_size; | |
| 2179 | + if (status == TINFL_STATUS_DONE) break; | |
| 2180 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 2181 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 2182 | + if (!pNew_buf) | |
| 2183 | + { | |
| 2184 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2185 | + } | |
| 2186 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 2187 | + } | |
| 2188 | + return pBuf; | |
| 2189 | +} | |
| 2190 | + | |
| 2191 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 2192 | +{ | |
| 2193 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 2194 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2195 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 2196 | +} | |
| 2197 | + | |
| 2198 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 2199 | +{ | |
| 2200 | + int result = 0; | |
| 2201 | + tinfl_decompressor decomp; | |
| 2202 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 2203 | + if (!pDict) | |
| 2204 | + return TINFL_STATUS_FAILED; | |
| 2205 | + tinfl_init(&decomp); | |
| 2206 | + for ( ; ; ) | |
| 2207 | + { | |
| 2208 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 2209 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 2210 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 2211 | + in_buf_ofs += in_buf_size; | |
| 2212 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 2213 | + break; | |
| 2214 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 2215 | + { | |
| 2216 | + result = (status == TINFL_STATUS_DONE); | |
| 2217 | + break; | |
| 2218 | + } | |
| 2219 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 2220 | + } | |
| 2221 | + MZ_FREE(pDict); | |
| 2222 | + *pIn_buf_size = in_buf_ofs; | |
| 2223 | + return result; | |
| 2224 | +} | |
| 2225 | + | |
| 2226 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 2227 | + | |
| 2228 | +// Purposely making these tables static for faster init and thread safety. | |
| 2229 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 2230 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 2231 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 2232 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 2233 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 2234 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 2235 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 2236 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 2237 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 2238 | + | |
| 2239 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 2240 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 2241 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 2242 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 2243 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 2244 | + | |
| 2245 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 2246 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 2247 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 2248 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2249 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2250 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 2251 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| 1 | /* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 2 | See "unlicense" statement at the end of this file. |
| 3 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 4 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 5 | |
| 6 | Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define |
| 7 | MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). |
| 8 | |
| 9 | * Change History |
| 10 | 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. |
| 11 | void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); |
| 12 | void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); |
| 13 | |
| 14 | // Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. |
| 15 | typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); |
| 16 | |
| 17 | // tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; |
| 18 | |
| 19 | if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; |
| 20 | pState->m_has_flushed |= (flush == MZ_FINISH); |
| 21 | |
| 22 | if ((flush == MZ_FINISH) && (first_call)) |
| 23 | { |
| 24 | // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. |
| 25 | decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; |
| 26 | in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; |
| 27 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); |
| 28 | pState->m_last_status = status; |
| 29 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; |
| 30 | pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 31 | pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; |
| 32 | |
| 33 | if (status < 0) |
| 34 | return MZ_DATA_ERROR; |
| 35 | else if (status != TINFL_STATUS_DONE) |
| 36 | { |
| 37 | pState->m_last_status = TINFL_STATUS_FAILED; |
| 38 | return MZ_BUF_ERROR; |
| 39 | } |
| 40 | return MZ_STREAM_END; |
| 41 | } |
| 42 | // flush != MZ_FINISH then we must assume there's more input. |
| 43 | if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; |
| 44 | |
| 45 | if (pState->m_dict_avail) |
| 46 | { |
| 47 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 48 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 49 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 50 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 51 | return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 52 | } |
| 53 | |
| 54 | for ( ; ; ) |
| 55 | { |
| 56 | in_bytes = pStream->avail_in; |
| 57 | out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; |
| 58 | |
| 59 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); |
| 60 | pState->m_last_status = status; |
| 61 | |
| 62 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; |
| 63 | pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 64 | |
| 65 | pState->m_dict_avail = (mz_uint)out_bytes; |
| 66 | |
| 67 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 68 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 69 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 70 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 71 | |
| 72 | if (status < 0) |
| 73 | return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). |
| 74 | else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) |
| 75 | return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. |
| 76 | else if (flush == MZ_FINISH) |
| 77 | { |
| 78 | // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. |
| 79 | if (status == TINFL_STATUS_DONE) |
| 80 | return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; |
| 81 | // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. |
| 82 | else if (!pStream->avail_out) |
| 83 | return MZ_BUF_ERROR; |
| 84 | } |
| 85 | else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) |
| 86 | break; |
| 87 | } |
| 88 | |
| 89 | return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 90 | } |
| 91 | |
| 92 | int mz_inflateEnd(mz_streamp pStream) |
| 93 | { |
| 94 | if (!pStream) |
| 95 | return MZ_STREAM_ERROR; |
| 96 | if (pStream->state) |
| 97 | { |
| 98 | pStream->zfree(pStream->opaque, pStream->state); |
| 99 | pStream->state = NULL; |
| 100 | } |
| 101 | return MZ_OK; |
| 102 | } |
| 103 | |
| 104 | int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) |
| 105 | { |
| 106 | mz_stream stream; |
| 107 | int status; |
| 108 | memset(&stream, 0, sizeof(stream)); |
| 109 | |
| 110 | // In case mz_ulong is 64-bits (argh I hate longs). |
| 111 | if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; |
| 112 | |
| 113 | stream.next_in = pSource; |
| 114 | stream.avail_in = (mz_uint32)source_len; |
| 115 | stream.next_out = pDest; |
| 116 | stream.avail_out = (mz_uint32)*pDest_len; |
| 117 | |
| 118 | status = mz_inflateInit(&stream); |
| 119 | if (status != MZ_OK) |
| 120 | return status; |
| 121 | |
| 122 | status = mz_inflate(&stream, MZ_FINISH); |
| 123 | if (status != MZ_STREAM_END) |
| 124 | { |
| 125 | mz_inflateEnd(&stream); |
| 126 | return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; |
| 127 | } |
| 128 | *pDest_len = stream.total_out; |
| 129 | |
| 130 | return mz_inflateEnd(&stream); |
| 131 | } |
| 132 | |
| 133 | const char *mz_error(int err) |
| 134 | { |
| 135 | static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = |
| 136 | { |
| 137 | { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, |
| 138 | { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } |
| 139 | }; |
| 140 | mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; |
| 141 | return NULL; |
| 142 | } |
| 143 | |
| 144 | #endif //MINIZ_NO_ZLIB_APIS |
| 145 | |
| 146 | // ------------------- Low-level Decompression (completely independent from all compression API's) |
| 147 | |
| 148 | #define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) |
| 149 | #define TINFL_MEMSET(p, c, l) memset(p, c, l) |
| 150 | |
| 151 | #define TINFL_CR_BEGIN switch(r->m_state) { case 0: |
| 152 | #define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END |
| 153 | #define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END |
| 154 | #define TINFL_CR_FINISH } |
| 155 | |
| 156 | // TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never |
| 157 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. |
| 158 | #define TINFL_GET_BYTE(state_index, c) do { \ |
| 159 | if (pIn_buf_cur >= pIn_buf_end) { \ |
| 160 | for ( ; ; ) { \ |
| 161 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ |
| 162 | TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ |
| 163 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 164 | c = *pIn_buf_cur++; \ |
| 165 | break; \ |
| 166 | } \ |
| 167 | } else { \ |
| 168 | c = 0; \ |
| 169 | break; \ |
| 170 | } \ |
| 171 | } \ |
| 172 | } else c = *pIn_buf_cur++; } MZ_MACRO_END |
| 173 | |
| 174 | #define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) |
| 175 | #define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 176 | #define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 177 | |
| 178 | // TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. |
| 179 | // It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a |
| 180 | // Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the |
| 181 | // bit buffer contains >=15 bits (deflate's max. Huffman code size). |
| 182 | #define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ |
| 183 | do { \ |
| 184 | temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ |
| 185 | if (temp >= 0) { \ |
| 186 | code_len = temp >> 9; \ |
| 187 | if ((code_len) && (num_bits >= code_len)) \ |
| 188 | break; \ |
| 189 | } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ |
| 190 | code_len = TINFL_FAST_LOOKUP_BITS; \ |
| 191 | do { \ |
| 192 | temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ |
| 193 | } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ |
| 194 | } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ |
| 195 | } while (num_bits < 15); |
| 196 | |
| 197 | // TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read |
| 198 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 199 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 200 | // The slow path is only executed at the very end of the input buffer. |
| 201 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 202 | int temp; mz_uint code_len, c; \ |
| 203 | if (num_bits < 15) { \ |
| 204 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 205 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 206 | } else { \ |
| 207 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 208 | } \ |
| 209 | } \ |
| 210 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 211 | code_len = temp >> 9, temp &= 511; \ |
| 212 | else { \ |
| 213 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 214 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 215 | |
| 216 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 217 | { |
| 218 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 219 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 220 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 221 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 222 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 223 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 224 | |
| 225 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 226 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 227 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 228 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 229 | |
| 230 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 231 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 232 | |
| 233 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 234 | TINFL_CR_BEGIN |
| 235 | |
| 236 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 237 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 238 | { |
| 239 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 240 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 241 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 242 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 243 | } |
| 244 | |
| 245 | do |
| 246 | { |
| 247 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 248 | if (r->m_type == 0) |
| 249 | { |
| 250 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 251 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 252 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 253 | while ((counter) && (num_bits)) |
| 254 | { |
| 255 | TINFL_GET_BITS(51, dist, 8); |
| 256 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 257 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 258 | counter--; |
| 259 | } |
| 260 | while (counter) |
| 261 | { |
| 262 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 263 | while (pIn_buf_cur >= pIn_buf_end) |
| 264 | { |
| 265 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 266 | { |
| 267 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 268 | } |
| 269 | else |
| 270 | { |
| 271 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 272 | } |
| 273 | } |
| 274 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 275 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 276 | } |
| 277 | } |
| 278 | else if (r->m_type == 3) |
| 279 | { |
| 280 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | if (r->m_type == 1) |
| 285 | { |
| 286 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 287 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 288 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 289 | } |
| 290 | else |
| 291 | { |
| 292 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 293 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 294 | r->m_table_sizes[2] = 19; |
| 295 | } |
| 296 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 297 | { |
| 298 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 299 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 300 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 301 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 302 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 303 | if ((65536 != total) && (used_syms > 1)) |
| 304 | { |
| 305 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 306 | } |
| 307 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 308 | { |
| 309 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 310 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 311 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 312 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 313 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 314 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 315 | { |
| 316 | tree_cur -= ((rev_code >>= 1) & 1); |
| 317 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 318 | } |
| 319 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 320 | } |
| 321 | if (r->m_type == 2) |
| 322 | { |
| 323 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 324 | { |
| 325 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 326 | if ((dist == 16) && (!counter)) |
| 327 | { |
| 328 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 329 | } |
| 330 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 331 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 332 | } |
| 333 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 334 | { |
| 335 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 336 | } |
| 337 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 338 | } |
| 339 | } |
| 340 | for ( ; ; ) |
| 341 | { |
| 342 | mz_uint8 *pSrc; |
| 343 | for ( ; ; ) |
| 344 | { |
| 345 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 346 | { |
| 347 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 348 | if (counter >= 256) |
| 349 | break; |
| 350 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 351 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 352 | } |
| 353 | else |
| 354 | { |
| 355 | int sym2; mz_uint code_len; |
| 356 | #if TINFL_USE_64BIT_BITBUF |
| 357 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 358 | #else |
| 359 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 360 | #endif |
| 361 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 362 | code_len = sym2 >> 9; |
| 363 | else |
| 364 | { |
| 365 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 366 | } |
| 367 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 368 | if (counter & 256) |
| 369 | break; |
| 370 | |
| 371 | #if !TINFL_USE_64BIT_BITBUF |
| 372 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 373 | #endif |
| 374 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 375 | code_len = sym2 >> 9; |
| 376 | else |
| 377 | { |
| 378 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 379 | } |
| 380 | bit_buf >>= code_len; num_bits -= code_len; |
| 381 | |
| 382 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 383 | if (sym2 & 256) |
| 384 | { |
| 385 | pOut_buf_cur++; |
| 386 | counter = sym2; |
| 387 | break; |
| 388 | } |
| 389 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 390 | pOut_buf_cur += 2; |
| 391 | } |
| 392 | } |
| 393 | if ((counter &= 511) == 256) break; |
| 394 | |
| 395 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 396 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 397 | |
| 398 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 399 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 400 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 401 | |
| 402 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 403 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 404 | { |
| 405 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 406 | } |
| 407 | |
| 408 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 409 | |
| 410 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 411 | { |
| 412 | while (counter--) |
| 413 | { |
| 414 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 415 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 416 | } |
| 417 | continue; |
| 418 | } |
| 419 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 420 | else if ((counter >= 9) && (counter <= dist)) |
| 421 | { |
| 422 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 423 | do |
| 424 | { |
| 425 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 426 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 427 | pOut_buf_cur += 8; |
| 428 | } while ((pSrc += 8) < pSrc_end); |
| 429 | if ((counter &= 7) < 3) |
| 430 | { |
| 431 | if (counter) |
| 432 | { |
| 433 | pOut_buf_cur[0] = pSrc[0]; |
| 434 | if (counter > 1) |
| 435 | pOut_buf_cur[1] = pSrc[1]; |
| 436 | pOut_buf_cur += counter; |
| 437 | } |
| 438 | continue; |
| 439 | } |
| 440 | } |
| 441 | #endif |
| 442 | do |
| 443 | { |
| 444 | pOut_buf_cur[0] = pSrc[0]; |
| 445 | pOut_buf_cur[1] = pSrc[1]; |
| 446 | pOut_buf_cur[2] = pSrc[2]; |
| 447 | pOut_buf_cur += 3; pSrc += 3; |
| 448 | } while ((int)(counter -= 3) > 2); |
| 449 | if ((int)counter > 0) |
| 450 | { |
| 451 | pOut_buf_cur[0] = pSrc[0]; |
| 452 | if ((int)counter > 1) |
| 453 | pOut_buf_cur[1] = pSrc[1]; |
| 454 | pOut_buf_cur += counter; |
| 455 | } |
| 456 | } |
| 457 | } |
| 458 | } while (!(r->m_final & 1)); |
| 459 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 460 | { |
| 461 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 462 | } |
| 463 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 464 | TINFL_CR_FINISH |
| 465 | |
| 466 | common_exit: |
| 467 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 468 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 469 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 470 | { |
| 471 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 472 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 473 | while (buf_len) |
| 474 | { |
| 475 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 476 | { |
| 477 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 478 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 479 | } |
| 480 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 481 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 482 | } |
| 483 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 484 | } |
| 485 | return status; |
| 486 | } |
| 487 | |
| 488 | // Higher level helper functions. |
| 489 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 490 | { |
| 491 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 492 | *pOut_len = 0; |
| 493 | tinfl_init(&decomp); |
| 494 | for ( ; ; ) |
| 495 | { |
| 496 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 497 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 498 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 499 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 500 | { |
| 501 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 502 | } |
| 503 | src_buf_ofs += src_buf_size; |
| 504 | *pOut_len += dst_buf_size; |
| 505 | if (status == TINFL_STATUS_DONE) break; |
| 506 | new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, |
| 507 | 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 508 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 509 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 510 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 511 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 512 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 513 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 514 | |
| 515 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 516 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 517 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 518 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 519 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 520 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 521 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 522 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 523 | 7,7,7,7,7,7,7,7 }; |
| 524 | |
| 525 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 526 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 527 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 528 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 529 | |
| 530 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 531 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 532 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 533 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 534 | |
| 535 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 536 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 537 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 538 | { |
| 539 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 540 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 541 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 542 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 543 | { |
| 544 | const mz_uint32* pHist = &hist[pass << 8]; |
| 545 | mz_uint offsets[256], cur_ofs = 0; |
| 546 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 547 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 548 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 549 | } |
| 550 | return pCur_syms; |
| 551 | } |
| 552 | |
| 553 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 554 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 555 | { |
| 556 | int root, leaf, next, avbl, used, dpth; |
| 557 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 558 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 559 | for (next=1; next < n-1; next++) |
| 560 | { |
| 561 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 562 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 563 | } |
| 564 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 565 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 566 | while (avbl>0) |
| 567 | { |
| 568 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 569 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 570 | avbl = 2*used; dpth++; used = 0; |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | // Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 575 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 576 | { |
| 577 | const mz_uint32* pHist = &hist[pass << 8]; |
| 578 | mz_uint offsets[256], cur_ofs = 0; |
| 579 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 580 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 581 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 582 | } |
| 583 | return pCur_syms; |
| 584 | } |
| 585 | |
| 586 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 587 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 588 | { |
| 589 | int root, leaf, next, avbl, used, dpth; |
| 590 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 591 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 592 | for (next=1; next < n-1; next++) |
| 593 | { |
| 594 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 595 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 596 | } |
| 597 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 598 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 599 | while (avbl>0) |
| 600 | { |
| 601 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 602 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 603 | avbl = 2*used; dpth++; used = 0; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | // Limits canonical Huffman code table's max code size. |
| 608 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 609 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 610 | { |
| 611 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 612 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 613 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 614 | while (total != (1UL << max_code_size)) |
| 615 | { |
| 616 | pNum_codes[max_code_size]--; |
| 617 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 618 | total--; |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 623 | { |
| 624 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 625 | if (static_table) |
| 626 | { |
| 627 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 628 | } |
| 629 | else |
| 630 | { |
| 631 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 632 | int num_used_syms = 0; |
| 633 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 634 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 635 | |
| 636 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 637 | |
| 638 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 639 | |
| 640 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 641 | |
| 642 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 643 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 644 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 645 | } |
| 646 | |
| 647 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 648 | |
| 649 | for (i = 0; i < table_len; i++) |
| 650 | { |
| 651 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 652 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 653 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 658 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 659 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 660 | while (d->m_bits_in >= 8) { \ |
| 661 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 662 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 663 | d->m_bit_buffer >>= 8; \ |
| 664 | d->m_bits_in -= 8; \ |
| 665 | } \ |
| 666 | } MZ_MACRO_END |
| 667 | |
| 668 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 669 | if (rle_repeat_count < 3) { \ |
| 670 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 671 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 672 | } else { \ |
| 673 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 674 | } rle_repeat_count = 0; } } |
| 675 | |
| 676 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 677 | if (rle_z_count < 3) { \ |
| 678 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 679 | } else if (rle_z_count <= 10) { \ |
| 680 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 681 | } else { \ |
| 682 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 683 | } rle_z_count = 0; } } |
| 684 | |
| 685 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 686 | |
| 687 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 688 | { |
| 689 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); |
| 690 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 691 | |
| 692 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 693 | { |
| 694 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 695 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 696 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 701 | { |
| 702 | mz_uint i; |
| 703 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 704 | |
| 705 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 706 | for ( ; i <= 255; ++i) *p++ = 9; |
| 707 | for ( ; i <= 279; ++i) *p++ = 7; |
| 708 | for ( ; i <= 287; ++i) *p++ = 8; |
| 709 | |
| 710 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 711 | |
| 712 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 713 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 714 | |
| 715 | TDEFL_PUT_BITS(1, 2); |
| 716 | } |
| 717 | |
| 718 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 719 | |
| 720 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 721 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 722 | { |
| 723 | mz_uint flags; |
| 724 | mz_uint8 *pLZ_codes; |
| 725 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 726 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 727 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 728 | mz_uint bits_in = d->m_bits_in; |
| 729 | |
| 730 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 731 | |
| 732 | flags = 1; |
| 733 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 734 | { |
| 735 | if (flags == 1) |
| 736 | flags = *pLZ_codes++ | 0x100; |
| 737 | |
| 738 | if (flags & 1) |
| 739 | { |
| 740 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 741 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 742 | |
| 743 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 744 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 745 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 746 | |
| 747 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 748 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 749 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 750 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 751 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 752 | sym = (match_dist < 512) ? s0 : s1; |
| 753 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 754 | |
| 755 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 757 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 758 | } |
| 759 | else |
| 760 | { |
| 761 | mz_uint lit = *pLZ_codes++; |
| 762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 764 | |
| 765 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 766 | { |
| 767 | flags >>= 1; |
| 768 | lit = *pLZ_codes++; |
| 769 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 770 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 771 | |
| 772 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 773 | { |
| 774 | flags >>= 1; |
| 775 | lit = *pLZ_codes++; |
| 776 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 777 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 783 | return MZ_FALSE; |
| 784 | |
| 785 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 786 | pOutput_buf += (bits_in >> 3); |
| 787 | bit_buffer >>= (bits_in & ~7); |
| 788 | bits_in &= 7; |
| 789 | } |
| 790 | |
| 791 | #undef TDEFL_PUT_BITS_FAST |
| 792 | |
| 793 | d->m_pOutput_buf = pOutput_buf; |
| 794 | d->m_bits_in = 0; |
| 795 | d->m_bit_buffer = 0; |
| 796 | |
| 797 | while (bits_in) |
| 798 | { |
| 799 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 800 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 801 | bit_buffer >>= n; |
| 802 | bits_in -= n; |
| 803 | } |
| 804 | |
| 805 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 806 | |
| 807 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 808 | } |
| 809 | #else |
| 810 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 811 | { |
| 812 | mz_uint flags; |
| 813 | mz_uint8 *pLZ_codes; |
| 814 | |
| 815 | flags = 1; |
| 816 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 817 | { |
| 818 | if (flags == 1) |
| 819 | flags = *pLZ_codes++ | 0x100; |
| 820 | if (flags & 1) |
| 821 | { |
| 822 | mz_uint sym, num_extra_bits; |
| 823 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 824 | |
| 825 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 826 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 827 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 828 | |
| 829 | if (match_dist < 512) |
| 830 | { |
| 831 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 832 | } |
| 833 | else |
| 834 | { |
| 835 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 836 | } |
| 837 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 838 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 839 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 840 | } |
| 841 | else |
| 842 | { |
| 843 | mz_uint lit = *pLZ_codes++; |
| 844 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 845 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 850 | |
| 851 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 852 | } |
| 853 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 854 | |
| 855 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 856 | { |
| 857 | if (static_block) |
| 858 | tdefl_start_static_block(d); |
| 859 | else |
| 860 | tdefl_start_dynamic_block(d); |
| 861 | return tdefl_compress_lz_codes(d); |
| 862 | } |
| 863 | |
| 864 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 865 | { |
| 866 | mz_uint saved_bit_buf, saved_bits_in; |
| 867 | mz_uint8 *pSaved_output_buf; |
| 868 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 869 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 870 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 871 | |
| 872 | d->m_pOutput_buf = pOutput_buf_start; |
| 873 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 874 | |
| 875 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 876 | d->m_output_flush_ofs = 0; |
| 877 | d->m_output_flush_remaining = 0; |
| 878 | |
| 879 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 880 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 881 | |
| 882 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 883 | { |
| 884 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 885 | } |
| 886 | |
| 887 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 888 | |
| 889 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 890 | |
| 891 | if (!use_raw_block) |
| 892 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 893 | |
| 894 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 895 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 896 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 897 | { |
| 898 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 899 | TDEFL_PUT_BITS(0, 2); |
| 900 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 901 | for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) |
| 902 | { |
| 903 | TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); |
| 904 | } |
| 905 | for (i = 0; i < d->m_total_lz_bytes; ++i) |
| 906 | { |
| 907 | TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); |
| 908 | } |
| 909 | } |
| 910 | // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. |
| 911 | else if (!comp_block_succeeded) |
| 912 | { |
| 913 | d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 914 | tdefl_compress_block(d, MZ_TRUE); |
| 915 | } |
| 916 | |
| 917 | if (flush) |
| 918 | { |
| 919 | if (flush == TDEFL_FINISH) |
| 920 | { |
| 921 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 922 | if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } |
| 923 | } |
| 924 | else |
| 925 | { |
| 926 | mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 931 | |
| 932 | memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); |
| 933 | memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); |
| 934 | |
| 935 | d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; |
| 936 | |
| 937 | if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) |
| 938 | { |
| 939 | if (d->m_pPut_buf_func) |
| 940 | { |
| 941 | *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; |
| 942 | if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) |
| 943 | return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); |
| 944 | } |
| 945 | else if (pOutput_buf_start == d->m_output_buf) |
| 946 | { |
| 947 | int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); |
| 948 | memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); |
| 949 | d->m_out_buf_ofs += bytes_to_copy; |
| 950 | if ((n -= bytes_to_copy) != 0) |
| 951 | { |
| 952 | d->m_output_flush_ofs = bytes_to_copy; |
| 953 | d->m_output_flush_remaining = n; |
| 954 | } |
| 955 | } |
| 956 | else |
| 957 | { |
| 958 | d->m_out_buf_ofs += n; |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | return d->m_output_flush_remaining; |
| 963 | } |
| 964 | |
| 965 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 966 | #define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) |
| 967 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 968 | { |
| 969 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 970 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 971 | const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; |
| 972 | mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); |
| 973 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 974 | for ( ; ; ) |
| 975 | { |
| 976 | for ( ; ; ) |
| 977 | { |
| 978 | if (--num_probes_left == 0) return; |
| 979 | #define TDEFL_PROBE \ |
| 980 | next_probe_pos = d->m_next[probe_pos]; \ |
| 981 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 982 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 983 | if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; |
| 984 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 985 | } |
| 986 | if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; |
| 987 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && |
| 988 | (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); |
| 989 | if (!probe_len) |
| 990 | { |
| 991 | *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; |
| 992 | } |
| 993 | else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) |
| 994 | { |
| 995 | *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; |
| 996 | c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); |
| 997 | } |
| 998 | } |
| 999 | } |
| 1000 | #else |
| 1001 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 1002 | { |
| 1003 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 1004 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 1005 | const mz_uint8 *s = d->m_dict + pos, *p, *q; |
| 1006 | mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; |
| 1007 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 1008 | for ( ; ; ) |
| 1009 | { |
| 1010 | for ( ; ; ) |
| 1011 | { |
| 1012 | if (--num_probes_left == 0) return; |
| 1013 | #define TDEFL_PROBE \ |
| 1014 | next_probe_pos = d->m_next[probe_pos]; \ |
| 1015 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 1016 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 1017 | if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; |
| 1018 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 1019 | } |
| 1020 | if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; |
| 1021 | if (probe_len > match_len) |
| 1022 | { |
| 1023 | *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; |
| 1024 | c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1029 | |
| 1030 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN |
| 1031 | static mz_bool tdefl_compress_fast(tdefl_compressor *d) |
| 1032 | { |
| 1033 | // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. |
| 1034 | mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; |
| 1035 | mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; |
| 1036 | mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; |
| 1037 | |
| 1038 | while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) |
| 1039 | { |
| 1040 | const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; |
| 1041 | mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1042 | mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); |
| 1043 | d->m_src_buf_left -= num_bytes_to_process; |
| 1044 | lookahead_size += num_bytes_to_process; |
| 1045 | |
| 1046 | while (num_bytes_to_process) |
| 1047 | { |
| 1048 | mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); |
| 1049 | memcpy(d->m_dict + dst_pos, d->m_pSrc, n); |
| 1050 | if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) |
| 1051 | memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); |
| 1052 | d->m_pSrc += n; |
| 1053 | dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1054 | num_bytes_to_process -= n; |
| 1055 | } |
| 1056 | |
| 1057 | dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); |
| 1058 | if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; |
| 1059 | |
| 1060 | while (lookahead_size >= 4) |
| 1061 | { |
| 1062 | mz_uint cur_match_dist, cur_match_len = 1; |
| 1063 | mz_uint8 *pCur_dict = d->m_dict + cur_pos; |
| 1064 | mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; |
| 1065 | mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; |
| 1066 | mz_uint probe_pos = d->m_hash[hash]; |
| 1067 | d->m_hash[hash] = (mz_uint16)lookahead_pos; |
| 1068 | |
| 1069 | if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) |
| 1070 | { |
| 1071 | const mz_uint16 *p = (const mz_uint16 *)pCur_dict; |
| 1072 | const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); |
| 1073 | mz_uint32 probe_len = 32; |
| 1074 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, |
| 1075 | { |
| 1076 | *pMatch_dis with the input because_capacity = 128;ver |
| 1077 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads |
| 1078 | } |
| 1079 | |
| 1080 | int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ |
| 1081 | r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ |
| 1082 | ) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ |
| 1083 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 1084 | c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ |
| 1085 | n} \ |
| 1086 | m.avail_out = (mz_uint c = 0; \ |
| 1087 | break; \) ); |
| 1088 | cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); |
| 1089 | counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } |
| 1090 | while (pI expects the decompressor to never read |
| 1091 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 1092 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 1093 | // The slow path is only executed at the very end of the input buffer. |
| 1094 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 1095 | int temp; mz_uint code_len, c; \ |
| 1096 | if (num_bits < 15) { \ |
| 1097 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 1098 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 1099 | } else { \ |
| 1100 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 1101 | } \ |
| 1102 | } \ |
| 1103 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 1104 | code_len = temp >> 9, temp &= 511; \ |
| 1105 | else { \ |
| 1106 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 1107 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 1108 | |
| 1109 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 1110 | { |
| 1111 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1112 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1113 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1114 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1115 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1116 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1117 | |
| 1118 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1119 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1120 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1121 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1122 | |
| 1123 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1124 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1125 | |
| 1126 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1127 | TINFL_CR_BEGIN |
| 1128 | |
| 1129 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1130 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1131 | { |
| 1132 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1133 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1134 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1135 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1136 | } |
| 1137 | |
| 1138 | do |
| 1139 | { |
| 1140 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1141 | if (r->m_type == 0) |
| 1142 | { |
| 1143 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1144 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1145 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1146 | while ((counter) && (num_bits)) |
| 1147 | { |
| 1148 | TINFL_GET_BITS(51, dist, 8); |
| 1149 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1150 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1151 | counter--; |
| 1152 | } |
| 1153 | while (counter) |
| 1154 | { |
| 1155 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1156 | while (pIn_buf_cur >= pIn_buf_end) |
| 1157 | { |
| 1158 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1159 | { |
| 1160 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1161 | } |
| 1162 | else |
| 1163 | { |
| 1164 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1165 | } |
| 1166 | } |
| 1167 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1168 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1169 | } |
| 1170 | } |
| 1171 | else if (r->m_type == 3) |
| 1172 | { |
| 1173 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1174 | } |
| 1175 | else |
| 1176 | { |
| 1177 | if (r->m_type == 1) |
| 1178 | { |
| 1179 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1180 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1181 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1182 | } |
| 1183 | else |
| 1184 | { |
| 1185 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1186 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1187 | r->m_table_sizes[2] = 19; |
| 1188 | } |
| 1189 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1190 | { |
| 1191 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1192 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1193 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1194 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1195 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1196 | if ((65536 != total) && (used_syms > 1)) |
| 1197 | { |
| 1198 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1199 | } |
| 1200 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1201 | { |
| 1202 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1203 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1204 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1205 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1206 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1207 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1208 | { |
| 1209 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1210 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1211 | } |
| 1212 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1213 | } |
| 1214 | if (r->m_type == 2) |
| 1215 | { |
| 1216 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1217 | { |
| 1218 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 1219 | if ((dist == 16) && (!counter)) |
| 1220 | { |
| 1221 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 1222 | } |
| 1223 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 1224 | TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } |
| 1225 | }; |
| 1226 | mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1227 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1228 | } |
| 1229 | else |
| 1230 | z_uint code_len; |
| 1231 | #if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 1232 | } |
| 1233 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 1234 | { |
| 1235 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 1236 | } |
| 1237 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 1238 | } |
| 1239 | } |
| 1240 | for ( ; ; ) |
| 1241 | { |
| 1242 | mz_uint8 *pSrc; |
| 1243 | for ( ; ; ) |
| 1244 | { |
| 1245 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 1246 | { |
| 1247 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 1248 | if (counter >= 256) |
| 1249 | break; |
| 1250 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1251 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1252 | } |
| 1253 | else |
| 1254 | { |
| 1255 | int sym2; mz_uint code_len; |
| 1256 | #if TINFL_USE_64BIT_BITBUF |
| 1257 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 1258 | #else |
| 1259 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1260 | #endif |
| 1261 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1262 | code_len = sym2 >> 9; |
| 1263 | else |
| 1264 | { |
| 1265 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1266 | } |
| 1267 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 1268 | if (counter & 256) |
| 1269 | break; |
| 1270 | |
| 1271 | #if !TINFL_USE_64BIT_BITBUF |
| 1272 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1273 | #endif |
| 1274 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1275 | code_len = sym2 >> 9; |
| 1276 | else |
| 1277 | { |
| 1278 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1279 | } |
| 1280 | bit_buf >>= code_len; num_bits -= code_len; |
| 1281 | |
| 1282 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 1283 | if (sym2 & 256) |
| 1284 | { |
| 1285 | pOut_buf_cur++; |
| 1286 | counter = sym2; |
| 1287 | break; |
| 1288 | } |
| 1289 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 1290 | pOut_buf_cur += 2; |
| 1291 | } |
| 1292 | } |
| 1293 | if ((counter &= 511) == 256) break; |
| 1294 | |
| 1295 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 1296 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 1297 | |
| 1298 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 1299 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 1300 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 1301 | |
| 1302 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 1303 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 1304 | { |
| 1305 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 1306 | } |
| 1307 | |
| 1308 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 1309 | |
| 1310 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 1311 | { |
| 1312 | while (counter--) |
| 1313 | { |
| 1314 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1315 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 1316 | } |
| 1317 | continue; |
| 1318 | } |
| 1319 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1320 | else if ((counter >= 9) && (counter <= dist)) |
| 1321 | { |
| 1322 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 1323 | do |
| 1324 | { |
| 1325 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 1326 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 1327 | pOut_buf_cur += 8; |
| 1328 | } while ((pSrc += 8) < pSrc_end); |
| 1329 | if ((counter &= 7) < 3) |
| 1330 | { |
| 1331 | if (counter) |
| 1332 | { |
| 1333 | pOut_buf_cur[0] = pSrc[0]; |
| 1334 | if (counter > 1) |
| 1335 | pOut_buf_cur[1] = pSrc[1]; |
| 1336 | pOut_buf_cur += counter; |
| 1337 | } |
| 1338 | continue; |
| 1339 | } |
| 1340 | } |
| 1341 | #endif |
| 1342 | do |
| 1343 | { |
| 1344 | pOut_buf_cur[0] = pSrc[0]; |
| 1345 | pOut_buf_cur[1] = pSrc[1]; |
| 1346 | pOut_buf_cur[2] = pSrc[2]; |
| 1347 | pOut_buf_cur += 3; pSrc += 3; |
| 1348 | } while ((int)(counter -= 3) > 2); |
| 1349 | if ((int)counter > 0) |
| 1350 | { |
| 1351 | pOut_buf_cur[0] = pSrc[0]; |
| 1352 | if ((int)counter > 1) |
| 1353 | pOut_buf_cur[1] = pSrc[1]; |
| 1354 | pOut_buf_cur += counter; |
| 1355 | } |
| 1356 | } |
| 1357 | } |
| 1358 | } while (!(r->m_final & 1)); |
| 1359 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1360 | { |
| 1361 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 1362 | } |
| 1363 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 1364 | TINFL_CR_FINISH |
| 1365 | |
| 1366 | common_exit: |
| 1367 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 1368 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 1369 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 1370 | { |
| 1371 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 1372 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 1373 | while (buf_len) |
| 1374 | { |
| 1375 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 1376 | { |
| 1377 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 1378 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 1379 | } |
| 1380 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 1381 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 1382 | } |
| 1383 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 1384 | } |
| 1385 | return status; |
| 1386 | } |
| 1387 | |
| 1388 | // Higher level helper functions. |
| 1389 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 1390 | { |
| 1391 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 1392 | *pOut_len = 0; |
| 1393 | tinfl_init(&decomp); |
| 1394 | for ( ; ; ) |
| 1395 | { |
| 1396 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 1397 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 1398 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1399 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 1400 | { |
| 1401 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1402 | } |
| 1403 | src_buf_ofs += src_buf_size; |
| 1404 | *pOut_len += dst_buf_size; |
| 1405 | if (status == TINFL_STATUS_DONE) break; |
| 1406 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 1407 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 1408 | if (!pNew_buf) |
| 1409 | { |
| 1410 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1411 | } |
| 1412 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 1413 | } |
| 1414 | return pBuf; |
| 1415 | } |
| 1416 | |
| 1417 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 1418 | { |
| 1419 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 1420 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1421 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 1422 | } |
| 1423 | |
| 1424 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 1425 | { |
| 1426 | int result = 0; |
| 1427 | tinfl_decompressor decomp; |
| 1428 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 1429 | if (!pDict) |
| 1430 | return TINFL_STATUS_FAILED; |
| 1431 | tinfl_init(&decomp); |
| 1432 | for ( ; ; ) |
| 1433 | { |
| 1434 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 1435 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 1436 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 1437 | in_buf_ofs += in_buf_size; |
| 1438 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 1439 | break; |
| 1440 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 1441 | { |
| 1442 | result = (status == TINFL_STATUS_DONE); |
| 1443 | break; |
| 1444 | } |
| 1445 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 1446 | } |
| 1447 | MZ_FREE(pDict); |
| 1448 | *pIn_buf_size = in_buf_ofs; |
| 1449 | return result; |
| 1450 | } |
| 1451 | |
| 1452 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 1453 | |
| 1454 | // Purposely making these tables static for faster init and thread safety. |
| 1455 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 1456 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 1457 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 1458 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 1459 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 1460 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 1461 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 1462 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 1463 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 1464 | |
| 1465 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 1466 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 1467 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 1468 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 1469 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 1470 | |
| 1471 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 1472 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 1473 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 1474 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1475 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1476 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 1477 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1478 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1479 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1480 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1481 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1482 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1483 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 1484 | |
| 1485 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 1486 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 1487 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1488 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1489 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1490 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1491 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1492 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1493 | 7,7,7,7,7,7,7,7 }; |
| 1494 | |
| 1495 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 1496 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 1497 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 1498 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 1499 | |
| 1500 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 1501 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 1502 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 1503 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 1504 | |
| 1505 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 1506 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 1507 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 1508 | { |
| 1509 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 1510 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 1511 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 1512 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 1513 | { |
| 1514 | const mz_uint32* pHist = &hist[pass << 8]; |
| 1515 | mz_uint offsets[256], cur_ofs = 0; |
| 1516 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 1517 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 1518 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 1519 | } |
| 1520 | return pCur_syms; |
| 1521 | } |
| 1522 | |
| 1523 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 1524 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 1525 | { |
| 1526 | int root, leaf, next, avbl, used, dpth; |
| 1527 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 1528 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 1529 | for (next=1; next < n-1; next++) |
| 1530 | { |
| 1531 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 1532 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 1533 | } |
| 1534 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 1535 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 1536 | while (avbl>0) |
| 1537 | { |
| 1538 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 1539 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 1540 | avbl = 2*used; dpth++; used = 0; |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | // Limits canonical Huffman code table's max code size. |
| 1545 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 1546 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 1547 | { |
| 1548 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 1549 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 1550 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 1551 | while (total != (1UL << max_code_size)) |
| 1552 | { |
| 1553 | pNum_codes[max_code_size]--; |
| 1554 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 1555 | total--; |
| 1556 | } |
| 1557 | } |
| 1558 | |
| 1559 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 1560 | { |
| 1561 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 1562 | if (static_table) |
| 1563 | { |
| 1564 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 1565 | } |
| 1566 | else |
| 1567 | { |
| 1568 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 1569 | int num_used_syms = 0; |
| 1570 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 1571 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 1572 | |
| 1573 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 1574 | |
| 1575 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 1576 | |
| 1577 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 1578 | |
| 1579 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 1580 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 1581 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 1582 | } |
| 1583 | |
| 1584 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 1585 | |
| 1586 | for (i = 0; i < table_len; i++) |
| 1587 | { |
| 1588 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 1589 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 1590 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 1595 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 1596 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 1597 | while (d->m_bits_in >= 8) { \ |
| 1598 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 1599 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 1600 | d->m_bit_buffer >>= 8; \ |
| 1601 | d->m_bits_in -= 8; \ |
| 1602 | } \ |
| 1603 | } MZ_MACRO_END |
| 1604 | |
| 1605 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 1606 | if (rle_repeat_count < 3) { \ |
| 1607 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 1608 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 1609 | } else { \ |
| 1610 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 1611 | } rle_repeat_count = 0; } } |
| 1612 | |
| 1613 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 1614 | if (rle_z_count < 3) { \ |
| 1615 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 1616 | } else if (rle_z_count <= 10) { \ |
| 1617 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 1618 | } else { \ |
| 1619 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 1620 | } rle_z_count = 0; } } |
| 1621 | |
| 1622 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 1623 | |
| 1624 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 1625 | { |
| 1626 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; |
| 1627 | mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; |
| 1628 | |
| 1629 | d->m_huff_count[0][256] = 1; |
| 1630 | |
| 1631 | tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); |
| 1632 | tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); |
| 1633 | |
| 1634 | for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; |
| 1635 | for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; |
| 1636 | |
| 1637 | memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); |
| 1638 | memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); |
| 1639 | total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; |
| 1640 | |
| 1641 | memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1642 | for (i = 0; i < total_code_sizes_to_pack; i++) |
| 1643 | { |
| 1644 | mz_uint8 code_size = code_sizes_to_pack[i]; |
| 1645 | if (!code_size) |
| 1646 | { |
| 1647 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1648 | if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1649 | } |
| 1650 | else |
| 1651 | { |
| 1652 | TDEFL_RLE_ZERO_CODE_SIZE(); |
| 1653 | if (code_size != prev_code_size) |
| 1654 | { |
| 1655 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1656 | d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; |
| 1657 | } |
| 1658 | else if (++rle_repeat_count == 6) |
| 1659 | { |
| 1660 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1661 | } |
| 1662 | } |
| 1663 | prev_code_size = code_size; |
| 1664 | } |
| 1665 | if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1666 | |
| 1667 | tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); |
| 1668 | |
| 1669 | TDEFL_PUT_BITS(2, 2); |
| 1670 | |
| 1671 | TDEFL_PUT_BITS(num_lit_codes - 257, 5); |
| 1672 | TDEFL_PUT_BITS(num_dist_codes - 1, 5); |
| 1673 | |
| 1674 | for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; |
| 1675 | num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); |
| 1676 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 1677 | |
| 1678 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 1679 | { |
| 1680 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1681 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 1682 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 1683 | } |
| 1684 | } |
| 1685 | |
| 1686 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 1687 | { |
| 1688 | mz_uint i; |
| 1689 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 1690 | |
| 1691 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 1692 | for ( ; i <= 255; ++i) *p++ = 9; |
| 1693 | for ( ; i <= 279; ++i) *p++ = 7; |
| 1694 | for ( ; i <= 287; ++i) *p++ = 8; |
| 1695 | |
| 1696 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 1697 | |
| 1698 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 1699 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 1700 | |
| 1701 | TDEFL_PUT_BITS(1, 2); |
| 1702 | } |
| 1703 | |
| 1704 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 1705 | |
| 1706 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1707 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1708 | { |
| 1709 | mz_uint flags; |
| 1710 | mz_uint8 *pLZ_codes; |
| 1711 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 1712 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 1713 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 1714 | mz_uint bits_in = d->m_bits_in; |
| 1715 | |
| 1716 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 1717 | |
| 1718 | flags = 1; |
| 1719 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 1720 | { |
| 1721 | if (flags == 1) |
| 1722 | flags = *pLZ_codes++ | 0x100; |
| 1723 | |
| 1724 | if (flags & 1) |
| 1725 | { |
| 1726 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 1727 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 1728 | |
| 1729 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1730 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1731 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1732 | |
| 1733 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 1734 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 1735 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 1736 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 1737 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1738 | sym = (match_dist < 512) ? s0 : s1; |
| 1739 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 1740 | |
| 1741 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1742 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1743 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1744 | } |
| 1745 | else |
| 1746 | { |
| 1747 | mz_uint lit = *pLZ_codes++; |
| 1748 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1749 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1750 | |
| 1751 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1752 | { |
| 1753 | flags >>= 1; |
| 1754 | lit = *pLZ_codes++; |
| 1755 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1757 | |
| 1758 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1759 | { |
| 1760 | flags >>= 1; |
| 1761 | lit = *pLZ_codes++; |
| 1762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1764 | } |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 1769 | return MZ_FALSE; |
| 1770 | |
| 1771 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 1772 | pOutput_buf += (bits_in >> 3); |
| 1773 | bit_buffer >>= (bits_in & ~7); |
| 1774 | bits_in &= 7; |
| 1775 | } |
| 1776 | |
| 1777 | #undef TDEFL_PUT_BITS_FAST |
| 1778 | |
| 1779 | d->m_pOutput_buf = pOutput_buf; |
| 1780 | d->m_bits_in = 0; |
| 1781 | d->m_bit_buffer = 0; |
| 1782 | |
| 1783 | while (bits_in) |
| 1784 | { |
| 1785 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 1786 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 1787 | bit_buffer >>= n; |
| 1788 | bits_in -= n; |
| 1789 | } |
| 1790 | |
| 1791 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1792 | |
| 1793 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1794 | } |
| 1795 | #else |
| 1796 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1797 | { |
| 1798 | mz_uint flags; |
| 1799 | mz_uint8 *pLZ_codes; |
| 1800 | |
| 1801 | flags = 1; |
| 1802 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 1803 | { |
| 1804 | if (flags == 1) |
| 1805 | flags = *pLZ_codes++ | 0x100; |
| 1806 | if (flags & 1) |
| 1807 | { |
| 1808 | mz_uint sym, num_extra_bits; |
| 1809 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 1810 | |
| 1811 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1812 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1813 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1814 | |
| 1815 | if (match_dist < 512) |
| 1816 | { |
| 1817 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 1818 | } |
| 1819 | else |
| 1820 | { |
| 1821 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1822 | } |
| 1823 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1824 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1825 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1826 | } |
| 1827 | else |
| 1828 | { |
| 1829 | mz_uint lit = *pLZ_codes++; |
| 1830 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1831 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1832 | } |
| 1833 | } |
| 1834 | |
| 1835 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1836 | |
| 1837 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1838 | } |
| 1839 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1840 | |
| 1841 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 1842 | { |
| 1843 | if (static_block) |
| 1844 | tdefl_start_static_block(d); |
| 1845 | else |
| 1846 | tdefl_start_dynamic_block(d); |
| 1847 | return tdefl_compress_lz_codes(d); |
| 1848 | } |
| 1849 | |
| 1850 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 1851 | { |
| 1852 | mz_uint saved_bit_buf, saved_bits_in; |
| 1853 | mz_uint8 *pSaved_output_buf; |
| 1854 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 1855 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 1856 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 1857 | |
| 1858 | d->m_pOutput_buf = pOutput_buf_start; |
| 1859 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 1860 | |
| 1861 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 1862 | d->m_output_flush_ofs = 0; |
| 1863 | d->m_output_flush_remaining = 0; |
| 1864 | |
| 1865 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 1866 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 1867 | |
| 1868 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 1869 | { |
| 1870 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 1871 | } |
| 1872 | |
| 1873 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 1874 | |
| 1875 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 1876 | |
| 1877 | if (!use_raw_block) |
| 1878 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 1879 | |
| 1880 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 1881 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 1882 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 1883 | { |
| 1884 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 1885 | TDEFL_PUT_BITS(0, 2); |
| 1886 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 1887 | See "unlicense" statement at the end of this file. |
| 1888 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 1889 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 1890 | |
| 1891 | Most API's defined in miniz.c are optionaljority of prev. users so I'm |
| 1892 | op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1893 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1894 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1895 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1896 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1897 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1898 | |
| 1899 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1900 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1901 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1902 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1903 | |
| 1904 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1905 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1906 | |
| 1907 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1908 | TINFL_CR_BEGIN |
| 1909 | |
| 1910 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1911 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1912 | { |
| 1913 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1914 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1915 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1916 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1917 | } |
| 1918 | |
| 1919 | do |
| 1920 | { |
| 1921 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1922 | if (r->m_type == 0) |
| 1923 | { |
| 1924 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1925 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1926 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1927 | while ((counter) && (num_bits)) |
| 1928 | { |
| 1929 | TINFL_GET_BITS(51, dist, 8); |
| 1930 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1931 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1932 | counter--; |
| 1933 | } |
| 1934 | while (counter) |
| 1935 | { |
| 1936 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1937 | while (pIn_buf_cur >= pIn_buf_end) |
| 1938 | { |
| 1939 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1940 | { |
| 1941 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1942 | } |
| 1943 | else |
| 1944 | { |
| 1945 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1946 | } |
| 1947 | } |
| 1948 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1949 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1950 | } |
| 1951 | } |
| 1952 | else if (r->m_type == 3) |
| 1953 | { |
| 1954 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1955 | } |
| 1956 | else |
| 1957 | { |
| 1958 | if (r->m_type == 1) |
| 1959 | { |
| 1960 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1961 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1962 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1963 | } |
| 1964 | else |
| 1965 | { |
| 1966 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1967 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1968 | r->m_table_sizes[2] = 19; |
| 1969 | } |
| 1970 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1971 | { |
| 1972 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1973 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1974 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1975 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1976 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1977 | if ((65536 != total) && (used_syms > 1)) |
| 1978 | { |
| 1979 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1980 | } |
| 1981 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1982 | { |
| 1983 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1984 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1985 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1986 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1987 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1988 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1989 | { |
| 1990 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1991 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1992 | } |
| 1993 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1994 | } |
| 1995 | if (r->m_type == 2) |
| 1996 | { |
| 1997 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1998 | { |
| 1999 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 2000 | if ((dist == 16) && (!counter)) |
| 2001 | { |
| 2002 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 2003 | } |
| 2004 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 2005 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 2006 | } |
| 2007 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 2008 | { |
| 2009 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 2010 | } |
| 2011 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 2012 | } |
| 2013 | } |
| 2014 | for ( ; ; ) |
| 2015 | { |
| 2016 | mz_uint8 *pSrc; |
| 2017 | for ( ; ; ) |
| 2018 | { |
| 2019 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 2020 | { |
| 2021 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 2022 | if (counter >= 256) |
| 2023 | break; |
| 2024 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2025 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 2026 | } |
| 2027 | else |
| 2028 | { |
| 2029 | int sym2; mz_uint code_len; |
| 2030 | #if TINFL_USE_64BIT_BITBUF |
| 2031 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 2032 | #else |
| 2033 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2034 | #endif |
| 2035 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2036 | code_len = sym2 >> 9; |
| 2037 | else |
| 2038 | { |
| 2039 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2040 | } |
| 2041 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 2042 | if (counter & 256) |
| 2043 | break; |
| 2044 | |
| 2045 | #if !TINFL_USE_64BIT_BITBUF |
| 2046 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2047 | #endif |
| 2048 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2049 | code_len = sym2 >> 9; |
| 2050 | else |
| 2051 | { |
| 2052 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2053 | } |
| 2054 | bit_buf >>= code_len; num_bits -= code_len; |
| 2055 | |
| 2056 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 2057 | if (sym2 & 256) |
| 2058 | { |
| 2059 | pOut_buf_cur++; |
| 2060 | counter = sym2; |
| 2061 | break; |
| 2062 | } |
| 2063 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 2064 | pOut_buf_cur += 2; |
| 2065 | } |
| 2066 | } |
| 2067 | if ((counter &= 511) == 256) break; |
| 2068 | |
| 2069 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 2070 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 2071 | |
| 2072 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 2073 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 2074 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 2075 | |
| 2076 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 2077 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 2078 | { |
| 2079 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 2080 | } |
| 2081 | |
| 2082 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 2083 | |
| 2084 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 2085 | { |
| 2086 | while (counter--) |
| 2087 | { |
| 2088 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2089 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 2090 | } |
| 2091 | continue; |
| 2092 | } |
| 2093 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 2094 | else if ((counter >= 9) && (counter <= dist)) |
| 2095 | { |
| 2096 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 2097 | do |
| 2098 | { |
| 2099 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 2100 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 2101 | pOut_buf_cur += 8; |
| 2102 | } while ((pSrc += 8) < pSrc_end); |
| 2103 | if ((counter &= 7) < 3) |
| 2104 | { |
| 2105 | if (counter) |
| 2106 | { |
| 2107 | pOut_buf_cur[0] = pSrc[0]; |
| 2108 | if (counter > 1) |
| 2109 | pOut_buf_cur[1] = pSrc[1]; |
| 2110 | pOut_buf_cur += counter; |
| 2111 | } |
| 2112 | continue; |
| 2113 | } |
| 2114 | } |
| 2115 | #endif |
| 2116 | do |
| 2117 | { |
| 2118 | pOut_buf_cur[0] = pSrc[0]; |
| 2119 | pOut_buf_cur[1] = pSrc[1]; |
| 2120 | pOut_buf_cur[2] = pSrc[2]; |
| 2121 | pOut_buf_cur += 3; pSrc += 3; |
| 2122 | } while ((int)(counter -= 3) > 2); |
| 2123 | if ((int)counter > 0) |
| 2124 | { |
| 2125 | pOut_buf_cur[0] = pSrc[0]; |
| 2126 | if ((int)counter > 1) |
| 2127 | pOut_buf_cur[1] = pSrc[1]; |
| 2128 | pOut_buf_cur += counter; |
| 2129 | } |
| 2130 | } |
| 2131 | } |
| 2132 | } while (!(r->m_final & 1)); |
| 2133 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 2134 | { |
| 2135 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 2136 | } |
| 2137 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 2138 | TINFL_CR_FINISH |
| 2139 | |
| 2140 | common_exit: |
| 2141 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 2142 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 2143 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 2144 | { |
| 2145 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 2146 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 2147 | while (buf_len) |
| 2148 | { |
| 2149 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 2150 | { |
| 2151 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 2152 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 2153 | } |
| 2154 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 2155 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 2156 | } |
| 2157 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 2158 | } |
| 2159 | return status; |
| 2160 | } |
| 2161 | |
| 2162 | // Higher level helper functions. |
| 2163 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 2164 | { |
| 2165 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 2166 | *pOut_len = 0; |
| 2167 | tinfl_init(&decomp); |
| 2168 | for ( ; ; ) |
| 2169 | { |
| 2170 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 2171 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 2172 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2173 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 2174 | { |
| 2175 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2176 | } |
| 2177 | src_buf_ofs += src_buf_size; |
| 2178 | *pOut_len += dst_buf_size; |
| 2179 | if (status == TINFL_STATUS_DONE) break; |
| 2180 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 2181 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 2182 | if (!pNew_buf) |
| 2183 | { |
| 2184 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2185 | } |
| 2186 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 2187 | } |
| 2188 | return pBuf; |
| 2189 | } |
| 2190 | |
| 2191 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 2192 | { |
| 2193 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 2194 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2195 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 2196 | } |
| 2197 | |
| 2198 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 2199 | { |
| 2200 | int result = 0; |
| 2201 | tinfl_decompressor decomp; |
| 2202 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 2203 | if (!pDict) |
| 2204 | return TINFL_STATUS_FAILED; |
| 2205 | tinfl_init(&decomp); |
| 2206 | for ( ; ; ) |
| 2207 | { |
| 2208 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 2209 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 2210 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 2211 | in_buf_ofs += in_buf_size; |
| 2212 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 2213 | break; |
| 2214 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 2215 | { |
| 2216 | result = (status == TINFL_STATUS_DONE); |
| 2217 | break; |
| 2218 | } |
| 2219 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 2220 | } |
| 2221 | MZ_FREE(pDict); |
| 2222 | *pIn_buf_size = in_buf_ofs; |
| 2223 | return result; |
| 2224 | } |
| 2225 | |
| 2226 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 2227 | |
| 2228 | // Purposely making these tables static for faster init and thread safety. |
| 2229 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 2230 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 2231 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 2232 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 2233 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 2234 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 2235 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 2236 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 2237 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 2238 | |
| 2239 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 2240 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 2241 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 2242 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 2243 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 2244 | |
| 2245 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 2246 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 2247 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 2248 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2249 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2250 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 2251 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
+2251
| --- a/src/miniz.c | ||
| +++ b/src/miniz.c | ||
| @@ -0,0 +1,2251 @@ | ||
| 1 | +/* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 2 | + See "unlicense" statement at the end of this file. | |
| 3 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 4 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 5 | + | |
| 6 | + Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define | |
| 7 | + MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). | |
| 8 | + | |
| 9 | + * Change History | |
| 10 | + 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. | |
| 11 | +void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); | |
| 12 | +void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); | |
| 13 | + | |
| 14 | +// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. | |
| 15 | +typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); | |
| 16 | + | |
| 17 | +// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; | |
| 18 | + | |
| 19 | + if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; | |
| 20 | + pState->m_has_flushed |= (flush == MZ_FINISH); | |
| 21 | + | |
| 22 | + if ((flush == MZ_FINISH) && (first_call)) | |
| 23 | + { | |
| 24 | + // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. | |
| 25 | + decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; | |
| 26 | + in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; | |
| 27 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); | |
| 28 | + pState->m_last_status = status; | |
| 29 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; | |
| 30 | + pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 31 | + pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; | |
| 32 | + | |
| 33 | + if (status < 0) | |
| 34 | + return MZ_DATA_ERROR; | |
| 35 | + else if (status != TINFL_STATUS_DONE) | |
| 36 | + { | |
| 37 | + pState->m_last_status = TINFL_STATUS_FAILED; | |
| 38 | + return MZ_BUF_ERROR; | |
| 39 | + } | |
| 40 | + return MZ_STREAM_END; | |
| 41 | + } | |
| 42 | + // flush != MZ_FINISH then we must assume there's more input. | |
| 43 | + if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; | |
| 44 | + | |
| 45 | + if (pState->m_dict_avail) | |
| 46 | + { | |
| 47 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 48 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 49 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 50 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 51 | + return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 52 | + } | |
| 53 | + | |
| 54 | + for ( ; ; ) | |
| 55 | + { | |
| 56 | + in_bytes = pStream->avail_in; | |
| 57 | + out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; | |
| 58 | + | |
| 59 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); | |
| 60 | + pState->m_last_status = status; | |
| 61 | + | |
| 62 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; | |
| 63 | + pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 64 | + | |
| 65 | + pState->m_dict_avail = (mz_uint)out_bytes; | |
| 66 | + | |
| 67 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 68 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 69 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 70 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 71 | + | |
| 72 | + if (status < 0) | |
| 73 | + return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). | |
| 74 | + else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) | |
| 75 | + return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. | |
| 76 | + else if (flush == MZ_FINISH) | |
| 77 | + { | |
| 78 | + // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. | |
| 79 | + if (status == TINFL_STATUS_DONE) | |
| 80 | + return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; | |
| 81 | + // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. | |
| 82 | + else if (!pStream->avail_out) | |
| 83 | + return MZ_BUF_ERROR; | |
| 84 | + } | |
| 85 | + else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) | |
| 86 | + break; | |
| 87 | + } | |
| 88 | + | |
| 89 | + return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 90 | +} | |
| 91 | + | |
| 92 | +int mz_inflateEnd(mz_streamp pStream) | |
| 93 | +{ | |
| 94 | + if (!pStream) | |
| 95 | + return MZ_STREAM_ERROR; | |
| 96 | + if (pStream->state) | |
| 97 | + { | |
| 98 | + pStream->zfree(pStream->opaque, pStream->state); | |
| 99 | + pStream->state = NULL; | |
| 100 | + } | |
| 101 | + return MZ_OK; | |
| 102 | +} | |
| 103 | + | |
| 104 | +int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) | |
| 105 | +{ | |
| 106 | + mz_stream stream; | |
| 107 | + int status; | |
| 108 | + memset(&stream, 0, sizeof(stream)); | |
| 109 | + | |
| 110 | + // In case mz_ulong is 64-bits (argh I hate longs). | |
| 111 | + if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; | |
| 112 | + | |
| 113 | + stream.next_in = pSource; | |
| 114 | + stream.avail_in = (mz_uint32)source_len; | |
| 115 | + stream.next_out = pDest; | |
| 116 | + stream.avail_out = (mz_uint32)*pDest_len; | |
| 117 | + | |
| 118 | + status = mz_inflateInit(&stream); | |
| 119 | + if (status != MZ_OK) | |
| 120 | + return status; | |
| 121 | + | |
| 122 | + status = mz_inflate(&stream, MZ_FINISH); | |
| 123 | + if (status != MZ_STREAM_END) | |
| 124 | + { | |
| 125 | + mz_inflateEnd(&stream); | |
| 126 | + return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; | |
| 127 | + } | |
| 128 | + *pDest_len = stream.total_out; | |
| 129 | + | |
| 130 | + return mz_inflateEnd(&stream); | |
| 131 | +} | |
| 132 | + | |
| 133 | +const char *mz_error(int err) | |
| 134 | +{ | |
| 135 | + static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = | |
| 136 | + { | |
| 137 | + { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, | |
| 138 | + { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 139 | + }; | |
| 140 | + mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; | |
| 141 | + return NULL; | |
| 142 | +} | |
| 143 | + | |
| 144 | +#endif //MINIZ_NO_ZLIB_APIS | |
| 145 | + | |
| 146 | +// ------------------- Low-level Decompression (completely independent from all compression API's) | |
| 147 | + | |
| 148 | +#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) | |
| 149 | +#define TINFL_MEMSET(p, c, l) memset(p, c, l) | |
| 150 | + | |
| 151 | +#define TINFL_CR_BEGIN switch(r->m_state) { case 0: | |
| 152 | +#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END | |
| 153 | +#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END | |
| 154 | +#define TINFL_CR_FINISH } | |
| 155 | + | |
| 156 | +// TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never | |
| 157 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. | |
| 158 | +#define TINFL_GET_BYTE(state_index, c) do { \ | |
| 159 | + if (pIn_buf_cur >= pIn_buf_end) { \ | |
| 160 | + for ( ; ; ) { \ | |
| 161 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ | |
| 162 | + TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ | |
| 163 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 164 | + c = *pIn_buf_cur++; \ | |
| 165 | + break; \ | |
| 166 | + } \ | |
| 167 | + } else { \ | |
| 168 | + c = 0; \ | |
| 169 | + break; \ | |
| 170 | + } \ | |
| 171 | + } \ | |
| 172 | + } else c = *pIn_buf_cur++; } MZ_MACRO_END | |
| 173 | + | |
| 174 | +#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) | |
| 175 | +#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 176 | +#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 177 | + | |
| 178 | +// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. | |
| 179 | +// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a | |
| 180 | +// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the | |
| 181 | +// bit buffer contains >=15 bits (deflate's max. Huffman code size). | |
| 182 | +#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ | |
| 183 | + do { \ | |
| 184 | + temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ | |
| 185 | + if (temp >= 0) { \ | |
| 186 | + code_len = temp >> 9; \ | |
| 187 | + if ((code_len) && (num_bits >= code_len)) \ | |
| 188 | + break; \ | |
| 189 | + } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ | |
| 190 | + code_len = TINFL_FAST_LOOKUP_BITS; \ | |
| 191 | + do { \ | |
| 192 | + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ | |
| 193 | + } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ | |
| 194 | + } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ | |
| 195 | + } while (num_bits < 15); | |
| 196 | + | |
| 197 | +// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read | |
| 198 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 199 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 200 | +// The slow path is only executed at the very end of the input buffer. | |
| 201 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 202 | + int temp; mz_uint code_len, c; \ | |
| 203 | + if (num_bits < 15) { \ | |
| 204 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 205 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 206 | + } else { \ | |
| 207 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 208 | + } \ | |
| 209 | + } \ | |
| 210 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 211 | + code_len = temp >> 9, temp &= 511; \ | |
| 212 | + else { \ | |
| 213 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 214 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 215 | + | |
| 216 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 217 | +{ | |
| 218 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 219 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 220 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 221 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 222 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 223 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 224 | + | |
| 225 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 226 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 227 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 228 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 229 | + | |
| 230 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 231 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 232 | + | |
| 233 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 234 | + TINFL_CR_BEGIN | |
| 235 | + | |
| 236 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 237 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 238 | + { | |
| 239 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 240 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 241 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 242 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 243 | + } | |
| 244 | + | |
| 245 | + do | |
| 246 | + { | |
| 247 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 248 | + if (r->m_type == 0) | |
| 249 | + { | |
| 250 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 251 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 252 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 253 | + while ((counter) && (num_bits)) | |
| 254 | + { | |
| 255 | + TINFL_GET_BITS(51, dist, 8); | |
| 256 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 257 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 258 | + counter--; | |
| 259 | + } | |
| 260 | + while (counter) | |
| 261 | + { | |
| 262 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 263 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 264 | + { | |
| 265 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 266 | + { | |
| 267 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 268 | + } | |
| 269 | + else | |
| 270 | + { | |
| 271 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 272 | + } | |
| 273 | + } | |
| 274 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 275 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 276 | + } | |
| 277 | + } | |
| 278 | + else if (r->m_type == 3) | |
| 279 | + { | |
| 280 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 281 | + } | |
| 282 | + else | |
| 283 | + { | |
| 284 | + if (r->m_type == 1) | |
| 285 | + { | |
| 286 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 287 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 288 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 289 | + } | |
| 290 | + else | |
| 291 | + { | |
| 292 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 293 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 294 | + r->m_table_sizes[2] = 19; | |
| 295 | + } | |
| 296 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 297 | + { | |
| 298 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 299 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 300 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 301 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 302 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 303 | + if ((65536 != total) && (used_syms > 1)) | |
| 304 | + { | |
| 305 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 306 | + } | |
| 307 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 308 | + { | |
| 309 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 310 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 311 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 312 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 313 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 314 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 315 | + { | |
| 316 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 317 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 318 | + } | |
| 319 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 320 | + } | |
| 321 | + if (r->m_type == 2) | |
| 322 | + { | |
| 323 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 324 | + { | |
| 325 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 326 | + if ((dist == 16) && (!counter)) | |
| 327 | + { | |
| 328 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 329 | + } | |
| 330 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 331 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 332 | + } | |
| 333 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 334 | + { | |
| 335 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 336 | + } | |
| 337 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 338 | + } | |
| 339 | + } | |
| 340 | + for ( ; ; ) | |
| 341 | + { | |
| 342 | + mz_uint8 *pSrc; | |
| 343 | + for ( ; ; ) | |
| 344 | + { | |
| 345 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 346 | + { | |
| 347 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 348 | + if (counter >= 256) | |
| 349 | + break; | |
| 350 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 351 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 352 | + } | |
| 353 | + else | |
| 354 | + { | |
| 355 | + int sym2; mz_uint code_len; | |
| 356 | +#if TINFL_USE_64BIT_BITBUF | |
| 357 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 358 | +#else | |
| 359 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 360 | +#endif | |
| 361 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 362 | + code_len = sym2 >> 9; | |
| 363 | + else | |
| 364 | + { | |
| 365 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 366 | + } | |
| 367 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 368 | + if (counter & 256) | |
| 369 | + break; | |
| 370 | + | |
| 371 | +#if !TINFL_USE_64BIT_BITBUF | |
| 372 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 373 | +#endif | |
| 374 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 375 | + code_len = sym2 >> 9; | |
| 376 | + else | |
| 377 | + { | |
| 378 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 379 | + } | |
| 380 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 381 | + | |
| 382 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 383 | + if (sym2 & 256) | |
| 384 | + { | |
| 385 | + pOut_buf_cur++; | |
| 386 | + counter = sym2; | |
| 387 | + break; | |
| 388 | + } | |
| 389 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 390 | + pOut_buf_cur += 2; | |
| 391 | + } | |
| 392 | + } | |
| 393 | + if ((counter &= 511) == 256) break; | |
| 394 | + | |
| 395 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 396 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 397 | + | |
| 398 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 399 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 400 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 401 | + | |
| 402 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 403 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 404 | + { | |
| 405 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 406 | + } | |
| 407 | + | |
| 408 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 409 | + | |
| 410 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 411 | + { | |
| 412 | + while (counter--) | |
| 413 | + { | |
| 414 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 415 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 416 | + } | |
| 417 | + continue; | |
| 418 | + } | |
| 419 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 420 | + else if ((counter >= 9) && (counter <= dist)) | |
| 421 | + { | |
| 422 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 423 | + do | |
| 424 | + { | |
| 425 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 426 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 427 | + pOut_buf_cur += 8; | |
| 428 | + } while ((pSrc += 8) < pSrc_end); | |
| 429 | + if ((counter &= 7) < 3) | |
| 430 | + { | |
| 431 | + if (counter) | |
| 432 | + { | |
| 433 | + pOut_buf_cur[0] = pSrc[0]; | |
| 434 | + if (counter > 1) | |
| 435 | + pOut_buf_cur[1] = pSrc[1]; | |
| 436 | + pOut_buf_cur += counter; | |
| 437 | + } | |
| 438 | + continue; | |
| 439 | + } | |
| 440 | + } | |
| 441 | +#endif | |
| 442 | + do | |
| 443 | + { | |
| 444 | + pOut_buf_cur[0] = pSrc[0]; | |
| 445 | + pOut_buf_cur[1] = pSrc[1]; | |
| 446 | + pOut_buf_cur[2] = pSrc[2]; | |
| 447 | + pOut_buf_cur += 3; pSrc += 3; | |
| 448 | + } while ((int)(counter -= 3) > 2); | |
| 449 | + if ((int)counter > 0) | |
| 450 | + { | |
| 451 | + pOut_buf_cur[0] = pSrc[0]; | |
| 452 | + if ((int)counter > 1) | |
| 453 | + pOut_buf_cur[1] = pSrc[1]; | |
| 454 | + pOut_buf_cur += counter; | |
| 455 | + } | |
| 456 | + } | |
| 457 | + } | |
| 458 | + } while (!(r->m_final & 1)); | |
| 459 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 460 | + { | |
| 461 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 462 | + } | |
| 463 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 464 | + TINFL_CR_FINISH | |
| 465 | + | |
| 466 | +common_exit: | |
| 467 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 468 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 469 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 470 | + { | |
| 471 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 472 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 473 | + while (buf_len) | |
| 474 | + { | |
| 475 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 476 | + { | |
| 477 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 478 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 479 | + } | |
| 480 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 481 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 482 | + } | |
| 483 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 484 | + } | |
| 485 | + return status; | |
| 486 | +} | |
| 487 | + | |
| 488 | +// Higher level helper functions. | |
| 489 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 490 | +{ | |
| 491 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 492 | + *pOut_len = 0; | |
| 493 | + tinfl_init(&decomp); | |
| 494 | + for ( ; ; ) | |
| 495 | + { | |
| 496 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 497 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 498 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 499 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 500 | + { | |
| 501 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 502 | + } | |
| 503 | + src_buf_ofs += src_buf_size; | |
| 504 | + *pOut_len += dst_buf_size; | |
| 505 | + if (status == TINFL_STATUS_DONE) break; | |
| 506 | + new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, | |
| 507 | + 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 508 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 509 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 510 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 511 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 512 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 513 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 514 | + | |
| 515 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 516 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 517 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 518 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 519 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 520 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 521 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 522 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 523 | + 7,7,7,7,7,7,7,7 }; | |
| 524 | + | |
| 525 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 526 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 527 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 528 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 529 | + | |
| 530 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 531 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 532 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 533 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 534 | + | |
| 535 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 536 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 537 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 538 | +{ | |
| 539 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 540 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 541 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 542 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 543 | + { | |
| 544 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 545 | + mz_uint offsets[256], cur_ofs = 0; | |
| 546 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 547 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 548 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 549 | + } | |
| 550 | + return pCur_syms; | |
| 551 | +} | |
| 552 | + | |
| 553 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 554 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 555 | +{ | |
| 556 | + int root, leaf, next, avbl, used, dpth; | |
| 557 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 558 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 559 | + for (next=1; next < n-1; next++) | |
| 560 | + { | |
| 561 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 562 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 563 | + } | |
| 564 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 565 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 566 | + while (avbl>0) | |
| 567 | + { | |
| 568 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 569 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 570 | + avbl = 2*used; dpth++; used = 0; | |
| 571 | + } | |
| 572 | +} | |
| 573 | + | |
| 574 | +// Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 575 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 576 | + { | |
| 577 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 578 | + mz_uint offsets[256], cur_ofs = 0; | |
| 579 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 580 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 581 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 582 | + } | |
| 583 | + return pCur_syms; | |
| 584 | +} | |
| 585 | + | |
| 586 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 587 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 588 | +{ | |
| 589 | + int root, leaf, next, avbl, used, dpth; | |
| 590 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 591 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 592 | + for (next=1; next < n-1; next++) | |
| 593 | + { | |
| 594 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 595 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 596 | + } | |
| 597 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 598 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 599 | + while (avbl>0) | |
| 600 | + { | |
| 601 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 602 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 603 | + avbl = 2*used; dpth++; used = 0; | |
| 604 | + } | |
| 605 | +} | |
| 606 | + | |
| 607 | +// Limits canonical Huffman code table's max code size. | |
| 608 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 609 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 610 | +{ | |
| 611 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 612 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 613 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 614 | + while (total != (1UL << max_code_size)) | |
| 615 | + { | |
| 616 | + pNum_codes[max_code_size]--; | |
| 617 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 618 | + total--; | |
| 619 | + } | |
| 620 | +} | |
| 621 | + | |
| 622 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 623 | +{ | |
| 624 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 625 | + if (static_table) | |
| 626 | + { | |
| 627 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 628 | + } | |
| 629 | + else | |
| 630 | + { | |
| 631 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 632 | + int num_used_syms = 0; | |
| 633 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 634 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 635 | + | |
| 636 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 637 | + | |
| 638 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 639 | + | |
| 640 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 641 | + | |
| 642 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 643 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 644 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 645 | + } | |
| 646 | + | |
| 647 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 648 | + | |
| 649 | + for (i = 0; i < table_len; i++) | |
| 650 | + { | |
| 651 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 652 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 653 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 654 | + } | |
| 655 | +} | |
| 656 | + | |
| 657 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 658 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 659 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 660 | + while (d->m_bits_in >= 8) { \ | |
| 661 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 662 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 663 | + d->m_bit_buffer >>= 8; \ | |
| 664 | + d->m_bits_in -= 8; \ | |
| 665 | + } \ | |
| 666 | +} MZ_MACRO_END | |
| 667 | + | |
| 668 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 669 | + if (rle_repeat_count < 3) { \ | |
| 670 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 671 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 672 | + } else { \ | |
| 673 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 674 | +} rle_repeat_count = 0; } } | |
| 675 | + | |
| 676 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 677 | + if (rle_z_count < 3) { \ | |
| 678 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 679 | + } else if (rle_z_count <= 10) { \ | |
| 680 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 681 | + } else { \ | |
| 682 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 683 | +} rle_z_count = 0; } } | |
| 684 | + | |
| 685 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 686 | + | |
| 687 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 688 | +{ | |
| 689 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); | |
| 690 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 691 | + | |
| 692 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 693 | + { | |
| 694 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 695 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 696 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 697 | + } | |
| 698 | +} | |
| 699 | + | |
| 700 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 701 | +{ | |
| 702 | + mz_uint i; | |
| 703 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 704 | + | |
| 705 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 706 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 707 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 708 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 709 | + | |
| 710 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 711 | + | |
| 712 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 713 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 714 | + | |
| 715 | + TDEFL_PUT_BITS(1, 2); | |
| 716 | +} | |
| 717 | + | |
| 718 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 719 | + | |
| 720 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 721 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 722 | +{ | |
| 723 | + mz_uint flags; | |
| 724 | + mz_uint8 *pLZ_codes; | |
| 725 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 726 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 727 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 728 | + mz_uint bits_in = d->m_bits_in; | |
| 729 | + | |
| 730 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 731 | + | |
| 732 | + flags = 1; | |
| 733 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 734 | + { | |
| 735 | + if (flags == 1) | |
| 736 | + flags = *pLZ_codes++ | 0x100; | |
| 737 | + | |
| 738 | + if (flags & 1) | |
| 739 | + { | |
| 740 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 741 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 742 | + | |
| 743 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 744 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 745 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 746 | + | |
| 747 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 748 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 749 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 750 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 751 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 752 | + sym = (match_dist < 512) ? s0 : s1; | |
| 753 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 754 | + | |
| 755 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 757 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 758 | + } | |
| 759 | + else | |
| 760 | + { | |
| 761 | + mz_uint lit = *pLZ_codes++; | |
| 762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 764 | + | |
| 765 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 766 | + { | |
| 767 | + flags >>= 1; | |
| 768 | + lit = *pLZ_codes++; | |
| 769 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 770 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 771 | + | |
| 772 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 773 | + { | |
| 774 | + flags >>= 1; | |
| 775 | + lit = *pLZ_codes++; | |
| 776 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 777 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 778 | + } | |
| 779 | + } | |
| 780 | + } | |
| 781 | + | |
| 782 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 783 | + return MZ_FALSE; | |
| 784 | + | |
| 785 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 786 | + pOutput_buf += (bits_in >> 3); | |
| 787 | + bit_buffer >>= (bits_in & ~7); | |
| 788 | + bits_in &= 7; | |
| 789 | + } | |
| 790 | + | |
| 791 | +#undef TDEFL_PUT_BITS_FAST | |
| 792 | + | |
| 793 | + d->m_pOutput_buf = pOutput_buf; | |
| 794 | + d->m_bits_in = 0; | |
| 795 | + d->m_bit_buffer = 0; | |
| 796 | + | |
| 797 | + while (bits_in) | |
| 798 | + { | |
| 799 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 800 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 801 | + bit_buffer >>= n; | |
| 802 | + bits_in -= n; | |
| 803 | + } | |
| 804 | + | |
| 805 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 806 | + | |
| 807 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 808 | +} | |
| 809 | +#else | |
| 810 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 811 | +{ | |
| 812 | + mz_uint flags; | |
| 813 | + mz_uint8 *pLZ_codes; | |
| 814 | + | |
| 815 | + flags = 1; | |
| 816 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 817 | + { | |
| 818 | + if (flags == 1) | |
| 819 | + flags = *pLZ_codes++ | 0x100; | |
| 820 | + if (flags & 1) | |
| 821 | + { | |
| 822 | + mz_uint sym, num_extra_bits; | |
| 823 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 824 | + | |
| 825 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 826 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 827 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 828 | + | |
| 829 | + if (match_dist < 512) | |
| 830 | + { | |
| 831 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 832 | + } | |
| 833 | + else | |
| 834 | + { | |
| 835 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 836 | + } | |
| 837 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 838 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 839 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 840 | + } | |
| 841 | + else | |
| 842 | + { | |
| 843 | + mz_uint lit = *pLZ_codes++; | |
| 844 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 845 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 846 | + } | |
| 847 | + } | |
| 848 | + | |
| 849 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 850 | + | |
| 851 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 852 | +} | |
| 853 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 854 | + | |
| 855 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 856 | +{ | |
| 857 | + if (static_block) | |
| 858 | + tdefl_start_static_block(d); | |
| 859 | + else | |
| 860 | + tdefl_start_dynamic_block(d); | |
| 861 | + return tdefl_compress_lz_codes(d); | |
| 862 | +} | |
| 863 | + | |
| 864 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 865 | +{ | |
| 866 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 867 | + mz_uint8 *pSaved_output_buf; | |
| 868 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 869 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 870 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 871 | + | |
| 872 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 873 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 874 | + | |
| 875 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 876 | + d->m_output_flush_ofs = 0; | |
| 877 | + d->m_output_flush_remaining = 0; | |
| 878 | + | |
| 879 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 880 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 881 | + | |
| 882 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 883 | + { | |
| 884 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 885 | + } | |
| 886 | + | |
| 887 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 888 | + | |
| 889 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 890 | + | |
| 891 | + if (!use_raw_block) | |
| 892 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 893 | + | |
| 894 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 895 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 896 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 897 | + { | |
| 898 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 899 | + TDEFL_PUT_BITS(0, 2); | |
| 900 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 901 | + for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) | |
| 902 | + { | |
| 903 | + TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); | |
| 904 | + } | |
| 905 | + for (i = 0; i < d->m_total_lz_bytes; ++i) | |
| 906 | + { | |
| 907 | + TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); | |
| 908 | + } | |
| 909 | + } | |
| 910 | + // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. | |
| 911 | + else if (!comp_block_succeeded) | |
| 912 | + { | |
| 913 | + d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 914 | + tdefl_compress_block(d, MZ_TRUE); | |
| 915 | + } | |
| 916 | + | |
| 917 | + if (flush) | |
| 918 | + { | |
| 919 | + if (flush == TDEFL_FINISH) | |
| 920 | + { | |
| 921 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 922 | + if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } | |
| 923 | + } | |
| 924 | + else | |
| 925 | + { | |
| 926 | + mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } | |
| 927 | + } | |
| 928 | + } | |
| 929 | + | |
| 930 | + MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 931 | + | |
| 932 | + memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); | |
| 933 | + memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); | |
| 934 | + | |
| 935 | + d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; | |
| 936 | + | |
| 937 | + if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) | |
| 938 | + { | |
| 939 | + if (d->m_pPut_buf_func) | |
| 940 | + { | |
| 941 | + *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; | |
| 942 | + if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) | |
| 943 | + return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); | |
| 944 | + } | |
| 945 | + else if (pOutput_buf_start == d->m_output_buf) | |
| 946 | + { | |
| 947 | + int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); | |
| 948 | + memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); | |
| 949 | + d->m_out_buf_ofs += bytes_to_copy; | |
| 950 | + if ((n -= bytes_to_copy) != 0) | |
| 951 | + { | |
| 952 | + d->m_output_flush_ofs = bytes_to_copy; | |
| 953 | + d->m_output_flush_remaining = n; | |
| 954 | + } | |
| 955 | + } | |
| 956 | + else | |
| 957 | + { | |
| 958 | + d->m_out_buf_ofs += n; | |
| 959 | + } | |
| 960 | + } | |
| 961 | + | |
| 962 | + return d->m_output_flush_remaining; | |
| 963 | +} | |
| 964 | + | |
| 965 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 966 | +#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) | |
| 967 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 968 | +{ | |
| 969 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 970 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 971 | + const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; | |
| 972 | + mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); | |
| 973 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 974 | + for ( ; ; ) | |
| 975 | + { | |
| 976 | + for ( ; ; ) | |
| 977 | + { | |
| 978 | + if (--num_probes_left == 0) return; | |
| 979 | + #define TDEFL_PROBE \ | |
| 980 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 981 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 982 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 983 | + if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; | |
| 984 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 985 | + } | |
| 986 | + if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; | |
| 987 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && | |
| 988 | + (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); | |
| 989 | + if (!probe_len) | |
| 990 | + { | |
| 991 | + *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; | |
| 992 | + } | |
| 993 | + else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) | |
| 994 | + { | |
| 995 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; | |
| 996 | + c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); | |
| 997 | + } | |
| 998 | + } | |
| 999 | +} | |
| 1000 | +#else | |
| 1001 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 1002 | +{ | |
| 1003 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 1004 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 1005 | + const mz_uint8 *s = d->m_dict + pos, *p, *q; | |
| 1006 | + mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; | |
| 1007 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 1008 | + for ( ; ; ) | |
| 1009 | + { | |
| 1010 | + for ( ; ; ) | |
| 1011 | + { | |
| 1012 | + if (--num_probes_left == 0) return; | |
| 1013 | + #define TDEFL_PROBE \ | |
| 1014 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 1015 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 1016 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 1017 | + if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; | |
| 1018 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 1019 | + } | |
| 1020 | + if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; | |
| 1021 | + if (probe_len > match_len) | |
| 1022 | + { | |
| 1023 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; | |
| 1024 | + c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; | |
| 1025 | + } | |
| 1026 | + } | |
| 1027 | +} | |
| 1028 | +#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1029 | + | |
| 1030 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN | |
| 1031 | +static mz_bool tdefl_compress_fast(tdefl_compressor *d) | |
| 1032 | +{ | |
| 1033 | + // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. | |
| 1034 | + mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; | |
| 1035 | + mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; | |
| 1036 | + mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1037 | + | |
| 1038 | + while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) | |
| 1039 | + { | |
| 1040 | + const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; | |
| 1041 | + mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1042 | + mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); | |
| 1043 | + d->m_src_buf_left -= num_bytes_to_process; | |
| 1044 | + lookahead_size += num_bytes_to_process; | |
| 1045 | + | |
| 1046 | + while (num_bytes_to_process) | |
| 1047 | + { | |
| 1048 | + mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); | |
| 1049 | + memcpy(d->m_dict + dst_pos, d->m_pSrc, n); | |
| 1050 | + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) | |
| 1051 | + memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); | |
| 1052 | + d->m_pSrc += n; | |
| 1053 | + dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1054 | + num_bytes_to_process -= n; | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | + dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); | |
| 1058 | + if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; | |
| 1059 | + | |
| 1060 | + while (lookahead_size >= 4) | |
| 1061 | + { | |
| 1062 | + mz_uint cur_match_dist, cur_match_len = 1; | |
| 1063 | + mz_uint8 *pCur_dict = d->m_dict + cur_pos; | |
| 1064 | + mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; | |
| 1065 | + mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; | |
| 1066 | + mz_uint probe_pos = d->m_hash[hash]; | |
| 1067 | + d->m_hash[hash] = (mz_uint16)lookahead_pos; | |
| 1068 | + | |
| 1069 | + if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) | |
| 1070 | + { | |
| 1071 | + const mz_uint16 *p = (const mz_uint16 *)pCur_dict; | |
| 1072 | + const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); | |
| 1073 | + mz_uint32 probe_len = 32; | |
| 1074 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, | |
| 1075 | + { | |
| 1076 | + *pMatch_dis with the input because_capacity = 128;ver | |
| 1077 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads | |
| 1078 | +} | |
| 1079 | + | |
| 1080 | +int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ | |
| 1081 | + r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ | |
| 1082 | +) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ | |
| 1083 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 1084 | + c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ | |
| 1085 | + n} \ | |
| 1086 | + m.avail_out = (mz_uint c = 0; \ | |
| 1087 | + break; \) ); | |
| 1088 | + cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); | |
| 1089 | + counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } | |
| 1090 | + while (pI expects the decompressor to never read | |
| 1091 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 1092 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 1093 | +// The slow path is only executed at the very end of the input buffer. | |
| 1094 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 1095 | + int temp; mz_uint code_len, c; \ | |
| 1096 | + if (num_bits < 15) { \ | |
| 1097 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 1098 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 1099 | + } else { \ | |
| 1100 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 1101 | + } \ | |
| 1102 | + } \ | |
| 1103 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 1104 | + code_len = temp >> 9, temp &= 511; \ | |
| 1105 | + else { \ | |
| 1106 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 1107 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 1108 | + | |
| 1109 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 1110 | +{ | |
| 1111 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1112 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1113 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1114 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1115 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1116 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1117 | + | |
| 1118 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1119 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1120 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1121 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1122 | + | |
| 1123 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1124 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1125 | + | |
| 1126 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1127 | + TINFL_CR_BEGIN | |
| 1128 | + | |
| 1129 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1130 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1131 | + { | |
| 1132 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1133 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1134 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1135 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1136 | + } | |
| 1137 | + | |
| 1138 | + do | |
| 1139 | + { | |
| 1140 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1141 | + if (r->m_type == 0) | |
| 1142 | + { | |
| 1143 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1144 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1145 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1146 | + while ((counter) && (num_bits)) | |
| 1147 | + { | |
| 1148 | + TINFL_GET_BITS(51, dist, 8); | |
| 1149 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1150 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1151 | + counter--; | |
| 1152 | + } | |
| 1153 | + while (counter) | |
| 1154 | + { | |
| 1155 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1156 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1157 | + { | |
| 1158 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1159 | + { | |
| 1160 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1161 | + } | |
| 1162 | + else | |
| 1163 | + { | |
| 1164 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1165 | + } | |
| 1166 | + } | |
| 1167 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1168 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1169 | + } | |
| 1170 | + } | |
| 1171 | + else if (r->m_type == 3) | |
| 1172 | + { | |
| 1173 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1174 | + } | |
| 1175 | + else | |
| 1176 | + { | |
| 1177 | + if (r->m_type == 1) | |
| 1178 | + { | |
| 1179 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1180 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1181 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1182 | + } | |
| 1183 | + else | |
| 1184 | + { | |
| 1185 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1186 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1187 | + r->m_table_sizes[2] = 19; | |
| 1188 | + } | |
| 1189 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1190 | + { | |
| 1191 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1192 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1193 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1194 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1195 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1196 | + if ((65536 != total) && (used_syms > 1)) | |
| 1197 | + { | |
| 1198 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1199 | + } | |
| 1200 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1201 | + { | |
| 1202 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1203 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1204 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1205 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1206 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1207 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1208 | + { | |
| 1209 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1210 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1211 | + } | |
| 1212 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1213 | + } | |
| 1214 | + if (r->m_type == 2) | |
| 1215 | + { | |
| 1216 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1217 | + { | |
| 1218 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 1219 | + if ((dist == 16) && (!counter)) | |
| 1220 | + { | |
| 1221 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 1222 | + } | |
| 1223 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 1224 | + TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 1225 | + }; | |
| 1226 | + mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1227 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1228 | + } | |
| 1229 | + else | |
| 1230 | + z_uint code_len; | |
| 1231 | +#if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 1232 | + } | |
| 1233 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 1234 | + { | |
| 1235 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 1236 | + } | |
| 1237 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 1238 | + } | |
| 1239 | + } | |
| 1240 | + for ( ; ; ) | |
| 1241 | + { | |
| 1242 | + mz_uint8 *pSrc; | |
| 1243 | + for ( ; ; ) | |
| 1244 | + { | |
| 1245 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 1246 | + { | |
| 1247 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 1248 | + if (counter >= 256) | |
| 1249 | + break; | |
| 1250 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1251 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1252 | + } | |
| 1253 | + else | |
| 1254 | + { | |
| 1255 | + int sym2; mz_uint code_len; | |
| 1256 | +#if TINFL_USE_64BIT_BITBUF | |
| 1257 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 1258 | +#else | |
| 1259 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1260 | +#endif | |
| 1261 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1262 | + code_len = sym2 >> 9; | |
| 1263 | + else | |
| 1264 | + { | |
| 1265 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1266 | + } | |
| 1267 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 1268 | + if (counter & 256) | |
| 1269 | + break; | |
| 1270 | + | |
| 1271 | +#if !TINFL_USE_64BIT_BITBUF | |
| 1272 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1273 | +#endif | |
| 1274 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1275 | + code_len = sym2 >> 9; | |
| 1276 | + else | |
| 1277 | + { | |
| 1278 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1279 | + } | |
| 1280 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 1281 | + | |
| 1282 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 1283 | + if (sym2 & 256) | |
| 1284 | + { | |
| 1285 | + pOut_buf_cur++; | |
| 1286 | + counter = sym2; | |
| 1287 | + break; | |
| 1288 | + } | |
| 1289 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 1290 | + pOut_buf_cur += 2; | |
| 1291 | + } | |
| 1292 | + } | |
| 1293 | + if ((counter &= 511) == 256) break; | |
| 1294 | + | |
| 1295 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 1296 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 1297 | + | |
| 1298 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 1299 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 1300 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 1301 | + | |
| 1302 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 1303 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 1304 | + { | |
| 1305 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 1306 | + } | |
| 1307 | + | |
| 1308 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 1309 | + | |
| 1310 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 1311 | + { | |
| 1312 | + while (counter--) | |
| 1313 | + { | |
| 1314 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1315 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 1316 | + } | |
| 1317 | + continue; | |
| 1318 | + } | |
| 1319 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1320 | + else if ((counter >= 9) && (counter <= dist)) | |
| 1321 | + { | |
| 1322 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 1323 | + do | |
| 1324 | + { | |
| 1325 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 1326 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 1327 | + pOut_buf_cur += 8; | |
| 1328 | + } while ((pSrc += 8) < pSrc_end); | |
| 1329 | + if ((counter &= 7) < 3) | |
| 1330 | + { | |
| 1331 | + if (counter) | |
| 1332 | + { | |
| 1333 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1334 | + if (counter > 1) | |
| 1335 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1336 | + pOut_buf_cur += counter; | |
| 1337 | + } | |
| 1338 | + continue; | |
| 1339 | + } | |
| 1340 | + } | |
| 1341 | +#endif | |
| 1342 | + do | |
| 1343 | + { | |
| 1344 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1345 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1346 | + pOut_buf_cur[2] = pSrc[2]; | |
| 1347 | + pOut_buf_cur += 3; pSrc += 3; | |
| 1348 | + } while ((int)(counter -= 3) > 2); | |
| 1349 | + if ((int)counter > 0) | |
| 1350 | + { | |
| 1351 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1352 | + if ((int)counter > 1) | |
| 1353 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1354 | + pOut_buf_cur += counter; | |
| 1355 | + } | |
| 1356 | + } | |
| 1357 | + } | |
| 1358 | + } while (!(r->m_final & 1)); | |
| 1359 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1360 | + { | |
| 1361 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 1362 | + } | |
| 1363 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 1364 | + TINFL_CR_FINISH | |
| 1365 | + | |
| 1366 | +common_exit: | |
| 1367 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 1368 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 1369 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 1370 | + { | |
| 1371 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 1372 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 1373 | + while (buf_len) | |
| 1374 | + { | |
| 1375 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 1376 | + { | |
| 1377 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 1378 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 1379 | + } | |
| 1380 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 1381 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 1382 | + } | |
| 1383 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 1384 | + } | |
| 1385 | + return status; | |
| 1386 | +} | |
| 1387 | + | |
| 1388 | +// Higher level helper functions. | |
| 1389 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 1390 | +{ | |
| 1391 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 1392 | + *pOut_len = 0; | |
| 1393 | + tinfl_init(&decomp); | |
| 1394 | + for ( ; ; ) | |
| 1395 | + { | |
| 1396 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 1397 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 1398 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1399 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 1400 | + { | |
| 1401 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1402 | + } | |
| 1403 | + src_buf_ofs += src_buf_size; | |
| 1404 | + *pOut_len += dst_buf_size; | |
| 1405 | + if (status == TINFL_STATUS_DONE) break; | |
| 1406 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 1407 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 1408 | + if (!pNew_buf) | |
| 1409 | + { | |
| 1410 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1411 | + } | |
| 1412 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 1413 | + } | |
| 1414 | + return pBuf; | |
| 1415 | +} | |
| 1416 | + | |
| 1417 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 1418 | +{ | |
| 1419 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 1420 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1421 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 1422 | +} | |
| 1423 | + | |
| 1424 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 1425 | +{ | |
| 1426 | + int result = 0; | |
| 1427 | + tinfl_decompressor decomp; | |
| 1428 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 1429 | + if (!pDict) | |
| 1430 | + return TINFL_STATUS_FAILED; | |
| 1431 | + tinfl_init(&decomp); | |
| 1432 | + for ( ; ; ) | |
| 1433 | + { | |
| 1434 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 1435 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 1436 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 1437 | + in_buf_ofs += in_buf_size; | |
| 1438 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 1439 | + break; | |
| 1440 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 1441 | + { | |
| 1442 | + result = (status == TINFL_STATUS_DONE); | |
| 1443 | + break; | |
| 1444 | + } | |
| 1445 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 1446 | + } | |
| 1447 | + MZ_FREE(pDict); | |
| 1448 | + *pIn_buf_size = in_buf_ofs; | |
| 1449 | + return result; | |
| 1450 | +} | |
| 1451 | + | |
| 1452 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 1453 | + | |
| 1454 | +// Purposely making these tables static for faster init and thread safety. | |
| 1455 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 1456 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 1457 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 1458 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 1459 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 1460 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 1461 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 1462 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 1463 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 1464 | + | |
| 1465 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 1466 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 1467 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 1468 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 1469 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 1470 | + | |
| 1471 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 1472 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 1473 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 1474 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1475 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1476 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 1477 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1478 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1479 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1480 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1481 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1482 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1483 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 1484 | + | |
| 1485 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 1486 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 1487 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1488 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1489 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1490 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1491 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1492 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1493 | + 7,7,7,7,7,7,7,7 }; | |
| 1494 | + | |
| 1495 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 1496 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 1497 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 1498 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 1499 | + | |
| 1500 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 1501 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 1502 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 1503 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 1504 | + | |
| 1505 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 1506 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 1507 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 1508 | +{ | |
| 1509 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 1510 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 1511 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 1512 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 1513 | + { | |
| 1514 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 1515 | + mz_uint offsets[256], cur_ofs = 0; | |
| 1516 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 1517 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 1518 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 1519 | + } | |
| 1520 | + return pCur_syms; | |
| 1521 | +} | |
| 1522 | + | |
| 1523 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 1524 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 1525 | +{ | |
| 1526 | + int root, leaf, next, avbl, used, dpth; | |
| 1527 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 1528 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 1529 | + for (next=1; next < n-1; next++) | |
| 1530 | + { | |
| 1531 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 1532 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 1533 | + } | |
| 1534 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 1535 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 1536 | + while (avbl>0) | |
| 1537 | + { | |
| 1538 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 1539 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 1540 | + avbl = 2*used; dpth++; used = 0; | |
| 1541 | + } | |
| 1542 | +} | |
| 1543 | + | |
| 1544 | +// Limits canonical Huffman code table's max code size. | |
| 1545 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 1546 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 1547 | +{ | |
| 1548 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 1549 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 1550 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 1551 | + while (total != (1UL << max_code_size)) | |
| 1552 | + { | |
| 1553 | + pNum_codes[max_code_size]--; | |
| 1554 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 1555 | + total--; | |
| 1556 | + } | |
| 1557 | +} | |
| 1558 | + | |
| 1559 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 1560 | +{ | |
| 1561 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 1562 | + if (static_table) | |
| 1563 | + { | |
| 1564 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 1565 | + } | |
| 1566 | + else | |
| 1567 | + { | |
| 1568 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 1569 | + int num_used_syms = 0; | |
| 1570 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 1571 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 1572 | + | |
| 1573 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 1574 | + | |
| 1575 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 1576 | + | |
| 1577 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 1578 | + | |
| 1579 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 1580 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 1581 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 1582 | + } | |
| 1583 | + | |
| 1584 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 1585 | + | |
| 1586 | + for (i = 0; i < table_len; i++) | |
| 1587 | + { | |
| 1588 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 1589 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 1590 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 1591 | + } | |
| 1592 | +} | |
| 1593 | + | |
| 1594 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 1595 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 1596 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 1597 | + while (d->m_bits_in >= 8) { \ | |
| 1598 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 1599 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 1600 | + d->m_bit_buffer >>= 8; \ | |
| 1601 | + d->m_bits_in -= 8; \ | |
| 1602 | + } \ | |
| 1603 | +} MZ_MACRO_END | |
| 1604 | + | |
| 1605 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 1606 | + if (rle_repeat_count < 3) { \ | |
| 1607 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 1608 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 1609 | + } else { \ | |
| 1610 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 1611 | +} rle_repeat_count = 0; } } | |
| 1612 | + | |
| 1613 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 1614 | + if (rle_z_count < 3) { \ | |
| 1615 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 1616 | + } else if (rle_z_count <= 10) { \ | |
| 1617 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 1618 | + } else { \ | |
| 1619 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 1620 | +} rle_z_count = 0; } } | |
| 1621 | + | |
| 1622 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 1623 | + | |
| 1624 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 1625 | +{ | |
| 1626 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; | |
| 1627 | + mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; | |
| 1628 | + | |
| 1629 | + d->m_huff_count[0][256] = 1; | |
| 1630 | + | |
| 1631 | + tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); | |
| 1632 | + tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); | |
| 1633 | + | |
| 1634 | + for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; | |
| 1635 | + for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; | |
| 1636 | + | |
| 1637 | + memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); | |
| 1638 | + memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); | |
| 1639 | + total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; | |
| 1640 | + | |
| 1641 | + memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1642 | + for (i = 0; i < total_code_sizes_to_pack; i++) | |
| 1643 | + { | |
| 1644 | + mz_uint8 code_size = code_sizes_to_pack[i]; | |
| 1645 | + if (!code_size) | |
| 1646 | + { | |
| 1647 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1648 | + if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1649 | + } | |
| 1650 | + else | |
| 1651 | + { | |
| 1652 | + TDEFL_RLE_ZERO_CODE_SIZE(); | |
| 1653 | + if (code_size != prev_code_size) | |
| 1654 | + { | |
| 1655 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1656 | + d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; | |
| 1657 | + } | |
| 1658 | + else if (++rle_repeat_count == 6) | |
| 1659 | + { | |
| 1660 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1661 | + } | |
| 1662 | + } | |
| 1663 | + prev_code_size = code_size; | |
| 1664 | + } | |
| 1665 | + if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1666 | + | |
| 1667 | + tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); | |
| 1668 | + | |
| 1669 | + TDEFL_PUT_BITS(2, 2); | |
| 1670 | + | |
| 1671 | + TDEFL_PUT_BITS(num_lit_codes - 257, 5); | |
| 1672 | + TDEFL_PUT_BITS(num_dist_codes - 1, 5); | |
| 1673 | + | |
| 1674 | + for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; | |
| 1675 | + num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); | |
| 1676 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 1677 | + | |
| 1678 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 1679 | + { | |
| 1680 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1681 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 1682 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 1683 | + } | |
| 1684 | +} | |
| 1685 | + | |
| 1686 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 1687 | +{ | |
| 1688 | + mz_uint i; | |
| 1689 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 1690 | + | |
| 1691 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 1692 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 1693 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 1694 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 1695 | + | |
| 1696 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 1697 | + | |
| 1698 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 1699 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 1700 | + | |
| 1701 | + TDEFL_PUT_BITS(1, 2); | |
| 1702 | +} | |
| 1703 | + | |
| 1704 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 1705 | + | |
| 1706 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1707 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1708 | +{ | |
| 1709 | + mz_uint flags; | |
| 1710 | + mz_uint8 *pLZ_codes; | |
| 1711 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 1712 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 1713 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 1714 | + mz_uint bits_in = d->m_bits_in; | |
| 1715 | + | |
| 1716 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 1717 | + | |
| 1718 | + flags = 1; | |
| 1719 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 1720 | + { | |
| 1721 | + if (flags == 1) | |
| 1722 | + flags = *pLZ_codes++ | 0x100; | |
| 1723 | + | |
| 1724 | + if (flags & 1) | |
| 1725 | + { | |
| 1726 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 1727 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 1728 | + | |
| 1729 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1730 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1731 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1732 | + | |
| 1733 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 1734 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 1735 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 1736 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 1737 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1738 | + sym = (match_dist < 512) ? s0 : s1; | |
| 1739 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 1740 | + | |
| 1741 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1742 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1743 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1744 | + } | |
| 1745 | + else | |
| 1746 | + { | |
| 1747 | + mz_uint lit = *pLZ_codes++; | |
| 1748 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1749 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1750 | + | |
| 1751 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1752 | + { | |
| 1753 | + flags >>= 1; | |
| 1754 | + lit = *pLZ_codes++; | |
| 1755 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1757 | + | |
| 1758 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1759 | + { | |
| 1760 | + flags >>= 1; | |
| 1761 | + lit = *pLZ_codes++; | |
| 1762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1764 | + } | |
| 1765 | + } | |
| 1766 | + } | |
| 1767 | + | |
| 1768 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 1769 | + return MZ_FALSE; | |
| 1770 | + | |
| 1771 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 1772 | + pOutput_buf += (bits_in >> 3); | |
| 1773 | + bit_buffer >>= (bits_in & ~7); | |
| 1774 | + bits_in &= 7; | |
| 1775 | + } | |
| 1776 | + | |
| 1777 | +#undef TDEFL_PUT_BITS_FAST | |
| 1778 | + | |
| 1779 | + d->m_pOutput_buf = pOutput_buf; | |
| 1780 | + d->m_bits_in = 0; | |
| 1781 | + d->m_bit_buffer = 0; | |
| 1782 | + | |
| 1783 | + while (bits_in) | |
| 1784 | + { | |
| 1785 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 1786 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 1787 | + bit_buffer >>= n; | |
| 1788 | + bits_in -= n; | |
| 1789 | + } | |
| 1790 | + | |
| 1791 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1792 | + | |
| 1793 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1794 | +} | |
| 1795 | +#else | |
| 1796 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1797 | +{ | |
| 1798 | + mz_uint flags; | |
| 1799 | + mz_uint8 *pLZ_codes; | |
| 1800 | + | |
| 1801 | + flags = 1; | |
| 1802 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 1803 | + { | |
| 1804 | + if (flags == 1) | |
| 1805 | + flags = *pLZ_codes++ | 0x100; | |
| 1806 | + if (flags & 1) | |
| 1807 | + { | |
| 1808 | + mz_uint sym, num_extra_bits; | |
| 1809 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 1810 | + | |
| 1811 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1812 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1813 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1814 | + | |
| 1815 | + if (match_dist < 512) | |
| 1816 | + { | |
| 1817 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 1818 | + } | |
| 1819 | + else | |
| 1820 | + { | |
| 1821 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1822 | + } | |
| 1823 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1824 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1825 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1826 | + } | |
| 1827 | + else | |
| 1828 | + { | |
| 1829 | + mz_uint lit = *pLZ_codes++; | |
| 1830 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1831 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1832 | + } | |
| 1833 | + } | |
| 1834 | + | |
| 1835 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1836 | + | |
| 1837 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1838 | +} | |
| 1839 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1840 | + | |
| 1841 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 1842 | +{ | |
| 1843 | + if (static_block) | |
| 1844 | + tdefl_start_static_block(d); | |
| 1845 | + else | |
| 1846 | + tdefl_start_dynamic_block(d); | |
| 1847 | + return tdefl_compress_lz_codes(d); | |
| 1848 | +} | |
| 1849 | + | |
| 1850 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 1851 | +{ | |
| 1852 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 1853 | + mz_uint8 *pSaved_output_buf; | |
| 1854 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 1855 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 1856 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 1857 | + | |
| 1858 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 1859 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 1860 | + | |
| 1861 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 1862 | + d->m_output_flush_ofs = 0; | |
| 1863 | + d->m_output_flush_remaining = 0; | |
| 1864 | + | |
| 1865 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 1866 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 1867 | + | |
| 1868 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 1869 | + { | |
| 1870 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 1871 | + } | |
| 1872 | + | |
| 1873 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 1874 | + | |
| 1875 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 1876 | + | |
| 1877 | + if (!use_raw_block) | |
| 1878 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 1879 | + | |
| 1880 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 1881 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 1882 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 1883 | + { | |
| 1884 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 1885 | + TDEFL_PUT_BITS(0, 2); | |
| 1886 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 1887 | + See "unlicense" statement at the end of this file. | |
| 1888 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 1889 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 1890 | + | |
| 1891 | + Most API's defined in miniz.c are optionaljority of prev. users so I'm | |
| 1892 | + op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1893 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1894 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1895 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1896 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1897 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1898 | + | |
| 1899 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1900 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1901 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1902 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1903 | + | |
| 1904 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1905 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1906 | + | |
| 1907 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1908 | + TINFL_CR_BEGIN | |
| 1909 | + | |
| 1910 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1911 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1912 | + { | |
| 1913 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1914 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1915 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1916 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1917 | + } | |
| 1918 | + | |
| 1919 | + do | |
| 1920 | + { | |
| 1921 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1922 | + if (r->m_type == 0) | |
| 1923 | + { | |
| 1924 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1925 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1926 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1927 | + while ((counter) && (num_bits)) | |
| 1928 | + { | |
| 1929 | + TINFL_GET_BITS(51, dist, 8); | |
| 1930 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1931 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1932 | + counter--; | |
| 1933 | + } | |
| 1934 | + while (counter) | |
| 1935 | + { | |
| 1936 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1937 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1938 | + { | |
| 1939 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1940 | + { | |
| 1941 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1942 | + } | |
| 1943 | + else | |
| 1944 | + { | |
| 1945 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1946 | + } | |
| 1947 | + } | |
| 1948 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1949 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1950 | + } | |
| 1951 | + } | |
| 1952 | + else if (r->m_type == 3) | |
| 1953 | + { | |
| 1954 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1955 | + } | |
| 1956 | + else | |
| 1957 | + { | |
| 1958 | + if (r->m_type == 1) | |
| 1959 | + { | |
| 1960 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1961 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1962 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1963 | + } | |
| 1964 | + else | |
| 1965 | + { | |
| 1966 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1967 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1968 | + r->m_table_sizes[2] = 19; | |
| 1969 | + } | |
| 1970 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1971 | + { | |
| 1972 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1973 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1974 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1975 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1976 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1977 | + if ((65536 != total) && (used_syms > 1)) | |
| 1978 | + { | |
| 1979 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1980 | + } | |
| 1981 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1982 | + { | |
| 1983 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1984 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1985 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1986 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1987 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1988 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1989 | + { | |
| 1990 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1991 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1992 | + } | |
| 1993 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1994 | + } | |
| 1995 | + if (r->m_type == 2) | |
| 1996 | + { | |
| 1997 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1998 | + { | |
| 1999 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 2000 | + if ((dist == 16) && (!counter)) | |
| 2001 | + { | |
| 2002 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 2003 | + } | |
| 2004 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 2005 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 2006 | + } | |
| 2007 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 2008 | + { | |
| 2009 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 2010 | + } | |
| 2011 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 2012 | + } | |
| 2013 | + } | |
| 2014 | + for ( ; ; ) | |
| 2015 | + { | |
| 2016 | + mz_uint8 *pSrc; | |
| 2017 | + for ( ; ; ) | |
| 2018 | + { | |
| 2019 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 2020 | + { | |
| 2021 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 2022 | + if (counter >= 256) | |
| 2023 | + break; | |
| 2024 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2025 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 2026 | + } | |
| 2027 | + else | |
| 2028 | + { | |
| 2029 | + int sym2; mz_uint code_len; | |
| 2030 | +#if TINFL_USE_64BIT_BITBUF | |
| 2031 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 2032 | +#else | |
| 2033 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2034 | +#endif | |
| 2035 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2036 | + code_len = sym2 >> 9; | |
| 2037 | + else | |
| 2038 | + { | |
| 2039 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2040 | + } | |
| 2041 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 2042 | + if (counter & 256) | |
| 2043 | + break; | |
| 2044 | + | |
| 2045 | +#if !TINFL_USE_64BIT_BITBUF | |
| 2046 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2047 | +#endif | |
| 2048 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2049 | + code_len = sym2 >> 9; | |
| 2050 | + else | |
| 2051 | + { | |
| 2052 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2053 | + } | |
| 2054 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 2055 | + | |
| 2056 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 2057 | + if (sym2 & 256) | |
| 2058 | + { | |
| 2059 | + pOut_buf_cur++; | |
| 2060 | + counter = sym2; | |
| 2061 | + break; | |
| 2062 | + } | |
| 2063 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 2064 | + pOut_buf_cur += 2; | |
| 2065 | + } | |
| 2066 | + } | |
| 2067 | + if ((counter &= 511) == 256) break; | |
| 2068 | + | |
| 2069 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 2070 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 2071 | + | |
| 2072 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 2073 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 2074 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 2075 | + | |
| 2076 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 2077 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 2078 | + { | |
| 2079 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 2080 | + } | |
| 2081 | + | |
| 2082 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 2083 | + | |
| 2084 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 2085 | + { | |
| 2086 | + while (counter--) | |
| 2087 | + { | |
| 2088 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2089 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 2090 | + } | |
| 2091 | + continue; | |
| 2092 | + } | |
| 2093 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 2094 | + else if ((counter >= 9) && (counter <= dist)) | |
| 2095 | + { | |
| 2096 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 2097 | + do | |
| 2098 | + { | |
| 2099 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 2100 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 2101 | + pOut_buf_cur += 8; | |
| 2102 | + } while ((pSrc += 8) < pSrc_end); | |
| 2103 | + if ((counter &= 7) < 3) | |
| 2104 | + { | |
| 2105 | + if (counter) | |
| 2106 | + { | |
| 2107 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2108 | + if (counter > 1) | |
| 2109 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2110 | + pOut_buf_cur += counter; | |
| 2111 | + } | |
| 2112 | + continue; | |
| 2113 | + } | |
| 2114 | + } | |
| 2115 | +#endif | |
| 2116 | + do | |
| 2117 | + { | |
| 2118 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2119 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2120 | + pOut_buf_cur[2] = pSrc[2]; | |
| 2121 | + pOut_buf_cur += 3; pSrc += 3; | |
| 2122 | + } while ((int)(counter -= 3) > 2); | |
| 2123 | + if ((int)counter > 0) | |
| 2124 | + { | |
| 2125 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2126 | + if ((int)counter > 1) | |
| 2127 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2128 | + pOut_buf_cur += counter; | |
| 2129 | + } | |
| 2130 | + } | |
| 2131 | + } | |
| 2132 | + } while (!(r->m_final & 1)); | |
| 2133 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 2134 | + { | |
| 2135 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 2136 | + } | |
| 2137 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 2138 | + TINFL_CR_FINISH | |
| 2139 | + | |
| 2140 | +common_exit: | |
| 2141 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 2142 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 2143 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 2144 | + { | |
| 2145 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 2146 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 2147 | + while (buf_len) | |
| 2148 | + { | |
| 2149 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 2150 | + { | |
| 2151 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 2152 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 2153 | + } | |
| 2154 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 2155 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 2156 | + } | |
| 2157 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 2158 | + } | |
| 2159 | + return status; | |
| 2160 | +} | |
| 2161 | + | |
| 2162 | +// Higher level helper functions. | |
| 2163 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 2164 | +{ | |
| 2165 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 2166 | + *pOut_len = 0; | |
| 2167 | + tinfl_init(&decomp); | |
| 2168 | + for ( ; ; ) | |
| 2169 | + { | |
| 2170 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 2171 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 2172 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2173 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 2174 | + { | |
| 2175 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2176 | + } | |
| 2177 | + src_buf_ofs += src_buf_size; | |
| 2178 | + *pOut_len += dst_buf_size; | |
| 2179 | + if (status == TINFL_STATUS_DONE) break; | |
| 2180 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 2181 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 2182 | + if (!pNew_buf) | |
| 2183 | + { | |
| 2184 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2185 | + } | |
| 2186 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 2187 | + } | |
| 2188 | + return pBuf; | |
| 2189 | +} | |
| 2190 | + | |
| 2191 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 2192 | +{ | |
| 2193 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 2194 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2195 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 2196 | +} | |
| 2197 | + | |
| 2198 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 2199 | +{ | |
| 2200 | + int result = 0; | |
| 2201 | + tinfl_decompressor decomp; | |
| 2202 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 2203 | + if (!pDict) | |
| 2204 | + return TINFL_STATUS_FAILED; | |
| 2205 | + tinfl_init(&decomp); | |
| 2206 | + for ( ; ; ) | |
| 2207 | + { | |
| 2208 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 2209 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 2210 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 2211 | + in_buf_ofs += in_buf_size; | |
| 2212 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 2213 | + break; | |
| 2214 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 2215 | + { | |
| 2216 | + result = (status == TINFL_STATUS_DONE); | |
| 2217 | + break; | |
| 2218 | + } | |
| 2219 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 2220 | + } | |
| 2221 | + MZ_FREE(pDict); | |
| 2222 | + *pIn_buf_size = in_buf_ofs; | |
| 2223 | + return result; | |
| 2224 | +} | |
| 2225 | + | |
| 2226 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 2227 | + | |
| 2228 | +// Purposely making these tables static for faster init and thread safety. | |
| 2229 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 2230 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 2231 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 2232 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 2233 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 2234 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 2235 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 2236 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 2237 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 2238 | + | |
| 2239 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 2240 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 2241 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 2242 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 2243 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 2244 | + | |
| 2245 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 2246 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 2247 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 2248 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2249 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2250 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 2251 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| 1 | /* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 2 | See "unlicense" statement at the end of this file. |
| 3 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 4 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 5 | |
| 6 | Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define |
| 7 | MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). |
| 8 | |
| 9 | * Change History |
| 10 | 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. |
| 11 | void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); |
| 12 | void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); |
| 13 | |
| 14 | // Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. |
| 15 | typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); |
| 16 | |
| 17 | // tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; |
| 18 | |
| 19 | if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; |
| 20 | pState->m_has_flushed |= (flush == MZ_FINISH); |
| 21 | |
| 22 | if ((flush == MZ_FINISH) && (first_call)) |
| 23 | { |
| 24 | // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. |
| 25 | decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; |
| 26 | in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; |
| 27 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); |
| 28 | pState->m_last_status = status; |
| 29 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; |
| 30 | pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 31 | pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; |
| 32 | |
| 33 | if (status < 0) |
| 34 | return MZ_DATA_ERROR; |
| 35 | else if (status != TINFL_STATUS_DONE) |
| 36 | { |
| 37 | pState->m_last_status = TINFL_STATUS_FAILED; |
| 38 | return MZ_BUF_ERROR; |
| 39 | } |
| 40 | return MZ_STREAM_END; |
| 41 | } |
| 42 | // flush != MZ_FINISH then we must assume there's more input. |
| 43 | if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; |
| 44 | |
| 45 | if (pState->m_dict_avail) |
| 46 | { |
| 47 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 48 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 49 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 50 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 51 | return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 52 | } |
| 53 | |
| 54 | for ( ; ; ) |
| 55 | { |
| 56 | in_bytes = pStream->avail_in; |
| 57 | out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; |
| 58 | |
| 59 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); |
| 60 | pState->m_last_status = status; |
| 61 | |
| 62 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; |
| 63 | pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 64 | |
| 65 | pState->m_dict_avail = (mz_uint)out_bytes; |
| 66 | |
| 67 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 68 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 69 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 70 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 71 | |
| 72 | if (status < 0) |
| 73 | return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). |
| 74 | else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) |
| 75 | return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. |
| 76 | else if (flush == MZ_FINISH) |
| 77 | { |
| 78 | // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. |
| 79 | if (status == TINFL_STATUS_DONE) |
| 80 | return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; |
| 81 | // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. |
| 82 | else if (!pStream->avail_out) |
| 83 | return MZ_BUF_ERROR; |
| 84 | } |
| 85 | else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) |
| 86 | break; |
| 87 | } |
| 88 | |
| 89 | return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 90 | } |
| 91 | |
| 92 | int mz_inflateEnd(mz_streamp pStream) |
| 93 | { |
| 94 | if (!pStream) |
| 95 | return MZ_STREAM_ERROR; |
| 96 | if (pStream->state) |
| 97 | { |
| 98 | pStream->zfree(pStream->opaque, pStream->state); |
| 99 | pStream->state = NULL; |
| 100 | } |
| 101 | return MZ_OK; |
| 102 | } |
| 103 | |
| 104 | int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) |
| 105 | { |
| 106 | mz_stream stream; |
| 107 | int status; |
| 108 | memset(&stream, 0, sizeof(stream)); |
| 109 | |
| 110 | // In case mz_ulong is 64-bits (argh I hate longs). |
| 111 | if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; |
| 112 | |
| 113 | stream.next_in = pSource; |
| 114 | stream.avail_in = (mz_uint32)source_len; |
| 115 | stream.next_out = pDest; |
| 116 | stream.avail_out = (mz_uint32)*pDest_len; |
| 117 | |
| 118 | status = mz_inflateInit(&stream); |
| 119 | if (status != MZ_OK) |
| 120 | return status; |
| 121 | |
| 122 | status = mz_inflate(&stream, MZ_FINISH); |
| 123 | if (status != MZ_STREAM_END) |
| 124 | { |
| 125 | mz_inflateEnd(&stream); |
| 126 | return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; |
| 127 | } |
| 128 | *pDest_len = stream.total_out; |
| 129 | |
| 130 | return mz_inflateEnd(&stream); |
| 131 | } |
| 132 | |
| 133 | const char *mz_error(int err) |
| 134 | { |
| 135 | static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = |
| 136 | { |
| 137 | { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, |
| 138 | { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } |
| 139 | }; |
| 140 | mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; |
| 141 | return NULL; |
| 142 | } |
| 143 | |
| 144 | #endif //MINIZ_NO_ZLIB_APIS |
| 145 | |
| 146 | // ------------------- Low-level Decompression (completely independent from all compression API's) |
| 147 | |
| 148 | #define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) |
| 149 | #define TINFL_MEMSET(p, c, l) memset(p, c, l) |
| 150 | |
| 151 | #define TINFL_CR_BEGIN switch(r->m_state) { case 0: |
| 152 | #define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END |
| 153 | #define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END |
| 154 | #define TINFL_CR_FINISH } |
| 155 | |
| 156 | // TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never |
| 157 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. |
| 158 | #define TINFL_GET_BYTE(state_index, c) do { \ |
| 159 | if (pIn_buf_cur >= pIn_buf_end) { \ |
| 160 | for ( ; ; ) { \ |
| 161 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ |
| 162 | TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ |
| 163 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 164 | c = *pIn_buf_cur++; \ |
| 165 | break; \ |
| 166 | } \ |
| 167 | } else { \ |
| 168 | c = 0; \ |
| 169 | break; \ |
| 170 | } \ |
| 171 | } \ |
| 172 | } else c = *pIn_buf_cur++; } MZ_MACRO_END |
| 173 | |
| 174 | #define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) |
| 175 | #define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 176 | #define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 177 | |
| 178 | // TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. |
| 179 | // It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a |
| 180 | // Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the |
| 181 | // bit buffer contains >=15 bits (deflate's max. Huffman code size). |
| 182 | #define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ |
| 183 | do { \ |
| 184 | temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ |
| 185 | if (temp >= 0) { \ |
| 186 | code_len = temp >> 9; \ |
| 187 | if ((code_len) && (num_bits >= code_len)) \ |
| 188 | break; \ |
| 189 | } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ |
| 190 | code_len = TINFL_FAST_LOOKUP_BITS; \ |
| 191 | do { \ |
| 192 | temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ |
| 193 | } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ |
| 194 | } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ |
| 195 | } while (num_bits < 15); |
| 196 | |
| 197 | // TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read |
| 198 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 199 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 200 | // The slow path is only executed at the very end of the input buffer. |
| 201 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 202 | int temp; mz_uint code_len, c; \ |
| 203 | if (num_bits < 15) { \ |
| 204 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 205 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 206 | } else { \ |
| 207 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 208 | } \ |
| 209 | } \ |
| 210 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 211 | code_len = temp >> 9, temp &= 511; \ |
| 212 | else { \ |
| 213 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 214 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 215 | |
| 216 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 217 | { |
| 218 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 219 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 220 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 221 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 222 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 223 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 224 | |
| 225 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 226 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 227 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 228 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 229 | |
| 230 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 231 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 232 | |
| 233 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 234 | TINFL_CR_BEGIN |
| 235 | |
| 236 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 237 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 238 | { |
| 239 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 240 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 241 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 242 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 243 | } |
| 244 | |
| 245 | do |
| 246 | { |
| 247 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 248 | if (r->m_type == 0) |
| 249 | { |
| 250 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 251 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 252 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 253 | while ((counter) && (num_bits)) |
| 254 | { |
| 255 | TINFL_GET_BITS(51, dist, 8); |
| 256 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 257 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 258 | counter--; |
| 259 | } |
| 260 | while (counter) |
| 261 | { |
| 262 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 263 | while (pIn_buf_cur >= pIn_buf_end) |
| 264 | { |
| 265 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 266 | { |
| 267 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 268 | } |
| 269 | else |
| 270 | { |
| 271 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 272 | } |
| 273 | } |
| 274 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 275 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 276 | } |
| 277 | } |
| 278 | else if (r->m_type == 3) |
| 279 | { |
| 280 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | if (r->m_type == 1) |
| 285 | { |
| 286 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 287 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 288 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 289 | } |
| 290 | else |
| 291 | { |
| 292 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 293 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 294 | r->m_table_sizes[2] = 19; |
| 295 | } |
| 296 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 297 | { |
| 298 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 299 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 300 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 301 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 302 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 303 | if ((65536 != total) && (used_syms > 1)) |
| 304 | { |
| 305 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 306 | } |
| 307 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 308 | { |
| 309 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 310 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 311 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 312 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 313 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 314 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 315 | { |
| 316 | tree_cur -= ((rev_code >>= 1) & 1); |
| 317 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 318 | } |
| 319 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 320 | } |
| 321 | if (r->m_type == 2) |
| 322 | { |
| 323 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 324 | { |
| 325 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 326 | if ((dist == 16) && (!counter)) |
| 327 | { |
| 328 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 329 | } |
| 330 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 331 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 332 | } |
| 333 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 334 | { |
| 335 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 336 | } |
| 337 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 338 | } |
| 339 | } |
| 340 | for ( ; ; ) |
| 341 | { |
| 342 | mz_uint8 *pSrc; |
| 343 | for ( ; ; ) |
| 344 | { |
| 345 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 346 | { |
| 347 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 348 | if (counter >= 256) |
| 349 | break; |
| 350 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 351 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 352 | } |
| 353 | else |
| 354 | { |
| 355 | int sym2; mz_uint code_len; |
| 356 | #if TINFL_USE_64BIT_BITBUF |
| 357 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 358 | #else |
| 359 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 360 | #endif |
| 361 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 362 | code_len = sym2 >> 9; |
| 363 | else |
| 364 | { |
| 365 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 366 | } |
| 367 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 368 | if (counter & 256) |
| 369 | break; |
| 370 | |
| 371 | #if !TINFL_USE_64BIT_BITBUF |
| 372 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 373 | #endif |
| 374 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 375 | code_len = sym2 >> 9; |
| 376 | else |
| 377 | { |
| 378 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 379 | } |
| 380 | bit_buf >>= code_len; num_bits -= code_len; |
| 381 | |
| 382 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 383 | if (sym2 & 256) |
| 384 | { |
| 385 | pOut_buf_cur++; |
| 386 | counter = sym2; |
| 387 | break; |
| 388 | } |
| 389 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 390 | pOut_buf_cur += 2; |
| 391 | } |
| 392 | } |
| 393 | if ((counter &= 511) == 256) break; |
| 394 | |
| 395 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 396 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 397 | |
| 398 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 399 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 400 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 401 | |
| 402 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 403 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 404 | { |
| 405 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 406 | } |
| 407 | |
| 408 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 409 | |
| 410 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 411 | { |
| 412 | while (counter--) |
| 413 | { |
| 414 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 415 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 416 | } |
| 417 | continue; |
| 418 | } |
| 419 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 420 | else if ((counter >= 9) && (counter <= dist)) |
| 421 | { |
| 422 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 423 | do |
| 424 | { |
| 425 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 426 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 427 | pOut_buf_cur += 8; |
| 428 | } while ((pSrc += 8) < pSrc_end); |
| 429 | if ((counter &= 7) < 3) |
| 430 | { |
| 431 | if (counter) |
| 432 | { |
| 433 | pOut_buf_cur[0] = pSrc[0]; |
| 434 | if (counter > 1) |
| 435 | pOut_buf_cur[1] = pSrc[1]; |
| 436 | pOut_buf_cur += counter; |
| 437 | } |
| 438 | continue; |
| 439 | } |
| 440 | } |
| 441 | #endif |
| 442 | do |
| 443 | { |
| 444 | pOut_buf_cur[0] = pSrc[0]; |
| 445 | pOut_buf_cur[1] = pSrc[1]; |
| 446 | pOut_buf_cur[2] = pSrc[2]; |
| 447 | pOut_buf_cur += 3; pSrc += 3; |
| 448 | } while ((int)(counter -= 3) > 2); |
| 449 | if ((int)counter > 0) |
| 450 | { |
| 451 | pOut_buf_cur[0] = pSrc[0]; |
| 452 | if ((int)counter > 1) |
| 453 | pOut_buf_cur[1] = pSrc[1]; |
| 454 | pOut_buf_cur += counter; |
| 455 | } |
| 456 | } |
| 457 | } |
| 458 | } while (!(r->m_final & 1)); |
| 459 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 460 | { |
| 461 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 462 | } |
| 463 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 464 | TINFL_CR_FINISH |
| 465 | |
| 466 | common_exit: |
| 467 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 468 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 469 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 470 | { |
| 471 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 472 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 473 | while (buf_len) |
| 474 | { |
| 475 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 476 | { |
| 477 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 478 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 479 | } |
| 480 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 481 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 482 | } |
| 483 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 484 | } |
| 485 | return status; |
| 486 | } |
| 487 | |
| 488 | // Higher level helper functions. |
| 489 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 490 | { |
| 491 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 492 | *pOut_len = 0; |
| 493 | tinfl_init(&decomp); |
| 494 | for ( ; ; ) |
| 495 | { |
| 496 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 497 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 498 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 499 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 500 | { |
| 501 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 502 | } |
| 503 | src_buf_ofs += src_buf_size; |
| 504 | *pOut_len += dst_buf_size; |
| 505 | if (status == TINFL_STATUS_DONE) break; |
| 506 | new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, |
| 507 | 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 508 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 509 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 510 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 511 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 512 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 513 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 514 | |
| 515 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 516 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 517 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 518 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 519 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 520 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 521 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 522 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 523 | 7,7,7,7,7,7,7,7 }; |
| 524 | |
| 525 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 526 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 527 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 528 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 529 | |
| 530 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 531 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 532 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 533 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 534 | |
| 535 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 536 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 537 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 538 | { |
| 539 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 540 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 541 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 542 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 543 | { |
| 544 | const mz_uint32* pHist = &hist[pass << 8]; |
| 545 | mz_uint offsets[256], cur_ofs = 0; |
| 546 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 547 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 548 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 549 | } |
| 550 | return pCur_syms; |
| 551 | } |
| 552 | |
| 553 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 554 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 555 | { |
| 556 | int root, leaf, next, avbl, used, dpth; |
| 557 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 558 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 559 | for (next=1; next < n-1; next++) |
| 560 | { |
| 561 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 562 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 563 | } |
| 564 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 565 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 566 | while (avbl>0) |
| 567 | { |
| 568 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 569 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 570 | avbl = 2*used; dpth++; used = 0; |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | // Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 575 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 576 | { |
| 577 | const mz_uint32* pHist = &hist[pass << 8]; |
| 578 | mz_uint offsets[256], cur_ofs = 0; |
| 579 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 580 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 581 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 582 | } |
| 583 | return pCur_syms; |
| 584 | } |
| 585 | |
| 586 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 587 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 588 | { |
| 589 | int root, leaf, next, avbl, used, dpth; |
| 590 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 591 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 592 | for (next=1; next < n-1; next++) |
| 593 | { |
| 594 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 595 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 596 | } |
| 597 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 598 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 599 | while (avbl>0) |
| 600 | { |
| 601 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 602 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 603 | avbl = 2*used; dpth++; used = 0; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | // Limits canonical Huffman code table's max code size. |
| 608 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 609 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 610 | { |
| 611 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 612 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 613 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 614 | while (total != (1UL << max_code_size)) |
| 615 | { |
| 616 | pNum_codes[max_code_size]--; |
| 617 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 618 | total--; |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 623 | { |
| 624 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 625 | if (static_table) |
| 626 | { |
| 627 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 628 | } |
| 629 | else |
| 630 | { |
| 631 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 632 | int num_used_syms = 0; |
| 633 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 634 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 635 | |
| 636 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 637 | |
| 638 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 639 | |
| 640 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 641 | |
| 642 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 643 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 644 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 645 | } |
| 646 | |
| 647 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 648 | |
| 649 | for (i = 0; i < table_len; i++) |
| 650 | { |
| 651 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 652 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 653 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 658 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 659 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 660 | while (d->m_bits_in >= 8) { \ |
| 661 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 662 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 663 | d->m_bit_buffer >>= 8; \ |
| 664 | d->m_bits_in -= 8; \ |
| 665 | } \ |
| 666 | } MZ_MACRO_END |
| 667 | |
| 668 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 669 | if (rle_repeat_count < 3) { \ |
| 670 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 671 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 672 | } else { \ |
| 673 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 674 | } rle_repeat_count = 0; } } |
| 675 | |
| 676 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 677 | if (rle_z_count < 3) { \ |
| 678 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 679 | } else if (rle_z_count <= 10) { \ |
| 680 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 681 | } else { \ |
| 682 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 683 | } rle_z_count = 0; } } |
| 684 | |
| 685 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 686 | |
| 687 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 688 | { |
| 689 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); |
| 690 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 691 | |
| 692 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 693 | { |
| 694 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 695 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 696 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 701 | { |
| 702 | mz_uint i; |
| 703 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 704 | |
| 705 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 706 | for ( ; i <= 255; ++i) *p++ = 9; |
| 707 | for ( ; i <= 279; ++i) *p++ = 7; |
| 708 | for ( ; i <= 287; ++i) *p++ = 8; |
| 709 | |
| 710 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 711 | |
| 712 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 713 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 714 | |
| 715 | TDEFL_PUT_BITS(1, 2); |
| 716 | } |
| 717 | |
| 718 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 719 | |
| 720 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 721 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 722 | { |
| 723 | mz_uint flags; |
| 724 | mz_uint8 *pLZ_codes; |
| 725 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 726 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 727 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 728 | mz_uint bits_in = d->m_bits_in; |
| 729 | |
| 730 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 731 | |
| 732 | flags = 1; |
| 733 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 734 | { |
| 735 | if (flags == 1) |
| 736 | flags = *pLZ_codes++ | 0x100; |
| 737 | |
| 738 | if (flags & 1) |
| 739 | { |
| 740 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 741 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 742 | |
| 743 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 744 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 745 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 746 | |
| 747 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 748 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 749 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 750 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 751 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 752 | sym = (match_dist < 512) ? s0 : s1; |
| 753 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 754 | |
| 755 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 757 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 758 | } |
| 759 | else |
| 760 | { |
| 761 | mz_uint lit = *pLZ_codes++; |
| 762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 764 | |
| 765 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 766 | { |
| 767 | flags >>= 1; |
| 768 | lit = *pLZ_codes++; |
| 769 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 770 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 771 | |
| 772 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 773 | { |
| 774 | flags >>= 1; |
| 775 | lit = *pLZ_codes++; |
| 776 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 777 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 783 | return MZ_FALSE; |
| 784 | |
| 785 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 786 | pOutput_buf += (bits_in >> 3); |
| 787 | bit_buffer >>= (bits_in & ~7); |
| 788 | bits_in &= 7; |
| 789 | } |
| 790 | |
| 791 | #undef TDEFL_PUT_BITS_FAST |
| 792 | |
| 793 | d->m_pOutput_buf = pOutput_buf; |
| 794 | d->m_bits_in = 0; |
| 795 | d->m_bit_buffer = 0; |
| 796 | |
| 797 | while (bits_in) |
| 798 | { |
| 799 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 800 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 801 | bit_buffer >>= n; |
| 802 | bits_in -= n; |
| 803 | } |
| 804 | |
| 805 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 806 | |
| 807 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 808 | } |
| 809 | #else |
| 810 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 811 | { |
| 812 | mz_uint flags; |
| 813 | mz_uint8 *pLZ_codes; |
| 814 | |
| 815 | flags = 1; |
| 816 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 817 | { |
| 818 | if (flags == 1) |
| 819 | flags = *pLZ_codes++ | 0x100; |
| 820 | if (flags & 1) |
| 821 | { |
| 822 | mz_uint sym, num_extra_bits; |
| 823 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 824 | |
| 825 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 826 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 827 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 828 | |
| 829 | if (match_dist < 512) |
| 830 | { |
| 831 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 832 | } |
| 833 | else |
| 834 | { |
| 835 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 836 | } |
| 837 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 838 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 839 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 840 | } |
| 841 | else |
| 842 | { |
| 843 | mz_uint lit = *pLZ_codes++; |
| 844 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 845 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 850 | |
| 851 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 852 | } |
| 853 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 854 | |
| 855 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 856 | { |
| 857 | if (static_block) |
| 858 | tdefl_start_static_block(d); |
| 859 | else |
| 860 | tdefl_start_dynamic_block(d); |
| 861 | return tdefl_compress_lz_codes(d); |
| 862 | } |
| 863 | |
| 864 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 865 | { |
| 866 | mz_uint saved_bit_buf, saved_bits_in; |
| 867 | mz_uint8 *pSaved_output_buf; |
| 868 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 869 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 870 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 871 | |
| 872 | d->m_pOutput_buf = pOutput_buf_start; |
| 873 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 874 | |
| 875 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 876 | d->m_output_flush_ofs = 0; |
| 877 | d->m_output_flush_remaining = 0; |
| 878 | |
| 879 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 880 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 881 | |
| 882 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 883 | { |
| 884 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 885 | } |
| 886 | |
| 887 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 888 | |
| 889 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 890 | |
| 891 | if (!use_raw_block) |
| 892 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 893 | |
| 894 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 895 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 896 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 897 | { |
| 898 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 899 | TDEFL_PUT_BITS(0, 2); |
| 900 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 901 | for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) |
| 902 | { |
| 903 | TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); |
| 904 | } |
| 905 | for (i = 0; i < d->m_total_lz_bytes; ++i) |
| 906 | { |
| 907 | TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); |
| 908 | } |
| 909 | } |
| 910 | // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. |
| 911 | else if (!comp_block_succeeded) |
| 912 | { |
| 913 | d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 914 | tdefl_compress_block(d, MZ_TRUE); |
| 915 | } |
| 916 | |
| 917 | if (flush) |
| 918 | { |
| 919 | if (flush == TDEFL_FINISH) |
| 920 | { |
| 921 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 922 | if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } |
| 923 | } |
| 924 | else |
| 925 | { |
| 926 | mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 931 | |
| 932 | memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); |
| 933 | memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); |
| 934 | |
| 935 | d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; |
| 936 | |
| 937 | if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) |
| 938 | { |
| 939 | if (d->m_pPut_buf_func) |
| 940 | { |
| 941 | *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; |
| 942 | if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) |
| 943 | return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); |
| 944 | } |
| 945 | else if (pOutput_buf_start == d->m_output_buf) |
| 946 | { |
| 947 | int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); |
| 948 | memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); |
| 949 | d->m_out_buf_ofs += bytes_to_copy; |
| 950 | if ((n -= bytes_to_copy) != 0) |
| 951 | { |
| 952 | d->m_output_flush_ofs = bytes_to_copy; |
| 953 | d->m_output_flush_remaining = n; |
| 954 | } |
| 955 | } |
| 956 | else |
| 957 | { |
| 958 | d->m_out_buf_ofs += n; |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | return d->m_output_flush_remaining; |
| 963 | } |
| 964 | |
| 965 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 966 | #define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) |
| 967 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 968 | { |
| 969 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 970 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 971 | const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; |
| 972 | mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); |
| 973 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 974 | for ( ; ; ) |
| 975 | { |
| 976 | for ( ; ; ) |
| 977 | { |
| 978 | if (--num_probes_left == 0) return; |
| 979 | #define TDEFL_PROBE \ |
| 980 | next_probe_pos = d->m_next[probe_pos]; \ |
| 981 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 982 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 983 | if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; |
| 984 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 985 | } |
| 986 | if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; |
| 987 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && |
| 988 | (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); |
| 989 | if (!probe_len) |
| 990 | { |
| 991 | *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; |
| 992 | } |
| 993 | else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) |
| 994 | { |
| 995 | *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; |
| 996 | c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); |
| 997 | } |
| 998 | } |
| 999 | } |
| 1000 | #else |
| 1001 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 1002 | { |
| 1003 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 1004 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 1005 | const mz_uint8 *s = d->m_dict + pos, *p, *q; |
| 1006 | mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; |
| 1007 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 1008 | for ( ; ; ) |
| 1009 | { |
| 1010 | for ( ; ; ) |
| 1011 | { |
| 1012 | if (--num_probes_left == 0) return; |
| 1013 | #define TDEFL_PROBE \ |
| 1014 | next_probe_pos = d->m_next[probe_pos]; \ |
| 1015 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 1016 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 1017 | if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; |
| 1018 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 1019 | } |
| 1020 | if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; |
| 1021 | if (probe_len > match_len) |
| 1022 | { |
| 1023 | *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; |
| 1024 | c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1029 | |
| 1030 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN |
| 1031 | static mz_bool tdefl_compress_fast(tdefl_compressor *d) |
| 1032 | { |
| 1033 | // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. |
| 1034 | mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; |
| 1035 | mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; |
| 1036 | mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; |
| 1037 | |
| 1038 | while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) |
| 1039 | { |
| 1040 | const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; |
| 1041 | mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1042 | mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); |
| 1043 | d->m_src_buf_left -= num_bytes_to_process; |
| 1044 | lookahead_size += num_bytes_to_process; |
| 1045 | |
| 1046 | while (num_bytes_to_process) |
| 1047 | { |
| 1048 | mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); |
| 1049 | memcpy(d->m_dict + dst_pos, d->m_pSrc, n); |
| 1050 | if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) |
| 1051 | memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); |
| 1052 | d->m_pSrc += n; |
| 1053 | dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1054 | num_bytes_to_process -= n; |
| 1055 | } |
| 1056 | |
| 1057 | dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); |
| 1058 | if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; |
| 1059 | |
| 1060 | while (lookahead_size >= 4) |
| 1061 | { |
| 1062 | mz_uint cur_match_dist, cur_match_len = 1; |
| 1063 | mz_uint8 *pCur_dict = d->m_dict + cur_pos; |
| 1064 | mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; |
| 1065 | mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; |
| 1066 | mz_uint probe_pos = d->m_hash[hash]; |
| 1067 | d->m_hash[hash] = (mz_uint16)lookahead_pos; |
| 1068 | |
| 1069 | if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) |
| 1070 | { |
| 1071 | const mz_uint16 *p = (const mz_uint16 *)pCur_dict; |
| 1072 | const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); |
| 1073 | mz_uint32 probe_len = 32; |
| 1074 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, |
| 1075 | { |
| 1076 | *pMatch_dis with the input because_capacity = 128;ver |
| 1077 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads |
| 1078 | } |
| 1079 | |
| 1080 | int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ |
| 1081 | r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ |
| 1082 | ) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ |
| 1083 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 1084 | c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ |
| 1085 | n} \ |
| 1086 | m.avail_out = (mz_uint c = 0; \ |
| 1087 | break; \) ); |
| 1088 | cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); |
| 1089 | counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } |
| 1090 | while (pI expects the decompressor to never read |
| 1091 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 1092 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 1093 | // The slow path is only executed at the very end of the input buffer. |
| 1094 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 1095 | int temp; mz_uint code_len, c; \ |
| 1096 | if (num_bits < 15) { \ |
| 1097 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 1098 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 1099 | } else { \ |
| 1100 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 1101 | } \ |
| 1102 | } \ |
| 1103 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 1104 | code_len = temp >> 9, temp &= 511; \ |
| 1105 | else { \ |
| 1106 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 1107 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 1108 | |
| 1109 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 1110 | { |
| 1111 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1112 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1113 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1114 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1115 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1116 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1117 | |
| 1118 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1119 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1120 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1121 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1122 | |
| 1123 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1124 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1125 | |
| 1126 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1127 | TINFL_CR_BEGIN |
| 1128 | |
| 1129 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1130 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1131 | { |
| 1132 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1133 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1134 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1135 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1136 | } |
| 1137 | |
| 1138 | do |
| 1139 | { |
| 1140 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1141 | if (r->m_type == 0) |
| 1142 | { |
| 1143 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1144 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1145 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1146 | while ((counter) && (num_bits)) |
| 1147 | { |
| 1148 | TINFL_GET_BITS(51, dist, 8); |
| 1149 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1150 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1151 | counter--; |
| 1152 | } |
| 1153 | while (counter) |
| 1154 | { |
| 1155 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1156 | while (pIn_buf_cur >= pIn_buf_end) |
| 1157 | { |
| 1158 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1159 | { |
| 1160 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1161 | } |
| 1162 | else |
| 1163 | { |
| 1164 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1165 | } |
| 1166 | } |
| 1167 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1168 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1169 | } |
| 1170 | } |
| 1171 | else if (r->m_type == 3) |
| 1172 | { |
| 1173 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1174 | } |
| 1175 | else |
| 1176 | { |
| 1177 | if (r->m_type == 1) |
| 1178 | { |
| 1179 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1180 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1181 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1182 | } |
| 1183 | else |
| 1184 | { |
| 1185 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1186 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1187 | r->m_table_sizes[2] = 19; |
| 1188 | } |
| 1189 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1190 | { |
| 1191 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1192 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1193 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1194 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1195 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1196 | if ((65536 != total) && (used_syms > 1)) |
| 1197 | { |
| 1198 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1199 | } |
| 1200 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1201 | { |
| 1202 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1203 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1204 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1205 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1206 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1207 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1208 | { |
| 1209 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1210 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1211 | } |
| 1212 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1213 | } |
| 1214 | if (r->m_type == 2) |
| 1215 | { |
| 1216 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1217 | { |
| 1218 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 1219 | if ((dist == 16) && (!counter)) |
| 1220 | { |
| 1221 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 1222 | } |
| 1223 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 1224 | TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } |
| 1225 | }; |
| 1226 | mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1227 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1228 | } |
| 1229 | else |
| 1230 | z_uint code_len; |
| 1231 | #if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 1232 | } |
| 1233 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 1234 | { |
| 1235 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 1236 | } |
| 1237 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 1238 | } |
| 1239 | } |
| 1240 | for ( ; ; ) |
| 1241 | { |
| 1242 | mz_uint8 *pSrc; |
| 1243 | for ( ; ; ) |
| 1244 | { |
| 1245 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 1246 | { |
| 1247 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 1248 | if (counter >= 256) |
| 1249 | break; |
| 1250 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1251 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1252 | } |
| 1253 | else |
| 1254 | { |
| 1255 | int sym2; mz_uint code_len; |
| 1256 | #if TINFL_USE_64BIT_BITBUF |
| 1257 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 1258 | #else |
| 1259 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1260 | #endif |
| 1261 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1262 | code_len = sym2 >> 9; |
| 1263 | else |
| 1264 | { |
| 1265 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1266 | } |
| 1267 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 1268 | if (counter & 256) |
| 1269 | break; |
| 1270 | |
| 1271 | #if !TINFL_USE_64BIT_BITBUF |
| 1272 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1273 | #endif |
| 1274 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1275 | code_len = sym2 >> 9; |
| 1276 | else |
| 1277 | { |
| 1278 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1279 | } |
| 1280 | bit_buf >>= code_len; num_bits -= code_len; |
| 1281 | |
| 1282 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 1283 | if (sym2 & 256) |
| 1284 | { |
| 1285 | pOut_buf_cur++; |
| 1286 | counter = sym2; |
| 1287 | break; |
| 1288 | } |
| 1289 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 1290 | pOut_buf_cur += 2; |
| 1291 | } |
| 1292 | } |
| 1293 | if ((counter &= 511) == 256) break; |
| 1294 | |
| 1295 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 1296 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 1297 | |
| 1298 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 1299 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 1300 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 1301 | |
| 1302 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 1303 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 1304 | { |
| 1305 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 1306 | } |
| 1307 | |
| 1308 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 1309 | |
| 1310 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 1311 | { |
| 1312 | while (counter--) |
| 1313 | { |
| 1314 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1315 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 1316 | } |
| 1317 | continue; |
| 1318 | } |
| 1319 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1320 | else if ((counter >= 9) && (counter <= dist)) |
| 1321 | { |
| 1322 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 1323 | do |
| 1324 | { |
| 1325 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 1326 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 1327 | pOut_buf_cur += 8; |
| 1328 | } while ((pSrc += 8) < pSrc_end); |
| 1329 | if ((counter &= 7) < 3) |
| 1330 | { |
| 1331 | if (counter) |
| 1332 | { |
| 1333 | pOut_buf_cur[0] = pSrc[0]; |
| 1334 | if (counter > 1) |
| 1335 | pOut_buf_cur[1] = pSrc[1]; |
| 1336 | pOut_buf_cur += counter; |
| 1337 | } |
| 1338 | continue; |
| 1339 | } |
| 1340 | } |
| 1341 | #endif |
| 1342 | do |
| 1343 | { |
| 1344 | pOut_buf_cur[0] = pSrc[0]; |
| 1345 | pOut_buf_cur[1] = pSrc[1]; |
| 1346 | pOut_buf_cur[2] = pSrc[2]; |
| 1347 | pOut_buf_cur += 3; pSrc += 3; |
| 1348 | } while ((int)(counter -= 3) > 2); |
| 1349 | if ((int)counter > 0) |
| 1350 | { |
| 1351 | pOut_buf_cur[0] = pSrc[0]; |
| 1352 | if ((int)counter > 1) |
| 1353 | pOut_buf_cur[1] = pSrc[1]; |
| 1354 | pOut_buf_cur += counter; |
| 1355 | } |
| 1356 | } |
| 1357 | } |
| 1358 | } while (!(r->m_final & 1)); |
| 1359 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1360 | { |
| 1361 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 1362 | } |
| 1363 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 1364 | TINFL_CR_FINISH |
| 1365 | |
| 1366 | common_exit: |
| 1367 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 1368 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 1369 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 1370 | { |
| 1371 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 1372 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 1373 | while (buf_len) |
| 1374 | { |
| 1375 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 1376 | { |
| 1377 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 1378 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 1379 | } |
| 1380 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 1381 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 1382 | } |
| 1383 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 1384 | } |
| 1385 | return status; |
| 1386 | } |
| 1387 | |
| 1388 | // Higher level helper functions. |
| 1389 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 1390 | { |
| 1391 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 1392 | *pOut_len = 0; |
| 1393 | tinfl_init(&decomp); |
| 1394 | for ( ; ; ) |
| 1395 | { |
| 1396 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 1397 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 1398 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1399 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 1400 | { |
| 1401 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1402 | } |
| 1403 | src_buf_ofs += src_buf_size; |
| 1404 | *pOut_len += dst_buf_size; |
| 1405 | if (status == TINFL_STATUS_DONE) break; |
| 1406 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 1407 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 1408 | if (!pNew_buf) |
| 1409 | { |
| 1410 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1411 | } |
| 1412 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 1413 | } |
| 1414 | return pBuf; |
| 1415 | } |
| 1416 | |
| 1417 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 1418 | { |
| 1419 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 1420 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1421 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 1422 | } |
| 1423 | |
| 1424 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 1425 | { |
| 1426 | int result = 0; |
| 1427 | tinfl_decompressor decomp; |
| 1428 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 1429 | if (!pDict) |
| 1430 | return TINFL_STATUS_FAILED; |
| 1431 | tinfl_init(&decomp); |
| 1432 | for ( ; ; ) |
| 1433 | { |
| 1434 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 1435 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 1436 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 1437 | in_buf_ofs += in_buf_size; |
| 1438 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 1439 | break; |
| 1440 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 1441 | { |
| 1442 | result = (status == TINFL_STATUS_DONE); |
| 1443 | break; |
| 1444 | } |
| 1445 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 1446 | } |
| 1447 | MZ_FREE(pDict); |
| 1448 | *pIn_buf_size = in_buf_ofs; |
| 1449 | return result; |
| 1450 | } |
| 1451 | |
| 1452 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 1453 | |
| 1454 | // Purposely making these tables static for faster init and thread safety. |
| 1455 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 1456 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 1457 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 1458 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 1459 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 1460 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 1461 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 1462 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 1463 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 1464 | |
| 1465 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 1466 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 1467 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 1468 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 1469 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 1470 | |
| 1471 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 1472 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 1473 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 1474 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1475 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1476 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 1477 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1478 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1479 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1480 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1481 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1482 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1483 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 1484 | |
| 1485 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 1486 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 1487 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1488 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1489 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1490 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1491 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1492 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1493 | 7,7,7,7,7,7,7,7 }; |
| 1494 | |
| 1495 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 1496 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 1497 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 1498 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 1499 | |
| 1500 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 1501 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 1502 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 1503 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 1504 | |
| 1505 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 1506 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 1507 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 1508 | { |
| 1509 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 1510 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 1511 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 1512 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 1513 | { |
| 1514 | const mz_uint32* pHist = &hist[pass << 8]; |
| 1515 | mz_uint offsets[256], cur_ofs = 0; |
| 1516 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 1517 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 1518 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 1519 | } |
| 1520 | return pCur_syms; |
| 1521 | } |
| 1522 | |
| 1523 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 1524 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 1525 | { |
| 1526 | int root, leaf, next, avbl, used, dpth; |
| 1527 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 1528 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 1529 | for (next=1; next < n-1; next++) |
| 1530 | { |
| 1531 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 1532 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 1533 | } |
| 1534 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 1535 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 1536 | while (avbl>0) |
| 1537 | { |
| 1538 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 1539 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 1540 | avbl = 2*used; dpth++; used = 0; |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | // Limits canonical Huffman code table's max code size. |
| 1545 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 1546 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 1547 | { |
| 1548 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 1549 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 1550 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 1551 | while (total != (1UL << max_code_size)) |
| 1552 | { |
| 1553 | pNum_codes[max_code_size]--; |
| 1554 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 1555 | total--; |
| 1556 | } |
| 1557 | } |
| 1558 | |
| 1559 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 1560 | { |
| 1561 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 1562 | if (static_table) |
| 1563 | { |
| 1564 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 1565 | } |
| 1566 | else |
| 1567 | { |
| 1568 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 1569 | int num_used_syms = 0; |
| 1570 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 1571 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 1572 | |
| 1573 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 1574 | |
| 1575 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 1576 | |
| 1577 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 1578 | |
| 1579 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 1580 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 1581 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 1582 | } |
| 1583 | |
| 1584 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 1585 | |
| 1586 | for (i = 0; i < table_len; i++) |
| 1587 | { |
| 1588 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 1589 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 1590 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 1595 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 1596 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 1597 | while (d->m_bits_in >= 8) { \ |
| 1598 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 1599 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 1600 | d->m_bit_buffer >>= 8; \ |
| 1601 | d->m_bits_in -= 8; \ |
| 1602 | } \ |
| 1603 | } MZ_MACRO_END |
| 1604 | |
| 1605 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 1606 | if (rle_repeat_count < 3) { \ |
| 1607 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 1608 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 1609 | } else { \ |
| 1610 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 1611 | } rle_repeat_count = 0; } } |
| 1612 | |
| 1613 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 1614 | if (rle_z_count < 3) { \ |
| 1615 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 1616 | } else if (rle_z_count <= 10) { \ |
| 1617 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 1618 | } else { \ |
| 1619 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 1620 | } rle_z_count = 0; } } |
| 1621 | |
| 1622 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 1623 | |
| 1624 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 1625 | { |
| 1626 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; |
| 1627 | mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; |
| 1628 | |
| 1629 | d->m_huff_count[0][256] = 1; |
| 1630 | |
| 1631 | tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); |
| 1632 | tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); |
| 1633 | |
| 1634 | for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; |
| 1635 | for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; |
| 1636 | |
| 1637 | memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); |
| 1638 | memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); |
| 1639 | total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; |
| 1640 | |
| 1641 | memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1642 | for (i = 0; i < total_code_sizes_to_pack; i++) |
| 1643 | { |
| 1644 | mz_uint8 code_size = code_sizes_to_pack[i]; |
| 1645 | if (!code_size) |
| 1646 | { |
| 1647 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1648 | if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1649 | } |
| 1650 | else |
| 1651 | { |
| 1652 | TDEFL_RLE_ZERO_CODE_SIZE(); |
| 1653 | if (code_size != prev_code_size) |
| 1654 | { |
| 1655 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1656 | d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; |
| 1657 | } |
| 1658 | else if (++rle_repeat_count == 6) |
| 1659 | { |
| 1660 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1661 | } |
| 1662 | } |
| 1663 | prev_code_size = code_size; |
| 1664 | } |
| 1665 | if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1666 | |
| 1667 | tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); |
| 1668 | |
| 1669 | TDEFL_PUT_BITS(2, 2); |
| 1670 | |
| 1671 | TDEFL_PUT_BITS(num_lit_codes - 257, 5); |
| 1672 | TDEFL_PUT_BITS(num_dist_codes - 1, 5); |
| 1673 | |
| 1674 | for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; |
| 1675 | num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); |
| 1676 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 1677 | |
| 1678 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 1679 | { |
| 1680 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1681 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 1682 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 1683 | } |
| 1684 | } |
| 1685 | |
| 1686 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 1687 | { |
| 1688 | mz_uint i; |
| 1689 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 1690 | |
| 1691 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 1692 | for ( ; i <= 255; ++i) *p++ = 9; |
| 1693 | for ( ; i <= 279; ++i) *p++ = 7; |
| 1694 | for ( ; i <= 287; ++i) *p++ = 8; |
| 1695 | |
| 1696 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 1697 | |
| 1698 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 1699 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 1700 | |
| 1701 | TDEFL_PUT_BITS(1, 2); |
| 1702 | } |
| 1703 | |
| 1704 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 1705 | |
| 1706 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1707 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1708 | { |
| 1709 | mz_uint flags; |
| 1710 | mz_uint8 *pLZ_codes; |
| 1711 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 1712 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 1713 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 1714 | mz_uint bits_in = d->m_bits_in; |
| 1715 | |
| 1716 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 1717 | |
| 1718 | flags = 1; |
| 1719 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 1720 | { |
| 1721 | if (flags == 1) |
| 1722 | flags = *pLZ_codes++ | 0x100; |
| 1723 | |
| 1724 | if (flags & 1) |
| 1725 | { |
| 1726 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 1727 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 1728 | |
| 1729 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1730 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1731 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1732 | |
| 1733 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 1734 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 1735 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 1736 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 1737 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1738 | sym = (match_dist < 512) ? s0 : s1; |
| 1739 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 1740 | |
| 1741 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1742 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1743 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1744 | } |
| 1745 | else |
| 1746 | { |
| 1747 | mz_uint lit = *pLZ_codes++; |
| 1748 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1749 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1750 | |
| 1751 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1752 | { |
| 1753 | flags >>= 1; |
| 1754 | lit = *pLZ_codes++; |
| 1755 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1757 | |
| 1758 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1759 | { |
| 1760 | flags >>= 1; |
| 1761 | lit = *pLZ_codes++; |
| 1762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1764 | } |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 1769 | return MZ_FALSE; |
| 1770 | |
| 1771 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 1772 | pOutput_buf += (bits_in >> 3); |
| 1773 | bit_buffer >>= (bits_in & ~7); |
| 1774 | bits_in &= 7; |
| 1775 | } |
| 1776 | |
| 1777 | #undef TDEFL_PUT_BITS_FAST |
| 1778 | |
| 1779 | d->m_pOutput_buf = pOutput_buf; |
| 1780 | d->m_bits_in = 0; |
| 1781 | d->m_bit_buffer = 0; |
| 1782 | |
| 1783 | while (bits_in) |
| 1784 | { |
| 1785 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 1786 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 1787 | bit_buffer >>= n; |
| 1788 | bits_in -= n; |
| 1789 | } |
| 1790 | |
| 1791 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1792 | |
| 1793 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1794 | } |
| 1795 | #else |
| 1796 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1797 | { |
| 1798 | mz_uint flags; |
| 1799 | mz_uint8 *pLZ_codes; |
| 1800 | |
| 1801 | flags = 1; |
| 1802 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 1803 | { |
| 1804 | if (flags == 1) |
| 1805 | flags = *pLZ_codes++ | 0x100; |
| 1806 | if (flags & 1) |
| 1807 | { |
| 1808 | mz_uint sym, num_extra_bits; |
| 1809 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 1810 | |
| 1811 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1812 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1813 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1814 | |
| 1815 | if (match_dist < 512) |
| 1816 | { |
| 1817 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 1818 | } |
| 1819 | else |
| 1820 | { |
| 1821 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1822 | } |
| 1823 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1824 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1825 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1826 | } |
| 1827 | else |
| 1828 | { |
| 1829 | mz_uint lit = *pLZ_codes++; |
| 1830 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1831 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1832 | } |
| 1833 | } |
| 1834 | |
| 1835 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1836 | |
| 1837 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1838 | } |
| 1839 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1840 | |
| 1841 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 1842 | { |
| 1843 | if (static_block) |
| 1844 | tdefl_start_static_block(d); |
| 1845 | else |
| 1846 | tdefl_start_dynamic_block(d); |
| 1847 | return tdefl_compress_lz_codes(d); |
| 1848 | } |
| 1849 | |
| 1850 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 1851 | { |
| 1852 | mz_uint saved_bit_buf, saved_bits_in; |
| 1853 | mz_uint8 *pSaved_output_buf; |
| 1854 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 1855 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 1856 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 1857 | |
| 1858 | d->m_pOutput_buf = pOutput_buf_start; |
| 1859 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 1860 | |
| 1861 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 1862 | d->m_output_flush_ofs = 0; |
| 1863 | d->m_output_flush_remaining = 0; |
| 1864 | |
| 1865 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 1866 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 1867 | |
| 1868 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 1869 | { |
| 1870 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 1871 | } |
| 1872 | |
| 1873 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 1874 | |
| 1875 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 1876 | |
| 1877 | if (!use_raw_block) |
| 1878 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 1879 | |
| 1880 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 1881 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 1882 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 1883 | { |
| 1884 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 1885 | TDEFL_PUT_BITS(0, 2); |
| 1886 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 1887 | See "unlicense" statement at the end of this file. |
| 1888 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 1889 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 1890 | |
| 1891 | Most API's defined in miniz.c are optionaljority of prev. users so I'm |
| 1892 | op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1893 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1894 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1895 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1896 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1897 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1898 | |
| 1899 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1900 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1901 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1902 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1903 | |
| 1904 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1905 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1906 | |
| 1907 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1908 | TINFL_CR_BEGIN |
| 1909 | |
| 1910 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1911 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1912 | { |
| 1913 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1914 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1915 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1916 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1917 | } |
| 1918 | |
| 1919 | do |
| 1920 | { |
| 1921 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1922 | if (r->m_type == 0) |
| 1923 | { |
| 1924 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1925 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1926 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1927 | while ((counter) && (num_bits)) |
| 1928 | { |
| 1929 | TINFL_GET_BITS(51, dist, 8); |
| 1930 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1931 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1932 | counter--; |
| 1933 | } |
| 1934 | while (counter) |
| 1935 | { |
| 1936 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1937 | while (pIn_buf_cur >= pIn_buf_end) |
| 1938 | { |
| 1939 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1940 | { |
| 1941 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1942 | } |
| 1943 | else |
| 1944 | { |
| 1945 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1946 | } |
| 1947 | } |
| 1948 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1949 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1950 | } |
| 1951 | } |
| 1952 | else if (r->m_type == 3) |
| 1953 | { |
| 1954 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1955 | } |
| 1956 | else |
| 1957 | { |
| 1958 | if (r->m_type == 1) |
| 1959 | { |
| 1960 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1961 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1962 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1963 | } |
| 1964 | else |
| 1965 | { |
| 1966 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1967 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1968 | r->m_table_sizes[2] = 19; |
| 1969 | } |
| 1970 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1971 | { |
| 1972 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1973 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1974 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1975 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1976 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1977 | if ((65536 != total) && (used_syms > 1)) |
| 1978 | { |
| 1979 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1980 | } |
| 1981 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1982 | { |
| 1983 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1984 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1985 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1986 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1987 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1988 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1989 | { |
| 1990 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1991 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1992 | } |
| 1993 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1994 | } |
| 1995 | if (r->m_type == 2) |
| 1996 | { |
| 1997 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1998 | { |
| 1999 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 2000 | if ((dist == 16) && (!counter)) |
| 2001 | { |
| 2002 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 2003 | } |
| 2004 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 2005 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 2006 | } |
| 2007 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 2008 | { |
| 2009 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 2010 | } |
| 2011 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 2012 | } |
| 2013 | } |
| 2014 | for ( ; ; ) |
| 2015 | { |
| 2016 | mz_uint8 *pSrc; |
| 2017 | for ( ; ; ) |
| 2018 | { |
| 2019 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 2020 | { |
| 2021 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 2022 | if (counter >= 256) |
| 2023 | break; |
| 2024 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2025 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 2026 | } |
| 2027 | else |
| 2028 | { |
| 2029 | int sym2; mz_uint code_len; |
| 2030 | #if TINFL_USE_64BIT_BITBUF |
| 2031 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 2032 | #else |
| 2033 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2034 | #endif |
| 2035 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2036 | code_len = sym2 >> 9; |
| 2037 | else |
| 2038 | { |
| 2039 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2040 | } |
| 2041 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 2042 | if (counter & 256) |
| 2043 | break; |
| 2044 | |
| 2045 | #if !TINFL_USE_64BIT_BITBUF |
| 2046 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2047 | #endif |
| 2048 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2049 | code_len = sym2 >> 9; |
| 2050 | else |
| 2051 | { |
| 2052 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2053 | } |
| 2054 | bit_buf >>= code_len; num_bits -= code_len; |
| 2055 | |
| 2056 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 2057 | if (sym2 & 256) |
| 2058 | { |
| 2059 | pOut_buf_cur++; |
| 2060 | counter = sym2; |
| 2061 | break; |
| 2062 | } |
| 2063 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 2064 | pOut_buf_cur += 2; |
| 2065 | } |
| 2066 | } |
| 2067 | if ((counter &= 511) == 256) break; |
| 2068 | |
| 2069 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 2070 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 2071 | |
| 2072 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 2073 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 2074 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 2075 | |
| 2076 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 2077 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 2078 | { |
| 2079 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 2080 | } |
| 2081 | |
| 2082 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 2083 | |
| 2084 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 2085 | { |
| 2086 | while (counter--) |
| 2087 | { |
| 2088 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2089 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 2090 | } |
| 2091 | continue; |
| 2092 | } |
| 2093 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 2094 | else if ((counter >= 9) && (counter <= dist)) |
| 2095 | { |
| 2096 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 2097 | do |
| 2098 | { |
| 2099 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 2100 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 2101 | pOut_buf_cur += 8; |
| 2102 | } while ((pSrc += 8) < pSrc_end); |
| 2103 | if ((counter &= 7) < 3) |
| 2104 | { |
| 2105 | if (counter) |
| 2106 | { |
| 2107 | pOut_buf_cur[0] = pSrc[0]; |
| 2108 | if (counter > 1) |
| 2109 | pOut_buf_cur[1] = pSrc[1]; |
| 2110 | pOut_buf_cur += counter; |
| 2111 | } |
| 2112 | continue; |
| 2113 | } |
| 2114 | } |
| 2115 | #endif |
| 2116 | do |
| 2117 | { |
| 2118 | pOut_buf_cur[0] = pSrc[0]; |
| 2119 | pOut_buf_cur[1] = pSrc[1]; |
| 2120 | pOut_buf_cur[2] = pSrc[2]; |
| 2121 | pOut_buf_cur += 3; pSrc += 3; |
| 2122 | } while ((int)(counter -= 3) > 2); |
| 2123 | if ((int)counter > 0) |
| 2124 | { |
| 2125 | pOut_buf_cur[0] = pSrc[0]; |
| 2126 | if ((int)counter > 1) |
| 2127 | pOut_buf_cur[1] = pSrc[1]; |
| 2128 | pOut_buf_cur += counter; |
| 2129 | } |
| 2130 | } |
| 2131 | } |
| 2132 | } while (!(r->m_final & 1)); |
| 2133 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 2134 | { |
| 2135 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 2136 | } |
| 2137 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 2138 | TINFL_CR_FINISH |
| 2139 | |
| 2140 | common_exit: |
| 2141 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 2142 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 2143 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 2144 | { |
| 2145 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 2146 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 2147 | while (buf_len) |
| 2148 | { |
| 2149 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 2150 | { |
| 2151 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 2152 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 2153 | } |
| 2154 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 2155 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 2156 | } |
| 2157 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 2158 | } |
| 2159 | return status; |
| 2160 | } |
| 2161 | |
| 2162 | // Higher level helper functions. |
| 2163 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 2164 | { |
| 2165 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 2166 | *pOut_len = 0; |
| 2167 | tinfl_init(&decomp); |
| 2168 | for ( ; ; ) |
| 2169 | { |
| 2170 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 2171 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 2172 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2173 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 2174 | { |
| 2175 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2176 | } |
| 2177 | src_buf_ofs += src_buf_size; |
| 2178 | *pOut_len += dst_buf_size; |
| 2179 | if (status == TINFL_STATUS_DONE) break; |
| 2180 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 2181 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 2182 | if (!pNew_buf) |
| 2183 | { |
| 2184 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2185 | } |
| 2186 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 2187 | } |
| 2188 | return pBuf; |
| 2189 | } |
| 2190 | |
| 2191 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 2192 | { |
| 2193 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 2194 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2195 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 2196 | } |
| 2197 | |
| 2198 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 2199 | { |
| 2200 | int result = 0; |
| 2201 | tinfl_decompressor decomp; |
| 2202 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 2203 | if (!pDict) |
| 2204 | return TINFL_STATUS_FAILED; |
| 2205 | tinfl_init(&decomp); |
| 2206 | for ( ; ; ) |
| 2207 | { |
| 2208 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 2209 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 2210 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 2211 | in_buf_ofs += in_buf_size; |
| 2212 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 2213 | break; |
| 2214 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 2215 | { |
| 2216 | result = (status == TINFL_STATUS_DONE); |
| 2217 | break; |
| 2218 | } |
| 2219 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 2220 | } |
| 2221 | MZ_FREE(pDict); |
| 2222 | *pIn_buf_size = in_buf_ofs; |
| 2223 | return result; |
| 2224 | } |
| 2225 | |
| 2226 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 2227 | |
| 2228 | // Purposely making these tables static for faster init and thread safety. |
| 2229 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 2230 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 2231 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 2232 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 2233 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 2234 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 2235 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 2236 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 2237 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 2238 | |
| 2239 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 2240 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 2241 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 2242 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 2243 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 2244 | |
| 2245 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 2246 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 2247 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 2248 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2249 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2250 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 2251 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
+2251
| --- a/src/miniz.c | ||
| +++ b/src/miniz.c | ||
| @@ -0,0 +1,2251 @@ | ||
| 1 | +/* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 2 | + See "unlicense" statement at the end of this file. | |
| 3 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 4 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 5 | + | |
| 6 | + Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define | |
| 7 | + MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). | |
| 8 | + | |
| 9 | + * Change History | |
| 10 | + 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. | |
| 11 | +void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); | |
| 12 | +void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); | |
| 13 | + | |
| 14 | +// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. | |
| 15 | +typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); | |
| 16 | + | |
| 17 | +// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; | |
| 18 | + | |
| 19 | + if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; | |
| 20 | + pState->m_has_flushed |= (flush == MZ_FINISH); | |
| 21 | + | |
| 22 | + if ((flush == MZ_FINISH) && (first_call)) | |
| 23 | + { | |
| 24 | + // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. | |
| 25 | + decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; | |
| 26 | + in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; | |
| 27 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); | |
| 28 | + pState->m_last_status = status; | |
| 29 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; | |
| 30 | + pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 31 | + pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; | |
| 32 | + | |
| 33 | + if (status < 0) | |
| 34 | + return MZ_DATA_ERROR; | |
| 35 | + else if (status != TINFL_STATUS_DONE) | |
| 36 | + { | |
| 37 | + pState->m_last_status = TINFL_STATUS_FAILED; | |
| 38 | + return MZ_BUF_ERROR; | |
| 39 | + } | |
| 40 | + return MZ_STREAM_END; | |
| 41 | + } | |
| 42 | + // flush != MZ_FINISH then we must assume there's more input. | |
| 43 | + if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; | |
| 44 | + | |
| 45 | + if (pState->m_dict_avail) | |
| 46 | + { | |
| 47 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 48 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 49 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 50 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 51 | + return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 52 | + } | |
| 53 | + | |
| 54 | + for ( ; ; ) | |
| 55 | + { | |
| 56 | + in_bytes = pStream->avail_in; | |
| 57 | + out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; | |
| 58 | + | |
| 59 | + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); | |
| 60 | + pState->m_last_status = status; | |
| 61 | + | |
| 62 | + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; | |
| 63 | + pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); | |
| 64 | + | |
| 65 | + pState->m_dict_avail = (mz_uint)out_bytes; | |
| 66 | + | |
| 67 | + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); | |
| 68 | + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); | |
| 69 | + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; | |
| 70 | + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); | |
| 71 | + | |
| 72 | + if (status < 0) | |
| 73 | + return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). | |
| 74 | + else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) | |
| 75 | + return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. | |
| 76 | + else if (flush == MZ_FINISH) | |
| 77 | + { | |
| 78 | + // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. | |
| 79 | + if (status == TINFL_STATUS_DONE) | |
| 80 | + return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; | |
| 81 | + // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. | |
| 82 | + else if (!pStream->avail_out) | |
| 83 | + return MZ_BUF_ERROR; | |
| 84 | + } | |
| 85 | + else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) | |
| 86 | + break; | |
| 87 | + } | |
| 88 | + | |
| 89 | + return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; | |
| 90 | +} | |
| 91 | + | |
| 92 | +int mz_inflateEnd(mz_streamp pStream) | |
| 93 | +{ | |
| 94 | + if (!pStream) | |
| 95 | + return MZ_STREAM_ERROR; | |
| 96 | + if (pStream->state) | |
| 97 | + { | |
| 98 | + pStream->zfree(pStream->opaque, pStream->state); | |
| 99 | + pStream->state = NULL; | |
| 100 | + } | |
| 101 | + return MZ_OK; | |
| 102 | +} | |
| 103 | + | |
| 104 | +int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) | |
| 105 | +{ | |
| 106 | + mz_stream stream; | |
| 107 | + int status; | |
| 108 | + memset(&stream, 0, sizeof(stream)); | |
| 109 | + | |
| 110 | + // In case mz_ulong is 64-bits (argh I hate longs). | |
| 111 | + if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; | |
| 112 | + | |
| 113 | + stream.next_in = pSource; | |
| 114 | + stream.avail_in = (mz_uint32)source_len; | |
| 115 | + stream.next_out = pDest; | |
| 116 | + stream.avail_out = (mz_uint32)*pDest_len; | |
| 117 | + | |
| 118 | + status = mz_inflateInit(&stream); | |
| 119 | + if (status != MZ_OK) | |
| 120 | + return status; | |
| 121 | + | |
| 122 | + status = mz_inflate(&stream, MZ_FINISH); | |
| 123 | + if (status != MZ_STREAM_END) | |
| 124 | + { | |
| 125 | + mz_inflateEnd(&stream); | |
| 126 | + return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; | |
| 127 | + } | |
| 128 | + *pDest_len = stream.total_out; | |
| 129 | + | |
| 130 | + return mz_inflateEnd(&stream); | |
| 131 | +} | |
| 132 | + | |
| 133 | +const char *mz_error(int err) | |
| 134 | +{ | |
| 135 | + static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = | |
| 136 | + { | |
| 137 | + { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, | |
| 138 | + { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 139 | + }; | |
| 140 | + mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; | |
| 141 | + return NULL; | |
| 142 | +} | |
| 143 | + | |
| 144 | +#endif //MINIZ_NO_ZLIB_APIS | |
| 145 | + | |
| 146 | +// ------------------- Low-level Decompression (completely independent from all compression API's) | |
| 147 | + | |
| 148 | +#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) | |
| 149 | +#define TINFL_MEMSET(p, c, l) memset(p, c, l) | |
| 150 | + | |
| 151 | +#define TINFL_CR_BEGIN switch(r->m_state) { case 0: | |
| 152 | +#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END | |
| 153 | +#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END | |
| 154 | +#define TINFL_CR_FINISH } | |
| 155 | + | |
| 156 | +// TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never | |
| 157 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. | |
| 158 | +#define TINFL_GET_BYTE(state_index, c) do { \ | |
| 159 | + if (pIn_buf_cur >= pIn_buf_end) { \ | |
| 160 | + for ( ; ; ) { \ | |
| 161 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ | |
| 162 | + TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ | |
| 163 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 164 | + c = *pIn_buf_cur++; \ | |
| 165 | + break; \ | |
| 166 | + } \ | |
| 167 | + } else { \ | |
| 168 | + c = 0; \ | |
| 169 | + break; \ | |
| 170 | + } \ | |
| 171 | + } \ | |
| 172 | + } else c = *pIn_buf_cur++; } MZ_MACRO_END | |
| 173 | + | |
| 174 | +#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) | |
| 175 | +#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 176 | +#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END | |
| 177 | + | |
| 178 | +// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. | |
| 179 | +// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a | |
| 180 | +// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the | |
| 181 | +// bit buffer contains >=15 bits (deflate's max. Huffman code size). | |
| 182 | +#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ | |
| 183 | + do { \ | |
| 184 | + temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ | |
| 185 | + if (temp >= 0) { \ | |
| 186 | + code_len = temp >> 9; \ | |
| 187 | + if ((code_len) && (num_bits >= code_len)) \ | |
| 188 | + break; \ | |
| 189 | + } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ | |
| 190 | + code_len = TINFL_FAST_LOOKUP_BITS; \ | |
| 191 | + do { \ | |
| 192 | + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ | |
| 193 | + } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ | |
| 194 | + } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ | |
| 195 | + } while (num_bits < 15); | |
| 196 | + | |
| 197 | +// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read | |
| 198 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 199 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 200 | +// The slow path is only executed at the very end of the input buffer. | |
| 201 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 202 | + int temp; mz_uint code_len, c; \ | |
| 203 | + if (num_bits < 15) { \ | |
| 204 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 205 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 206 | + } else { \ | |
| 207 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 208 | + } \ | |
| 209 | + } \ | |
| 210 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 211 | + code_len = temp >> 9, temp &= 511; \ | |
| 212 | + else { \ | |
| 213 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 214 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 215 | + | |
| 216 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 217 | +{ | |
| 218 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 219 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 220 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 221 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 222 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 223 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 224 | + | |
| 225 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 226 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 227 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 228 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 229 | + | |
| 230 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 231 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 232 | + | |
| 233 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 234 | + TINFL_CR_BEGIN | |
| 235 | + | |
| 236 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 237 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 238 | + { | |
| 239 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 240 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 241 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 242 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 243 | + } | |
| 244 | + | |
| 245 | + do | |
| 246 | + { | |
| 247 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 248 | + if (r->m_type == 0) | |
| 249 | + { | |
| 250 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 251 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 252 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 253 | + while ((counter) && (num_bits)) | |
| 254 | + { | |
| 255 | + TINFL_GET_BITS(51, dist, 8); | |
| 256 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 257 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 258 | + counter--; | |
| 259 | + } | |
| 260 | + while (counter) | |
| 261 | + { | |
| 262 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 263 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 264 | + { | |
| 265 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 266 | + { | |
| 267 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 268 | + } | |
| 269 | + else | |
| 270 | + { | |
| 271 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 272 | + } | |
| 273 | + } | |
| 274 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 275 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 276 | + } | |
| 277 | + } | |
| 278 | + else if (r->m_type == 3) | |
| 279 | + { | |
| 280 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 281 | + } | |
| 282 | + else | |
| 283 | + { | |
| 284 | + if (r->m_type == 1) | |
| 285 | + { | |
| 286 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 287 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 288 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 289 | + } | |
| 290 | + else | |
| 291 | + { | |
| 292 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 293 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 294 | + r->m_table_sizes[2] = 19; | |
| 295 | + } | |
| 296 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 297 | + { | |
| 298 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 299 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 300 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 301 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 302 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 303 | + if ((65536 != total) && (used_syms > 1)) | |
| 304 | + { | |
| 305 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 306 | + } | |
| 307 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 308 | + { | |
| 309 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 310 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 311 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 312 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 313 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 314 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 315 | + { | |
| 316 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 317 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 318 | + } | |
| 319 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 320 | + } | |
| 321 | + if (r->m_type == 2) | |
| 322 | + { | |
| 323 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 324 | + { | |
| 325 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 326 | + if ((dist == 16) && (!counter)) | |
| 327 | + { | |
| 328 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 329 | + } | |
| 330 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 331 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 332 | + } | |
| 333 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 334 | + { | |
| 335 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 336 | + } | |
| 337 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 338 | + } | |
| 339 | + } | |
| 340 | + for ( ; ; ) | |
| 341 | + { | |
| 342 | + mz_uint8 *pSrc; | |
| 343 | + for ( ; ; ) | |
| 344 | + { | |
| 345 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 346 | + { | |
| 347 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 348 | + if (counter >= 256) | |
| 349 | + break; | |
| 350 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 351 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 352 | + } | |
| 353 | + else | |
| 354 | + { | |
| 355 | + int sym2; mz_uint code_len; | |
| 356 | +#if TINFL_USE_64BIT_BITBUF | |
| 357 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 358 | +#else | |
| 359 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 360 | +#endif | |
| 361 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 362 | + code_len = sym2 >> 9; | |
| 363 | + else | |
| 364 | + { | |
| 365 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 366 | + } | |
| 367 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 368 | + if (counter & 256) | |
| 369 | + break; | |
| 370 | + | |
| 371 | +#if !TINFL_USE_64BIT_BITBUF | |
| 372 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 373 | +#endif | |
| 374 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 375 | + code_len = sym2 >> 9; | |
| 376 | + else | |
| 377 | + { | |
| 378 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 379 | + } | |
| 380 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 381 | + | |
| 382 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 383 | + if (sym2 & 256) | |
| 384 | + { | |
| 385 | + pOut_buf_cur++; | |
| 386 | + counter = sym2; | |
| 387 | + break; | |
| 388 | + } | |
| 389 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 390 | + pOut_buf_cur += 2; | |
| 391 | + } | |
| 392 | + } | |
| 393 | + if ((counter &= 511) == 256) break; | |
| 394 | + | |
| 395 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 396 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 397 | + | |
| 398 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 399 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 400 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 401 | + | |
| 402 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 403 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 404 | + { | |
| 405 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 406 | + } | |
| 407 | + | |
| 408 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 409 | + | |
| 410 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 411 | + { | |
| 412 | + while (counter--) | |
| 413 | + { | |
| 414 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 415 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 416 | + } | |
| 417 | + continue; | |
| 418 | + } | |
| 419 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 420 | + else if ((counter >= 9) && (counter <= dist)) | |
| 421 | + { | |
| 422 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 423 | + do | |
| 424 | + { | |
| 425 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 426 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 427 | + pOut_buf_cur += 8; | |
| 428 | + } while ((pSrc += 8) < pSrc_end); | |
| 429 | + if ((counter &= 7) < 3) | |
| 430 | + { | |
| 431 | + if (counter) | |
| 432 | + { | |
| 433 | + pOut_buf_cur[0] = pSrc[0]; | |
| 434 | + if (counter > 1) | |
| 435 | + pOut_buf_cur[1] = pSrc[1]; | |
| 436 | + pOut_buf_cur += counter; | |
| 437 | + } | |
| 438 | + continue; | |
| 439 | + } | |
| 440 | + } | |
| 441 | +#endif | |
| 442 | + do | |
| 443 | + { | |
| 444 | + pOut_buf_cur[0] = pSrc[0]; | |
| 445 | + pOut_buf_cur[1] = pSrc[1]; | |
| 446 | + pOut_buf_cur[2] = pSrc[2]; | |
| 447 | + pOut_buf_cur += 3; pSrc += 3; | |
| 448 | + } while ((int)(counter -= 3) > 2); | |
| 449 | + if ((int)counter > 0) | |
| 450 | + { | |
| 451 | + pOut_buf_cur[0] = pSrc[0]; | |
| 452 | + if ((int)counter > 1) | |
| 453 | + pOut_buf_cur[1] = pSrc[1]; | |
| 454 | + pOut_buf_cur += counter; | |
| 455 | + } | |
| 456 | + } | |
| 457 | + } | |
| 458 | + } while (!(r->m_final & 1)); | |
| 459 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 460 | + { | |
| 461 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 462 | + } | |
| 463 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 464 | + TINFL_CR_FINISH | |
| 465 | + | |
| 466 | +common_exit: | |
| 467 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 468 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 469 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 470 | + { | |
| 471 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 472 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 473 | + while (buf_len) | |
| 474 | + { | |
| 475 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 476 | + { | |
| 477 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 478 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 479 | + } | |
| 480 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 481 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 482 | + } | |
| 483 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 484 | + } | |
| 485 | + return status; | |
| 486 | +} | |
| 487 | + | |
| 488 | +// Higher level helper functions. | |
| 489 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 490 | +{ | |
| 491 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 492 | + *pOut_len = 0; | |
| 493 | + tinfl_init(&decomp); | |
| 494 | + for ( ; ; ) | |
| 495 | + { | |
| 496 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 497 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 498 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 499 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 500 | + { | |
| 501 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 502 | + } | |
| 503 | + src_buf_ofs += src_buf_size; | |
| 504 | + *pOut_len += dst_buf_size; | |
| 505 | + if (status == TINFL_STATUS_DONE) break; | |
| 506 | + new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, | |
| 507 | + 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 508 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 509 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 510 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 511 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 512 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 513 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 514 | + | |
| 515 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 516 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 517 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 518 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 519 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 520 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 521 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 522 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 523 | + 7,7,7,7,7,7,7,7 }; | |
| 524 | + | |
| 525 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 526 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 527 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 528 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 529 | + | |
| 530 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 531 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 532 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 533 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 534 | + | |
| 535 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 536 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 537 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 538 | +{ | |
| 539 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 540 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 541 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 542 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 543 | + { | |
| 544 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 545 | + mz_uint offsets[256], cur_ofs = 0; | |
| 546 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 547 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 548 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 549 | + } | |
| 550 | + return pCur_syms; | |
| 551 | +} | |
| 552 | + | |
| 553 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 554 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 555 | +{ | |
| 556 | + int root, leaf, next, avbl, used, dpth; | |
| 557 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 558 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 559 | + for (next=1; next < n-1; next++) | |
| 560 | + { | |
| 561 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 562 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 563 | + } | |
| 564 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 565 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 566 | + while (avbl>0) | |
| 567 | + { | |
| 568 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 569 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 570 | + avbl = 2*used; dpth++; used = 0; | |
| 571 | + } | |
| 572 | +} | |
| 573 | + | |
| 574 | +// Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 575 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 576 | + { | |
| 577 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 578 | + mz_uint offsets[256], cur_ofs = 0; | |
| 579 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 580 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 581 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 582 | + } | |
| 583 | + return pCur_syms; | |
| 584 | +} | |
| 585 | + | |
| 586 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 587 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 588 | +{ | |
| 589 | + int root, leaf, next, avbl, used, dpth; | |
| 590 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 591 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 592 | + for (next=1; next < n-1; next++) | |
| 593 | + { | |
| 594 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 595 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 596 | + } | |
| 597 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 598 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 599 | + while (avbl>0) | |
| 600 | + { | |
| 601 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 602 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 603 | + avbl = 2*used; dpth++; used = 0; | |
| 604 | + } | |
| 605 | +} | |
| 606 | + | |
| 607 | +// Limits canonical Huffman code table's max code size. | |
| 608 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 609 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 610 | +{ | |
| 611 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 612 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 613 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 614 | + while (total != (1UL << max_code_size)) | |
| 615 | + { | |
| 616 | + pNum_codes[max_code_size]--; | |
| 617 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 618 | + total--; | |
| 619 | + } | |
| 620 | +} | |
| 621 | + | |
| 622 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 623 | +{ | |
| 624 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 625 | + if (static_table) | |
| 626 | + { | |
| 627 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 628 | + } | |
| 629 | + else | |
| 630 | + { | |
| 631 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 632 | + int num_used_syms = 0; | |
| 633 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 634 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 635 | + | |
| 636 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 637 | + | |
| 638 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 639 | + | |
| 640 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 641 | + | |
| 642 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 643 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 644 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 645 | + } | |
| 646 | + | |
| 647 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 648 | + | |
| 649 | + for (i = 0; i < table_len; i++) | |
| 650 | + { | |
| 651 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 652 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 653 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 654 | + } | |
| 655 | +} | |
| 656 | + | |
| 657 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 658 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 659 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 660 | + while (d->m_bits_in >= 8) { \ | |
| 661 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 662 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 663 | + d->m_bit_buffer >>= 8; \ | |
| 664 | + d->m_bits_in -= 8; \ | |
| 665 | + } \ | |
| 666 | +} MZ_MACRO_END | |
| 667 | + | |
| 668 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 669 | + if (rle_repeat_count < 3) { \ | |
| 670 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 671 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 672 | + } else { \ | |
| 673 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 674 | +} rle_repeat_count = 0; } } | |
| 675 | + | |
| 676 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 677 | + if (rle_z_count < 3) { \ | |
| 678 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 679 | + } else if (rle_z_count <= 10) { \ | |
| 680 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 681 | + } else { \ | |
| 682 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 683 | +} rle_z_count = 0; } } | |
| 684 | + | |
| 685 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 686 | + | |
| 687 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 688 | +{ | |
| 689 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); | |
| 690 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 691 | + | |
| 692 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 693 | + { | |
| 694 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 695 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 696 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 697 | + } | |
| 698 | +} | |
| 699 | + | |
| 700 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 701 | +{ | |
| 702 | + mz_uint i; | |
| 703 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 704 | + | |
| 705 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 706 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 707 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 708 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 709 | + | |
| 710 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 711 | + | |
| 712 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 713 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 714 | + | |
| 715 | + TDEFL_PUT_BITS(1, 2); | |
| 716 | +} | |
| 717 | + | |
| 718 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 719 | + | |
| 720 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 721 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 722 | +{ | |
| 723 | + mz_uint flags; | |
| 724 | + mz_uint8 *pLZ_codes; | |
| 725 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 726 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 727 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 728 | + mz_uint bits_in = d->m_bits_in; | |
| 729 | + | |
| 730 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 731 | + | |
| 732 | + flags = 1; | |
| 733 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 734 | + { | |
| 735 | + if (flags == 1) | |
| 736 | + flags = *pLZ_codes++ | 0x100; | |
| 737 | + | |
| 738 | + if (flags & 1) | |
| 739 | + { | |
| 740 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 741 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 742 | + | |
| 743 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 744 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 745 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 746 | + | |
| 747 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 748 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 749 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 750 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 751 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 752 | + sym = (match_dist < 512) ? s0 : s1; | |
| 753 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 754 | + | |
| 755 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 757 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 758 | + } | |
| 759 | + else | |
| 760 | + { | |
| 761 | + mz_uint lit = *pLZ_codes++; | |
| 762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 764 | + | |
| 765 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 766 | + { | |
| 767 | + flags >>= 1; | |
| 768 | + lit = *pLZ_codes++; | |
| 769 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 770 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 771 | + | |
| 772 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 773 | + { | |
| 774 | + flags >>= 1; | |
| 775 | + lit = *pLZ_codes++; | |
| 776 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 777 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 778 | + } | |
| 779 | + } | |
| 780 | + } | |
| 781 | + | |
| 782 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 783 | + return MZ_FALSE; | |
| 784 | + | |
| 785 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 786 | + pOutput_buf += (bits_in >> 3); | |
| 787 | + bit_buffer >>= (bits_in & ~7); | |
| 788 | + bits_in &= 7; | |
| 789 | + } | |
| 790 | + | |
| 791 | +#undef TDEFL_PUT_BITS_FAST | |
| 792 | + | |
| 793 | + d->m_pOutput_buf = pOutput_buf; | |
| 794 | + d->m_bits_in = 0; | |
| 795 | + d->m_bit_buffer = 0; | |
| 796 | + | |
| 797 | + while (bits_in) | |
| 798 | + { | |
| 799 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 800 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 801 | + bit_buffer >>= n; | |
| 802 | + bits_in -= n; | |
| 803 | + } | |
| 804 | + | |
| 805 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 806 | + | |
| 807 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 808 | +} | |
| 809 | +#else | |
| 810 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 811 | +{ | |
| 812 | + mz_uint flags; | |
| 813 | + mz_uint8 *pLZ_codes; | |
| 814 | + | |
| 815 | + flags = 1; | |
| 816 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 817 | + { | |
| 818 | + if (flags == 1) | |
| 819 | + flags = *pLZ_codes++ | 0x100; | |
| 820 | + if (flags & 1) | |
| 821 | + { | |
| 822 | + mz_uint sym, num_extra_bits; | |
| 823 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 824 | + | |
| 825 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 826 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 827 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 828 | + | |
| 829 | + if (match_dist < 512) | |
| 830 | + { | |
| 831 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 832 | + } | |
| 833 | + else | |
| 834 | + { | |
| 835 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 836 | + } | |
| 837 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 838 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 839 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 840 | + } | |
| 841 | + else | |
| 842 | + { | |
| 843 | + mz_uint lit = *pLZ_codes++; | |
| 844 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 845 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 846 | + } | |
| 847 | + } | |
| 848 | + | |
| 849 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 850 | + | |
| 851 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 852 | +} | |
| 853 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 854 | + | |
| 855 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 856 | +{ | |
| 857 | + if (static_block) | |
| 858 | + tdefl_start_static_block(d); | |
| 859 | + else | |
| 860 | + tdefl_start_dynamic_block(d); | |
| 861 | + return tdefl_compress_lz_codes(d); | |
| 862 | +} | |
| 863 | + | |
| 864 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 865 | +{ | |
| 866 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 867 | + mz_uint8 *pSaved_output_buf; | |
| 868 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 869 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 870 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 871 | + | |
| 872 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 873 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 874 | + | |
| 875 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 876 | + d->m_output_flush_ofs = 0; | |
| 877 | + d->m_output_flush_remaining = 0; | |
| 878 | + | |
| 879 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 880 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 881 | + | |
| 882 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 883 | + { | |
| 884 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 885 | + } | |
| 886 | + | |
| 887 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 888 | + | |
| 889 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 890 | + | |
| 891 | + if (!use_raw_block) | |
| 892 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 893 | + | |
| 894 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 895 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 896 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 897 | + { | |
| 898 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 899 | + TDEFL_PUT_BITS(0, 2); | |
| 900 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 901 | + for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) | |
| 902 | + { | |
| 903 | + TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); | |
| 904 | + } | |
| 905 | + for (i = 0; i < d->m_total_lz_bytes; ++i) | |
| 906 | + { | |
| 907 | + TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); | |
| 908 | + } | |
| 909 | + } | |
| 910 | + // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. | |
| 911 | + else if (!comp_block_succeeded) | |
| 912 | + { | |
| 913 | + d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 914 | + tdefl_compress_block(d, MZ_TRUE); | |
| 915 | + } | |
| 916 | + | |
| 917 | + if (flush) | |
| 918 | + { | |
| 919 | + if (flush == TDEFL_FINISH) | |
| 920 | + { | |
| 921 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } | |
| 922 | + if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } | |
| 923 | + } | |
| 924 | + else | |
| 925 | + { | |
| 926 | + mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } | |
| 927 | + } | |
| 928 | + } | |
| 929 | + | |
| 930 | + MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 931 | + | |
| 932 | + memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); | |
| 933 | + memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); | |
| 934 | + | |
| 935 | + d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; | |
| 936 | + | |
| 937 | + if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) | |
| 938 | + { | |
| 939 | + if (d->m_pPut_buf_func) | |
| 940 | + { | |
| 941 | + *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; | |
| 942 | + if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) | |
| 943 | + return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); | |
| 944 | + } | |
| 945 | + else if (pOutput_buf_start == d->m_output_buf) | |
| 946 | + { | |
| 947 | + int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); | |
| 948 | + memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); | |
| 949 | + d->m_out_buf_ofs += bytes_to_copy; | |
| 950 | + if ((n -= bytes_to_copy) != 0) | |
| 951 | + { | |
| 952 | + d->m_output_flush_ofs = bytes_to_copy; | |
| 953 | + d->m_output_flush_remaining = n; | |
| 954 | + } | |
| 955 | + } | |
| 956 | + else | |
| 957 | + { | |
| 958 | + d->m_out_buf_ofs += n; | |
| 959 | + } | |
| 960 | + } | |
| 961 | + | |
| 962 | + return d->m_output_flush_remaining; | |
| 963 | +} | |
| 964 | + | |
| 965 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 966 | +#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) | |
| 967 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 968 | +{ | |
| 969 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 970 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 971 | + const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; | |
| 972 | + mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); | |
| 973 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 974 | + for ( ; ; ) | |
| 975 | + { | |
| 976 | + for ( ; ; ) | |
| 977 | + { | |
| 978 | + if (--num_probes_left == 0) return; | |
| 979 | + #define TDEFL_PROBE \ | |
| 980 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 981 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 982 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 983 | + if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; | |
| 984 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 985 | + } | |
| 986 | + if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; | |
| 987 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && | |
| 988 | + (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); | |
| 989 | + if (!probe_len) | |
| 990 | + { | |
| 991 | + *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; | |
| 992 | + } | |
| 993 | + else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) | |
| 994 | + { | |
| 995 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; | |
| 996 | + c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); | |
| 997 | + } | |
| 998 | + } | |
| 999 | +} | |
| 1000 | +#else | |
| 1001 | +static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) | |
| 1002 | +{ | |
| 1003 | + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; | |
| 1004 | + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; | |
| 1005 | + const mz_uint8 *s = d->m_dict + pos, *p, *q; | |
| 1006 | + mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; | |
| 1007 | + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; | |
| 1008 | + for ( ; ; ) | |
| 1009 | + { | |
| 1010 | + for ( ; ; ) | |
| 1011 | + { | |
| 1012 | + if (--num_probes_left == 0) return; | |
| 1013 | + #define TDEFL_PROBE \ | |
| 1014 | + next_probe_pos = d->m_next[probe_pos]; \ | |
| 1015 | + if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ | |
| 1016 | + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ | |
| 1017 | + if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; | |
| 1018 | + TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; | |
| 1019 | + } | |
| 1020 | + if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; | |
| 1021 | + if (probe_len > match_len) | |
| 1022 | + { | |
| 1023 | + *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; | |
| 1024 | + c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; | |
| 1025 | + } | |
| 1026 | + } | |
| 1027 | +} | |
| 1028 | +#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1029 | + | |
| 1030 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN | |
| 1031 | +static mz_bool tdefl_compress_fast(tdefl_compressor *d) | |
| 1032 | +{ | |
| 1033 | + // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. | |
| 1034 | + mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; | |
| 1035 | + mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; | |
| 1036 | + mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1037 | + | |
| 1038 | + while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) | |
| 1039 | + { | |
| 1040 | + const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; | |
| 1041 | + mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1042 | + mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); | |
| 1043 | + d->m_src_buf_left -= num_bytes_to_process; | |
| 1044 | + lookahead_size += num_bytes_to_process; | |
| 1045 | + | |
| 1046 | + while (num_bytes_to_process) | |
| 1047 | + { | |
| 1048 | + mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); | |
| 1049 | + memcpy(d->m_dict + dst_pos, d->m_pSrc, n); | |
| 1050 | + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) | |
| 1051 | + memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); | |
| 1052 | + d->m_pSrc += n; | |
| 1053 | + dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; | |
| 1054 | + num_bytes_to_process -= n; | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | + dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); | |
| 1058 | + if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; | |
| 1059 | + | |
| 1060 | + while (lookahead_size >= 4) | |
| 1061 | + { | |
| 1062 | + mz_uint cur_match_dist, cur_match_len = 1; | |
| 1063 | + mz_uint8 *pCur_dict = d->m_dict + cur_pos; | |
| 1064 | + mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; | |
| 1065 | + mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; | |
| 1066 | + mz_uint probe_pos = d->m_hash[hash]; | |
| 1067 | + d->m_hash[hash] = (mz_uint16)lookahead_pos; | |
| 1068 | + | |
| 1069 | + if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) | |
| 1070 | + { | |
| 1071 | + const mz_uint16 *p = (const mz_uint16 *)pCur_dict; | |
| 1072 | + const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); | |
| 1073 | + mz_uint32 probe_len = 32; | |
| 1074 | + do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, | |
| 1075 | + { | |
| 1076 | + *pMatch_dis with the input because_capacity = 128;ver | |
| 1077 | +// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads | |
| 1078 | +} | |
| 1079 | + | |
| 1080 | +int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ | |
| 1081 | + r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ | |
| 1082 | +) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ | |
| 1083 | + if (pIn_buf_cur < pIn_buf_end) { \ | |
| 1084 | + c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ | |
| 1085 | + n} \ | |
| 1086 | + m.avail_out = (mz_uint c = 0; \ | |
| 1087 | + break; \) ); | |
| 1088 | + cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); | |
| 1089 | + counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } | |
| 1090 | + while (pI expects the decompressor to never read | |
| 1091 | +// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully | |
| 1092 | +// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. | |
| 1093 | +// The slow path is only executed at the very end of the input buffer. | |
| 1094 | +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ | |
| 1095 | + int temp; mz_uint code_len, c; \ | |
| 1096 | + if (num_bits < 15) { \ | |
| 1097 | + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ | |
| 1098 | + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ | |
| 1099 | + } else { \ | |
| 1100 | + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ | |
| 1101 | + } \ | |
| 1102 | + } \ | |
| 1103 | + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ | |
| 1104 | + code_len = temp >> 9, temp &= 511; \ | |
| 1105 | + else { \ | |
| 1106 | + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ | |
| 1107 | + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END | |
| 1108 | + | |
| 1109 | +tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) | |
| 1110 | +{ | |
| 1111 | + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1112 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1113 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1114 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1115 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1116 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1117 | + | |
| 1118 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1119 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1120 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1121 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1122 | + | |
| 1123 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1124 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1125 | + | |
| 1126 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1127 | + TINFL_CR_BEGIN | |
| 1128 | + | |
| 1129 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1130 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1131 | + { | |
| 1132 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1133 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1134 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1135 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1136 | + } | |
| 1137 | + | |
| 1138 | + do | |
| 1139 | + { | |
| 1140 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1141 | + if (r->m_type == 0) | |
| 1142 | + { | |
| 1143 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1144 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1145 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1146 | + while ((counter) && (num_bits)) | |
| 1147 | + { | |
| 1148 | + TINFL_GET_BITS(51, dist, 8); | |
| 1149 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1150 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1151 | + counter--; | |
| 1152 | + } | |
| 1153 | + while (counter) | |
| 1154 | + { | |
| 1155 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1156 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1157 | + { | |
| 1158 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1159 | + { | |
| 1160 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1161 | + } | |
| 1162 | + else | |
| 1163 | + { | |
| 1164 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1165 | + } | |
| 1166 | + } | |
| 1167 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1168 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1169 | + } | |
| 1170 | + } | |
| 1171 | + else if (r->m_type == 3) | |
| 1172 | + { | |
| 1173 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1174 | + } | |
| 1175 | + else | |
| 1176 | + { | |
| 1177 | + if (r->m_type == 1) | |
| 1178 | + { | |
| 1179 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1180 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1181 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1182 | + } | |
| 1183 | + else | |
| 1184 | + { | |
| 1185 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1186 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1187 | + r->m_table_sizes[2] = 19; | |
| 1188 | + } | |
| 1189 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1190 | + { | |
| 1191 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1192 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1193 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1194 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1195 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1196 | + if ((65536 != total) && (used_syms > 1)) | |
| 1197 | + { | |
| 1198 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1199 | + } | |
| 1200 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1201 | + { | |
| 1202 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1203 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1204 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1205 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1206 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1207 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1208 | + { | |
| 1209 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1210 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1211 | + } | |
| 1212 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1213 | + } | |
| 1214 | + if (r->m_type == 2) | |
| 1215 | + { | |
| 1216 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1217 | + { | |
| 1218 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 1219 | + if ((dist == 16) && (!counter)) | |
| 1220 | + { | |
| 1221 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 1222 | + } | |
| 1223 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 1224 | + TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } | |
| 1225 | + }; | |
| 1226 | + mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1227 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1228 | + } | |
| 1229 | + else | |
| 1230 | + z_uint code_len; | |
| 1231 | +#if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 1232 | + } | |
| 1233 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 1234 | + { | |
| 1235 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 1236 | + } | |
| 1237 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 1238 | + } | |
| 1239 | + } | |
| 1240 | + for ( ; ; ) | |
| 1241 | + { | |
| 1242 | + mz_uint8 *pSrc; | |
| 1243 | + for ( ; ; ) | |
| 1244 | + { | |
| 1245 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 1246 | + { | |
| 1247 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 1248 | + if (counter >= 256) | |
| 1249 | + break; | |
| 1250 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1251 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 1252 | + } | |
| 1253 | + else | |
| 1254 | + { | |
| 1255 | + int sym2; mz_uint code_len; | |
| 1256 | +#if TINFL_USE_64BIT_BITBUF | |
| 1257 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 1258 | +#else | |
| 1259 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1260 | +#endif | |
| 1261 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1262 | + code_len = sym2 >> 9; | |
| 1263 | + else | |
| 1264 | + { | |
| 1265 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1266 | + } | |
| 1267 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 1268 | + if (counter & 256) | |
| 1269 | + break; | |
| 1270 | + | |
| 1271 | +#if !TINFL_USE_64BIT_BITBUF | |
| 1272 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 1273 | +#endif | |
| 1274 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 1275 | + code_len = sym2 >> 9; | |
| 1276 | + else | |
| 1277 | + { | |
| 1278 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 1279 | + } | |
| 1280 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 1281 | + | |
| 1282 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 1283 | + if (sym2 & 256) | |
| 1284 | + { | |
| 1285 | + pOut_buf_cur++; | |
| 1286 | + counter = sym2; | |
| 1287 | + break; | |
| 1288 | + } | |
| 1289 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 1290 | + pOut_buf_cur += 2; | |
| 1291 | + } | |
| 1292 | + } | |
| 1293 | + if ((counter &= 511) == 256) break; | |
| 1294 | + | |
| 1295 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 1296 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 1297 | + | |
| 1298 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 1299 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 1300 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 1301 | + | |
| 1302 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 1303 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 1304 | + { | |
| 1305 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 1306 | + } | |
| 1307 | + | |
| 1308 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 1309 | + | |
| 1310 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 1311 | + { | |
| 1312 | + while (counter--) | |
| 1313 | + { | |
| 1314 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1315 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 1316 | + } | |
| 1317 | + continue; | |
| 1318 | + } | |
| 1319 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 1320 | + else if ((counter >= 9) && (counter <= dist)) | |
| 1321 | + { | |
| 1322 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 1323 | + do | |
| 1324 | + { | |
| 1325 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 1326 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 1327 | + pOut_buf_cur += 8; | |
| 1328 | + } while ((pSrc += 8) < pSrc_end); | |
| 1329 | + if ((counter &= 7) < 3) | |
| 1330 | + { | |
| 1331 | + if (counter) | |
| 1332 | + { | |
| 1333 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1334 | + if (counter > 1) | |
| 1335 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1336 | + pOut_buf_cur += counter; | |
| 1337 | + } | |
| 1338 | + continue; | |
| 1339 | + } | |
| 1340 | + } | |
| 1341 | +#endif | |
| 1342 | + do | |
| 1343 | + { | |
| 1344 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1345 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1346 | + pOut_buf_cur[2] = pSrc[2]; | |
| 1347 | + pOut_buf_cur += 3; pSrc += 3; | |
| 1348 | + } while ((int)(counter -= 3) > 2); | |
| 1349 | + if ((int)counter > 0) | |
| 1350 | + { | |
| 1351 | + pOut_buf_cur[0] = pSrc[0]; | |
| 1352 | + if ((int)counter > 1) | |
| 1353 | + pOut_buf_cur[1] = pSrc[1]; | |
| 1354 | + pOut_buf_cur += counter; | |
| 1355 | + } | |
| 1356 | + } | |
| 1357 | + } | |
| 1358 | + } while (!(r->m_final & 1)); | |
| 1359 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1360 | + { | |
| 1361 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 1362 | + } | |
| 1363 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 1364 | + TINFL_CR_FINISH | |
| 1365 | + | |
| 1366 | +common_exit: | |
| 1367 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 1368 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 1369 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 1370 | + { | |
| 1371 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 1372 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 1373 | + while (buf_len) | |
| 1374 | + { | |
| 1375 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 1376 | + { | |
| 1377 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 1378 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 1379 | + } | |
| 1380 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 1381 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 1382 | + } | |
| 1383 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 1384 | + } | |
| 1385 | + return status; | |
| 1386 | +} | |
| 1387 | + | |
| 1388 | +// Higher level helper functions. | |
| 1389 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 1390 | +{ | |
| 1391 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 1392 | + *pOut_len = 0; | |
| 1393 | + tinfl_init(&decomp); | |
| 1394 | + for ( ; ; ) | |
| 1395 | + { | |
| 1396 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 1397 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 1398 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1399 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 1400 | + { | |
| 1401 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1402 | + } | |
| 1403 | + src_buf_ofs += src_buf_size; | |
| 1404 | + *pOut_len += dst_buf_size; | |
| 1405 | + if (status == TINFL_STATUS_DONE) break; | |
| 1406 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 1407 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 1408 | + if (!pNew_buf) | |
| 1409 | + { | |
| 1410 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 1411 | + } | |
| 1412 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 1413 | + } | |
| 1414 | + return pBuf; | |
| 1415 | +} | |
| 1416 | + | |
| 1417 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 1418 | +{ | |
| 1419 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 1420 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 1421 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 1422 | +} | |
| 1423 | + | |
| 1424 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 1425 | +{ | |
| 1426 | + int result = 0; | |
| 1427 | + tinfl_decompressor decomp; | |
| 1428 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 1429 | + if (!pDict) | |
| 1430 | + return TINFL_STATUS_FAILED; | |
| 1431 | + tinfl_init(&decomp); | |
| 1432 | + for ( ; ; ) | |
| 1433 | + { | |
| 1434 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 1435 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 1436 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 1437 | + in_buf_ofs += in_buf_size; | |
| 1438 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 1439 | + break; | |
| 1440 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 1441 | + { | |
| 1442 | + result = (status == TINFL_STATUS_DONE); | |
| 1443 | + break; | |
| 1444 | + } | |
| 1445 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 1446 | + } | |
| 1447 | + MZ_FREE(pDict); | |
| 1448 | + *pIn_buf_size = in_buf_ofs; | |
| 1449 | + return result; | |
| 1450 | +} | |
| 1451 | + | |
| 1452 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 1453 | + | |
| 1454 | +// Purposely making these tables static for faster init and thread safety. | |
| 1455 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 1456 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 1457 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 1458 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 1459 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 1460 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 1461 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 1462 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 1463 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 1464 | + | |
| 1465 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 1466 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 1467 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 1468 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 1469 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 1470 | + | |
| 1471 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 1472 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 1473 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 1474 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1475 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 1476 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 1477 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1478 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1479 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, | |
| 1480 | + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1481 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1482 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, | |
| 1483 | + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; | |
| 1484 | + | |
| 1485 | +static const mz_uint8 s_tdefl_small_dist_extra[512] = { | |
| 1486 | + 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, | |
| 1487 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1488 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
| 1489 | + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1490 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1491 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1492 | + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | |
| 1493 | + 7,7,7,7,7,7,7,7 }; | |
| 1494 | + | |
| 1495 | +static const mz_uint8 s_tdefl_large_dist_sym[128] = { | |
| 1496 | + 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, | |
| 1497 | + 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, | |
| 1498 | + 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; | |
| 1499 | + | |
| 1500 | +static const mz_uint8 s_tdefl_large_dist_extra[128] = { | |
| 1501 | + 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, | |
| 1502 | + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, | |
| 1503 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; | |
| 1504 | + | |
| 1505 | +// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. | |
| 1506 | +typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; | |
| 1507 | +static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) | |
| 1508 | +{ | |
| 1509 | + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); | |
| 1510 | + for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } | |
| 1511 | + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; | |
| 1512 | + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) | |
| 1513 | + { | |
| 1514 | + const mz_uint32* pHist = &hist[pass << 8]; | |
| 1515 | + mz_uint offsets[256], cur_ofs = 0; | |
| 1516 | + for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } | |
| 1517 | + for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; | |
| 1518 | + { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } | |
| 1519 | + } | |
| 1520 | + return pCur_syms; | |
| 1521 | +} | |
| 1522 | + | |
| 1523 | +// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. | |
| 1524 | +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) | |
| 1525 | +{ | |
| 1526 | + int root, leaf, next, avbl, used, dpth; | |
| 1527 | + if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } | |
| 1528 | + A[0].m_key += A[1].m_key; root = 0; leaf = 2; | |
| 1529 | + for (next=1; next < n-1; next++) | |
| 1530 | + { | |
| 1531 | + if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; | |
| 1532 | + if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); | |
| 1533 | + } | |
| 1534 | + A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; | |
| 1535 | + avbl = 1; used = dpth = 0; root = n-2; next = n-1; | |
| 1536 | + while (avbl>0) | |
| 1537 | + { | |
| 1538 | + while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } | |
| 1539 | + while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } | |
| 1540 | + avbl = 2*used; dpth++; used = 0; | |
| 1541 | + } | |
| 1542 | +} | |
| 1543 | + | |
| 1544 | +// Limits canonical Huffman code table's max code size. | |
| 1545 | +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; | |
| 1546 | +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) | |
| 1547 | +{ | |
| 1548 | + int i; mz_uint32 total = 0; if (code_list_len <= 1) return; | |
| 1549 | + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; | |
| 1550 | + for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); | |
| 1551 | + while (total != (1UL << max_code_size)) | |
| 1552 | + { | |
| 1553 | + pNum_codes[max_code_size]--; | |
| 1554 | + for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } | |
| 1555 | + total--; | |
| 1556 | + } | |
| 1557 | +} | |
| 1558 | + | |
| 1559 | +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) | |
| 1560 | +{ | |
| 1561 | + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); | |
| 1562 | + if (static_table) | |
| 1563 | + { | |
| 1564 | + for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; | |
| 1565 | + } | |
| 1566 | + else | |
| 1567 | + { | |
| 1568 | + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; | |
| 1569 | + int num_used_syms = 0; | |
| 1570 | + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; | |
| 1571 | + for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } | |
| 1572 | + | |
| 1573 | + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); | |
| 1574 | + | |
| 1575 | + for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; | |
| 1576 | + | |
| 1577 | + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); | |
| 1578 | + | |
| 1579 | + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); | |
| 1580 | + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) | |
| 1581 | + for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); | |
| 1582 | + } | |
| 1583 | + | |
| 1584 | + next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); | |
| 1585 | + | |
| 1586 | + for (i = 0; i < table_len; i++) | |
| 1587 | + { | |
| 1588 | + mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; | |
| 1589 | + code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); | |
| 1590 | + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; | |
| 1591 | + } | |
| 1592 | +} | |
| 1593 | + | |
| 1594 | +#define TDEFL_PUT_BITS(b, l) do { \ | |
| 1595 | + mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ | |
| 1596 | + d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ | |
| 1597 | + while (d->m_bits_in >= 8) { \ | |
| 1598 | + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ | |
| 1599 | + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ | |
| 1600 | + d->m_bit_buffer >>= 8; \ | |
| 1601 | + d->m_bits_in -= 8; \ | |
| 1602 | + } \ | |
| 1603 | +} MZ_MACRO_END | |
| 1604 | + | |
| 1605 | +#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ | |
| 1606 | + if (rle_repeat_count < 3) { \ | |
| 1607 | + d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ | |
| 1608 | + while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ | |
| 1609 | + } else { \ | |
| 1610 | + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ | |
| 1611 | +} rle_repeat_count = 0; } } | |
| 1612 | + | |
| 1613 | +#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ | |
| 1614 | + if (rle_z_count < 3) { \ | |
| 1615 | + d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ | |
| 1616 | + } else if (rle_z_count <= 10) { \ | |
| 1617 | + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ | |
| 1618 | + } else { \ | |
| 1619 | + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ | |
| 1620 | +} rle_z_count = 0; } } | |
| 1621 | + | |
| 1622 | +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | |
| 1623 | + | |
| 1624 | +static void tdefl_start_dynamic_block(tdefl_compressor *d) | |
| 1625 | +{ | |
| 1626 | + int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; | |
| 1627 | + mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; | |
| 1628 | + | |
| 1629 | + d->m_huff_count[0][256] = 1; | |
| 1630 | + | |
| 1631 | + tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); | |
| 1632 | + tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); | |
| 1633 | + | |
| 1634 | + for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; | |
| 1635 | + for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; | |
| 1636 | + | |
| 1637 | + memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); | |
| 1638 | + memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); | |
| 1639 | + total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; | |
| 1640 | + | |
| 1641 | + memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1642 | + for (i = 0; i < total_code_sizes_to_pack; i++) | |
| 1643 | + { | |
| 1644 | + mz_uint8 code_size = code_sizes_to_pack[i]; | |
| 1645 | + if (!code_size) | |
| 1646 | + { | |
| 1647 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1648 | + if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1649 | + } | |
| 1650 | + else | |
| 1651 | + { | |
| 1652 | + TDEFL_RLE_ZERO_CODE_SIZE(); | |
| 1653 | + if (code_size != prev_code_size) | |
| 1654 | + { | |
| 1655 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1656 | + d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; | |
| 1657 | + } | |
| 1658 | + else if (++rle_repeat_count == 6) | |
| 1659 | + { | |
| 1660 | + TDEFL_RLE_PREV_CODE_SIZE(); | |
| 1661 | + } | |
| 1662 | + } | |
| 1663 | + prev_code_size = code_size; | |
| 1664 | + } | |
| 1665 | + if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } | |
| 1666 | + | |
| 1667 | + tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); | |
| 1668 | + | |
| 1669 | + TDEFL_PUT_BITS(2, 2); | |
| 1670 | + | |
| 1671 | + TDEFL_PUT_BITS(num_lit_codes - 257, 5); | |
| 1672 | + TDEFL_PUT_BITS(num_dist_codes - 1, 5); | |
| 1673 | + | |
| 1674 | + for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; | |
| 1675 | + num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); | |
| 1676 | + for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); | |
| 1677 | + | |
| 1678 | + for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) | |
| 1679 | + { | |
| 1680 | + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); | |
| 1681 | + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); | |
| 1682 | + if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); | |
| 1683 | + } | |
| 1684 | +} | |
| 1685 | + | |
| 1686 | +static void tdefl_start_static_block(tdefl_compressor *d) | |
| 1687 | +{ | |
| 1688 | + mz_uint i; | |
| 1689 | + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; | |
| 1690 | + | |
| 1691 | + for (i = 0; i <= 143; ++i) *p++ = 8; | |
| 1692 | + for ( ; i <= 255; ++i) *p++ = 9; | |
| 1693 | + for ( ; i <= 279; ++i) *p++ = 7; | |
| 1694 | + for ( ; i <= 287; ++i) *p++ = 8; | |
| 1695 | + | |
| 1696 | + memset(d->m_huff_code_sizes[1], 5, 32); | |
| 1697 | + | |
| 1698 | + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); | |
| 1699 | + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); | |
| 1700 | + | |
| 1701 | + TDEFL_PUT_BITS(1, 2); | |
| 1702 | +} | |
| 1703 | + | |
| 1704 | +static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; | |
| 1705 | + | |
| 1706 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1707 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1708 | +{ | |
| 1709 | + mz_uint flags; | |
| 1710 | + mz_uint8 *pLZ_codes; | |
| 1711 | + mz_uint8 *pOutput_buf = d->m_pOutput_buf; | |
| 1712 | + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; | |
| 1713 | + mz_uint64 bit_buffer = d->m_bit_buffer; | |
| 1714 | + mz_uint bits_in = d->m_bits_in; | |
| 1715 | + | |
| 1716 | +#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } | |
| 1717 | + | |
| 1718 | + flags = 1; | |
| 1719 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) | |
| 1720 | + { | |
| 1721 | + if (flags == 1) | |
| 1722 | + flags = *pLZ_codes++ | 0x100; | |
| 1723 | + | |
| 1724 | + if (flags & 1) | |
| 1725 | + { | |
| 1726 | + mz_uint s0, s1, n0, n1, sym, num_extra_bits; | |
| 1727 | + mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; | |
| 1728 | + | |
| 1729 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1730 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1731 | + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1732 | + | |
| 1733 | + // This sequence coaxes MSVC into using cmov's vs. jmp's. | |
| 1734 | + s0 = s_tdefl_small_dist_sym[match_dist & 511]; | |
| 1735 | + n0 = s_tdefl_small_dist_extra[match_dist & 511]; | |
| 1736 | + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; | |
| 1737 | + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1738 | + sym = (match_dist < 512) ? s0 : s1; | |
| 1739 | + num_extra_bits = (match_dist < 512) ? n0 : n1; | |
| 1740 | + | |
| 1741 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1742 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1743 | + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1744 | + } | |
| 1745 | + else | |
| 1746 | + { | |
| 1747 | + mz_uint lit = *pLZ_codes++; | |
| 1748 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1749 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1750 | + | |
| 1751 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1752 | + { | |
| 1753 | + flags >>= 1; | |
| 1754 | + lit = *pLZ_codes++; | |
| 1755 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1756 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1757 | + | |
| 1758 | + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) | |
| 1759 | + { | |
| 1760 | + flags >>= 1; | |
| 1761 | + lit = *pLZ_codes++; | |
| 1762 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1763 | + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1764 | + } | |
| 1765 | + } | |
| 1766 | + } | |
| 1767 | + | |
| 1768 | + if (pOutput_buf >= d->m_pOutput_buf_end) | |
| 1769 | + return MZ_FALSE; | |
| 1770 | + | |
| 1771 | + *(mz_uint64*)pOutput_buf = bit_buffer; | |
| 1772 | + pOutput_buf += (bits_in >> 3); | |
| 1773 | + bit_buffer >>= (bits_in & ~7); | |
| 1774 | + bits_in &= 7; | |
| 1775 | + } | |
| 1776 | + | |
| 1777 | +#undef TDEFL_PUT_BITS_FAST | |
| 1778 | + | |
| 1779 | + d->m_pOutput_buf = pOutput_buf; | |
| 1780 | + d->m_bits_in = 0; | |
| 1781 | + d->m_bit_buffer = 0; | |
| 1782 | + | |
| 1783 | + while (bits_in) | |
| 1784 | + { | |
| 1785 | + mz_uint32 n = MZ_MIN(bits_in, 16); | |
| 1786 | + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); | |
| 1787 | + bit_buffer >>= n; | |
| 1788 | + bits_in -= n; | |
| 1789 | + } | |
| 1790 | + | |
| 1791 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1792 | + | |
| 1793 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1794 | +} | |
| 1795 | +#else | |
| 1796 | +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) | |
| 1797 | +{ | |
| 1798 | + mz_uint flags; | |
| 1799 | + mz_uint8 *pLZ_codes; | |
| 1800 | + | |
| 1801 | + flags = 1; | |
| 1802 | + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) | |
| 1803 | + { | |
| 1804 | + if (flags == 1) | |
| 1805 | + flags = *pLZ_codes++ | 0x100; | |
| 1806 | + if (flags & 1) | |
| 1807 | + { | |
| 1808 | + mz_uint sym, num_extra_bits; | |
| 1809 | + mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; | |
| 1810 | + | |
| 1811 | + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1812 | + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); | |
| 1813 | + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); | |
| 1814 | + | |
| 1815 | + if (match_dist < 512) | |
| 1816 | + { | |
| 1817 | + sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; | |
| 1818 | + } | |
| 1819 | + else | |
| 1820 | + { | |
| 1821 | + sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; | |
| 1822 | + } | |
| 1823 | + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); | |
| 1824 | + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); | |
| 1825 | + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); | |
| 1826 | + } | |
| 1827 | + else | |
| 1828 | + { | |
| 1829 | + mz_uint lit = *pLZ_codes++; | |
| 1830 | + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); | |
| 1831 | + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); | |
| 1832 | + } | |
| 1833 | + } | |
| 1834 | + | |
| 1835 | + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); | |
| 1836 | + | |
| 1837 | + return (d->m_pOutput_buf < d->m_pOutput_buf_end); | |
| 1838 | +} | |
| 1839 | +#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS | |
| 1840 | + | |
| 1841 | +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) | |
| 1842 | +{ | |
| 1843 | + if (static_block) | |
| 1844 | + tdefl_start_static_block(d); | |
| 1845 | + else | |
| 1846 | + tdefl_start_dynamic_block(d); | |
| 1847 | + return tdefl_compress_lz_codes(d); | |
| 1848 | +} | |
| 1849 | + | |
| 1850 | +static int tdefl_flush_block(tdefl_compressor *d, int flush) | |
| 1851 | +{ | |
| 1852 | + mz_uint saved_bit_buf, saved_bits_in; | |
| 1853 | + mz_uint8 *pSaved_output_buf; | |
| 1854 | + mz_bool comp_block_succeeded = MZ_FALSE; | |
| 1855 | + int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; | |
| 1856 | + mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; | |
| 1857 | + | |
| 1858 | + d->m_pOutput_buf = pOutput_buf_start; | |
| 1859 | + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; | |
| 1860 | + | |
| 1861 | + MZ_ASSERT(!d->m_output_flush_remaining); | |
| 1862 | + d->m_output_flush_ofs = 0; | |
| 1863 | + d->m_output_flush_remaining = 0; | |
| 1864 | + | |
| 1865 | + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); | |
| 1866 | + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); | |
| 1867 | + | |
| 1868 | + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) | |
| 1869 | + { | |
| 1870 | + TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); | |
| 1871 | + } | |
| 1872 | + | |
| 1873 | + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); | |
| 1874 | + | |
| 1875 | + pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; | |
| 1876 | + | |
| 1877 | + if (!use_raw_block) | |
| 1878 | + comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); | |
| 1879 | + | |
| 1880 | + // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. | |
| 1881 | + if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && | |
| 1882 | + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) | |
| 1883 | + { | |
| 1884 | + mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; | |
| 1885 | + TDEFL_PUT_BITS(0, 2); | |
| 1886 | + if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | |
| 1887 | + See "unlicense" statement at the end of this file. | |
| 1888 | + Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 | |
| 1889 | + Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | |
| 1890 | + | |
| 1891 | + Most API's defined in miniz.c are optionaljority of prev. users so I'm | |
| 1892 | + op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; | |
| 1893 | + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; | |
| 1894 | + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; | |
| 1895 | + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; | |
| 1896 | + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; | |
| 1897 | + static const int s_min_table_sizes[3] = { 257, 1, 4 }; | |
| 1898 | + | |
| 1899 | + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; | |
| 1900 | + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; | |
| 1901 | + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; | |
| 1902 | + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; | |
| 1903 | + | |
| 1904 | + // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). | |
| 1905 | + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } | |
| 1906 | + | |
| 1907 | + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; | |
| 1908 | + TINFL_CR_BEGIN | |
| 1909 | + | |
| 1910 | + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; | |
| 1911 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 1912 | + { | |
| 1913 | + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); | |
| 1914 | + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); | |
| 1915 | + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); | |
| 1916 | + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } | |
| 1917 | + } | |
| 1918 | + | |
| 1919 | + do | |
| 1920 | + { | |
| 1921 | + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; | |
| 1922 | + if (r->m_type == 0) | |
| 1923 | + { | |
| 1924 | + TINFL_SKIP_BITS(5, num_bits & 7); | |
| 1925 | + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } | |
| 1926 | + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } | |
| 1927 | + while ((counter) && (num_bits)) | |
| 1928 | + { | |
| 1929 | + TINFL_GET_BITS(51, dist, 8); | |
| 1930 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1931 | + *pOut_buf_cur++ = (mz_uint8)dist; | |
| 1932 | + counter--; | |
| 1933 | + } | |
| 1934 | + while (counter) | |
| 1935 | + { | |
| 1936 | + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 1937 | + while (pIn_buf_cur >= pIn_buf_end) | |
| 1938 | + { | |
| 1939 | + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) | |
| 1940 | + { | |
| 1941 | + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); | |
| 1942 | + } | |
| 1943 | + else | |
| 1944 | + { | |
| 1945 | + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); | |
| 1946 | + } | |
| 1947 | + } | |
| 1948 | + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); | |
| 1949 | + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; | |
| 1950 | + } | |
| 1951 | + } | |
| 1952 | + else if (r->m_type == 3) | |
| 1953 | + { | |
| 1954 | + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); | |
| 1955 | + } | |
| 1956 | + else | |
| 1957 | + { | |
| 1958 | + if (r->m_type == 1) | |
| 1959 | + { | |
| 1960 | + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; | |
| 1961 | + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); | |
| 1962 | + for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; | |
| 1963 | + } | |
| 1964 | + else | |
| 1965 | + { | |
| 1966 | + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } | |
| 1967 | + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } | |
| 1968 | + r->m_table_sizes[2] = 19; | |
| 1969 | + } | |
| 1970 | + for ( ; (int)r->m_type >= 0; r->m_type--) | |
| 1971 | + { | |
| 1972 | + int tree_next, tree_cur; tinfl_huff_table *pTable; | |
| 1973 | + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); | |
| 1974 | + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; | |
| 1975 | + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; | |
| 1976 | + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } | |
| 1977 | + if ((65536 != total) && (used_syms > 1)) | |
| 1978 | + { | |
| 1979 | + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); | |
| 1980 | + } | |
| 1981 | + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) | |
| 1982 | + { | |
| 1983 | + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; | |
| 1984 | + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); | |
| 1985 | + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } | |
| 1986 | + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } | |
| 1987 | + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); | |
| 1988 | + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) | |
| 1989 | + { | |
| 1990 | + tree_cur -= ((rev_code >>= 1) & 1); | |
| 1991 | + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; | |
| 1992 | + } | |
| 1993 | + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; | |
| 1994 | + } | |
| 1995 | + if (r->m_type == 2) | |
| 1996 | + { | |
| 1997 | + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) | |
| 1998 | + { | |
| 1999 | + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } | |
| 2000 | + if ((dist == 16) && (!counter)) | |
| 2001 | + { | |
| 2002 | + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); | |
| 2003 | + } | |
| 2004 | + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; | |
| 2005 | + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; | |
| 2006 | + } | |
| 2007 | + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) | |
| 2008 | + { | |
| 2009 | + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); | |
| 2010 | + } | |
| 2011 | + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); | |
| 2012 | + } | |
| 2013 | + } | |
| 2014 | + for ( ; ; ) | |
| 2015 | + { | |
| 2016 | + mz_uint8 *pSrc; | |
| 2017 | + for ( ; ; ) | |
| 2018 | + { | |
| 2019 | + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) | |
| 2020 | + { | |
| 2021 | + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); | |
| 2022 | + if (counter >= 256) | |
| 2023 | + break; | |
| 2024 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2025 | + *pOut_buf_cur++ = (mz_uint8)counter; | |
| 2026 | + } | |
| 2027 | + else | |
| 2028 | + { | |
| 2029 | + int sym2; mz_uint code_len; | |
| 2030 | +#if TINFL_USE_64BIT_BITBUF | |
| 2031 | + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } | |
| 2032 | +#else | |
| 2033 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2034 | +#endif | |
| 2035 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2036 | + code_len = sym2 >> 9; | |
| 2037 | + else | |
| 2038 | + { | |
| 2039 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2040 | + } | |
| 2041 | + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; | |
| 2042 | + if (counter & 256) | |
| 2043 | + break; | |
| 2044 | + | |
| 2045 | +#if !TINFL_USE_64BIT_BITBUF | |
| 2046 | + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } | |
| 2047 | +#endif | |
| 2048 | + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) | |
| 2049 | + code_len = sym2 >> 9; | |
| 2050 | + else | |
| 2051 | + { | |
| 2052 | + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); | |
| 2053 | + } | |
| 2054 | + bit_buf >>= code_len; num_bits -= code_len; | |
| 2055 | + | |
| 2056 | + pOut_buf_cur[0] = (mz_uint8)counter; | |
| 2057 | + if (sym2 & 256) | |
| 2058 | + { | |
| 2059 | + pOut_buf_cur++; | |
| 2060 | + counter = sym2; | |
| 2061 | + break; | |
| 2062 | + } | |
| 2063 | + pOut_buf_cur[1] = (mz_uint8)sym2; | |
| 2064 | + pOut_buf_cur += 2; | |
| 2065 | + } | |
| 2066 | + } | |
| 2067 | + if ((counter &= 511) == 256) break; | |
| 2068 | + | |
| 2069 | + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; | |
| 2070 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } | |
| 2071 | + | |
| 2072 | + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); | |
| 2073 | + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; | |
| 2074 | + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } | |
| 2075 | + | |
| 2076 | + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; | |
| 2077 | + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) | |
| 2078 | + { | |
| 2079 | + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); | |
| 2080 | + } | |
| 2081 | + | |
| 2082 | + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); | |
| 2083 | + | |
| 2084 | + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) | |
| 2085 | + { | |
| 2086 | + while (counter--) | |
| 2087 | + { | |
| 2088 | + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } | |
| 2089 | + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; | |
| 2090 | + } | |
| 2091 | + continue; | |
| 2092 | + } | |
| 2093 | +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES | |
| 2094 | + else if ((counter >= 9) && (counter <= dist)) | |
| 2095 | + { | |
| 2096 | + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); | |
| 2097 | + do | |
| 2098 | + { | |
| 2099 | + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; | |
| 2100 | + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; | |
| 2101 | + pOut_buf_cur += 8; | |
| 2102 | + } while ((pSrc += 8) < pSrc_end); | |
| 2103 | + if ((counter &= 7) < 3) | |
| 2104 | + { | |
| 2105 | + if (counter) | |
| 2106 | + { | |
| 2107 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2108 | + if (counter > 1) | |
| 2109 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2110 | + pOut_buf_cur += counter; | |
| 2111 | + } | |
| 2112 | + continue; | |
| 2113 | + } | |
| 2114 | + } | |
| 2115 | +#endif | |
| 2116 | + do | |
| 2117 | + { | |
| 2118 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2119 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2120 | + pOut_buf_cur[2] = pSrc[2]; | |
| 2121 | + pOut_buf_cur += 3; pSrc += 3; | |
| 2122 | + } while ((int)(counter -= 3) > 2); | |
| 2123 | + if ((int)counter > 0) | |
| 2124 | + { | |
| 2125 | + pOut_buf_cur[0] = pSrc[0]; | |
| 2126 | + if ((int)counter > 1) | |
| 2127 | + pOut_buf_cur[1] = pSrc[1]; | |
| 2128 | + pOut_buf_cur += counter; | |
| 2129 | + } | |
| 2130 | + } | |
| 2131 | + } | |
| 2132 | + } while (!(r->m_final & 1)); | |
| 2133 | + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) | |
| 2134 | + { | |
| 2135 | + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } | |
| 2136 | + } | |
| 2137 | + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); | |
| 2138 | + TINFL_CR_FINISH | |
| 2139 | + | |
| 2140 | +common_exit: | |
| 2141 | + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; | |
| 2142 | + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; | |
| 2143 | + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) | |
| 2144 | + { | |
| 2145 | + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; | |
| 2146 | + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; | |
| 2147 | + while (buf_len) | |
| 2148 | + { | |
| 2149 | + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) | |
| 2150 | + { | |
| 2151 | + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; | |
| 2152 | + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; | |
| 2153 | + } | |
| 2154 | + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; | |
| 2155 | + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; | |
| 2156 | + } | |
| 2157 | + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; | |
| 2158 | + } | |
| 2159 | + return status; | |
| 2160 | +} | |
| 2161 | + | |
| 2162 | +// Higher level helper functions. | |
| 2163 | +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) | |
| 2164 | +{ | |
| 2165 | + tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; | |
| 2166 | + *pOut_len = 0; | |
| 2167 | + tinfl_init(&decomp); | |
| 2168 | + for ( ; ; ) | |
| 2169 | + { | |
| 2170 | + size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; | |
| 2171 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, | |
| 2172 | + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2173 | + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) | |
| 2174 | + { | |
| 2175 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2176 | + } | |
| 2177 | + src_buf_ofs += src_buf_size; | |
| 2178 | + *pOut_len += dst_buf_size; | |
| 2179 | + if (status == TINFL_STATUS_DONE) break; | |
| 2180 | + new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; | |
| 2181 | + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); | |
| 2182 | + if (!pNew_buf) | |
| 2183 | + { | |
| 2184 | + MZ_FREE(pBuf); *pOut_len = 0; return NULL; | |
| 2185 | + } | |
| 2186 | + pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; | |
| 2187 | + } | |
| 2188 | + return pBuf; | |
| 2189 | +} | |
| 2190 | + | |
| 2191 | +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) | |
| 2192 | +{ | |
| 2193 | + tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); | |
| 2194 | + status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); | |
| 2195 | + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; | |
| 2196 | +} | |
| 2197 | + | |
| 2198 | +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) | |
| 2199 | +{ | |
| 2200 | + int result = 0; | |
| 2201 | + tinfl_decompressor decomp; | |
| 2202 | + mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; | |
| 2203 | + if (!pDict) | |
| 2204 | + return TINFL_STATUS_FAILED; | |
| 2205 | + tinfl_init(&decomp); | |
| 2206 | + for ( ; ; ) | |
| 2207 | + { | |
| 2208 | + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; | |
| 2209 | + tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, | |
| 2210 | + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); | |
| 2211 | + in_buf_ofs += in_buf_size; | |
| 2212 | + if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) | |
| 2213 | + break; | |
| 2214 | + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) | |
| 2215 | + { | |
| 2216 | + result = (status == TINFL_STATUS_DONE); | |
| 2217 | + break; | |
| 2218 | + } | |
| 2219 | + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); | |
| 2220 | + } | |
| 2221 | + MZ_FREE(pDict); | |
| 2222 | + *pIn_buf_size = in_buf_ofs; | |
| 2223 | + return result; | |
| 2224 | +} | |
| 2225 | + | |
| 2226 | +// ------------------- Low-level Compression (independent from all decompression API's) | |
| 2227 | + | |
| 2228 | +// Purposely making these tables static for faster init and thread safety. | |
| 2229 | +static const mz_uint16 s_tdefl_len_sym[256] = { | |
| 2230 | + 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, | |
| 2231 | + 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, | |
| 2232 | + 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, | |
| 2233 | + 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
| 2234 | + 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, | |
| 2235 | + 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, | |
| 2236 | + 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, | |
| 2237 | + 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; | |
| 2238 | + | |
| 2239 | +static const mz_uint8 s_tdefl_len_extra[256] = { | |
| 2240 | + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
| 2241 | + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, | |
| 2242 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
| 2243 | + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; | |
| 2244 | + | |
| 2245 | +static const mz_uint8 s_tdefl_small_dist_sym[512] = { | |
| 2246 | + 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, | |
| 2247 | + 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, | |
| 2248 | + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2249 | + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, | |
| 2250 | + 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, | |
| 2251 | + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| --- a/src/miniz.c | |
| +++ b/src/miniz.c | |
| @@ -0,0 +1,2251 @@ | |
| 1 | /* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 2 | See "unlicense" statement at the end of this file. |
| 3 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 4 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 5 | |
| 6 | Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define |
| 7 | MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). |
| 8 | |
| 9 | * Change History |
| 10 | 10/1ller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed. |
| 11 | void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); |
| 12 | void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); |
| 13 | |
| 14 | // Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. |
| 15 | typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser); |
| 16 | |
| 17 | // tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function intern return MZ_DATA_ERROR; |
| 18 | |
| 19 | if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; |
| 20 | pState->m_has_flushed |= (flush == MZ_FINISH); |
| 21 | |
| 22 | if ((flush == MZ_FINISH) && (first_call)) |
| 23 | { |
| 24 | // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. |
| 25 | decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; |
| 26 | in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; |
| 27 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); |
| 28 | pState->m_last_status = status; |
| 29 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; |
| 30 | pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 31 | pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; |
| 32 | |
| 33 | if (status < 0) |
| 34 | return MZ_DATA_ERROR; |
| 35 | else if (status != TINFL_STATUS_DONE) |
| 36 | { |
| 37 | pState->m_last_status = TINFL_STATUS_FAILED; |
| 38 | return MZ_BUF_ERROR; |
| 39 | } |
| 40 | return MZ_STREAM_END; |
| 41 | } |
| 42 | // flush != MZ_FINISH then we must assume there's more input. |
| 43 | if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; |
| 44 | |
| 45 | if (pState->m_dict_avail) |
| 46 | { |
| 47 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 48 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 49 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 50 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 51 | return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 52 | } |
| 53 | |
| 54 | for ( ; ; ) |
| 55 | { |
| 56 | in_bytes = pStream->avail_in; |
| 57 | out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; |
| 58 | |
| 59 | status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); |
| 60 | pState->m_last_status = status; |
| 61 | |
| 62 | pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; |
| 63 | pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); |
| 64 | |
| 65 | pState->m_dict_avail = (mz_uint)out_bytes; |
| 66 | |
| 67 | n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); |
| 68 | memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); |
| 69 | pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; |
| 70 | pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); |
| 71 | |
| 72 | if (status < 0) |
| 73 | return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). |
| 74 | else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) |
| 75 | return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. |
| 76 | else if (flush == MZ_FINISH) |
| 77 | { |
| 78 | // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. |
| 79 | if (status == TINFL_STATUS_DONE) |
| 80 | return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; |
| 81 | // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. |
| 82 | else if (!pStream->avail_out) |
| 83 | return MZ_BUF_ERROR; |
| 84 | } |
| 85 | else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) |
| 86 | break; |
| 87 | } |
| 88 | |
| 89 | return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; |
| 90 | } |
| 91 | |
| 92 | int mz_inflateEnd(mz_streamp pStream) |
| 93 | { |
| 94 | if (!pStream) |
| 95 | return MZ_STREAM_ERROR; |
| 96 | if (pStream->state) |
| 97 | { |
| 98 | pStream->zfree(pStream->opaque, pStream->state); |
| 99 | pStream->state = NULL; |
| 100 | } |
| 101 | return MZ_OK; |
| 102 | } |
| 103 | |
| 104 | int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) |
| 105 | { |
| 106 | mz_stream stream; |
| 107 | int status; |
| 108 | memset(&stream, 0, sizeof(stream)); |
| 109 | |
| 110 | // In case mz_ulong is 64-bits (argh I hate longs). |
| 111 | if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; |
| 112 | |
| 113 | stream.next_in = pSource; |
| 114 | stream.avail_in = (mz_uint32)source_len; |
| 115 | stream.next_out = pDest; |
| 116 | stream.avail_out = (mz_uint32)*pDest_len; |
| 117 | |
| 118 | status = mz_inflateInit(&stream); |
| 119 | if (status != MZ_OK) |
| 120 | return status; |
| 121 | |
| 122 | status = mz_inflate(&stream, MZ_FINISH); |
| 123 | if (status != MZ_STREAM_END) |
| 124 | { |
| 125 | mz_inflateEnd(&stream); |
| 126 | return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; |
| 127 | } |
| 128 | *pDest_len = stream.total_out; |
| 129 | |
| 130 | return mz_inflateEnd(&stream); |
| 131 | } |
| 132 | |
| 133 | const char *mz_error(int err) |
| 134 | { |
| 135 | static const struct { int m_err; const char *m_pDesc; } s_error_descs[] = |
| 136 | { |
| 137 | { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, |
| 138 | { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" } |
| 139 | }; |
| 140 | mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; |
| 141 | return NULL; |
| 142 | } |
| 143 | |
| 144 | #endif //MINIZ_NO_ZLIB_APIS |
| 145 | |
| 146 | // ------------------- Low-level Decompression (completely independent from all compression API's) |
| 147 | |
| 148 | #define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) |
| 149 | #define TINFL_MEMSET(p, c, l) memset(p, c, l) |
| 150 | |
| 151 | #define TINFL_CR_BEGIN switch(r->m_state) { case 0: |
| 152 | #define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END |
| 153 | #define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END |
| 154 | #define TINFL_CR_FINISH } |
| 155 | |
| 156 | // TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never |
| 157 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. |
| 158 | #define TINFL_GET_BYTE(state_index, c) do { \ |
| 159 | if (pIn_buf_cur >= pIn_buf_end) { \ |
| 160 | for ( ; ; ) { \ |
| 161 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ |
| 162 | TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ |
| 163 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 164 | c = *pIn_buf_cur++; \ |
| 165 | break; \ |
| 166 | } \ |
| 167 | } else { \ |
| 168 | c = 0; \ |
| 169 | break; \ |
| 170 | } \ |
| 171 | } \ |
| 172 | } else c = *pIn_buf_cur++; } MZ_MACRO_END |
| 173 | |
| 174 | #define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) |
| 175 | #define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 176 | #define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END |
| 177 | |
| 178 | // TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. |
| 179 | // It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a |
| 180 | // Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the |
| 181 | // bit buffer contains >=15 bits (deflate's max. Huffman code size). |
| 182 | #define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ |
| 183 | do { \ |
| 184 | temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ |
| 185 | if (temp >= 0) { \ |
| 186 | code_len = temp >> 9; \ |
| 187 | if ((code_len) && (num_bits >= code_len)) \ |
| 188 | break; \ |
| 189 | } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ |
| 190 | code_len = TINFL_FAST_LOOKUP_BITS; \ |
| 191 | do { \ |
| 192 | temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ |
| 193 | } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ |
| 194 | } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ |
| 195 | } while (num_bits < 15); |
| 196 | |
| 197 | // TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read |
| 198 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 199 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 200 | // The slow path is only executed at the very end of the input buffer. |
| 201 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 202 | int temp; mz_uint code_len, c; \ |
| 203 | if (num_bits < 15) { \ |
| 204 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 205 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 206 | } else { \ |
| 207 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 208 | } \ |
| 209 | } \ |
| 210 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 211 | code_len = temp >> 9, temp &= 511; \ |
| 212 | else { \ |
| 213 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 214 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 215 | |
| 216 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 217 | { |
| 218 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 219 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 220 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 221 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 222 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 223 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 224 | |
| 225 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 226 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 227 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 228 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 229 | |
| 230 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 231 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 232 | |
| 233 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 234 | TINFL_CR_BEGIN |
| 235 | |
| 236 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 237 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 238 | { |
| 239 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 240 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 241 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 242 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 243 | } |
| 244 | |
| 245 | do |
| 246 | { |
| 247 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 248 | if (r->m_type == 0) |
| 249 | { |
| 250 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 251 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 252 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 253 | while ((counter) && (num_bits)) |
| 254 | { |
| 255 | TINFL_GET_BITS(51, dist, 8); |
| 256 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 257 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 258 | counter--; |
| 259 | } |
| 260 | while (counter) |
| 261 | { |
| 262 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 263 | while (pIn_buf_cur >= pIn_buf_end) |
| 264 | { |
| 265 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 266 | { |
| 267 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 268 | } |
| 269 | else |
| 270 | { |
| 271 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 272 | } |
| 273 | } |
| 274 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 275 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 276 | } |
| 277 | } |
| 278 | else if (r->m_type == 3) |
| 279 | { |
| 280 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | if (r->m_type == 1) |
| 285 | { |
| 286 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 287 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 288 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 289 | } |
| 290 | else |
| 291 | { |
| 292 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 293 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 294 | r->m_table_sizes[2] = 19; |
| 295 | } |
| 296 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 297 | { |
| 298 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 299 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 300 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 301 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 302 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 303 | if ((65536 != total) && (used_syms > 1)) |
| 304 | { |
| 305 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 306 | } |
| 307 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 308 | { |
| 309 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 310 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 311 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 312 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 313 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 314 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 315 | { |
| 316 | tree_cur -= ((rev_code >>= 1) & 1); |
| 317 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 318 | } |
| 319 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 320 | } |
| 321 | if (r->m_type == 2) |
| 322 | { |
| 323 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 324 | { |
| 325 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 326 | if ((dist == 16) && (!counter)) |
| 327 | { |
| 328 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 329 | } |
| 330 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 331 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 332 | } |
| 333 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 334 | { |
| 335 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 336 | } |
| 337 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 338 | } |
| 339 | } |
| 340 | for ( ; ; ) |
| 341 | { |
| 342 | mz_uint8 *pSrc; |
| 343 | for ( ; ; ) |
| 344 | { |
| 345 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 346 | { |
| 347 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 348 | if (counter >= 256) |
| 349 | break; |
| 350 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 351 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 352 | } |
| 353 | else |
| 354 | { |
| 355 | int sym2; mz_uint code_len; |
| 356 | #if TINFL_USE_64BIT_BITBUF |
| 357 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 358 | #else |
| 359 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 360 | #endif |
| 361 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 362 | code_len = sym2 >> 9; |
| 363 | else |
| 364 | { |
| 365 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 366 | } |
| 367 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 368 | if (counter & 256) |
| 369 | break; |
| 370 | |
| 371 | #if !TINFL_USE_64BIT_BITBUF |
| 372 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 373 | #endif |
| 374 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 375 | code_len = sym2 >> 9; |
| 376 | else |
| 377 | { |
| 378 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 379 | } |
| 380 | bit_buf >>= code_len; num_bits -= code_len; |
| 381 | |
| 382 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 383 | if (sym2 & 256) |
| 384 | { |
| 385 | pOut_buf_cur++; |
| 386 | counter = sym2; |
| 387 | break; |
| 388 | } |
| 389 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 390 | pOut_buf_cur += 2; |
| 391 | } |
| 392 | } |
| 393 | if ((counter &= 511) == 256) break; |
| 394 | |
| 395 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 396 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 397 | |
| 398 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 399 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 400 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 401 | |
| 402 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 403 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 404 | { |
| 405 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 406 | } |
| 407 | |
| 408 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 409 | |
| 410 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 411 | { |
| 412 | while (counter--) |
| 413 | { |
| 414 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 415 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 416 | } |
| 417 | continue; |
| 418 | } |
| 419 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 420 | else if ((counter >= 9) && (counter <= dist)) |
| 421 | { |
| 422 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 423 | do |
| 424 | { |
| 425 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 426 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 427 | pOut_buf_cur += 8; |
| 428 | } while ((pSrc += 8) < pSrc_end); |
| 429 | if ((counter &= 7) < 3) |
| 430 | { |
| 431 | if (counter) |
| 432 | { |
| 433 | pOut_buf_cur[0] = pSrc[0]; |
| 434 | if (counter > 1) |
| 435 | pOut_buf_cur[1] = pSrc[1]; |
| 436 | pOut_buf_cur += counter; |
| 437 | } |
| 438 | continue; |
| 439 | } |
| 440 | } |
| 441 | #endif |
| 442 | do |
| 443 | { |
| 444 | pOut_buf_cur[0] = pSrc[0]; |
| 445 | pOut_buf_cur[1] = pSrc[1]; |
| 446 | pOut_buf_cur[2] = pSrc[2]; |
| 447 | pOut_buf_cur += 3; pSrc += 3; |
| 448 | } while ((int)(counter -= 3) > 2); |
| 449 | if ((int)counter > 0) |
| 450 | { |
| 451 | pOut_buf_cur[0] = pSrc[0]; |
| 452 | if ((int)counter > 1) |
| 453 | pOut_buf_cur[1] = pSrc[1]; |
| 454 | pOut_buf_cur += counter; |
| 455 | } |
| 456 | } |
| 457 | } |
| 458 | } while (!(r->m_final & 1)); |
| 459 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 460 | { |
| 461 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 462 | } |
| 463 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 464 | TINFL_CR_FINISH |
| 465 | |
| 466 | common_exit: |
| 467 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 468 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 469 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 470 | { |
| 471 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 472 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 473 | while (buf_len) |
| 474 | { |
| 475 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 476 | { |
| 477 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 478 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 479 | } |
| 480 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 481 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 482 | } |
| 483 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 484 | } |
| 485 | return status; |
| 486 | } |
| 487 | |
| 488 | // Higher level helper functions. |
| 489 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 490 | { |
| 491 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 492 | *pOut_len = 0; |
| 493 | tinfl_init(&decomp); |
| 494 | for ( ; ; ) |
| 495 | { |
| 496 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 497 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 498 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 499 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 500 | { |
| 501 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 502 | } |
| 503 | src_buf_ofs += src_buf_size; |
| 504 | *pOut_len += dst_buf_size; |
| 505 | if (status == TINFL_STATUS_DONE) break; |
| 506 | new_out_buf_capacity = out_buf_capacit7,278,278,278,278,278,278,27880, |
| 507 | 281,2 w deflate (non-zlib) = -1,,277,278,278,278DONE = 0,,277,278,278,278 byte in order t = 1,,277,278,278,278HAS_MORE_OUTPUT = 215,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 508 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 509 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 510 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 511 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 512 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 513 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 514 | |
| 515 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 516 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 517 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 518 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 519 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 520 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 521 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 522 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 523 | 7,7,7,7,7,7,7,7 }; |
| 524 | |
| 525 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 526 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 527 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 528 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 529 | |
| 530 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 531 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 532 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 533 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 534 | |
| 535 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 536 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 537 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 538 | { |
| 539 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 540 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 541 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 542 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 543 | { |
| 544 | const mz_uint32* pHist = &hist[pass << 8]; |
| 545 | mz_uint offsets[256], cur_ofs = 0; |
| 546 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 547 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 548 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 549 | } |
| 550 | return pCur_syms; |
| 551 | } |
| 552 | |
| 553 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 554 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 555 | { |
| 556 | int root, leaf, next, avbl, used, dpth; |
| 557 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 558 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 559 | for (next=1; next < n-1; next++) |
| 560 | { |
| 561 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 562 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 563 | } |
| 564 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 565 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 566 | while (avbl>0) |
| 567 | { |
| 568 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 569 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 570 | avbl = 2*used; dpth++; used = 0; |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | // Limits canonical Huffman code table's max um_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 575 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 576 | { |
| 577 | const mz_uint32* pHist = &hist[pass << 8]; |
| 578 | mz_uint offsets[256], cur_ofs = 0; |
| 579 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 580 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 581 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 582 | } |
| 583 | return pCur_syms; |
| 584 | } |
| 585 | |
| 586 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 587 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 588 | { |
| 589 | int root, leaf, next, avbl, used, dpth; |
| 590 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 591 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 592 | for (next=1; next < n-1; next++) |
| 593 | { |
| 594 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 595 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 596 | } |
| 597 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 598 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 599 | while (avbl>0) |
| 600 | { |
| 601 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 602 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 603 | avbl = 2*used; dpth++; used = 0; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | // Limits canonical Huffman code table's max code size. |
| 608 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 609 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 610 | { |
| 611 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 612 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 613 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 614 | while (total != (1UL << max_code_size)) |
| 615 | { |
| 616 | pNum_codes[max_code_size]--; |
| 617 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 618 | total--; |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 623 | { |
| 624 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 625 | if (static_table) |
| 626 | { |
| 627 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 628 | } |
| 629 | else |
| 630 | { |
| 631 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 632 | int num_used_syms = 0; |
| 633 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 634 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 635 | |
| 636 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 637 | |
| 638 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 639 | |
| 640 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 641 | |
| 642 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 643 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 644 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 645 | } |
| 646 | |
| 647 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 648 | |
| 649 | for (i = 0; i < table_len; i++) |
| 650 | { |
| 651 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 652 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 653 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 658 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 659 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 660 | while (d->m_bits_in >= 8) { \ |
| 661 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 662 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 663 | d->m_bit_buffer >>= 8; \ |
| 664 | d->m_bits_in -= 8; \ |
| 665 | } \ |
| 666 | } MZ_MACRO_END |
| 667 | |
| 668 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 669 | if (rle_repeat_count < 3) { \ |
| 670 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 671 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 672 | } else { \ |
| 673 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 674 | } rle_repeat_count = 0; } } |
| 675 | |
| 676 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 677 | if (rle_z_count < 3) { \ |
| 678 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 679 | } else if (rle_z_count <= 10) { \ |
| 680 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 681 | } else { \ |
| 682 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 683 | } rle_z_count = 0; } } |
| 684 | |
| 685 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 686 | |
| 687 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 688 | { |
| 689 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_indITS(num_bit_lengths - 4, 4); |
| 690 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 691 | |
| 692 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 693 | { |
| 694 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 695 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 696 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 701 | { |
| 702 | mz_uint i; |
| 703 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 704 | |
| 705 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 706 | for ( ; i <= 255; ++i) *p++ = 9; |
| 707 | for ( ; i <= 279; ++i) *p++ = 7; |
| 708 | for ( ; i <= 287; ++i) *p++ = 8; |
| 709 | |
| 710 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 711 | |
| 712 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 713 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 714 | |
| 715 | TDEFL_PUT_BITS(1, 2); |
| 716 | } |
| 717 | |
| 718 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 719 | |
| 720 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 721 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 722 | { |
| 723 | mz_uint flags; |
| 724 | mz_uint8 *pLZ_codes; |
| 725 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 726 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 727 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 728 | mz_uint bits_in = d->m_bits_in; |
| 729 | |
| 730 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 731 | |
| 732 | flags = 1; |
| 733 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 734 | { |
| 735 | if (flags == 1) |
| 736 | flags = *pLZ_codes++ | 0x100; |
| 737 | |
| 738 | if (flags & 1) |
| 739 | { |
| 740 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 741 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 742 | |
| 743 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 744 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 745 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 746 | |
| 747 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 748 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 749 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 750 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 751 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 752 | sym = (match_dist < 512) ? s0 : s1; |
| 753 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 754 | |
| 755 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 757 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 758 | } |
| 759 | else |
| 760 | { |
| 761 | mz_uint lit = *pLZ_codes++; |
| 762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 764 | |
| 765 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 766 | { |
| 767 | flags >>= 1; |
| 768 | lit = *pLZ_codes++; |
| 769 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 770 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 771 | |
| 772 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 773 | { |
| 774 | flags >>= 1; |
| 775 | lit = *pLZ_codes++; |
| 776 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 777 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 783 | return MZ_FALSE; |
| 784 | |
| 785 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 786 | pOutput_buf += (bits_in >> 3); |
| 787 | bit_buffer >>= (bits_in & ~7); |
| 788 | bits_in &= 7; |
| 789 | } |
| 790 | |
| 791 | #undef TDEFL_PUT_BITS_FAST |
| 792 | |
| 793 | d->m_pOutput_buf = pOutput_buf; |
| 794 | d->m_bits_in = 0; |
| 795 | d->m_bit_buffer = 0; |
| 796 | |
| 797 | while (bits_in) |
| 798 | { |
| 799 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 800 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 801 | bit_buffer >>= n; |
| 802 | bits_in -= n; |
| 803 | } |
| 804 | |
| 805 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 806 | |
| 807 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 808 | } |
| 809 | #else |
| 810 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 811 | { |
| 812 | mz_uint flags; |
| 813 | mz_uint8 *pLZ_codes; |
| 814 | |
| 815 | flags = 1; |
| 816 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 817 | { |
| 818 | if (flags == 1) |
| 819 | flags = *pLZ_codes++ | 0x100; |
| 820 | if (flags & 1) |
| 821 | { |
| 822 | mz_uint sym, num_extra_bits; |
| 823 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 824 | |
| 825 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 826 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 827 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 828 | |
| 829 | if (match_dist < 512) |
| 830 | { |
| 831 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 832 | } |
| 833 | else |
| 834 | { |
| 835 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 836 | } |
| 837 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 838 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 839 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 840 | } |
| 841 | else |
| 842 | { |
| 843 | mz_uint lit = *pLZ_codes++; |
| 844 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 845 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 850 | |
| 851 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 852 | } |
| 853 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 854 | |
| 855 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 856 | { |
| 857 | if (static_block) |
| 858 | tdefl_start_static_block(d); |
| 859 | else |
| 860 | tdefl_start_dynamic_block(d); |
| 861 | return tdefl_compress_lz_codes(d); |
| 862 | } |
| 863 | |
| 864 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 865 | { |
| 866 | mz_uint saved_bit_buf, saved_bits_in; |
| 867 | mz_uint8 *pSaved_output_buf; |
| 868 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 869 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 870 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 871 | |
| 872 | d->m_pOutput_buf = pOutput_buf_start; |
| 873 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 874 | |
| 875 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 876 | d->m_output_flush_ofs = 0; |
| 877 | d->m_output_flush_remaining = 0; |
| 878 | |
| 879 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 880 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 881 | |
| 882 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 883 | { |
| 884 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 885 | } |
| 886 | |
| 887 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 888 | |
| 889 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 890 | |
| 891 | if (!use_raw_block) |
| 892 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 893 | |
| 894 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 895 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 896 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 897 | { |
| 898 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 899 | TDEFL_PUT_BITS(0, 2); |
| 900 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 901 | for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) |
| 902 | { |
| 903 | TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); |
| 904 | } |
| 905 | for (i = 0; i < d->m_total_lz_bytes; ++i) |
| 906 | { |
| 907 | TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); |
| 908 | } |
| 909 | } |
| 910 | // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes. |
| 911 | else if (!comp_block_succeeded) |
| 912 | { |
| 913 | d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 914 | tdefl_compress_block(d, MZ_TRUE); |
| 915 | } |
| 916 | |
| 917 | if (flush) |
| 918 | { |
| 919 | if (flush == TDEFL_FINISH) |
| 920 | { |
| 921 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } |
| 922 | if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } |
| 923 | } |
| 924 | else |
| 925 | { |
| 926 | mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 931 | |
| 932 | memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); |
| 933 | memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); |
| 934 | |
| 935 | d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; |
| 936 | |
| 937 | if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) |
| 938 | { |
| 939 | if (d->m_pPut_buf_func) |
| 940 | { |
| 941 | *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; |
| 942 | if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) |
| 943 | return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); |
| 944 | } |
| 945 | else if (pOutput_buf_start == d->m_output_buf) |
| 946 | { |
| 947 | int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); |
| 948 | memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); |
| 949 | d->m_out_buf_ofs += bytes_to_copy; |
| 950 | if ((n -= bytes_to_copy) != 0) |
| 951 | { |
| 952 | d->m_output_flush_ofs = bytes_to_copy; |
| 953 | d->m_output_flush_remaining = n; |
| 954 | } |
| 955 | } |
| 956 | else |
| 957 | { |
| 958 | d->m_out_buf_ofs += n; |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | return d->m_output_flush_remaining; |
| 963 | } |
| 964 | |
| 965 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 966 | #define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) |
| 967 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 968 | { |
| 969 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 970 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 971 | const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; |
| 972 | mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); |
| 973 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 974 | for ( ; ; ) |
| 975 | { |
| 976 | for ( ; ; ) |
| 977 | { |
| 978 | if (--num_probes_left == 0) return; |
| 979 | #define TDEFL_PROBE \ |
| 980 | next_probe_pos = d->m_next[probe_pos]; \ |
| 981 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 982 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 983 | if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; |
| 984 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 985 | } |
| 986 | if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; |
| 987 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && |
| 988 | (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); |
| 989 | if (!probe_len) |
| 990 | { |
| 991 | *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; |
| 992 | } |
| 993 | else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) |
| 994 | { |
| 995 | *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; |
| 996 | c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); |
| 997 | } |
| 998 | } |
| 999 | } |
| 1000 | #else |
| 1001 | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) |
| 1002 | { |
| 1003 | mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; |
| 1004 | mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; |
| 1005 | const mz_uint8 *s = d->m_dict + pos, *p, *q; |
| 1006 | mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; |
| 1007 | MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; |
| 1008 | for ( ; ; ) |
| 1009 | { |
| 1010 | for ( ; ; ) |
| 1011 | { |
| 1012 | if (--num_probes_left == 0) return; |
| 1013 | #define TDEFL_PROBE \ |
| 1014 | next_probe_pos = d->m_next[probe_pos]; \ |
| 1015 | if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ |
| 1016 | probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ |
| 1017 | if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break; |
| 1018 | TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; |
| 1019 | } |
| 1020 | if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; |
| 1021 | if (probe_len > match_len) |
| 1022 | { |
| 1023 | *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; |
| 1024 | c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1029 | |
| 1030 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN |
| 1031 | static mz_bool tdefl_compress_fast(tdefl_compressor *d) |
| 1032 | { |
| 1033 | // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio. |
| 1034 | mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; |
| 1035 | mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; |
| 1036 | mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; |
| 1037 | |
| 1038 | while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) |
| 1039 | { |
| 1040 | const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; |
| 1041 | mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1042 | mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); |
| 1043 | d->m_src_buf_left -= num_bytes_to_process; |
| 1044 | lookahead_size += num_bytes_to_process; |
| 1045 | |
| 1046 | while (num_bytes_to_process) |
| 1047 | { |
| 1048 | mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); |
| 1049 | memcpy(d->m_dict + dst_pos, d->m_pSrc, n); |
| 1050 | if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) |
| 1051 | memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); |
| 1052 | d->m_pSrc += n; |
| 1053 | dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; |
| 1054 | num_bytes_to_process -= n; |
| 1055 | } |
| 1056 | |
| 1057 | dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); |
| 1058 | if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; |
| 1059 | |
| 1060 | while (lookahead_size >= 4) |
| 1061 | { |
| 1062 | mz_uint cur_match_dist, cur_match_len = 1; |
| 1063 | mz_uint8 *pCur_dict = d->m_dict + cur_pos; |
| 1064 | mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; |
| 1065 | mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; |
| 1066 | mz_uint probe_pos = d->m_hash[hash]; |
| 1067 | d->m_hash[hash] = (mz_uint16)lookahead_pos; |
| 1068 | |
| 1069 | if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) |
| 1070 | { |
| 1071 | const mz_uint16 *p = (const mz_uint16 *)pCur_dict; |
| 1072 | const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); |
| 1073 | mz_uint32 probe_len = 32; |
| 1074 | do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(// TODO: Ifhe raw deflate data (problem dithere's no more input, and we attempt to read beyond the input buf, |
| 1075 | { |
| 1076 | *pMatch_dis with the input because_capacity = 128;ver |
| 1077 | // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads |
| 1078 | } |
| 1079 | |
| 1080 | int mz_deflastream with 0's in this scenario.GNED_WORD(++p) == TDEFifD_UNALIGNEDfor ( ; ; ) { \ |
| 1081 | r" }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUT) { \ |
| 1082 | ) << num_bits); num_bitsstate_index, memcpy(d->m_dict + dst_pos, \ |
| 1083 | if (pIn_buf_cur < pIn_buf_end) { \ |
| 1084 | c = *pIn_buf_cur++; \, { MZ_BUF_ERROR, \ |
| 1085 | n} \ |
| 1086 | m.avail_out = (mz_uint c = 0; \ |
| 1087 | break; \) ); |
| 1088 | cur_match_le }, { MZ_PARAM_ERROR, "parametHAS_MORE_INPUTr1); |
| 1089 | counter = (((r->mTINFL_CR_RETURN(38, memcpy(d->m_dict + dst_pos, if (decomp_flags *)(d->m_dict + probe_po4 particularly important on raTPUT); } |
| 1090 | while (pI expects the decompressor to never read |
| 1091 | // beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully |
| 1092 | // decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. |
| 1093 | // The slow path is only executed at the very end of the input buffer. |
| 1094 | #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ |
| 1095 | int temp; mz_uint code_len, c; \ |
| 1096 | if (num_bits < 15) { \ |
| 1097 | if ((pIn_buf_end - pIn_buf_cur) < 2) { \ |
| 1098 | TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ |
| 1099 | } else { \ |
| 1100 | bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ |
| 1101 | } \ |
| 1102 | } \ |
| 1103 | if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ |
| 1104 | code_len = temp >> 9, temp &= 511; \ |
| 1105 | else { \ |
| 1106 | code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ |
| 1107 | } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END |
| 1108 | |
| 1109 | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) |
| 1110 | { |
| 1111 | static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1112 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1113 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1114 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1115 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1116 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1117 | |
| 1118 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1119 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1120 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1121 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1122 | |
| 1123 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1124 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1125 | |
| 1126 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1127 | TINFL_CR_BEGIN |
| 1128 | |
| 1129 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1130 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1131 | { |
| 1132 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1133 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1134 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1135 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1136 | } |
| 1137 | |
| 1138 | do |
| 1139 | { |
| 1140 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1141 | if (r->m_type == 0) |
| 1142 | { |
| 1143 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1144 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1145 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1146 | while ((counter) && (num_bits)) |
| 1147 | { |
| 1148 | TINFL_GET_BITS(51, dist, 8); |
| 1149 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1150 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1151 | counter--; |
| 1152 | } |
| 1153 | while (counter) |
| 1154 | { |
| 1155 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1156 | while (pIn_buf_cur >= pIn_buf_end) |
| 1157 | { |
| 1158 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1159 | { |
| 1160 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1161 | } |
| 1162 | else |
| 1163 | { |
| 1164 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1165 | } |
| 1166 | } |
| 1167 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1168 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1169 | } |
| 1170 | } |
| 1171 | else if (r->m_type == 3) |
| 1172 | { |
| 1173 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1174 | } |
| 1175 | else |
| 1176 | { |
| 1177 | if (r->m_type == 1) |
| 1178 | { |
| 1179 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1180 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1181 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1182 | } |
| 1183 | else |
| 1184 | { |
| 1185 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1186 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1187 | r->m_table_sizes[2] = 19; |
| 1188 | } |
| 1189 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1190 | { |
| 1191 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1192 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1193 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1194 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1195 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1196 | if ((65536 != total) && (used_syms > 1)) |
| 1197 | { |
| 1198 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1199 | } |
| 1200 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1201 | { |
| 1202 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1203 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1204 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1205 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1206 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1207 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1208 | { |
| 1209 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1210 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1211 | } |
| 1212 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1213 | } |
| 1214 | if (r->m_type == 2) |
| 1215 | { |
| 1216 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1217 | { |
| 1218 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 1219 | if ((dist == 16) && (!counter)) |
| 1220 | { |
| 1221 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 1222 | } |
| 1223 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 1224 | TINFL_MEMSET(r->m_len_codes + counter, (disr" }, { MZ_PARAM_ERROR, "parameter error" } |
| 1225 | }; |
| 1226 | mz_uint i; forSKIP_BITS(32, num_bits & 7);result) do { for (pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1227 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1228 | } |
| 1229 | else |
| 1230 | z_uint code_len; |
| 1231 | #if TINFL_USE_64BINFL_GET_BITS(18, s, n_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 1232 | } |
| 1233 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 1234 | { |
| 1235 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 1236 | } |
| 1237 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 1238 | } |
| 1239 | } |
| 1240 | for ( ; ; ) |
| 1241 | { |
| 1242 | mz_uint8 *pSrc; |
| 1243 | for ( ; ; ) |
| 1244 | { |
| 1245 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 1246 | { |
| 1247 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 1248 | if (counter >= 256) |
| 1249 | break; |
| 1250 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1251 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 1252 | } |
| 1253 | else |
| 1254 | { |
| 1255 | int sym2; mz_uint code_len; |
| 1256 | #if TINFL_USE_64BIT_BITBUF |
| 1257 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 1258 | #else |
| 1259 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1260 | #endif |
| 1261 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1262 | code_len = sym2 >> 9; |
| 1263 | else |
| 1264 | { |
| 1265 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1266 | } |
| 1267 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 1268 | if (counter & 256) |
| 1269 | break; |
| 1270 | |
| 1271 | #if !TINFL_USE_64BIT_BITBUF |
| 1272 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 1273 | #endif |
| 1274 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 1275 | code_len = sym2 >> 9; |
| 1276 | else |
| 1277 | { |
| 1278 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 1279 | } |
| 1280 | bit_buf >>= code_len; num_bits -= code_len; |
| 1281 | |
| 1282 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 1283 | if (sym2 & 256) |
| 1284 | { |
| 1285 | pOut_buf_cur++; |
| 1286 | counter = sym2; |
| 1287 | break; |
| 1288 | } |
| 1289 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 1290 | pOut_buf_cur += 2; |
| 1291 | } |
| 1292 | } |
| 1293 | if ((counter &= 511) == 256) break; |
| 1294 | |
| 1295 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 1296 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 1297 | |
| 1298 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 1299 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 1300 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 1301 | |
| 1302 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 1303 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 1304 | { |
| 1305 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 1306 | } |
| 1307 | |
| 1308 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 1309 | |
| 1310 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 1311 | { |
| 1312 | while (counter--) |
| 1313 | { |
| 1314 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1315 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 1316 | } |
| 1317 | continue; |
| 1318 | } |
| 1319 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 1320 | else if ((counter >= 9) && (counter <= dist)) |
| 1321 | { |
| 1322 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 1323 | do |
| 1324 | { |
| 1325 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 1326 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 1327 | pOut_buf_cur += 8; |
| 1328 | } while ((pSrc += 8) < pSrc_end); |
| 1329 | if ((counter &= 7) < 3) |
| 1330 | { |
| 1331 | if (counter) |
| 1332 | { |
| 1333 | pOut_buf_cur[0] = pSrc[0]; |
| 1334 | if (counter > 1) |
| 1335 | pOut_buf_cur[1] = pSrc[1]; |
| 1336 | pOut_buf_cur += counter; |
| 1337 | } |
| 1338 | continue; |
| 1339 | } |
| 1340 | } |
| 1341 | #endif |
| 1342 | do |
| 1343 | { |
| 1344 | pOut_buf_cur[0] = pSrc[0]; |
| 1345 | pOut_buf_cur[1] = pSrc[1]; |
| 1346 | pOut_buf_cur[2] = pSrc[2]; |
| 1347 | pOut_buf_cur += 3; pSrc += 3; |
| 1348 | } while ((int)(counter -= 3) > 2); |
| 1349 | if ((int)counter > 0) |
| 1350 | { |
| 1351 | pOut_buf_cur[0] = pSrc[0]; |
| 1352 | if ((int)counter > 1) |
| 1353 | pOut_buf_cur[1] = pSrc[1]; |
| 1354 | pOut_buf_cur += counter; |
| 1355 | } |
| 1356 | } |
| 1357 | } |
| 1358 | } while (!(r->m_final & 1)); |
| 1359 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1360 | { |
| 1361 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 1362 | } |
| 1363 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 1364 | TINFL_CR_FINISH |
| 1365 | |
| 1366 | common_exit: |
| 1367 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 1368 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 1369 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 1370 | { |
| 1371 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 1372 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 1373 | while (buf_len) |
| 1374 | { |
| 1375 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 1376 | { |
| 1377 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 1378 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 1379 | } |
| 1380 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 1381 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 1382 | } |
| 1383 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 1384 | } |
| 1385 | return status; |
| 1386 | } |
| 1387 | |
| 1388 | // Higher level helper functions. |
| 1389 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 1390 | { |
| 1391 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 1392 | *pOut_len = 0; |
| 1393 | tinfl_init(&decomp); |
| 1394 | for ( ; ; ) |
| 1395 | { |
| 1396 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 1397 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 1398 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1399 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 1400 | { |
| 1401 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1402 | } |
| 1403 | src_buf_ofs += src_buf_size; |
| 1404 | *pOut_len += dst_buf_size; |
| 1405 | if (status == TINFL_STATUS_DONE) break; |
| 1406 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 1407 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 1408 | if (!pNew_buf) |
| 1409 | { |
| 1410 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 1411 | } |
| 1412 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 1413 | } |
| 1414 | return pBuf; |
| 1415 | } |
| 1416 | |
| 1417 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 1418 | { |
| 1419 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 1420 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 1421 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 1422 | } |
| 1423 | |
| 1424 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 1425 | { |
| 1426 | int result = 0; |
| 1427 | tinfl_decompressor decomp; |
| 1428 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 1429 | if (!pDict) |
| 1430 | return TINFL_STATUS_FAILED; |
| 1431 | tinfl_init(&decomp); |
| 1432 | for ( ; ; ) |
| 1433 | { |
| 1434 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 1435 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 1436 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 1437 | in_buf_ofs += in_buf_size; |
| 1438 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 1439 | break; |
| 1440 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 1441 | { |
| 1442 | result = (status == TINFL_STATUS_DONE); |
| 1443 | break; |
| 1444 | } |
| 1445 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 1446 | } |
| 1447 | MZ_FREE(pDict); |
| 1448 | *pIn_buf_size = in_buf_ofs; |
| 1449 | return result; |
| 1450 | } |
| 1451 | |
| 1452 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 1453 | |
| 1454 | // Purposely making these tables static for faster init and thread safety. |
| 1455 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 1456 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 1457 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 1458 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 1459 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 1460 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 1461 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 1462 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 1463 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 1464 | |
| 1465 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 1466 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 1467 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 1468 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 1469 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 1470 | |
| 1471 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 1472 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 1473 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 1474 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1475 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 1476 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 1477 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1478 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1479 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, |
| 1480 | 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1481 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1482 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, |
| 1483 | 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }; |
| 1484 | |
| 1485 | static const mz_uint8 s_tdefl_small_dist_extra[512] = { |
| 1486 | 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, |
| 1487 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1488 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
| 1489 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1490 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1491 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1492 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, |
| 1493 | 7,7,7,7,7,7,7,7 }; |
| 1494 | |
| 1495 | static const mz_uint8 s_tdefl_large_dist_sym[128] = { |
| 1496 | 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, |
| 1497 | 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, |
| 1498 | 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 }; |
| 1499 | |
| 1500 | static const mz_uint8 s_tdefl_large_dist_extra[128] = { |
| 1501 | 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, |
| 1502 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, |
| 1503 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 }; |
| 1504 | |
| 1505 | // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values. |
| 1506 | typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; |
| 1507 | static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1) |
| 1508 | { |
| 1509 | mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); |
| 1510 | for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } |
| 1511 | while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; |
| 1512 | for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) |
| 1513 | { |
| 1514 | const mz_uint32* pHist = &hist[pass << 8]; |
| 1515 | mz_uint offsets[256], cur_ofs = 0; |
| 1516 | for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } |
| 1517 | for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; |
| 1518 | { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } |
| 1519 | } |
| 1520 | return pCur_syms; |
| 1521 | } |
| 1522 | |
| 1523 | // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, [email protected], Jyrki Katajainen, [email protected], November 1996. |
| 1524 | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) |
| 1525 | { |
| 1526 | int root, leaf, next, avbl, used, dpth; |
| 1527 | if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } |
| 1528 | A[0].m_key += A[1].m_key; root = 0; leaf = 2; |
| 1529 | for (next=1; next < n-1; next++) |
| 1530 | { |
| 1531 | if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; |
| 1532 | if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); |
| 1533 | } |
| 1534 | A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1; |
| 1535 | avbl = 1; used = dpth = 0; root = n-2; next = n-1; |
| 1536 | while (avbl>0) |
| 1537 | { |
| 1538 | while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; } |
| 1539 | while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } |
| 1540 | avbl = 2*used; dpth++; used = 0; |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | // Limits canonical Huffman code table's max code size. |
| 1545 | enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; |
| 1546 | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) |
| 1547 | { |
| 1548 | int i; mz_uint32 total = 0; if (code_list_len <= 1) return; |
| 1549 | for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; |
| 1550 | for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); |
| 1551 | while (total != (1UL << max_code_size)) |
| 1552 | { |
| 1553 | pNum_codes[max_code_size]--; |
| 1554 | for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } |
| 1555 | total--; |
| 1556 | } |
| 1557 | } |
| 1558 | |
| 1559 | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) |
| 1560 | { |
| 1561 | int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); |
| 1562 | if (static_table) |
| 1563 | { |
| 1564 | for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; |
| 1565 | } |
| 1566 | else |
| 1567 | { |
| 1568 | tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; |
| 1569 | int num_used_syms = 0; |
| 1570 | const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; |
| 1571 | for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } |
| 1572 | |
| 1573 | pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); |
| 1574 | |
| 1575 | for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; |
| 1576 | |
| 1577 | tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); |
| 1578 | |
| 1579 | MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); |
| 1580 | for (i = 1, j = num_used_syms; i <= code_size_limit; i++) |
| 1581 | for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); |
| 1582 | } |
| 1583 | |
| 1584 | next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); |
| 1585 | |
| 1586 | for (i = 0; i < table_len; i++) |
| 1587 | { |
| 1588 | mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; |
| 1589 | code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); |
| 1590 | d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | #define TDEFL_PUT_BITS(b, l) do { \ |
| 1595 | mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \ |
| 1596 | d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \ |
| 1597 | while (d->m_bits_in >= 8) { \ |
| 1598 | if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ |
| 1599 | *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ |
| 1600 | d->m_bit_buffer >>= 8; \ |
| 1601 | d->m_bits_in -= 8; \ |
| 1602 | } \ |
| 1603 | } MZ_MACRO_END |
| 1604 | |
| 1605 | #define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \ |
| 1606 | if (rle_repeat_count < 3) { \ |
| 1607 | d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ |
| 1608 | while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ |
| 1609 | } else { \ |
| 1610 | d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \ |
| 1611 | } rle_repeat_count = 0; } } |
| 1612 | |
| 1613 | #define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \ |
| 1614 | if (rle_z_count < 3) { \ |
| 1615 | d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ |
| 1616 | } else if (rle_z_count <= 10) { \ |
| 1617 | d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \ |
| 1618 | } else { \ |
| 1619 | d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \ |
| 1620 | } rle_z_count = 0; } } |
| 1621 | |
| 1622 | static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
| 1623 | |
| 1624 | static void tdefl_start_dynamic_block(tdefl_compressor *d) |
| 1625 | { |
| 1626 | int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; |
| 1627 | mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; |
| 1628 | |
| 1629 | d->m_huff_count[0][256] = 1; |
| 1630 | |
| 1631 | tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); |
| 1632 | tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); |
| 1633 | |
| 1634 | for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; |
| 1635 | for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; |
| 1636 | |
| 1637 | memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); |
| 1638 | memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); |
| 1639 | total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; |
| 1640 | |
| 1641 | memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1642 | for (i = 0; i < total_code_sizes_to_pack; i++) |
| 1643 | { |
| 1644 | mz_uint8 code_size = code_sizes_to_pack[i]; |
| 1645 | if (!code_size) |
| 1646 | { |
| 1647 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1648 | if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1649 | } |
| 1650 | else |
| 1651 | { |
| 1652 | TDEFL_RLE_ZERO_CODE_SIZE(); |
| 1653 | if (code_size != prev_code_size) |
| 1654 | { |
| 1655 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1656 | d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; |
| 1657 | } |
| 1658 | else if (++rle_repeat_count == 6) |
| 1659 | { |
| 1660 | TDEFL_RLE_PREV_CODE_SIZE(); |
| 1661 | } |
| 1662 | } |
| 1663 | prev_code_size = code_size; |
| 1664 | } |
| 1665 | if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } |
| 1666 | |
| 1667 | tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); |
| 1668 | |
| 1669 | TDEFL_PUT_BITS(2, 2); |
| 1670 | |
| 1671 | TDEFL_PUT_BITS(num_lit_codes - 257, 5); |
| 1672 | TDEFL_PUT_BITS(num_dist_codes - 1, 5); |
| 1673 | |
| 1674 | for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; |
| 1675 | num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); |
| 1676 | for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); |
| 1677 | |
| 1678 | for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; ) |
| 1679 | { |
| 1680 | mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); |
| 1681 | TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); |
| 1682 | if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); |
| 1683 | } |
| 1684 | } |
| 1685 | |
| 1686 | static void tdefl_start_static_block(tdefl_compressor *d) |
| 1687 | { |
| 1688 | mz_uint i; |
| 1689 | mz_uint8 *p = &d->m_huff_code_sizes[0][0]; |
| 1690 | |
| 1691 | for (i = 0; i <= 143; ++i) *p++ = 8; |
| 1692 | for ( ; i <= 255; ++i) *p++ = 9; |
| 1693 | for ( ; i <= 279; ++i) *p++ = 7; |
| 1694 | for ( ; i <= 287; ++i) *p++ = 8; |
| 1695 | |
| 1696 | memset(d->m_huff_code_sizes[1], 5, 32); |
| 1697 | |
| 1698 | tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); |
| 1699 | tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); |
| 1700 | |
| 1701 | TDEFL_PUT_BITS(1, 2); |
| 1702 | } |
| 1703 | |
| 1704 | static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; |
| 1705 | |
| 1706 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1707 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1708 | { |
| 1709 | mz_uint flags; |
| 1710 | mz_uint8 *pLZ_codes; |
| 1711 | mz_uint8 *pOutput_buf = d->m_pOutput_buf; |
| 1712 | mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; |
| 1713 | mz_uint64 bit_buffer = d->m_bit_buffer; |
| 1714 | mz_uint bits_in = d->m_bits_in; |
| 1715 | |
| 1716 | #define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); } |
| 1717 | |
| 1718 | flags = 1; |
| 1719 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) |
| 1720 | { |
| 1721 | if (flags == 1) |
| 1722 | flags = *pLZ_codes++ | 0x100; |
| 1723 | |
| 1724 | if (flags & 1) |
| 1725 | { |
| 1726 | mz_uint s0, s1, n0, n1, sym, num_extra_bits; |
| 1727 | mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; |
| 1728 | |
| 1729 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1730 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1731 | TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1732 | |
| 1733 | // This sequence coaxes MSVC into using cmov's vs. jmp's. |
| 1734 | s0 = s_tdefl_small_dist_sym[match_dist & 511]; |
| 1735 | n0 = s_tdefl_small_dist_extra[match_dist & 511]; |
| 1736 | s1 = s_tdefl_large_dist_sym[match_dist >> 8]; |
| 1737 | n1 = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1738 | sym = (match_dist < 512) ? s0 : s1; |
| 1739 | num_extra_bits = (match_dist < 512) ? n0 : n1; |
| 1740 | |
| 1741 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1742 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1743 | TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1744 | } |
| 1745 | else |
| 1746 | { |
| 1747 | mz_uint lit = *pLZ_codes++; |
| 1748 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1749 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1750 | |
| 1751 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1752 | { |
| 1753 | flags >>= 1; |
| 1754 | lit = *pLZ_codes++; |
| 1755 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1756 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1757 | |
| 1758 | if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) |
| 1759 | { |
| 1760 | flags >>= 1; |
| 1761 | lit = *pLZ_codes++; |
| 1762 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1763 | TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1764 | } |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | if (pOutput_buf >= d->m_pOutput_buf_end) |
| 1769 | return MZ_FALSE; |
| 1770 | |
| 1771 | *(mz_uint64*)pOutput_buf = bit_buffer; |
| 1772 | pOutput_buf += (bits_in >> 3); |
| 1773 | bit_buffer >>= (bits_in & ~7); |
| 1774 | bits_in &= 7; |
| 1775 | } |
| 1776 | |
| 1777 | #undef TDEFL_PUT_BITS_FAST |
| 1778 | |
| 1779 | d->m_pOutput_buf = pOutput_buf; |
| 1780 | d->m_bits_in = 0; |
| 1781 | d->m_bit_buffer = 0; |
| 1782 | |
| 1783 | while (bits_in) |
| 1784 | { |
| 1785 | mz_uint32 n = MZ_MIN(bits_in, 16); |
| 1786 | TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); |
| 1787 | bit_buffer >>= n; |
| 1788 | bits_in -= n; |
| 1789 | } |
| 1790 | |
| 1791 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1792 | |
| 1793 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1794 | } |
| 1795 | #else |
| 1796 | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) |
| 1797 | { |
| 1798 | mz_uint flags; |
| 1799 | mz_uint8 *pLZ_codes; |
| 1800 | |
| 1801 | flags = 1; |
| 1802 | for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) |
| 1803 | { |
| 1804 | if (flags == 1) |
| 1805 | flags = *pLZ_codes++ | 0x100; |
| 1806 | if (flags & 1) |
| 1807 | { |
| 1808 | mz_uint sym, num_extra_bits; |
| 1809 | mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; |
| 1810 | |
| 1811 | MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1812 | TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); |
| 1813 | TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); |
| 1814 | |
| 1815 | if (match_dist < 512) |
| 1816 | { |
| 1817 | sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; |
| 1818 | } |
| 1819 | else |
| 1820 | { |
| 1821 | sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; |
| 1822 | } |
| 1823 | MZ_ASSERT(d->m_huff_code_sizes[1][sym]); |
| 1824 | TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); |
| 1825 | TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); |
| 1826 | } |
| 1827 | else |
| 1828 | { |
| 1829 | mz_uint lit = *pLZ_codes++; |
| 1830 | MZ_ASSERT(d->m_huff_code_sizes[0][lit]); |
| 1831 | TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); |
| 1832 | } |
| 1833 | } |
| 1834 | |
| 1835 | TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); |
| 1836 | |
| 1837 | return (d->m_pOutput_buf < d->m_pOutput_buf_end); |
| 1838 | } |
| 1839 | #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS |
| 1840 | |
| 1841 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) |
| 1842 | { |
| 1843 | if (static_block) |
| 1844 | tdefl_start_static_block(d); |
| 1845 | else |
| 1846 | tdefl_start_dynamic_block(d); |
| 1847 | return tdefl_compress_lz_codes(d); |
| 1848 | } |
| 1849 | |
| 1850 | static int tdefl_flush_block(tdefl_compressor *d, int flush) |
| 1851 | { |
| 1852 | mz_uint saved_bit_buf, saved_bits_in; |
| 1853 | mz_uint8 *pSaved_output_buf; |
| 1854 | mz_bool comp_block_succeeded = MZ_FALSE; |
| 1855 | int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; |
| 1856 | mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; |
| 1857 | |
| 1858 | d->m_pOutput_buf = pOutput_buf_start; |
| 1859 | d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; |
| 1860 | |
| 1861 | MZ_ASSERT(!d->m_output_flush_remaining); |
| 1862 | d->m_output_flush_ofs = 0; |
| 1863 | d->m_output_flush_remaining = 0; |
| 1864 | |
| 1865 | *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); |
| 1866 | d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); |
| 1867 | |
| 1868 | if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) |
| 1869 | { |
| 1870 | TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); |
| 1871 | } |
| 1872 | |
| 1873 | TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); |
| 1874 | |
| 1875 | pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; |
| 1876 | |
| 1877 | if (!use_raw_block) |
| 1878 | comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); |
| 1879 | |
| 1880 | // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead. |
| 1881 | if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && |
| 1882 | ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) ) |
| 1883 | { |
| 1884 | mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; |
| 1885 | TDEFL_PUT_BITS(0, 2); |
| 1886 | if (d->m_bits_in) { TDEFL_PUT_BITS(0, /* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing |
| 1887 | See "unlicense" statement at the end of this file. |
| 1888 | Rich Geldreich <[email protected]>, last updated Oct. 13, 2013 |
| 1889 | Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt |
| 1890 | |
| 1891 | Most API's defined in miniz.c are optionaljority of prev. users so I'm |
| 1892 | op)w deflate data (pr/* matic const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; |
| 1893 | static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; |
| 1894 | static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; |
| 1895 | static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; |
| 1896 | static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; |
| 1897 | static const int s_min_table_sizes[3] = { 257, 1, 4 }; |
| 1898 | |
| 1899 | tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; |
| 1900 | const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; |
| 1901 | mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; |
| 1902 | size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; |
| 1903 | |
| 1904 | // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). |
| 1905 | if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } |
| 1906 | |
| 1907 | num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; |
| 1908 | TINFL_CR_BEGIN |
| 1909 | |
| 1910 | bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; |
| 1911 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 1912 | { |
| 1913 | TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); |
| 1914 | counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); |
| 1915 | if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); |
| 1916 | if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } |
| 1917 | } |
| 1918 | |
| 1919 | do |
| 1920 | { |
| 1921 | TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; |
| 1922 | if (r->m_type == 0) |
| 1923 | { |
| 1924 | TINFL_SKIP_BITS(5, num_bits & 7); |
| 1925 | for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } |
| 1926 | if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } |
| 1927 | while ((counter) && (num_bits)) |
| 1928 | { |
| 1929 | TINFL_GET_BITS(51, dist, 8); |
| 1930 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1931 | *pOut_buf_cur++ = (mz_uint8)dist; |
| 1932 | counter--; |
| 1933 | } |
| 1934 | while (counter) |
| 1935 | { |
| 1936 | size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 1937 | while (pIn_buf_cur >= pIn_buf_end) |
| 1938 | { |
| 1939 | if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) |
| 1940 | { |
| 1941 | TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); |
| 1942 | } |
| 1943 | else |
| 1944 | { |
| 1945 | TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); |
| 1946 | } |
| 1947 | } |
| 1948 | n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); |
| 1949 | TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; |
| 1950 | } |
| 1951 | } |
| 1952 | else if (r->m_type == 3) |
| 1953 | { |
| 1954 | TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); |
| 1955 | } |
| 1956 | else |
| 1957 | { |
| 1958 | if (r->m_type == 1) |
| 1959 | { |
| 1960 | mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; |
| 1961 | r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); |
| 1962 | for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; |
| 1963 | } |
| 1964 | else |
| 1965 | { |
| 1966 | for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } |
| 1967 | MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } |
| 1968 | r->m_table_sizes[2] = 19; |
| 1969 | } |
| 1970 | for ( ; (int)r->m_type >= 0; r->m_type--) |
| 1971 | { |
| 1972 | int tree_next, tree_cur; tinfl_huff_table *pTable; |
| 1973 | mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); |
| 1974 | for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; |
| 1975 | used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; |
| 1976 | for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } |
| 1977 | if ((65536 != total) && (used_syms > 1)) |
| 1978 | { |
| 1979 | TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); |
| 1980 | } |
| 1981 | for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) |
| 1982 | { |
| 1983 | mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; |
| 1984 | cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); |
| 1985 | if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } |
| 1986 | if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } |
| 1987 | rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); |
| 1988 | for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) |
| 1989 | { |
| 1990 | tree_cur -= ((rev_code >>= 1) & 1); |
| 1991 | if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; |
| 1992 | } |
| 1993 | tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; |
| 1994 | } |
| 1995 | if (r->m_type == 2) |
| 1996 | { |
| 1997 | for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) |
| 1998 | { |
| 1999 | mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } |
| 2000 | if ((dist == 16) && (!counter)) |
| 2001 | { |
| 2002 | TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); |
| 2003 | } |
| 2004 | num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; |
| 2005 | TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; |
| 2006 | } |
| 2007 | if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) |
| 2008 | { |
| 2009 | TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); |
| 2010 | } |
| 2011 | TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); |
| 2012 | } |
| 2013 | } |
| 2014 | for ( ; ; ) |
| 2015 | { |
| 2016 | mz_uint8 *pSrc; |
| 2017 | for ( ; ; ) |
| 2018 | { |
| 2019 | if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) |
| 2020 | { |
| 2021 | TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); |
| 2022 | if (counter >= 256) |
| 2023 | break; |
| 2024 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2025 | *pOut_buf_cur++ = (mz_uint8)counter; |
| 2026 | } |
| 2027 | else |
| 2028 | { |
| 2029 | int sym2; mz_uint code_len; |
| 2030 | #if TINFL_USE_64BIT_BITBUF |
| 2031 | if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } |
| 2032 | #else |
| 2033 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2034 | #endif |
| 2035 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2036 | code_len = sym2 >> 9; |
| 2037 | else |
| 2038 | { |
| 2039 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2040 | } |
| 2041 | counter = sym2; bit_buf >>= code_len; num_bits -= code_len; |
| 2042 | if (counter & 256) |
| 2043 | break; |
| 2044 | |
| 2045 | #if !TINFL_USE_64BIT_BITBUF |
| 2046 | if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } |
| 2047 | #endif |
| 2048 | if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) |
| 2049 | code_len = sym2 >> 9; |
| 2050 | else |
| 2051 | { |
| 2052 | code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); |
| 2053 | } |
| 2054 | bit_buf >>= code_len; num_bits -= code_len; |
| 2055 | |
| 2056 | pOut_buf_cur[0] = (mz_uint8)counter; |
| 2057 | if (sym2 & 256) |
| 2058 | { |
| 2059 | pOut_buf_cur++; |
| 2060 | counter = sym2; |
| 2061 | break; |
| 2062 | } |
| 2063 | pOut_buf_cur[1] = (mz_uint8)sym2; |
| 2064 | pOut_buf_cur += 2; |
| 2065 | } |
| 2066 | } |
| 2067 | if ((counter &= 511) == 256) break; |
| 2068 | |
| 2069 | num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; |
| 2070 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } |
| 2071 | |
| 2072 | TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); |
| 2073 | num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; |
| 2074 | if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } |
| 2075 | |
| 2076 | dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; |
| 2077 | if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) |
| 2078 | { |
| 2079 | TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); |
| 2080 | } |
| 2081 | |
| 2082 | pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); |
| 2083 | |
| 2084 | if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) |
| 2085 | { |
| 2086 | while (counter--) |
| 2087 | { |
| 2088 | while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } |
| 2089 | *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; |
| 2090 | } |
| 2091 | continue; |
| 2092 | } |
| 2093 | #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES |
| 2094 | else if ((counter >= 9) && (counter <= dist)) |
| 2095 | { |
| 2096 | const mz_uint8 *pSrc_end = pSrc + (counter & ~7); |
| 2097 | do |
| 2098 | { |
| 2099 | ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; |
| 2100 | ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; |
| 2101 | pOut_buf_cur += 8; |
| 2102 | } while ((pSrc += 8) < pSrc_end); |
| 2103 | if ((counter &= 7) < 3) |
| 2104 | { |
| 2105 | if (counter) |
| 2106 | { |
| 2107 | pOut_buf_cur[0] = pSrc[0]; |
| 2108 | if (counter > 1) |
| 2109 | pOut_buf_cur[1] = pSrc[1]; |
| 2110 | pOut_buf_cur += counter; |
| 2111 | } |
| 2112 | continue; |
| 2113 | } |
| 2114 | } |
| 2115 | #endif |
| 2116 | do |
| 2117 | { |
| 2118 | pOut_buf_cur[0] = pSrc[0]; |
| 2119 | pOut_buf_cur[1] = pSrc[1]; |
| 2120 | pOut_buf_cur[2] = pSrc[2]; |
| 2121 | pOut_buf_cur += 3; pSrc += 3; |
| 2122 | } while ((int)(counter -= 3) > 2); |
| 2123 | if ((int)counter > 0) |
| 2124 | { |
| 2125 | pOut_buf_cur[0] = pSrc[0]; |
| 2126 | if ((int)counter > 1) |
| 2127 | pOut_buf_cur[1] = pSrc[1]; |
| 2128 | pOut_buf_cur += counter; |
| 2129 | } |
| 2130 | } |
| 2131 | } |
| 2132 | } while (!(r->m_final & 1)); |
| 2133 | if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) |
| 2134 | { |
| 2135 | TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } |
| 2136 | } |
| 2137 | TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); |
| 2138 | TINFL_CR_FINISH |
| 2139 | |
| 2140 | common_exit: |
| 2141 | r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; |
| 2142 | *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; |
| 2143 | if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) |
| 2144 | { |
| 2145 | const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; |
| 2146 | mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; |
| 2147 | while (buf_len) |
| 2148 | { |
| 2149 | for (i = 0; i + 7 < block_len; i += 8, ptr += 8) |
| 2150 | { |
| 2151 | s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; |
| 2152 | s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; |
| 2153 | } |
| 2154 | for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; |
| 2155 | s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; |
| 2156 | } |
| 2157 | r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; |
| 2158 | } |
| 2159 | return status; |
| 2160 | } |
| 2161 | |
| 2162 | // Higher level helper functions. |
| 2163 | void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) |
| 2164 | { |
| 2165 | tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; |
| 2166 | *pOut_len = 0; |
| 2167 | tinfl_init(&decomp); |
| 2168 | for ( ; ; ) |
| 2169 | { |
| 2170 | size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; |
| 2171 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size, |
| 2172 | (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2173 | if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) |
| 2174 | { |
| 2175 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2176 | } |
| 2177 | src_buf_ofs += src_buf_size; |
| 2178 | *pOut_len += dst_buf_size; |
| 2179 | if (status == TINFL_STATUS_DONE) break; |
| 2180 | new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; |
| 2181 | pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); |
| 2182 | if (!pNew_buf) |
| 2183 | { |
| 2184 | MZ_FREE(pBuf); *pOut_len = 0; return NULL; |
| 2185 | } |
| 2186 | pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; |
| 2187 | } |
| 2188 | return pBuf; |
| 2189 | } |
| 2190 | |
| 2191 | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) |
| 2192 | { |
| 2193 | tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); |
| 2194 | status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); |
| 2195 | return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; |
| 2196 | } |
| 2197 | |
| 2198 | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) |
| 2199 | { |
| 2200 | int result = 0; |
| 2201 | tinfl_decompressor decomp; |
| 2202 | mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; |
| 2203 | if (!pDict) |
| 2204 | return TINFL_STATUS_FAILED; |
| 2205 | tinfl_init(&decomp); |
| 2206 | for ( ; ; ) |
| 2207 | { |
| 2208 | size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; |
| 2209 | tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, |
| 2210 | (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); |
| 2211 | in_buf_ofs += in_buf_size; |
| 2212 | if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) |
| 2213 | break; |
| 2214 | if (status != TINFL_STATUS_HAS_MORE_OUTPUT) |
| 2215 | { |
| 2216 | result = (status == TINFL_STATUS_DONE); |
| 2217 | break; |
| 2218 | } |
| 2219 | dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); |
| 2220 | } |
| 2221 | MZ_FREE(pDict); |
| 2222 | *pIn_buf_size = in_buf_ofs; |
| 2223 | return result; |
| 2224 | } |
| 2225 | |
| 2226 | // ------------------- Low-level Compression (independent from all decompression API's) |
| 2227 | |
| 2228 | // Purposely making these tables static for faster init and thread safety. |
| 2229 | static const mz_uint16 s_tdefl_len_sym[256] = { |
| 2230 | 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272, |
| 2231 | 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276, |
| 2232 | 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, |
| 2233 | 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, |
| 2234 | 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281, |
| 2235 | 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282, |
| 2236 | 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, |
| 2237 | 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 }; |
| 2238 | |
| 2239 | static const mz_uint8 s_tdefl_len_extra[256] = { |
| 2240 | 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| 2241 | 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, |
| 2242 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
| 2243 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 }; |
| 2244 | |
| 2245 | static const mz_uint8 s_tdefl_small_dist_sym[512] = { |
| 2246 | 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, |
| 2247 | 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, |
| 2248 | 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2249 | 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, |
| 2250 | 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, |
| 2251 | 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16 |
+5
-2
| --- a/src/sqlcmd.c | ||
| +++ b/src/sqlcmd.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | ** |
| 24 | 24 | ** Usage example for files_of_checkin: |
| 25 | 25 | ** |
| 26 | -** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" | |
| 26 | +** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; | |
| 27 | +** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) | |
| 28 | +# define MINIZ_HEADER_FILE_ONLY | |
| 29 | +# include "miniz.c" | |
| 27 | 30 | #elsecontentif(e for decoding manifests. |
| 28 | 31 | ** |
| 29 | 32 | ** Usa |
| @@ -51,4 +54,4 @@ | ||
| 51 | 54 | }!!int noRepository;noRepository = ; |
| 52 | 55 | if( !noRepoE_MINIZ) |
| 53 | 56 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | -# inclu#if USE_SYSTEM_SQLITE+0==1 | |
| 57 | +# incluLI |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" |
| 27 | #elsecontentif(e for decoding manifests. |
| 28 | ** |
| 29 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 51 | }!!int noRepository;noRepository = ; |
| 52 | if( !noRepoE_MINIZ) |
| 53 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | # inclu#if USE_SYSTEM_SQLITE+0==1 |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; |
| 27 | ** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) |
| 28 | # define MINIZ_HEADER_FILE_ONLY |
| 29 | # include "miniz.c" |
| 30 | #elsecontentif(e for decoding manifests. |
| 31 | ** |
| 32 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 54 | }!!int noRepository;noRepository = ; |
| 55 | if( !noRepoE_MINIZ) |
| 56 | # define MINIZ_HEADER_FILE_ONLY |
| 57 | # incluLI |
+5
-2
| --- a/src/sqlcmd.c | ||
| +++ b/src/sqlcmd.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | ** |
| 24 | 24 | ** Usage example for files_of_checkin: |
| 25 | 25 | ** |
| 26 | -** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" | |
| 26 | +** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; | |
| 27 | +** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) | |
| 28 | +# define MINIZ_HEADER_FILE_ONLY | |
| 29 | +# include "miniz.c" | |
| 27 | 30 | #elsecontentif(e for decoding manifests. |
| 28 | 31 | ** |
| 29 | 32 | ** Usa |
| @@ -51,4 +54,4 @@ | ||
| 51 | 54 | }!!int noRepository;noRepository = ; |
| 52 | 55 | if( !noRepoE_MINIZ) |
| 53 | 56 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | -# inclu#if USE_SYSTEM_SQLITE+0==1 | |
| 57 | +# incluLI |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" |
| 27 | #elsecontentif(e for decoding manifests. |
| 28 | ** |
| 29 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 51 | }!!int noRepository;noRepository = ; |
| 52 | if( !noRepoE_MINIZ) |
| 53 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | # inclu#if USE_SYSTEM_SQLITE+0==1 |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; |
| 27 | ** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) |
| 28 | # define MINIZ_HEADER_FILE_ONLY |
| 29 | # include "miniz.c" |
| 30 | #elsecontentif(e for decoding manifests. |
| 31 | ** |
| 32 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 54 | }!!int noRepository;noRepository = ; |
| 55 | if( !noRepoE_MINIZ) |
| 56 | # define MINIZ_HEADER_FILE_ONLY |
| 57 | # incluLI |
+5
-2
| --- a/src/sqlcmd.c | ||
| +++ b/src/sqlcmd.c | ||
| @@ -23,7 +23,10 @@ | ||
| 23 | 23 | ** |
| 24 | 24 | ** Usage example for files_of_checkin: |
| 25 | 25 | ** |
| 26 | -** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" | |
| 26 | +** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; | |
| 27 | +** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) | |
| 28 | +# define MINIZ_HEADER_FILE_ONLY | |
| 29 | +# include "miniz.c" | |
| 27 | 30 | #elsecontentif(e for decoding manifests. |
| 28 | 31 | ** |
| 29 | 32 | ** Usa |
| @@ -51,4 +54,4 @@ | ||
| 51 | 54 | }!!int noRepository;noRepository = ; |
| 52 | 55 | if( !noRepoE_MINIZ) |
| 53 | 56 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | -# inclu#if USE_SYSTEM_SQLITE+0==1 | |
| 57 | +# incluLI |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE tempnclude <zlib.h>contentnID=symbolic_name_to include "miniz.c" |
| 27 | #elsecontentif(e for decoding manifests. |
| 28 | ** |
| 29 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 51 | }!!int noRepository;noRepository = ; |
| 52 | if( !noRepoE_MINIZ) |
| 53 | # define MINIZ_HEADER_FILE_ONLY |
| 54 | # inclu#if USE_SYSTEM_SQLITE+0==1 |
| --- a/src/sqlcmd.c | |
| +++ b/src/sqlcmd.c | |
| @@ -23,7 +23,10 @@ | |
| 23 | ** |
| 24 | ** Usage example for files_of_checkin: |
| 25 | ** |
| 26 | ** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin; |
| 27 | ** SELECT * FROM foci WHERE checkinID=symbolic_name_to_ridnclude <zlib.h>xaf defined(FOSSIL_ENABLE_MINIZ) |
| 28 | # define MINIZ_HEADER_FILE_ONLY |
| 29 | # include "miniz.c" |
| 30 | #elsecontentif(e for decoding manifests. |
| 31 | ** |
| 32 | ** Usa |
| @@ -51,4 +54,4 @@ | |
| 54 | }!!int noRepository;noRepository = ; |
| 55 | if( !noRepoE_MINIZ) |
| 56 | # define MINIZ_HEADER_FILE_ONLY |
| 57 | # incluLI |
+6
-1
| --- a/src/tar.c | ||
| +++ b/src/tar.c | ||
| @@ -14,7 +14,12 @@ | ||
| 14 | 14 | * extension,tarball./%q", zNam") |
| 15 | 15 | && db_get_boo", -1); |
| 16 | 16 | ;a check-in and return that |
| 17 | -* extmfilenclude <zlib.h>ion,tarball./%q", zNam") | |
| 17 | +* extmfilef defined(FOSSIL_ENABLE_MINIZ) | |
| 18 | +# define MINIZ_HEADER_FILE_ONLY | |
| 19 | +# include "miniz.c" | |
| 20 | +#else -1); | |
| 21 | +;a check-in and returblob_reset(&hash);;a check-in and return that | |
| 22 | +* extension,tarball./%q", zNam") | |
| 18 | 23 | && db_get_boo", -1); |
| 19 | 24 | ;a check-in and return that |
| 20 | 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilenclude <zlib.h>ion,tarball./%q", zNam") |
| 18 | && db_get_boo", -1); |
| 19 | ;a check-in and return that |
| 20 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilef defined(FOSSIL_ENABLE_MINIZ) |
| 18 | # define MINIZ_HEADER_FILE_ONLY |
| 19 | # include "miniz.c" |
| 20 | #else -1); |
| 21 | ;a check-in and returblob_reset(&hash);;a check-in and return that |
| 22 | * extension,tarball./%q", zNam") |
| 23 | && db_get_boo", -1); |
| 24 | ;a check-in and return that |
| 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
+6
-1
| --- a/src/tar.c | ||
| +++ b/src/tar.c | ||
| @@ -14,7 +14,12 @@ | ||
| 14 | 14 | * extension,tarball./%q", zNam") |
| 15 | 15 | && db_get_boo", -1); |
| 16 | 16 | ;a check-in and return that |
| 17 | -* extmfilenclude <zlib.h>ion,tarball./%q", zNam") | |
| 17 | +* extmfilef defined(FOSSIL_ENABLE_MINIZ) | |
| 18 | +# define MINIZ_HEADER_FILE_ONLY | |
| 19 | +# include "miniz.c" | |
| 20 | +#else -1); | |
| 21 | +;a check-in and returblob_reset(&hash);;a check-in and return that | |
| 22 | +* extension,tarball./%q", zNam") | |
| 18 | 23 | && db_get_boo", -1); |
| 19 | 24 | ;a check-in and return that |
| 20 | 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilenclude <zlib.h>ion,tarball./%q", zNam") |
| 18 | && db_get_boo", -1); |
| 19 | ;a check-in and return that |
| 20 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilef defined(FOSSIL_ENABLE_MINIZ) |
| 18 | # define MINIZ_HEADER_FILE_ONLY |
| 19 | # include "miniz.c" |
| 20 | #else -1); |
| 21 | ;a check-in and returblob_reset(&hash);;a check-in and return that |
| 22 | * extension,tarball./%q", zNam") |
| 23 | && db_get_boo", -1); |
| 24 | ;a check-in and return that |
| 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
+6
-1
| --- a/src/tar.c | ||
| +++ b/src/tar.c | ||
| @@ -14,7 +14,12 @@ | ||
| 14 | 14 | * extension,tarball./%q", zNam") |
| 15 | 15 | && db_get_boo", -1); |
| 16 | 16 | ;a check-in and return that |
| 17 | -* extmfilenclude <zlib.h>ion,tarball./%q", zNam") | |
| 17 | +* extmfilef defined(FOSSIL_ENABLE_MINIZ) | |
| 18 | +# define MINIZ_HEADER_FILE_ONLY | |
| 19 | +# include "miniz.c" | |
| 20 | +#else -1); | |
| 21 | +;a check-in and returblob_reset(&hash);;a check-in and return that | |
| 22 | +* extension,tarball./%q", zNam") | |
| 18 | 23 | && db_get_boo", -1); |
| 19 | 24 | ;a check-in and return that |
| 20 | 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilenclude <zlib.h>ion,tarball./%q", zNam") |
| 18 | && db_get_boo", -1); |
| 19 | ;a check-in and return that |
| 20 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
| --- a/src/tar.c | |
| +++ b/src/tar.c | |
| @@ -14,7 +14,12 @@ | |
| 14 | * extension,tarball./%q", zNam") |
| 15 | && db_get_boo", -1); |
| 16 | ;a check-in and return that |
| 17 | * extmfilef defined(FOSSIL_ENABLE_MINIZ) |
| 18 | # define MINIZ_HEADER_FILE_ONLY |
| 19 | # include "miniz.c" |
| 20 | #else -1); |
| 21 | ;a check-in and returblob_reset(&hash);;a check-in and return that |
| 22 | * extension,tarball./%q", zNam") |
| 23 | && db_get_boo", -1); |
| 24 | ;a check-in and return that |
| 25 | * extmfile;a check-in and return tha"manifest.uuid", -1); |
M
src/th.c
+1
-445
| --- a/src/th.c | ||
| +++ b/src/th.c | ||
| @@ -476,448 +476,4 @@ | ||
| 476 | 476 | hexdig i += 2; |
| 477 | 477 | i += 2; |
| 478 | 478 | base = 2; |
| 479 | - bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return | |
| 480 | -**tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ | |
| 481 | - nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); | |
| 482 | - | |
| 483 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 484 | -static void thPopFrame(Th_Interp*); | |
| 485 | - | |
| 486 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 487 | -sgto 11. Or, | |
| 488 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 489 | -*/ | |
| 490 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 491 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 492 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 493 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 494 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 495 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 496 | - switch (c) { | |
| 497 | - case '0': return 0; | |
| 498 | - case '1': return 1; | |
| 499 | - case '2': return 2; | |
| 500 | - case '3': return 3; | |
| 501 | - case '4': return 4; | |
| 502 | - case '5': return 5; | |
| 503 | - case '6': reH core. This file ce TH dOfLine(const char *, int); | |
| 504 | - | |
| 505 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 506 | -static void thPopFrame(Th_Interp*); | |
| 507 | - | |
| 508 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 509 | -sgto 11. Or, | |
| 510 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 511 | -*/ | |
| 512 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 513 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 514 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 515 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 516 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 517 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 518 | - switch (c) { | |
| 519 | - case '0': return 0; | |
| 520 | - case '1': return 1; | |
| 521 | - case '2': return 2; | |
| 522 | - case '3': return 3; | |
| 523 | - case '4': return 4; | |
| 524 | - case '5': return 5; | |
| 525 | - case '6': return 6; | |
| 526 | - case '7': return 7; | |
| 527 | - case '8': return 8; | |
| 528 | - case '9': return 9; | |
| 529 | - case 'a': case 'A': return 10; | |
| 530 | - case 'b': case 'B': return 11; | |
| 531 | - case 'c': case 'C': return 12; | |
| 532 | - case 'd': case 'D': return 13; | |
| 533 | - case 'e': case 'E': return 14; | |
| 534 | - case 'f': case 'F': return 15; | |
| 535 | - } | |
| 536 | - return -1; | |
| 537 | -} | |
| 538 | - | |
| 539 | -/* | |
| 540 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 541 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 542 | -** structure that the entry points to. Free the Th_Variable if its | |
| 543 | -** reference count reaches 0. | |
| 544 | -** | |
| 545 | -** Argument pContext is a pointer to the interpreter structure. | |
| 546 | -** | |
| 547 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 548 | -/* | |
| 549 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 550 | - | |
| 551 | - if( nAdd<0 ){ | |
| 552 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 553 | - | |
| 554 | - 1_PLATFORM | |
| 555 | -**tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 556 | - | |
| 557 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 558 | -static void thPopFrame(Th_Interp*); | |
| 559 | - | |
| 560 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 561 | -sg set to 11. Or, | |
| 562 | -** | |
| 563 | -** int nByte; | |
| 564 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 565 | -** | |
| 566 | -** results in variable nByte being set to 11. Or, | |
| 567 | -** | |
| 568 | -** thNextVarname(interp,te being set to 2. | |
| 569 | -*/ | |
| 570 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 571 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 572 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 573 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 574 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 575 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 576 | - switch (c) { | |
| 577 | - case '0': return 0; | |
| 578 | - case '1': return 1; | |
| 579 | - case '2': return 2; | |
| 580 | - case '3': return 3; | |
| 581 | - case '4': return 4; | |
| 582 | - case '5': return 5; | |
| 583 | - case '6': return 6; | |
| 584 | - case '7': return 7; | |
| 585 | - case '8': return 8; | |
| 586 | - case '9': return 9; | |
| 587 | - case 'a': case 'A': return 10; | |
| 588 | - case 'b': case 'B': return 11; | |
| 589 | - case 'c': case 'C': return 12; | |
| 590 | - case 'd': case 'D': return 13; | |
| 591 | - case 'e': case 'E': return 14; | |
| 592 | - case 'f': case 'F': return 15; | |
| 593 | - } | |
| 594 | - return -1; | |
| 595 | -} | |
| 596 | - | |
| 597 | -/* | |
| 598 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 599 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 600 | -** structure that the entry points to. Free the Th_Variable if its | |
| 601 | -** reference count reaches 0. | |
| 602 | -** | |
| 603 | -** Argument pContext is a pointer to the interpreter structure. | |
| 604 | -** | |
| 605 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 606 | -/* | |
| 607 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 608 | - | |
| 609 | - if( nAdd<0 ){ | |
| 610 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 611 | - | |
| 612 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 613 | -** of the input consumed by the construct. For example: | |
| 614 | -** | |
| 615 | -** int nByte; | |
| 616 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 617 | -** | |
| 618 | -** results in variable nByte being set to 11. Or, | |
| 619 | -** | |
| 620 | -** thNextVarname(interp,te being set to 2. | |
| 621 | -*/ | |
| 622 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 623 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 624 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 625 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 626 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 627 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 628 | - switch (c) { | |
| 629 | - case '0': return 0; | |
| 630 | - case '1': return 1; | |
| 631 | - case '2': return 2; | |
| 632 | - case '3': return 3; | |
| 633 | - case '4': return 4; | |
| 634 | - case '5': return 5; | |
| 635 | - case '6': return 6; | |
| 636 | - case '7': return 7; | |
| 637 | - case '8': return 8; | |
| 638 | - case '9': return 9; | |
| 639 | - case 'a': case 'A': return 10; | |
| 640 | - case 'b': case 'B': return 11; | |
| 641 | - case 'c': case 'C': return 12; | |
| 642 | - case 'd': case 'D': return 13; | |
| 643 | - case 'e': case 'E': return 14; | |
| 644 | - case 'f': case 'F': return 15; | |
| 645 | - } | |
| 646 | - return -1; | |
| 647 | -} | |
| 648 | - | |
| 649 | -/* | |
| 650 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 651 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 652 | -** structure that the entry points to. Free the Th_Variable if its | |
| 653 | -** reference count reaches 0. | |
| 654 | -** | |
| 655 | -** Argument pContext is a pointer to the interpreter structure. | |
| 656 | -** | |
| 657 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 658 | -/* | |
| 659 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 660 | - | |
| 661 | - if( nAdd<0 ){ | |
| 662 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 663 | - | |
| 664 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 665 | - | |
| 666 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 667 | -static void thPopFrame(Th_Interp*); | |
| 668 | - | |
| 669 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 670 | -sg set to 11. Or, | |
| 671 | -** | |
| 672 | -** int nByte; | |
| 673 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 674 | -** | |
| 675 | -** results in variable nByte being set to 11. Or, | |
| 676 | -** | |
| 677 | -** thNextVarname(interp,te being set to 2. | |
| 678 | -*/ | |
| 679 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 680 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 681 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 682 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 683 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 684 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 685 | - switch (c) { | |
| 686 | - case '0': return 0; | |
| 687 | - case '1': return 1; | |
| 688 | - case '2': return 2; | |
| 689 | - case '3': return 3; | |
| 690 | - case '4': return 4; | |
| 691 | - case '5': return 5; | |
| 692 | - case '6': return 6; | |
| 693 | - case '7': return 7; | |
| 694 | - case '8': return 8; | |
| 695 | - case '9': return 9; | |
| 696 | - case 'a': case 'A': return 10; | |
| 697 | - case 'b': case 'B': return 11; | |
| 698 | - case 'c': case 'C': return 12; | |
| 699 | - case 'd': case 'D': return 13; | |
| 700 | - case 'e': case 'E': return 14; | |
| 701 | - case 'f': case 'F': return 15; | |
| 702 | - } | |
| 703 | - return -1; | |
| 704 | -} | |
| 705 | - | |
| 706 | -/* | |
| 707 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 708 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 709 | -** structure that the entry points to. Free the Th_Variable if its | |
| 710 | -** reference count reaches 0. | |
| 711 | -** | |
| 712 | -** Argument pContext is a pointer to the interpreter structure. | |
| 713 | -** | |
| 714 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 715 | -/* | |
| 716 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 717 | - | |
| 718 | - if( nAdd<0 ){ | |
| 719 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 720 | - | |
| 721 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 722 | -** of the input consumed by the construct. For example: | |
| 723 | -** | |
| 724 | -** int nByte; | |
| 725 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 726 | -** | |
| 727 | -** results in variable nByte being set to 11. Or, | |
| 728 | -** | |
| 729 | -** thNextVarname(interp,te being set to 2. | |
| 730 | -*/ | |
| 731 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 732 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 733 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 734 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 735 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 736 | -** like "\xFF" oThis file ce TH dOfLine(const char *, int); | |
| 737 | - | |
| 738 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 739 | -static void thPopFrame(Th_Interp*); | |
| 740 | - | |
| 741 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 742 | -sg set to 11. Or, | |
| 743 | -** | |
| 744 | -** int nByte; | |
| 745 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 746 | -** | |
| 747 | -** results in variable nByte being set to 11. Or, | |
| 748 | -** | |
| 749 | -** thNextVarname(interp,te being set to 2. | |
| 750 | -*/ | |
| 751 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 752 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 753 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 754 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 755 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 756 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 757 | - switch (c) { | |
| 758 | - case '0': return 0; | |
| 759 | - case '1': return 1; | |
| 760 | - case '2': return 2; | |
| 761 | - case '3': return 3; | |
| 762 | - case '4': return 4; | |
| 763 | - case '5': return 5; | |
| 764 | - case '6': return 6; | |
| 765 | - case '7': return 7; | |
| 766 | - case '8': return 8; | |
| 767 | - case '9': return 9; | |
| 768 | - case 'a': case 'A': return 10; | |
| 769 | - case 'b': case 'B': return 11; | |
| 770 | - case 'c': case 'C': return 12; | |
| 771 | - case 'd': case 'D': return 13; | |
| 772 | - case 'e': case 'E': return 14; | |
| 773 | - case 'f': case 'F': return 15; | |
| 774 | - } | |
| 775 | - return -1; | |
| 776 | -} | |
| 777 | - | |
| 778 | -/* | |
| 779 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 780 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 781 | -** structure that the entry points to. Free the Th_Variable if its | |
| 782 | -** reference count reaches 0. | |
| 783 | -** | |
| 784 | -** Argument pContext is a pointer to the interpreter structure. | |
| 785 | -** | |
| 786 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 787 | -/* | |
| 788 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 789 | - | |
| 790 | - if( nAdd<0 ){ | |
| 791 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 792 | - | |
| 793 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 794 | -** of the input consumed by the construct. For example: | |
| 795 | -** | |
| 796 | -** int nByte; | |
| 797 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 798 | -** | |
| 799 | -** results in variable nByte being set to 11. Or, | |
| 800 | -** | |
| 801 | -** thNextVarname(interp,te being set to 2. | |
| 802 | -*/ | |
| 803 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 804 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 805 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 806 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 807 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 808 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 809 | - switch (c) { | |
| 810 | - case '0': return 0; | |
| 811 | - case '1': return 1; | |
| 812 | - case '2': return 2; | |
| 813 | - case '3': return 3; | |
| 814 | - case '4': return 4; | |
| 815 | - case '5': return 5; | |
| 816 | - case '6': return 6; | |
| 817 | - case '7': return 7; | |
| 818 | - case '8': return 8; | |
| 819 | - case '9': return 9; | |
| 820 | - case 'a': case 'A': return 10; | |
| 821 | - case 'b': case 'B': return 11; | |
| 822 | - case 'c': case 'C': return 12; | |
| 823 | - case 'd': case 'D': return 13; | |
| 824 | - case 'e': case 'E': return 14; | |
| 825 | - case 'f': case 'F': return 15; | |
| 826 | - } | |
| 827 | - return -1; | |
| 828 | -} | |
| 829 | - | |
| 830 | -/* | |
| 831 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 832 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 833 | -** structure that the entry points to. Free the Th_Variable if its | |
| 834 | -** reference count reaches 0. | |
| 835 | -** | |
| 836 | -** Argument pContext is a pointer to the interpreter structure. | |
| 837 | -** | |
| 838 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 839 | -/* | |
| 840 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 841 | - | |
| 842 | - if( nAdd<0 ){ | |
| 843 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 844 | - | |
| 845 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 846 | - | |
| 847 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 848 | -static void thPopFrame(Th_Interp*); | |
| 849 | - | |
| 850 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 851 | -sg set to 11. Or, | |
| 852 | -** | |
| 853 | -** int nByte; | |
| 854 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 855 | -** | |
| 856 | -** results in variable nByte being set to 11. Or, | |
| 857 | -** | |
| 858 | -** thNextVarname(interp,te being set to 2. | |
| 859 | -*/ | |
| 860 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 861 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 862 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 863 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 864 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 865 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 866 | - switch (c) { | |
| 867 | - case '0': return 0; | |
| 868 | - case '1': return 1; | |
| 869 | - case '2': return 2; | |
| 870 | - case '3': return 3; | |
| 871 | - case '4': return 4; | |
| 872 | - case '5': return 5; | |
| 873 | - case '6': return 6; | |
| 874 | - case '7': return 7; | |
| 875 | - case '8': return 8; | |
| 876 | - case '9': return 9; | |
| 877 | - case 'a': case 'A': return 10; | |
| 878 | - case 'b': case 'B': return 11; | |
| 879 | - case 'c': case 'C': return 12; | |
| 880 | - case 'd': case 'D': return 13; | |
| 881 | - case 'e': case 'E': return 14; | |
| 882 | - case 'f': case 'F': return 15; | |
| 883 | - } | |
| 884 | - return -1; | |
| 885 | -} | |
| 886 | - | |
| 887 | -/* | |
| 888 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 889 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 890 | -** structure that the entry points to. Free the Th_Variable if its | |
| 891 | -** reference count reaches 0. | |
| 892 | -** | |
| 893 | -** Argument pContext is a pointer to the interpreter structure. | |
| 894 | -** | |
| 895 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 896 | -/* | |
| 897 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 898 | - | |
| 899 | - if( nAdd<0 ){ | |
| 900 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 901 | - | |
| 902 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 903 | -** of the input consumed by the construct. For example: | |
| 904 | -** | |
| 905 | -** int nByte; | |
| 906 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 907 | -** | |
| 908 | -** results in variable nByte being set to 11. Or, | |
| 909 | -** | |
| 910 | -** thNextVarname(interp,te being set to 2. | |
| 911 | -*/ | |
| 912 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 913 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 914 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 915 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 916 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 917 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 918 | - switch (c) { | |
| 919 | - case '0': return 0; | |
| 920 | - case '1': return 1; | |
| 921 | - case '2': return 2; | |
| 922 | - && iLeft>0 | |
| 923 | - iRight=jj+1 | |
| 479 | + bindig |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return |
| 480 | **tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ |
| 481 | nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); |
| 482 | |
| 483 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 484 | static void thPopFrame(Th_Interp*); |
| 485 | |
| 486 | static int thFreeVariable(Th_HashEntry*, void*); |
| 487 | sgto 11. Or, |
| 488 | **Iter", 18, Th_Variablebeing set to 2. |
| 489 | */ |
| 490 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 491 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 492 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 493 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 494 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 495 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 496 | switch (c) { |
| 497 | case '0': return 0; |
| 498 | case '1': return 1; |
| 499 | case '2': return 2; |
| 500 | case '3': return 3; |
| 501 | case '4': return 4; |
| 502 | case '5': return 5; |
| 503 | case '6': reH core. This file ce TH dOfLine(const char *, int); |
| 504 | |
| 505 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 506 | static void thPopFrame(Th_Interp*); |
| 507 | |
| 508 | static int thFreeVariable(Th_HashEntry*, void*); |
| 509 | sgto 11. Or, |
| 510 | **Iter", 18, Th_Variablebeing set to 2. |
| 511 | */ |
| 512 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 513 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 514 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 515 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 516 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 517 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 518 | switch (c) { |
| 519 | case '0': return 0; |
| 520 | case '1': return 1; |
| 521 | case '2': return 2; |
| 522 | case '3': return 3; |
| 523 | case '4': return 4; |
| 524 | case '5': return 5; |
| 525 | case '6': return 6; |
| 526 | case '7': return 7; |
| 527 | case '8': return 8; |
| 528 | case '9': return 9; |
| 529 | case 'a': case 'A': return 10; |
| 530 | case 'b': case 'B': return 11; |
| 531 | case 'c': case 'C': return 12; |
| 532 | case 'd': case 'D': return 13; |
| 533 | case 'e': case 'E': return 14; |
| 534 | case 'f': case 'F': return 15; |
| 535 | } |
| 536 | return -1; |
| 537 | } |
| 538 | |
| 539 | /* |
| 540 | ** Argument pEntry points to an entry in a stack frame hash table |
| 541 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 542 | ** structure that the entry points to. Free the Th_Variable if its |
| 543 | ** reference count reaches 0. |
| 544 | ** |
| 545 | ** Argument pContext is a pointer to the interpreter structure. |
| 546 | ** |
| 547 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 548 | /* |
| 549 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 550 | |
| 551 | if( nAdd<0 ){ |
| 552 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 553 | |
| 554 | 1_PLATFORM |
| 555 | **tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 556 | |
| 557 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 558 | static void thPopFrame(Th_Interp*); |
| 559 | |
| 560 | static int thFreeVariable(Th_HashEntry*, void*); |
| 561 | sg set to 11. Or, |
| 562 | ** |
| 563 | ** int nByte; |
| 564 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 565 | ** |
| 566 | ** results in variable nByte being set to 11. Or, |
| 567 | ** |
| 568 | ** thNextVarname(interp,te being set to 2. |
| 569 | */ |
| 570 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 571 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 572 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 573 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 574 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 575 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 576 | switch (c) { |
| 577 | case '0': return 0; |
| 578 | case '1': return 1; |
| 579 | case '2': return 2; |
| 580 | case '3': return 3; |
| 581 | case '4': return 4; |
| 582 | case '5': return 5; |
| 583 | case '6': return 6; |
| 584 | case '7': return 7; |
| 585 | case '8': return 8; |
| 586 | case '9': return 9; |
| 587 | case 'a': case 'A': return 10; |
| 588 | case 'b': case 'B': return 11; |
| 589 | case 'c': case 'C': return 12; |
| 590 | case 'd': case 'D': return 13; |
| 591 | case 'e': case 'E': return 14; |
| 592 | case 'f': case 'F': return 15; |
| 593 | } |
| 594 | return -1; |
| 595 | } |
| 596 | |
| 597 | /* |
| 598 | ** Argument pEntry points to an entry in a stack frame hash table |
| 599 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 600 | ** structure that the entry points to. Free the Th_Variable if its |
| 601 | ** reference count reaches 0. |
| 602 | ** |
| 603 | ** Argument pContext is a pointer to the interpreter structure. |
| 604 | ** |
| 605 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 606 | /* |
| 607 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 608 | |
| 609 | if( nAdd<0 ){ |
| 610 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 611 | |
| 612 | 1_PLATFORMc.), these functions determine the number of bytes |
| 613 | ** of the input consumed by the construct. For example: |
| 614 | ** |
| 615 | ** int nByte; |
| 616 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 617 | ** |
| 618 | ** results in variable nByte being set to 11. Or, |
| 619 | ** |
| 620 | ** thNextVarname(interp,te being set to 2. |
| 621 | */ |
| 622 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 623 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 624 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 625 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 626 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 627 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 628 | switch (c) { |
| 629 | case '0': return 0; |
| 630 | case '1': return 1; |
| 631 | case '2': return 2; |
| 632 | case '3': return 3; |
| 633 | case '4': return 4; |
| 634 | case '5': return 5; |
| 635 | case '6': return 6; |
| 636 | case '7': return 7; |
| 637 | case '8': return 8; |
| 638 | case '9': return 9; |
| 639 | case 'a': case 'A': return 10; |
| 640 | case 'b': case 'B': return 11; |
| 641 | case 'c': case 'C': return 12; |
| 642 | case 'd': case 'D': return 13; |
| 643 | case 'e': case 'E': return 14; |
| 644 | case 'f': case 'F': return 15; |
| 645 | } |
| 646 | return -1; |
| 647 | } |
| 648 | |
| 649 | /* |
| 650 | ** Argument pEntry points to an entry in a stack frame hash table |
| 651 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 652 | ** structure that the entry points to. Free the Th_Variable if its |
| 653 | ** reference count reaches 0. |
| 654 | ** |
| 655 | ** Argument pContext is a pointer to the interpreter structure. |
| 656 | ** |
| 657 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 658 | /* |
| 659 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 660 | |
| 661 | if( nAdd<0 ){ |
| 662 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 663 | |
| 664 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 665 | |
| 666 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 667 | static void thPopFrame(Th_Interp*); |
| 668 | |
| 669 | static int thFreeVariable(Th_HashEntry*, void*); |
| 670 | sg set to 11. Or, |
| 671 | ** |
| 672 | ** int nByte; |
| 673 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 674 | ** |
| 675 | ** results in variable nByte being set to 11. Or, |
| 676 | ** |
| 677 | ** thNextVarname(interp,te being set to 2. |
| 678 | */ |
| 679 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 680 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 681 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 682 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 683 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 684 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 685 | switch (c) { |
| 686 | case '0': return 0; |
| 687 | case '1': return 1; |
| 688 | case '2': return 2; |
| 689 | case '3': return 3; |
| 690 | case '4': return 4; |
| 691 | case '5': return 5; |
| 692 | case '6': return 6; |
| 693 | case '7': return 7; |
| 694 | case '8': return 8; |
| 695 | case '9': return 9; |
| 696 | case 'a': case 'A': return 10; |
| 697 | case 'b': case 'B': return 11; |
| 698 | case 'c': case 'C': return 12; |
| 699 | case 'd': case 'D': return 13; |
| 700 | case 'e': case 'E': return 14; |
| 701 | case 'f': case 'F': return 15; |
| 702 | } |
| 703 | return -1; |
| 704 | } |
| 705 | |
| 706 | /* |
| 707 | ** Argument pEntry points to an entry in a stack frame hash table |
| 708 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 709 | ** structure that the entry points to. Free the Th_Variable if its |
| 710 | ** reference count reaches 0. |
| 711 | ** |
| 712 | ** Argument pContext is a pointer to the interpreter structure. |
| 713 | ** |
| 714 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 715 | /* |
| 716 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 717 | |
| 718 | if( nAdd<0 ){ |
| 719 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 720 | |
| 721 | 1_PLATFORMc.), these functions determine the number of bytes |
| 722 | ** of the input consumed by the construct. For example: |
| 723 | ** |
| 724 | ** int nByte; |
| 725 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 726 | ** |
| 727 | ** results in variable nByte being set to 11. Or, |
| 728 | ** |
| 729 | ** thNextVarname(interp,te being set to 2. |
| 730 | */ |
| 731 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 732 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 733 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 734 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 735 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 736 | ** like "\xFF" oThis file ce TH dOfLine(const char *, int); |
| 737 | |
| 738 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 739 | static void thPopFrame(Th_Interp*); |
| 740 | |
| 741 | static int thFreeVariable(Th_HashEntry*, void*); |
| 742 | sg set to 11. Or, |
| 743 | ** |
| 744 | ** int nByte; |
| 745 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 746 | ** |
| 747 | ** results in variable nByte being set to 11. Or, |
| 748 | ** |
| 749 | ** thNextVarname(interp,te being set to 2. |
| 750 | */ |
| 751 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 752 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 753 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 754 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 755 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 756 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 757 | switch (c) { |
| 758 | case '0': return 0; |
| 759 | case '1': return 1; |
| 760 | case '2': return 2; |
| 761 | case '3': return 3; |
| 762 | case '4': return 4; |
| 763 | case '5': return 5; |
| 764 | case '6': return 6; |
| 765 | case '7': return 7; |
| 766 | case '8': return 8; |
| 767 | case '9': return 9; |
| 768 | case 'a': case 'A': return 10; |
| 769 | case 'b': case 'B': return 11; |
| 770 | case 'c': case 'C': return 12; |
| 771 | case 'd': case 'D': return 13; |
| 772 | case 'e': case 'E': return 14; |
| 773 | case 'f': case 'F': return 15; |
| 774 | } |
| 775 | return -1; |
| 776 | } |
| 777 | |
| 778 | /* |
| 779 | ** Argument pEntry points to an entry in a stack frame hash table |
| 780 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 781 | ** structure that the entry points to. Free the Th_Variable if its |
| 782 | ** reference count reaches 0. |
| 783 | ** |
| 784 | ** Argument pContext is a pointer to the interpreter structure. |
| 785 | ** |
| 786 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 787 | /* |
| 788 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 789 | |
| 790 | if( nAdd<0 ){ |
| 791 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 792 | |
| 793 | 1_PLATFORMc.), these functions determine the number of bytes |
| 794 | ** of the input consumed by the construct. For example: |
| 795 | ** |
| 796 | ** int nByte; |
| 797 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 798 | ** |
| 799 | ** results in variable nByte being set to 11. Or, |
| 800 | ** |
| 801 | ** thNextVarname(interp,te being set to 2. |
| 802 | */ |
| 803 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 804 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 805 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 806 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 807 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 808 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 809 | switch (c) { |
| 810 | case '0': return 0; |
| 811 | case '1': return 1; |
| 812 | case '2': return 2; |
| 813 | case '3': return 3; |
| 814 | case '4': return 4; |
| 815 | case '5': return 5; |
| 816 | case '6': return 6; |
| 817 | case '7': return 7; |
| 818 | case '8': return 8; |
| 819 | case '9': return 9; |
| 820 | case 'a': case 'A': return 10; |
| 821 | case 'b': case 'B': return 11; |
| 822 | case 'c': case 'C': return 12; |
| 823 | case 'd': case 'D': return 13; |
| 824 | case 'e': case 'E': return 14; |
| 825 | case 'f': case 'F': return 15; |
| 826 | } |
| 827 | return -1; |
| 828 | } |
| 829 | |
| 830 | /* |
| 831 | ** Argument pEntry points to an entry in a stack frame hash table |
| 832 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 833 | ** structure that the entry points to. Free the Th_Variable if its |
| 834 | ** reference count reaches 0. |
| 835 | ** |
| 836 | ** Argument pContext is a pointer to the interpreter structure. |
| 837 | ** |
| 838 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 839 | /* |
| 840 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 841 | |
| 842 | if( nAdd<0 ){ |
| 843 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 844 | |
| 845 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 846 | |
| 847 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 848 | static void thPopFrame(Th_Interp*); |
| 849 | |
| 850 | static int thFreeVariable(Th_HashEntry*, void*); |
| 851 | sg set to 11. Or, |
| 852 | ** |
| 853 | ** int nByte; |
| 854 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 855 | ** |
| 856 | ** results in variable nByte being set to 11. Or, |
| 857 | ** |
| 858 | ** thNextVarname(interp,te being set to 2. |
| 859 | */ |
| 860 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 861 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 862 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 863 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 864 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 865 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 866 | switch (c) { |
| 867 | case '0': return 0; |
| 868 | case '1': return 1; |
| 869 | case '2': return 2; |
| 870 | case '3': return 3; |
| 871 | case '4': return 4; |
| 872 | case '5': return 5; |
| 873 | case '6': return 6; |
| 874 | case '7': return 7; |
| 875 | case '8': return 8; |
| 876 | case '9': return 9; |
| 877 | case 'a': case 'A': return 10; |
| 878 | case 'b': case 'B': return 11; |
| 879 | case 'c': case 'C': return 12; |
| 880 | case 'd': case 'D': return 13; |
| 881 | case 'e': case 'E': return 14; |
| 882 | case 'f': case 'F': return 15; |
| 883 | } |
| 884 | return -1; |
| 885 | } |
| 886 | |
| 887 | /* |
| 888 | ** Argument pEntry points to an entry in a stack frame hash table |
| 889 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 890 | ** structure that the entry points to. Free the Th_Variable if its |
| 891 | ** reference count reaches 0. |
| 892 | ** |
| 893 | ** Argument pContext is a pointer to the interpreter structure. |
| 894 | ** |
| 895 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 896 | /* |
| 897 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 898 | |
| 899 | if( nAdd<0 ){ |
| 900 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 901 | |
| 902 | 1_PLATFORMc.), these functions determine the number of bytes |
| 903 | ** of the input consumed by the construct. For example: |
| 904 | ** |
| 905 | ** int nByte; |
| 906 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 907 | ** |
| 908 | ** results in variable nByte being set to 11. Or, |
| 909 | ** |
| 910 | ** thNextVarname(interp,te being set to 2. |
| 911 | */ |
| 912 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 913 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 914 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 915 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 916 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 917 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 918 | switch (c) { |
| 919 | case '0': return 0; |
| 920 | case '1': return 1; |
| 921 | case '2': return 2; |
| 922 | && iLeft>0 |
| 923 | iRight=jj+1 |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindig |
M
src/th.c
+1
-445
| --- a/src/th.c | ||
| +++ b/src/th.c | ||
| @@ -476,448 +476,4 @@ | ||
| 476 | 476 | hexdig i += 2; |
| 477 | 477 | i += 2; |
| 478 | 478 | base = 2; |
| 479 | - bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return | |
| 480 | -**tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ | |
| 481 | - nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); | |
| 482 | - | |
| 483 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 484 | -static void thPopFrame(Th_Interp*); | |
| 485 | - | |
| 486 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 487 | -sgto 11. Or, | |
| 488 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 489 | -*/ | |
| 490 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 491 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 492 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 493 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 494 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 495 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 496 | - switch (c) { | |
| 497 | - case '0': return 0; | |
| 498 | - case '1': return 1; | |
| 499 | - case '2': return 2; | |
| 500 | - case '3': return 3; | |
| 501 | - case '4': return 4; | |
| 502 | - case '5': return 5; | |
| 503 | - case '6': reH core. This file ce TH dOfLine(const char *, int); | |
| 504 | - | |
| 505 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 506 | -static void thPopFrame(Th_Interp*); | |
| 507 | - | |
| 508 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 509 | -sgto 11. Or, | |
| 510 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 511 | -*/ | |
| 512 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 513 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 514 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 515 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 516 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 517 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 518 | - switch (c) { | |
| 519 | - case '0': return 0; | |
| 520 | - case '1': return 1; | |
| 521 | - case '2': return 2; | |
| 522 | - case '3': return 3; | |
| 523 | - case '4': return 4; | |
| 524 | - case '5': return 5; | |
| 525 | - case '6': return 6; | |
| 526 | - case '7': return 7; | |
| 527 | - case '8': return 8; | |
| 528 | - case '9': return 9; | |
| 529 | - case 'a': case 'A': return 10; | |
| 530 | - case 'b': case 'B': return 11; | |
| 531 | - case 'c': case 'C': return 12; | |
| 532 | - case 'd': case 'D': return 13; | |
| 533 | - case 'e': case 'E': return 14; | |
| 534 | - case 'f': case 'F': return 15; | |
| 535 | - } | |
| 536 | - return -1; | |
| 537 | -} | |
| 538 | - | |
| 539 | -/* | |
| 540 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 541 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 542 | -** structure that the entry points to. Free the Th_Variable if its | |
| 543 | -** reference count reaches 0. | |
| 544 | -** | |
| 545 | -** Argument pContext is a pointer to the interpreter structure. | |
| 546 | -** | |
| 547 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 548 | -/* | |
| 549 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 550 | - | |
| 551 | - if( nAdd<0 ){ | |
| 552 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 553 | - | |
| 554 | - 1_PLATFORM | |
| 555 | -**tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 556 | - | |
| 557 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 558 | -static void thPopFrame(Th_Interp*); | |
| 559 | - | |
| 560 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 561 | -sg set to 11. Or, | |
| 562 | -** | |
| 563 | -** int nByte; | |
| 564 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 565 | -** | |
| 566 | -** results in variable nByte being set to 11. Or, | |
| 567 | -** | |
| 568 | -** thNextVarname(interp,te being set to 2. | |
| 569 | -*/ | |
| 570 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 571 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 572 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 573 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 574 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 575 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 576 | - switch (c) { | |
| 577 | - case '0': return 0; | |
| 578 | - case '1': return 1; | |
| 579 | - case '2': return 2; | |
| 580 | - case '3': return 3; | |
| 581 | - case '4': return 4; | |
| 582 | - case '5': return 5; | |
| 583 | - case '6': return 6; | |
| 584 | - case '7': return 7; | |
| 585 | - case '8': return 8; | |
| 586 | - case '9': return 9; | |
| 587 | - case 'a': case 'A': return 10; | |
| 588 | - case 'b': case 'B': return 11; | |
| 589 | - case 'c': case 'C': return 12; | |
| 590 | - case 'd': case 'D': return 13; | |
| 591 | - case 'e': case 'E': return 14; | |
| 592 | - case 'f': case 'F': return 15; | |
| 593 | - } | |
| 594 | - return -1; | |
| 595 | -} | |
| 596 | - | |
| 597 | -/* | |
| 598 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 599 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 600 | -** structure that the entry points to. Free the Th_Variable if its | |
| 601 | -** reference count reaches 0. | |
| 602 | -** | |
| 603 | -** Argument pContext is a pointer to the interpreter structure. | |
| 604 | -** | |
| 605 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 606 | -/* | |
| 607 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 608 | - | |
| 609 | - if( nAdd<0 ){ | |
| 610 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 611 | - | |
| 612 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 613 | -** of the input consumed by the construct. For example: | |
| 614 | -** | |
| 615 | -** int nByte; | |
| 616 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 617 | -** | |
| 618 | -** results in variable nByte being set to 11. Or, | |
| 619 | -** | |
| 620 | -** thNextVarname(interp,te being set to 2. | |
| 621 | -*/ | |
| 622 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 623 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 624 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 625 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 626 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 627 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 628 | - switch (c) { | |
| 629 | - case '0': return 0; | |
| 630 | - case '1': return 1; | |
| 631 | - case '2': return 2; | |
| 632 | - case '3': return 3; | |
| 633 | - case '4': return 4; | |
| 634 | - case '5': return 5; | |
| 635 | - case '6': return 6; | |
| 636 | - case '7': return 7; | |
| 637 | - case '8': return 8; | |
| 638 | - case '9': return 9; | |
| 639 | - case 'a': case 'A': return 10; | |
| 640 | - case 'b': case 'B': return 11; | |
| 641 | - case 'c': case 'C': return 12; | |
| 642 | - case 'd': case 'D': return 13; | |
| 643 | - case 'e': case 'E': return 14; | |
| 644 | - case 'f': case 'F': return 15; | |
| 645 | - } | |
| 646 | - return -1; | |
| 647 | -} | |
| 648 | - | |
| 649 | -/* | |
| 650 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 651 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 652 | -** structure that the entry points to. Free the Th_Variable if its | |
| 653 | -** reference count reaches 0. | |
| 654 | -** | |
| 655 | -** Argument pContext is a pointer to the interpreter structure. | |
| 656 | -** | |
| 657 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 658 | -/* | |
| 659 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 660 | - | |
| 661 | - if( nAdd<0 ){ | |
| 662 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 663 | - | |
| 664 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 665 | - | |
| 666 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 667 | -static void thPopFrame(Th_Interp*); | |
| 668 | - | |
| 669 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 670 | -sg set to 11. Or, | |
| 671 | -** | |
| 672 | -** int nByte; | |
| 673 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 674 | -** | |
| 675 | -** results in variable nByte being set to 11. Or, | |
| 676 | -** | |
| 677 | -** thNextVarname(interp,te being set to 2. | |
| 678 | -*/ | |
| 679 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 680 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 681 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 682 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 683 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 684 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 685 | - switch (c) { | |
| 686 | - case '0': return 0; | |
| 687 | - case '1': return 1; | |
| 688 | - case '2': return 2; | |
| 689 | - case '3': return 3; | |
| 690 | - case '4': return 4; | |
| 691 | - case '5': return 5; | |
| 692 | - case '6': return 6; | |
| 693 | - case '7': return 7; | |
| 694 | - case '8': return 8; | |
| 695 | - case '9': return 9; | |
| 696 | - case 'a': case 'A': return 10; | |
| 697 | - case 'b': case 'B': return 11; | |
| 698 | - case 'c': case 'C': return 12; | |
| 699 | - case 'd': case 'D': return 13; | |
| 700 | - case 'e': case 'E': return 14; | |
| 701 | - case 'f': case 'F': return 15; | |
| 702 | - } | |
| 703 | - return -1; | |
| 704 | -} | |
| 705 | - | |
| 706 | -/* | |
| 707 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 708 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 709 | -** structure that the entry points to. Free the Th_Variable if its | |
| 710 | -** reference count reaches 0. | |
| 711 | -** | |
| 712 | -** Argument pContext is a pointer to the interpreter structure. | |
| 713 | -** | |
| 714 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 715 | -/* | |
| 716 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 717 | - | |
| 718 | - if( nAdd<0 ){ | |
| 719 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 720 | - | |
| 721 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 722 | -** of the input consumed by the construct. For example: | |
| 723 | -** | |
| 724 | -** int nByte; | |
| 725 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 726 | -** | |
| 727 | -** results in variable nByte being set to 11. Or, | |
| 728 | -** | |
| 729 | -** thNextVarname(interp,te being set to 2. | |
| 730 | -*/ | |
| 731 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 732 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 733 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 734 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 735 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 736 | -** like "\xFF" oThis file ce TH dOfLine(const char *, int); | |
| 737 | - | |
| 738 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 739 | -static void thPopFrame(Th_Interp*); | |
| 740 | - | |
| 741 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 742 | -sg set to 11. Or, | |
| 743 | -** | |
| 744 | -** int nByte; | |
| 745 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 746 | -** | |
| 747 | -** results in variable nByte being set to 11. Or, | |
| 748 | -** | |
| 749 | -** thNextVarname(interp,te being set to 2. | |
| 750 | -*/ | |
| 751 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 752 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 753 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 754 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 755 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 756 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 757 | - switch (c) { | |
| 758 | - case '0': return 0; | |
| 759 | - case '1': return 1; | |
| 760 | - case '2': return 2; | |
| 761 | - case '3': return 3; | |
| 762 | - case '4': return 4; | |
| 763 | - case '5': return 5; | |
| 764 | - case '6': return 6; | |
| 765 | - case '7': return 7; | |
| 766 | - case '8': return 8; | |
| 767 | - case '9': return 9; | |
| 768 | - case 'a': case 'A': return 10; | |
| 769 | - case 'b': case 'B': return 11; | |
| 770 | - case 'c': case 'C': return 12; | |
| 771 | - case 'd': case 'D': return 13; | |
| 772 | - case 'e': case 'E': return 14; | |
| 773 | - case 'f': case 'F': return 15; | |
| 774 | - } | |
| 775 | - return -1; | |
| 776 | -} | |
| 777 | - | |
| 778 | -/* | |
| 779 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 780 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 781 | -** structure that the entry points to. Free the Th_Variable if its | |
| 782 | -** reference count reaches 0. | |
| 783 | -** | |
| 784 | -** Argument pContext is a pointer to the interpreter structure. | |
| 785 | -** | |
| 786 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 787 | -/* | |
| 788 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 789 | - | |
| 790 | - if( nAdd<0 ){ | |
| 791 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 792 | - | |
| 793 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 794 | -** of the input consumed by the construct. For example: | |
| 795 | -** | |
| 796 | -** int nByte; | |
| 797 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 798 | -** | |
| 799 | -** results in variable nByte being set to 11. Or, | |
| 800 | -** | |
| 801 | -** thNextVarname(interp,te being set to 2. | |
| 802 | -*/ | |
| 803 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 804 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 805 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 806 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 807 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 808 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 809 | - switch (c) { | |
| 810 | - case '0': return 0; | |
| 811 | - case '1': return 1; | |
| 812 | - case '2': return 2; | |
| 813 | - case '3': return 3; | |
| 814 | - case '4': return 4; | |
| 815 | - case '5': return 5; | |
| 816 | - case '6': return 6; | |
| 817 | - case '7': return 7; | |
| 818 | - case '8': return 8; | |
| 819 | - case '9': return 9; | |
| 820 | - case 'a': case 'A': return 10; | |
| 821 | - case 'b': case 'B': return 11; | |
| 822 | - case 'c': case 'C': return 12; | |
| 823 | - case 'd': case 'D': return 13; | |
| 824 | - case 'e': case 'E': return 14; | |
| 825 | - case 'f': case 'F': return 15; | |
| 826 | - } | |
| 827 | - return -1; | |
| 828 | -} | |
| 829 | - | |
| 830 | -/* | |
| 831 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 832 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 833 | -** structure that the entry points to. Free the Th_Variable if its | |
| 834 | -** reference count reaches 0. | |
| 835 | -** | |
| 836 | -** Argument pContext is a pointer to the interpreter structure. | |
| 837 | -** | |
| 838 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 839 | -/* | |
| 840 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 841 | - | |
| 842 | - if( nAdd<0 ){ | |
| 843 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 844 | - | |
| 845 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 846 | - | |
| 847 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 848 | -static void thPopFrame(Th_Interp*); | |
| 849 | - | |
| 850 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 851 | -sg set to 11. Or, | |
| 852 | -** | |
| 853 | -** int nByte; | |
| 854 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 855 | -** | |
| 856 | -** results in variable nByte being set to 11. Or, | |
| 857 | -** | |
| 858 | -** thNextVarname(interp,te being set to 2. | |
| 859 | -*/ | |
| 860 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 861 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 862 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 863 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 864 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 865 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 866 | - switch (c) { | |
| 867 | - case '0': return 0; | |
| 868 | - case '1': return 1; | |
| 869 | - case '2': return 2; | |
| 870 | - case '3': return 3; | |
| 871 | - case '4': return 4; | |
| 872 | - case '5': return 5; | |
| 873 | - case '6': return 6; | |
| 874 | - case '7': return 7; | |
| 875 | - case '8': return 8; | |
| 876 | - case '9': return 9; | |
| 877 | - case 'a': case 'A': return 10; | |
| 878 | - case 'b': case 'B': return 11; | |
| 879 | - case 'c': case 'C': return 12; | |
| 880 | - case 'd': case 'D': return 13; | |
| 881 | - case 'e': case 'E': return 14; | |
| 882 | - case 'f': case 'F': return 15; | |
| 883 | - } | |
| 884 | - return -1; | |
| 885 | -} | |
| 886 | - | |
| 887 | -/* | |
| 888 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 889 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 890 | -** structure that the entry points to. Free the Th_Variable if its | |
| 891 | -** reference count reaches 0. | |
| 892 | -** | |
| 893 | -** Argument pContext is a pointer to the interpreter structure. | |
| 894 | -** | |
| 895 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 896 | -/* | |
| 897 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 898 | - | |
| 899 | - if( nAdd<0 ){ | |
| 900 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 901 | - | |
| 902 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 903 | -** of the input consumed by the construct. For example: | |
| 904 | -** | |
| 905 | -** int nByte; | |
| 906 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 907 | -** | |
| 908 | -** results in variable nByte being set to 11. Or, | |
| 909 | -** | |
| 910 | -** thNextVarname(interp,te being set to 2. | |
| 911 | -*/ | |
| 912 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 913 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 914 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 915 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 916 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 917 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 918 | - switch (c) { | |
| 919 | - case '0': return 0; | |
| 920 | - case '1': return 1; | |
| 921 | - case '2': return 2; | |
| 922 | - && iLeft>0 | |
| 923 | - iRight=jj+1 | |
| 479 | + bindig |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return |
| 480 | **tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ |
| 481 | nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); |
| 482 | |
| 483 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 484 | static void thPopFrame(Th_Interp*); |
| 485 | |
| 486 | static int thFreeVariable(Th_HashEntry*, void*); |
| 487 | sgto 11. Or, |
| 488 | **Iter", 18, Th_Variablebeing set to 2. |
| 489 | */ |
| 490 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 491 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 492 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 493 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 494 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 495 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 496 | switch (c) { |
| 497 | case '0': return 0; |
| 498 | case '1': return 1; |
| 499 | case '2': return 2; |
| 500 | case '3': return 3; |
| 501 | case '4': return 4; |
| 502 | case '5': return 5; |
| 503 | case '6': reH core. This file ce TH dOfLine(const char *, int); |
| 504 | |
| 505 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 506 | static void thPopFrame(Th_Interp*); |
| 507 | |
| 508 | static int thFreeVariable(Th_HashEntry*, void*); |
| 509 | sgto 11. Or, |
| 510 | **Iter", 18, Th_Variablebeing set to 2. |
| 511 | */ |
| 512 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 513 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 514 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 515 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 516 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 517 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 518 | switch (c) { |
| 519 | case '0': return 0; |
| 520 | case '1': return 1; |
| 521 | case '2': return 2; |
| 522 | case '3': return 3; |
| 523 | case '4': return 4; |
| 524 | case '5': return 5; |
| 525 | case '6': return 6; |
| 526 | case '7': return 7; |
| 527 | case '8': return 8; |
| 528 | case '9': return 9; |
| 529 | case 'a': case 'A': return 10; |
| 530 | case 'b': case 'B': return 11; |
| 531 | case 'c': case 'C': return 12; |
| 532 | case 'd': case 'D': return 13; |
| 533 | case 'e': case 'E': return 14; |
| 534 | case 'f': case 'F': return 15; |
| 535 | } |
| 536 | return -1; |
| 537 | } |
| 538 | |
| 539 | /* |
| 540 | ** Argument pEntry points to an entry in a stack frame hash table |
| 541 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 542 | ** structure that the entry points to. Free the Th_Variable if its |
| 543 | ** reference count reaches 0. |
| 544 | ** |
| 545 | ** Argument pContext is a pointer to the interpreter structure. |
| 546 | ** |
| 547 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 548 | /* |
| 549 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 550 | |
| 551 | if( nAdd<0 ){ |
| 552 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 553 | |
| 554 | 1_PLATFORM |
| 555 | **tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 556 | |
| 557 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 558 | static void thPopFrame(Th_Interp*); |
| 559 | |
| 560 | static int thFreeVariable(Th_HashEntry*, void*); |
| 561 | sg set to 11. Or, |
| 562 | ** |
| 563 | ** int nByte; |
| 564 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 565 | ** |
| 566 | ** results in variable nByte being set to 11. Or, |
| 567 | ** |
| 568 | ** thNextVarname(interp,te being set to 2. |
| 569 | */ |
| 570 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 571 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 572 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 573 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 574 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 575 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 576 | switch (c) { |
| 577 | case '0': return 0; |
| 578 | case '1': return 1; |
| 579 | case '2': return 2; |
| 580 | case '3': return 3; |
| 581 | case '4': return 4; |
| 582 | case '5': return 5; |
| 583 | case '6': return 6; |
| 584 | case '7': return 7; |
| 585 | case '8': return 8; |
| 586 | case '9': return 9; |
| 587 | case 'a': case 'A': return 10; |
| 588 | case 'b': case 'B': return 11; |
| 589 | case 'c': case 'C': return 12; |
| 590 | case 'd': case 'D': return 13; |
| 591 | case 'e': case 'E': return 14; |
| 592 | case 'f': case 'F': return 15; |
| 593 | } |
| 594 | return -1; |
| 595 | } |
| 596 | |
| 597 | /* |
| 598 | ** Argument pEntry points to an entry in a stack frame hash table |
| 599 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 600 | ** structure that the entry points to. Free the Th_Variable if its |
| 601 | ** reference count reaches 0. |
| 602 | ** |
| 603 | ** Argument pContext is a pointer to the interpreter structure. |
| 604 | ** |
| 605 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 606 | /* |
| 607 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 608 | |
| 609 | if( nAdd<0 ){ |
| 610 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 611 | |
| 612 | 1_PLATFORMc.), these functions determine the number of bytes |
| 613 | ** of the input consumed by the construct. For example: |
| 614 | ** |
| 615 | ** int nByte; |
| 616 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 617 | ** |
| 618 | ** results in variable nByte being set to 11. Or, |
| 619 | ** |
| 620 | ** thNextVarname(interp,te being set to 2. |
| 621 | */ |
| 622 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 623 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 624 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 625 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 626 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 627 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 628 | switch (c) { |
| 629 | case '0': return 0; |
| 630 | case '1': return 1; |
| 631 | case '2': return 2; |
| 632 | case '3': return 3; |
| 633 | case '4': return 4; |
| 634 | case '5': return 5; |
| 635 | case '6': return 6; |
| 636 | case '7': return 7; |
| 637 | case '8': return 8; |
| 638 | case '9': return 9; |
| 639 | case 'a': case 'A': return 10; |
| 640 | case 'b': case 'B': return 11; |
| 641 | case 'c': case 'C': return 12; |
| 642 | case 'd': case 'D': return 13; |
| 643 | case 'e': case 'E': return 14; |
| 644 | case 'f': case 'F': return 15; |
| 645 | } |
| 646 | return -1; |
| 647 | } |
| 648 | |
| 649 | /* |
| 650 | ** Argument pEntry points to an entry in a stack frame hash table |
| 651 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 652 | ** structure that the entry points to. Free the Th_Variable if its |
| 653 | ** reference count reaches 0. |
| 654 | ** |
| 655 | ** Argument pContext is a pointer to the interpreter structure. |
| 656 | ** |
| 657 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 658 | /* |
| 659 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 660 | |
| 661 | if( nAdd<0 ){ |
| 662 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 663 | |
| 664 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 665 | |
| 666 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 667 | static void thPopFrame(Th_Interp*); |
| 668 | |
| 669 | static int thFreeVariable(Th_HashEntry*, void*); |
| 670 | sg set to 11. Or, |
| 671 | ** |
| 672 | ** int nByte; |
| 673 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 674 | ** |
| 675 | ** results in variable nByte being set to 11. Or, |
| 676 | ** |
| 677 | ** thNextVarname(interp,te being set to 2. |
| 678 | */ |
| 679 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 680 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 681 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 682 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 683 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 684 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 685 | switch (c) { |
| 686 | case '0': return 0; |
| 687 | case '1': return 1; |
| 688 | case '2': return 2; |
| 689 | case '3': return 3; |
| 690 | case '4': return 4; |
| 691 | case '5': return 5; |
| 692 | case '6': return 6; |
| 693 | case '7': return 7; |
| 694 | case '8': return 8; |
| 695 | case '9': return 9; |
| 696 | case 'a': case 'A': return 10; |
| 697 | case 'b': case 'B': return 11; |
| 698 | case 'c': case 'C': return 12; |
| 699 | case 'd': case 'D': return 13; |
| 700 | case 'e': case 'E': return 14; |
| 701 | case 'f': case 'F': return 15; |
| 702 | } |
| 703 | return -1; |
| 704 | } |
| 705 | |
| 706 | /* |
| 707 | ** Argument pEntry points to an entry in a stack frame hash table |
| 708 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 709 | ** structure that the entry points to. Free the Th_Variable if its |
| 710 | ** reference count reaches 0. |
| 711 | ** |
| 712 | ** Argument pContext is a pointer to the interpreter structure. |
| 713 | ** |
| 714 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 715 | /* |
| 716 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 717 | |
| 718 | if( nAdd<0 ){ |
| 719 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 720 | |
| 721 | 1_PLATFORMc.), these functions determine the number of bytes |
| 722 | ** of the input consumed by the construct. For example: |
| 723 | ** |
| 724 | ** int nByte; |
| 725 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 726 | ** |
| 727 | ** results in variable nByte being set to 11. Or, |
| 728 | ** |
| 729 | ** thNextVarname(interp,te being set to 2. |
| 730 | */ |
| 731 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 732 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 733 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 734 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 735 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 736 | ** like "\xFF" oThis file ce TH dOfLine(const char *, int); |
| 737 | |
| 738 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 739 | static void thPopFrame(Th_Interp*); |
| 740 | |
| 741 | static int thFreeVariable(Th_HashEntry*, void*); |
| 742 | sg set to 11. Or, |
| 743 | ** |
| 744 | ** int nByte; |
| 745 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 746 | ** |
| 747 | ** results in variable nByte being set to 11. Or, |
| 748 | ** |
| 749 | ** thNextVarname(interp,te being set to 2. |
| 750 | */ |
| 751 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 752 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 753 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 754 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 755 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 756 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 757 | switch (c) { |
| 758 | case '0': return 0; |
| 759 | case '1': return 1; |
| 760 | case '2': return 2; |
| 761 | case '3': return 3; |
| 762 | case '4': return 4; |
| 763 | case '5': return 5; |
| 764 | case '6': return 6; |
| 765 | case '7': return 7; |
| 766 | case '8': return 8; |
| 767 | case '9': return 9; |
| 768 | case 'a': case 'A': return 10; |
| 769 | case 'b': case 'B': return 11; |
| 770 | case 'c': case 'C': return 12; |
| 771 | case 'd': case 'D': return 13; |
| 772 | case 'e': case 'E': return 14; |
| 773 | case 'f': case 'F': return 15; |
| 774 | } |
| 775 | return -1; |
| 776 | } |
| 777 | |
| 778 | /* |
| 779 | ** Argument pEntry points to an entry in a stack frame hash table |
| 780 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 781 | ** structure that the entry points to. Free the Th_Variable if its |
| 782 | ** reference count reaches 0. |
| 783 | ** |
| 784 | ** Argument pContext is a pointer to the interpreter structure. |
| 785 | ** |
| 786 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 787 | /* |
| 788 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 789 | |
| 790 | if( nAdd<0 ){ |
| 791 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 792 | |
| 793 | 1_PLATFORMc.), these functions determine the number of bytes |
| 794 | ** of the input consumed by the construct. For example: |
| 795 | ** |
| 796 | ** int nByte; |
| 797 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 798 | ** |
| 799 | ** results in variable nByte being set to 11. Or, |
| 800 | ** |
| 801 | ** thNextVarname(interp,te being set to 2. |
| 802 | */ |
| 803 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 804 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 805 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 806 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 807 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 808 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 809 | switch (c) { |
| 810 | case '0': return 0; |
| 811 | case '1': return 1; |
| 812 | case '2': return 2; |
| 813 | case '3': return 3; |
| 814 | case '4': return 4; |
| 815 | case '5': return 5; |
| 816 | case '6': return 6; |
| 817 | case '7': return 7; |
| 818 | case '8': return 8; |
| 819 | case '9': return 9; |
| 820 | case 'a': case 'A': return 10; |
| 821 | case 'b': case 'B': return 11; |
| 822 | case 'c': case 'C': return 12; |
| 823 | case 'd': case 'D': return 13; |
| 824 | case 'e': case 'E': return 14; |
| 825 | case 'f': case 'F': return 15; |
| 826 | } |
| 827 | return -1; |
| 828 | } |
| 829 | |
| 830 | /* |
| 831 | ** Argument pEntry points to an entry in a stack frame hash table |
| 832 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 833 | ** structure that the entry points to. Free the Th_Variable if its |
| 834 | ** reference count reaches 0. |
| 835 | ** |
| 836 | ** Argument pContext is a pointer to the interpreter structure. |
| 837 | ** |
| 838 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 839 | /* |
| 840 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 841 | |
| 842 | if( nAdd<0 ){ |
| 843 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 844 | |
| 845 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 846 | |
| 847 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 848 | static void thPopFrame(Th_Interp*); |
| 849 | |
| 850 | static int thFreeVariable(Th_HashEntry*, void*); |
| 851 | sg set to 11. Or, |
| 852 | ** |
| 853 | ** int nByte; |
| 854 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 855 | ** |
| 856 | ** results in variable nByte being set to 11. Or, |
| 857 | ** |
| 858 | ** thNextVarname(interp,te being set to 2. |
| 859 | */ |
| 860 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 861 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 862 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 863 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 864 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 865 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 866 | switch (c) { |
| 867 | case '0': return 0; |
| 868 | case '1': return 1; |
| 869 | case '2': return 2; |
| 870 | case '3': return 3; |
| 871 | case '4': return 4; |
| 872 | case '5': return 5; |
| 873 | case '6': return 6; |
| 874 | case '7': return 7; |
| 875 | case '8': return 8; |
| 876 | case '9': return 9; |
| 877 | case 'a': case 'A': return 10; |
| 878 | case 'b': case 'B': return 11; |
| 879 | case 'c': case 'C': return 12; |
| 880 | case 'd': case 'D': return 13; |
| 881 | case 'e': case 'E': return 14; |
| 882 | case 'f': case 'F': return 15; |
| 883 | } |
| 884 | return -1; |
| 885 | } |
| 886 | |
| 887 | /* |
| 888 | ** Argument pEntry points to an entry in a stack frame hash table |
| 889 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 890 | ** structure that the entry points to. Free the Th_Variable if its |
| 891 | ** reference count reaches 0. |
| 892 | ** |
| 893 | ** Argument pContext is a pointer to the interpreter structure. |
| 894 | ** |
| 895 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 896 | /* |
| 897 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 898 | |
| 899 | if( nAdd<0 ){ |
| 900 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 901 | |
| 902 | 1_PLATFORMc.), these functions determine the number of bytes |
| 903 | ** of the input consumed by the construct. For example: |
| 904 | ** |
| 905 | ** int nByte; |
| 906 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 907 | ** |
| 908 | ** results in variable nByte being set to 11. Or, |
| 909 | ** |
| 910 | ** thNextVarname(interp,te being set to 2. |
| 911 | */ |
| 912 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 913 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 914 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 915 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 916 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 917 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 918 | switch (c) { |
| 919 | case '0': return 0; |
| 920 | case '1': return 1; |
| 921 | case '2': return 2; |
| 922 | && iLeft>0 |
| 923 | iRight=jj+1 |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindig |
M
src/th.c
+1
-445
| --- a/src/th.c | ||
| +++ b/src/th.c | ||
| @@ -476,448 +476,4 @@ | ||
| 476 | 476 | hexdig i += 2; |
| 477 | 477 | i += 2; |
| 478 | 478 | base = 2; |
| 479 | - bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return | |
| 480 | -**tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ | |
| 481 | - nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); | |
| 482 | - | |
| 483 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 484 | -static void thPopFrame(Th_Interp*); | |
| 485 | - | |
| 486 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 487 | -sgto 11. Or, | |
| 488 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 489 | -*/ | |
| 490 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 491 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 492 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 493 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 494 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 495 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 496 | - switch (c) { | |
| 497 | - case '0': return 0; | |
| 498 | - case '1': return 1; | |
| 499 | - case '2': return 2; | |
| 500 | - case '3': return 3; | |
| 501 | - case '4': return 4; | |
| 502 | - case '5': return 5; | |
| 503 | - case '6': reH core. This file ce TH dOfLine(const char *, int); | |
| 504 | - | |
| 505 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 506 | -static void thPopFrame(Th_Interp*); | |
| 507 | - | |
| 508 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 509 | -sgto 11. Or, | |
| 510 | -**Iter", 18, Th_Variablebeing set to 2. | |
| 511 | -*/ | |
| 512 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 513 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 514 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 515 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 516 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 517 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 518 | - switch (c) { | |
| 519 | - case '0': return 0; | |
| 520 | - case '1': return 1; | |
| 521 | - case '2': return 2; | |
| 522 | - case '3': return 3; | |
| 523 | - case '4': return 4; | |
| 524 | - case '5': return 5; | |
| 525 | - case '6': return 6; | |
| 526 | - case '7': return 7; | |
| 527 | - case '8': return 8; | |
| 528 | - case '9': return 9; | |
| 529 | - case 'a': case 'A': return 10; | |
| 530 | - case 'b': case 'B': return 11; | |
| 531 | - case 'c': case 'C': return 12; | |
| 532 | - case 'd': case 'D': return 13; | |
| 533 | - case 'e': case 'E': return 14; | |
| 534 | - case 'f': case 'F': return 15; | |
| 535 | - } | |
| 536 | - return -1; | |
| 537 | -} | |
| 538 | - | |
| 539 | -/* | |
| 540 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 541 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 542 | -** structure that the entry points to. Free the Th_Variable if its | |
| 543 | -** reference count reaches 0. | |
| 544 | -** | |
| 545 | -** Argument pContext is a pointer to the interpreter structure. | |
| 546 | -** | |
| 547 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 548 | -/* | |
| 549 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 550 | - | |
| 551 | - if( nAdd<0 ){ | |
| 552 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 553 | - | |
| 554 | - 1_PLATFORM | |
| 555 | -**tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 556 | - | |
| 557 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 558 | -static void thPopFrame(Th_Interp*); | |
| 559 | - | |
| 560 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 561 | -sg set to 11. Or, | |
| 562 | -** | |
| 563 | -** int nByte; | |
| 564 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 565 | -** | |
| 566 | -** results in variable nByte being set to 11. Or, | |
| 567 | -** | |
| 568 | -** thNextVarname(interp,te being set to 2. | |
| 569 | -*/ | |
| 570 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 571 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 572 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 573 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 574 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 575 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 576 | - switch (c) { | |
| 577 | - case '0': return 0; | |
| 578 | - case '1': return 1; | |
| 579 | - case '2': return 2; | |
| 580 | - case '3': return 3; | |
| 581 | - case '4': return 4; | |
| 582 | - case '5': return 5; | |
| 583 | - case '6': return 6; | |
| 584 | - case '7': return 7; | |
| 585 | - case '8': return 8; | |
| 586 | - case '9': return 9; | |
| 587 | - case 'a': case 'A': return 10; | |
| 588 | - case 'b': case 'B': return 11; | |
| 589 | - case 'c': case 'C': return 12; | |
| 590 | - case 'd': case 'D': return 13; | |
| 591 | - case 'e': case 'E': return 14; | |
| 592 | - case 'f': case 'F': return 15; | |
| 593 | - } | |
| 594 | - return -1; | |
| 595 | -} | |
| 596 | - | |
| 597 | -/* | |
| 598 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 599 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 600 | -** structure that the entry points to. Free the Th_Variable if its | |
| 601 | -** reference count reaches 0. | |
| 602 | -** | |
| 603 | -** Argument pContext is a pointer to the interpreter structure. | |
| 604 | -** | |
| 605 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 606 | -/* | |
| 607 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 608 | - | |
| 609 | - if( nAdd<0 ){ | |
| 610 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 611 | - | |
| 612 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 613 | -** of the input consumed by the construct. For example: | |
| 614 | -** | |
| 615 | -** int nByte; | |
| 616 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 617 | -** | |
| 618 | -** results in variable nByte being set to 11. Or, | |
| 619 | -** | |
| 620 | -** thNextVarname(interp,te being set to 2. | |
| 621 | -*/ | |
| 622 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 623 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 624 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 625 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 626 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 627 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 628 | - switch (c) { | |
| 629 | - case '0': return 0; | |
| 630 | - case '1': return 1; | |
| 631 | - case '2': return 2; | |
| 632 | - case '3': return 3; | |
| 633 | - case '4': return 4; | |
| 634 | - case '5': return 5; | |
| 635 | - case '6': return 6; | |
| 636 | - case '7': return 7; | |
| 637 | - case '8': return 8; | |
| 638 | - case '9': return 9; | |
| 639 | - case 'a': case 'A': return 10; | |
| 640 | - case 'b': case 'B': return 11; | |
| 641 | - case 'c': case 'C': return 12; | |
| 642 | - case 'd': case 'D': return 13; | |
| 643 | - case 'e': case 'E': return 14; | |
| 644 | - case 'f': case 'F': return 15; | |
| 645 | - } | |
| 646 | - return -1; | |
| 647 | -} | |
| 648 | - | |
| 649 | -/* | |
| 650 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 651 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 652 | -** structure that the entry points to. Free the Th_Variable if its | |
| 653 | -** reference count reaches 0. | |
| 654 | -** | |
| 655 | -** Argument pContext is a pointer to the interpreter structure. | |
| 656 | -** | |
| 657 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 658 | -/* | |
| 659 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 660 | - | |
| 661 | - if( nAdd<0 ){ | |
| 662 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 663 | - | |
| 664 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 665 | - | |
| 666 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 667 | -static void thPopFrame(Th_Interp*); | |
| 668 | - | |
| 669 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 670 | -sg set to 11. Or, | |
| 671 | -** | |
| 672 | -** int nByte; | |
| 673 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 674 | -** | |
| 675 | -** results in variable nByte being set to 11. Or, | |
| 676 | -** | |
| 677 | -** thNextVarname(interp,te being set to 2. | |
| 678 | -*/ | |
| 679 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 680 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 681 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 682 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 683 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 684 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 685 | - switch (c) { | |
| 686 | - case '0': return 0; | |
| 687 | - case '1': return 1; | |
| 688 | - case '2': return 2; | |
| 689 | - case '3': return 3; | |
| 690 | - case '4': return 4; | |
| 691 | - case '5': return 5; | |
| 692 | - case '6': return 6; | |
| 693 | - case '7': return 7; | |
| 694 | - case '8': return 8; | |
| 695 | - case '9': return 9; | |
| 696 | - case 'a': case 'A': return 10; | |
| 697 | - case 'b': case 'B': return 11; | |
| 698 | - case 'c': case 'C': return 12; | |
| 699 | - case 'd': case 'D': return 13; | |
| 700 | - case 'e': case 'E': return 14; | |
| 701 | - case 'f': case 'F': return 15; | |
| 702 | - } | |
| 703 | - return -1; | |
| 704 | -} | |
| 705 | - | |
| 706 | -/* | |
| 707 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 708 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 709 | -** structure that the entry points to. Free the Th_Variable if its | |
| 710 | -** reference count reaches 0. | |
| 711 | -** | |
| 712 | -** Argument pContext is a pointer to the interpreter structure. | |
| 713 | -** | |
| 714 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 715 | -/* | |
| 716 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 717 | - | |
| 718 | - if( nAdd<0 ){ | |
| 719 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 720 | - | |
| 721 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 722 | -** of the input consumed by the construct. For example: | |
| 723 | -** | |
| 724 | -** int nByte; | |
| 725 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 726 | -** | |
| 727 | -** results in variable nByte being set to 11. Or, | |
| 728 | -** | |
| 729 | -** thNextVarname(interp,te being set to 2. | |
| 730 | -*/ | |
| 731 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 732 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 733 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 734 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 735 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 736 | -** like "\xFF" oThis file ce TH dOfLine(const char *, int); | |
| 737 | - | |
| 738 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 739 | -static void thPopFrame(Th_Interp*); | |
| 740 | - | |
| 741 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 742 | -sg set to 11. Or, | |
| 743 | -** | |
| 744 | -** int nByte; | |
| 745 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 746 | -** | |
| 747 | -** results in variable nByte being set to 11. Or, | |
| 748 | -** | |
| 749 | -** thNextVarname(interp,te being set to 2. | |
| 750 | -*/ | |
| 751 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 752 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 753 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 754 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 755 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 756 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 757 | - switch (c) { | |
| 758 | - case '0': return 0; | |
| 759 | - case '1': return 1; | |
| 760 | - case '2': return 2; | |
| 761 | - case '3': return 3; | |
| 762 | - case '4': return 4; | |
| 763 | - case '5': return 5; | |
| 764 | - case '6': return 6; | |
| 765 | - case '7': return 7; | |
| 766 | - case '8': return 8; | |
| 767 | - case '9': return 9; | |
| 768 | - case 'a': case 'A': return 10; | |
| 769 | - case 'b': case 'B': return 11; | |
| 770 | - case 'c': case 'C': return 12; | |
| 771 | - case 'd': case 'D': return 13; | |
| 772 | - case 'e': case 'E': return 14; | |
| 773 | - case 'f': case 'F': return 15; | |
| 774 | - } | |
| 775 | - return -1; | |
| 776 | -} | |
| 777 | - | |
| 778 | -/* | |
| 779 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 780 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 781 | -** structure that the entry points to. Free the Th_Variable if its | |
| 782 | -** reference count reaches 0. | |
| 783 | -** | |
| 784 | -** Argument pContext is a pointer to the interpreter structure. | |
| 785 | -** | |
| 786 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 787 | -/* | |
| 788 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 789 | - | |
| 790 | - if( nAdd<0 ){ | |
| 791 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 792 | - | |
| 793 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 794 | -** of the input consumed by the construct. For example: | |
| 795 | -** | |
| 796 | -** int nByte; | |
| 797 | -** thNextCommand(interp, "[expr $a+1] $nIter&nByte); | |
| 798 | -** | |
| 799 | -** results in variable nByte being set to 11. Or, | |
| 800 | -** | |
| 801 | -** thNextVarname(interp,te being set to 2. | |
| 802 | -*/ | |
| 803 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 804 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 805 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 806 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 807 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 808 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 809 | - switch (c) { | |
| 810 | - case '0': return 0; | |
| 811 | - case '1': return 1; | |
| 812 | - case '2': return 2; | |
| 813 | - case '3': return 3; | |
| 814 | - case '4': return 4; | |
| 815 | - case '5': return 5; | |
| 816 | - case '6': return 6; | |
| 817 | - case '7': return 7; | |
| 818 | - case '8': return 8; | |
| 819 | - case '9': return 9; | |
| 820 | - case 'a': case 'A': return 10; | |
| 821 | - case 'b': case 'B': return 11; | |
| 822 | - case 'c': case 'C': return 12; | |
| 823 | - case 'd': case 'D': return 13; | |
| 824 | - case 'e': case 'E': return 14; | |
| 825 | - case 'f': case 'F': return 15; | |
| 826 | - } | |
| 827 | - return -1; | |
| 828 | -} | |
| 829 | - | |
| 830 | -/* | |
| 831 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 832 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 833 | -** structure that the entry points to. Free the Th_Variable if its | |
| 834 | -** reference count reaches 0. | |
| 835 | -** | |
| 836 | -** Argument pContext is a pointer to the interpreter structure. | |
| 837 | -** | |
| 838 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 839 | -/* | |
| 840 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 841 | - | |
| 842 | - if( nAdd<0 ){ | |
| 843 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 844 | - | |
| 845 | - 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); | |
| 846 | - | |
| 847 | -static int thPushFrame(Th_Interp*, Th_Frame*); | |
| 848 | -static void thPopFrame(Th_Interp*); | |
| 849 | - | |
| 850 | -static int thFreeVariable(Th_HashEntry*, void*); | |
| 851 | -sg set to 11. Or, | |
| 852 | -** | |
| 853 | -** int nByte; | |
| 854 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 855 | -** | |
| 856 | -** results in variable nByte being set to 11. Or, | |
| 857 | -** | |
| 858 | -** thNextVarname(interp,te being set to 2. | |
| 859 | -*/ | |
| 860 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 861 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 862 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 863 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 864 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 865 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 866 | - switch (c) { | |
| 867 | - case '0': return 0; | |
| 868 | - case '1': return 1; | |
| 869 | - case '2': return 2; | |
| 870 | - case '3': return 3; | |
| 871 | - case '4': return 4; | |
| 872 | - case '5': return 5; | |
| 873 | - case '6': return 6; | |
| 874 | - case '7': return 7; | |
| 875 | - case '8': return 8; | |
| 876 | - case '9': return 9; | |
| 877 | - case 'a': case 'A': return 10; | |
| 878 | - case 'b': case 'B': return 11; | |
| 879 | - case 'c': case 'C': return 12; | |
| 880 | - case 'd': case 'D': return 13; | |
| 881 | - case 'e': case 'E': return 14; | |
| 882 | - case 'f': case 'F': return 15; | |
| 883 | - } | |
| 884 | - return -1; | |
| 885 | -} | |
| 886 | - | |
| 887 | -/* | |
| 888 | -** Argument pEntry points to an entry in a stack frame hash table | |
| 889 | -** (Th_Frame.paVar). Decrement the reference count of the Th_Variable | |
| 890 | -** structure that the entry points to. Free the Th_Variable if its | |
| 891 | -** reference count reaches 0. | |
| 892 | -** | |
| 893 | -** Argument pContext is a pointer to the interpreter structure. | |
| 894 | -** | |
| 895 | -** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe | |
| 896 | -/* | |
| 897 | -** The imple thSubstCommand(Th_Interp*, conReq; | |
| 898 | - | |
| 899 | - if( nAdd<0 ){ | |
| 900 | - nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, | |
| 901 | - | |
| 902 | - 1_PLATFORMc.), these functions determine the number of bytes | |
| 903 | -** of the input consumed by the construct. For example: | |
| 904 | -** | |
| 905 | -** int nByte; | |
| 906 | -** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); | |
| 907 | -** | |
| 908 | -** results in variable nByte being set to 11. Or, | |
| 909 | -** | |
| 910 | -** thNextVarname(interp,te being set to 2. | |
| 911 | -*/ | |
| 912 | -static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); | |
| 913 | -static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); | |
| 914 | -static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); | |
| 915 | -static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); | |
| 916 | -static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence | |
| 917 | -** like "\xFF" or a variable reference like "${varname}", pegit(char c){ | |
| 918 | - switch (c) { | |
| 919 | - case '0': return 0; | |
| 920 | - case '1': return 1; | |
| 921 | - case '2': return 2; | |
| 922 | - && iLeft>0 | |
| 923 | - iRight=jj+1 | |
| 479 | + bindig |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindigOP_G=="OP_NEeq"OP_SNE&&"OP_SUBTRACT,<", case '3': return |
| 480 | **tation of the TH for(j=0; aOperator[j].zOpEscape (Th_Interp*&& nToken>0 ){ |
| 481 | nOp = th_strlen((const char *)aOperator[j].e TH core. This file ce TH dOfLine(const char *, int); |
| 482 | |
| 483 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 484 | static void thPopFrame(Th_Interp*); |
| 485 | |
| 486 | static int thFreeVariable(Th_HashEntry*, void*); |
| 487 | sgto 11. Or, |
| 488 | **Iter", 18, Th_Variablebeing set to 2. |
| 489 | */ |
| 490 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 491 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 492 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 493 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 494 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 495 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 496 | switch (c) { |
| 497 | case '0': return 0; |
| 498 | case '1': return 1; |
| 499 | case '2': return 2; |
| 500 | case '3': return 3; |
| 501 | case '4': return 4; |
| 502 | case '5': return 5; |
| 503 | case '6': reH core. This file ce TH dOfLine(const char *, int); |
| 504 | |
| 505 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 506 | static void thPopFrame(Th_Interp*); |
| 507 | |
| 508 | static int thFreeVariable(Th_HashEntry*, void*); |
| 509 | sgto 11. Or, |
| 510 | **Iter", 18, Th_Variablebeing set to 2. |
| 511 | */ |
| 512 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 513 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 514 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 515 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 516 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 517 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 518 | switch (c) { |
| 519 | case '0': return 0; |
| 520 | case '1': return 1; |
| 521 | case '2': return 2; |
| 522 | case '3': return 3; |
| 523 | case '4': return 4; |
| 524 | case '5': return 5; |
| 525 | case '6': return 6; |
| 526 | case '7': return 7; |
| 527 | case '8': return 8; |
| 528 | case '9': return 9; |
| 529 | case 'a': case 'A': return 10; |
| 530 | case 'b': case 'B': return 11; |
| 531 | case 'c': case 'C': return 12; |
| 532 | case 'd': case 'D': return 13; |
| 533 | case 'e': case 'E': return 14; |
| 534 | case 'f': case 'F': return 15; |
| 535 | } |
| 536 | return -1; |
| 537 | } |
| 538 | |
| 539 | /* |
| 540 | ** Argument pEntry points to an entry in a stack frame hash table |
| 541 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 542 | ** structure that the entry points to. Free the Th_Variable if its |
| 543 | ** reference count reaches 0. |
| 544 | ** |
| 545 | ** Argument pContext is a pointer to the interpreter structure. |
| 546 | ** |
| 547 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 548 | /* |
| 549 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 550 | |
| 551 | if( nAdd<0 ){ |
| 552 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 553 | |
| 554 | 1_PLATFORM |
| 555 | **tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 556 | |
| 557 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 558 | static void thPopFrame(Th_Interp*); |
| 559 | |
| 560 | static int thFreeVariable(Th_HashEntry*, void*); |
| 561 | sg set to 11. Or, |
| 562 | ** |
| 563 | ** int nByte; |
| 564 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 565 | ** |
| 566 | ** results in variable nByte being set to 11. Or, |
| 567 | ** |
| 568 | ** thNextVarname(interp,te being set to 2. |
| 569 | */ |
| 570 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 571 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 572 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 573 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 574 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 575 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 576 | switch (c) { |
| 577 | case '0': return 0; |
| 578 | case '1': return 1; |
| 579 | case '2': return 2; |
| 580 | case '3': return 3; |
| 581 | case '4': return 4; |
| 582 | case '5': return 5; |
| 583 | case '6': return 6; |
| 584 | case '7': return 7; |
| 585 | case '8': return 8; |
| 586 | case '9': return 9; |
| 587 | case 'a': case 'A': return 10; |
| 588 | case 'b': case 'B': return 11; |
| 589 | case 'c': case 'C': return 12; |
| 590 | case 'd': case 'D': return 13; |
| 591 | case 'e': case 'E': return 14; |
| 592 | case 'f': case 'F': return 15; |
| 593 | } |
| 594 | return -1; |
| 595 | } |
| 596 | |
| 597 | /* |
| 598 | ** Argument pEntry points to an entry in a stack frame hash table |
| 599 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 600 | ** structure that the entry points to. Free the Th_Variable if its |
| 601 | ** reference count reaches 0. |
| 602 | ** |
| 603 | ** Argument pContext is a pointer to the interpreter structure. |
| 604 | ** |
| 605 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 606 | /* |
| 607 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 608 | |
| 609 | if( nAdd<0 ){ |
| 610 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 611 | |
| 612 | 1_PLATFORMc.), these functions determine the number of bytes |
| 613 | ** of the input consumed by the construct. For example: |
| 614 | ** |
| 615 | ** int nByte; |
| 616 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 617 | ** |
| 618 | ** results in variable nByte being set to 11. Or, |
| 619 | ** |
| 620 | ** thNextVarname(interp,te being set to 2. |
| 621 | */ |
| 622 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 623 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 624 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 625 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 626 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 627 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 628 | switch (c) { |
| 629 | case '0': return 0; |
| 630 | case '1': return 1; |
| 631 | case '2': return 2; |
| 632 | case '3': return 3; |
| 633 | case '4': return 4; |
| 634 | case '5': return 5; |
| 635 | case '6': return 6; |
| 636 | case '7': return 7; |
| 637 | case '8': return 8; |
| 638 | case '9': return 9; |
| 639 | case 'a': case 'A': return 10; |
| 640 | case 'b': case 'B': return 11; |
| 641 | case 'c': case 'C': return 12; |
| 642 | case 'd': case 'D': return 13; |
| 643 | case 'e': case 'E': return 14; |
| 644 | case 'f': case 'F': return 15; |
| 645 | } |
| 646 | return -1; |
| 647 | } |
| 648 | |
| 649 | /* |
| 650 | ** Argument pEntry points to an entry in a stack frame hash table |
| 651 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 652 | ** structure that the entry points to. Free the Th_Variable if its |
| 653 | ** reference count reaches 0. |
| 654 | ** |
| 655 | ** Argument pContext is a pointer to the interpreter structure. |
| 656 | ** |
| 657 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 658 | /* |
| 659 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 660 | |
| 661 | if( nAdd<0 ){ |
| 662 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 663 | |
| 664 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 665 | |
| 666 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 667 | static void thPopFrame(Th_Interp*); |
| 668 | |
| 669 | static int thFreeVariable(Th_HashEntry*, void*); |
| 670 | sg set to 11. Or, |
| 671 | ** |
| 672 | ** int nByte; |
| 673 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 674 | ** |
| 675 | ** results in variable nByte being set to 11. Or, |
| 676 | ** |
| 677 | ** thNextVarname(interp,te being set to 2. |
| 678 | */ |
| 679 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 680 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 681 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 682 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 683 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 684 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 685 | switch (c) { |
| 686 | case '0': return 0; |
| 687 | case '1': return 1; |
| 688 | case '2': return 2; |
| 689 | case '3': return 3; |
| 690 | case '4': return 4; |
| 691 | case '5': return 5; |
| 692 | case '6': return 6; |
| 693 | case '7': return 7; |
| 694 | case '8': return 8; |
| 695 | case '9': return 9; |
| 696 | case 'a': case 'A': return 10; |
| 697 | case 'b': case 'B': return 11; |
| 698 | case 'c': case 'C': return 12; |
| 699 | case 'd': case 'D': return 13; |
| 700 | case 'e': case 'E': return 14; |
| 701 | case 'f': case 'F': return 15; |
| 702 | } |
| 703 | return -1; |
| 704 | } |
| 705 | |
| 706 | /* |
| 707 | ** Argument pEntry points to an entry in a stack frame hash table |
| 708 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 709 | ** structure that the entry points to. Free the Th_Variable if its |
| 710 | ** reference count reaches 0. |
| 711 | ** |
| 712 | ** Argument pContext is a pointer to the interpreter structure. |
| 713 | ** |
| 714 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 715 | /* |
| 716 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 717 | |
| 718 | if( nAdd<0 ){ |
| 719 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 720 | |
| 721 | 1_PLATFORMc.), these functions determine the number of bytes |
| 722 | ** of the input consumed by the construct. For example: |
| 723 | ** |
| 724 | ** int nByte; |
| 725 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 726 | ** |
| 727 | ** results in variable nByte being set to 11. Or, |
| 728 | ** |
| 729 | ** thNextVarname(interp,te being set to 2. |
| 730 | */ |
| 731 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 732 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 733 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 734 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 735 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 736 | ** like "\xFF" oThis file ce TH dOfLine(const char *, int); |
| 737 | |
| 738 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 739 | static void thPopFrame(Th_Interp*); |
| 740 | |
| 741 | static int thFreeVariable(Th_HashEntry*, void*); |
| 742 | sg set to 11. Or, |
| 743 | ** |
| 744 | ** int nByte; |
| 745 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 746 | ** |
| 747 | ** results in variable nByte being set to 11. Or, |
| 748 | ** |
| 749 | ** thNextVarname(interp,te being set to 2. |
| 750 | */ |
| 751 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 752 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 753 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 754 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 755 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 756 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 757 | switch (c) { |
| 758 | case '0': return 0; |
| 759 | case '1': return 1; |
| 760 | case '2': return 2; |
| 761 | case '3': return 3; |
| 762 | case '4': return 4; |
| 763 | case '5': return 5; |
| 764 | case '6': return 6; |
| 765 | case '7': return 7; |
| 766 | case '8': return 8; |
| 767 | case '9': return 9; |
| 768 | case 'a': case 'A': return 10; |
| 769 | case 'b': case 'B': return 11; |
| 770 | case 'c': case 'C': return 12; |
| 771 | case 'd': case 'D': return 13; |
| 772 | case 'e': case 'E': return 14; |
| 773 | case 'f': case 'F': return 15; |
| 774 | } |
| 775 | return -1; |
| 776 | } |
| 777 | |
| 778 | /* |
| 779 | ** Argument pEntry points to an entry in a stack frame hash table |
| 780 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 781 | ** structure that the entry points to. Free the Th_Variable if its |
| 782 | ** reference count reaches 0. |
| 783 | ** |
| 784 | ** Argument pContext is a pointer to the interpreter structure. |
| 785 | ** |
| 786 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 787 | /* |
| 788 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 789 | |
| 790 | if( nAdd<0 ){ |
| 791 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 792 | |
| 793 | 1_PLATFORMc.), these functions determine the number of bytes |
| 794 | ** of the input consumed by the construct. For example: |
| 795 | ** |
| 796 | ** int nByte; |
| 797 | ** thNextCommand(interp, "[expr $a+1] $nIter&nByte); |
| 798 | ** |
| 799 | ** results in variable nByte being set to 11. Or, |
| 800 | ** |
| 801 | ** thNextVarname(interp,te being set to 2. |
| 802 | */ |
| 803 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 804 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 805 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 806 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 807 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 808 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 809 | switch (c) { |
| 810 | case '0': return 0; |
| 811 | case '1': return 1; |
| 812 | case '2': return 2; |
| 813 | case '3': return 3; |
| 814 | case '4': return 4; |
| 815 | case '5': return 5; |
| 816 | case '6': return 6; |
| 817 | case '7': return 7; |
| 818 | case '8': return 8; |
| 819 | case '9': return 9; |
| 820 | case 'a': case 'A': return 10; |
| 821 | case 'b': case 'B': return 11; |
| 822 | case 'c': case 'C': return 12; |
| 823 | case 'd': case 'D': return 13; |
| 824 | case 'e': case 'E': return 14; |
| 825 | case 'f': case 'F': return 15; |
| 826 | } |
| 827 | return -1; |
| 828 | } |
| 829 | |
| 830 | /* |
| 831 | ** Argument pEntry points to an entry in a stack frame hash table |
| 832 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 833 | ** structure that the entry points to. Free the Th_Variable if its |
| 834 | ** reference count reaches 0. |
| 835 | ** |
| 836 | ** Argument pContext is a pointer to the interpreter structure. |
| 837 | ** |
| 838 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 839 | /* |
| 840 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 841 | |
| 842 | if( nAdd<0 ){ |
| 843 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 844 | |
| 845 | 11Delete an*tation of the TH core. This file ce TH dOfLine(const char *, int); |
| 846 | |
| 847 | static int thPushFrame(Th_Interp*, Th_Frame*); |
| 848 | static void thPopFrame(Th_Interp*); |
| 849 | |
| 850 | static int thFreeVariable(Th_HashEntry*, void*); |
| 851 | sg set to 11. Or, |
| 852 | ** |
| 853 | ** int nByte; |
| 854 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 855 | ** |
| 856 | ** results in variable nByte being set to 11. Or, |
| 857 | ** |
| 858 | ** thNextVarname(interp,te being set to 2. |
| 859 | */ |
| 860 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 861 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 862 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 863 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 864 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 865 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 866 | switch (c) { |
| 867 | case '0': return 0; |
| 868 | case '1': return 1; |
| 869 | case '2': return 2; |
| 870 | case '3': return 3; |
| 871 | case '4': return 4; |
| 872 | case '5': return 5; |
| 873 | case '6': return 6; |
| 874 | case '7': return 7; |
| 875 | case '8': return 8; |
| 876 | case '9': return 9; |
| 877 | case 'a': case 'A': return 10; |
| 878 | case 'b': case 'B': return 11; |
| 879 | case 'c': case 'C': return 12; |
| 880 | case 'd': case 'D': return 13; |
| 881 | case 'e': case 'E': return 14; |
| 882 | case 'f': case 'F': return 15; |
| 883 | } |
| 884 | return -1; |
| 885 | } |
| 886 | |
| 887 | /* |
| 888 | ** Argument pEntry points to an entry in a stack frame hash table |
| 889 | ** (Th_Frame.paVar). Decrement the reference count of the Th_Variable |
| 890 | ** structure that the entry points to. Free the Th_Variable if its |
| 891 | ** reference count reaches 0. |
| 892 | ** |
| 893 | ** Argument pContext is a pointer to the interpreter structure. |
| 894 | ** |
| 895 | ** Returns non-zero if the Th_Variable was actually freechar *z = pBuffe |
| 896 | /* |
| 897 | ** The imple thSubstCommand(Th_Interp*, conReq; |
| 898 | |
| 899 | if( nAdd<0 ){ |
| 900 | nAdd = th char **pzList, int *pnList char **pzList, int *pnList_Interp*, const char *z, |
| 901 | |
| 902 | 1_PLATFORMc.), these functions determine the number of bytes |
| 903 | ** of the input consumed by the construct. For example: |
| 904 | ** |
| 905 | ** int nByte; |
| 906 | ** thNextCommand(interp, "[expr $a+1] $nIter", 18, &nByte); |
| 907 | ** |
| 908 | ** results in variable nByte being set to 11. Or, |
| 909 | ** |
| 910 | ** thNextVarname(interp,te being set to 2. |
| 911 | */ |
| 912 | static int thNextCommand(Th_Interp*, const char *z, int n, int *pN); |
| 913 | static int thNextEscape (Th_Interp*, const char *z, int n, int *pN); |
| 914 | static int thNextVarname(Th_Interp*, const char *z, int n, int *pN); |
| 915 | static int thNextNumber (Th_Interp*, const char *z, int n, int *pN); |
| 916 | static int thNextInteger (Th_Interp*,evant type (a command enclosed in [], an escape sequence |
| 917 | ** like "\xFF" or a variable reference like "${varname}", pegit(char c){ |
| 918 | switch (c) { |
| 919 | case '0': return 0; |
| 920 | case '1': return 1; |
| 921 | case '2': return 2; |
| 922 | && iLeft>0 |
| 923 | iRight=jj+1 |
| --- a/src/th.c | |
| +++ b/src/th.c | |
| @@ -476,448 +476,4 @@ | |
| 476 | hexdig i += 2; |
| 477 | i += 2; |
| 478 | base = 2; |
| 479 | bindig |
No diff available
No diff available
No diff available
+1
-1
| --- a/src/zip.c | ||
| +++ b/src/zip.c | ||
| @@ -1 +1 @@ | ||
| 1 | -zlib<zlib.h> | |
| 1 | + |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 | zlib<zlib.h> |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 |
+1
-1
| --- a/src/zip.c | ||
| +++ b/src/zip.c | ||
| @@ -1 +1 @@ | ||
| 1 | -zlib<zlib.h> | |
| 1 | + |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 | zlib<zlib.h> |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 |
+1
-1
| --- a/src/zip.c | ||
| +++ b/src/zip.c | ||
| @@ -1 +1 @@ | ||
| 1 | -zlib<zlib.h> | |
| 1 | + |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 | zlib<zlib.h> |
| --- a/src/zip.c | |
| +++ b/src/zip.c | |
| @@ -1 +1 @@ | |
| 1 |
+115
-5
| --- a/test/th1.test | ||
| +++ b/test/th1.test | ||
| @@ -831,7 +831,60 @@ | ||
| 831 | 831 | test th1-header-2run_in_checkout { |
| 832 | 832 | #3run_in_checkout { |
| 833 | 833 | # |
| 834 | -# heckotsn_in_checkopyright7run_in_checkab "") changes. | |
| 834 | +# Copyright7run_in_checkout# | |
| 835 | +# Copyright} | |
| 836 | +} | |
| 837 | +run_in_checkout# | |
| 838 | +# Copyright | |
| 839 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 840 | +# "") changes. | |
| 841 | +# | |
| 842 | +run_in_checkout { | |
| 843 | + | |
| 844 | +markdown{run_in_checkout { | |
| 845 | +oyrun_in_checkout | |
| 846 | +1run_in_checkoutcheckout" | |
| 847 | + } | |
| 848 | +} | |
| 849 | +2run_in_chout {run_in_checkout { | |
| 850 | +oyrun_in_checkout | |
| 851 | +1run_in_checkoutcheckout" | |
| 852 | + } | |
| 853 | +} | |
| 854 | +2run_in_checkout { | |
| 855 | + | |
| 856 | + | |
| 857 | +test th1-header-2run_in_un_in_checkoutcheckout" | |
| 858 | + } | |
| 859 | +} | |
| 860 | +2run_in_checkout { | |
| 861 | + | |
| 862 | + | |
| 863 | +test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". | |
| 864 | +test th1-checkout-heckoutcheckout" | |
| 865 | + } | |
| 866 | +} | |
| 867 | +2run>out { | |
| 868 | +oyrun_in_checkout | |
| 869 | +1run_in_cheeckout {run_in_checkout { | |
| 870 | +oyrun_in_checkout | |
| 871 | +"checkout"; # NOTE: Assumes running "in tree". | |
| 872 | +test th1-checkout-2eckoutcheckout" | |
| 873 | + } | |
| 874 | +} | |
| 875 | +2run>out { | |
| 876 | +oyrun_in_c" | |
| 877 | + } | |
| 878 | +} | |
| 879 | +2run>out { | |
| 880 | +oyrun_in_checkout | |
| 881 | +1run_in_cheeckout {run_in_checkout { | |
| 882 | +otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. | |
| 883 | +#kdownin_checkout { | |
| 884 | +oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { | |
| 885 | +oyrun_checkout { | |
| 886 | +eckout { | |
| 887 | +#3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. | |
| 835 | 888 | #kdownin_checkout { |
| 836 | 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | 890 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | ||
| 1084 | 1137 | } |
| 1085 | 1138 | } |
| 1086 | 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | -o changes. | |
| 1088 | -#3 of this test if thf654fccc4a4d8out {run_in_checkout { | |
| 1089 | -oyrun_in_globalState chein_checkout { | |
| 1090 | -oyrun_in_chec"TH_ERROR: unknow | |
| 1140 | +oyrun_in_checkout | |
| 1141 | +1run_in_checkoutcheckout" | |
| 1142 | + } | |
| 1143 | +} | |
| 1144 | +2run_in_checkout { | |
| 1145 | + | |
| 1146 | + | |
| 1147 | +test th1-header-2run_in_checkout { | |
| 1148 | +#3run_in_checkout { | |
| 1149 | +# | |
| 1150 | +# Copyright7run_in_checkout# | |
| 1151 | +# Copyright} | |
| 1152 | +} | |
| 1153 | +run_in_checkout# | |
| 1154 | +# Copyright | |
| 1155 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1156 | +# "") changes. | |
| 1157 | +# | |
| 1158 | +run_in_checkout { | |
| 1159 | + | |
| 1160 | +markdownin_checkout { | |
| 1161 | +oyrun_in_checkout | |
| 1162 | +1run_in_checkoutcheckout" | |
| 1163 | + } | |
| 1164 | +} | |
| 1165 | +2run_in_checkout { | |
| 1166 | + | |
| 1167 | + | |
| 1168 | +test th1-header-2run_in_checkout { | |
| 1169 | +#3run_in_checkout { | |
| 1170 | +# | |
| 1171 | +# Copyright7run_in_chash foo sha3-512} | |
| 1172 | +test th1-hash-9 {$RESULT eq [appendArgs \ | |
| 1173 | +4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ | |
| 1174 | +0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup | |
| 1175 | +test_cleanup | |
| 1176 | +test_cleanup | |
| 1177 | +dir nyy1hashaso h" | |
| 1178 | +1} iles | |
| 1179 | +# } | |
| 1180 | +run_inrun_in_checkout {run_in_hashascap-yes-$perm } | |
| 1181 | +}in_checkouteckout { | |
| 1182 | +oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { | |
| 1183 | +#3run_in_checkout { | |
| 1184 | +# | |
| 1185 | +# Copyright7run_in_checkout# | |
| 1186 | +# Copdirht} | |
| 1187 | +} | |
| 1188 | +run_in_checkout# | |
| 1189 | +# Copyright | |
| 1190 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1191 | +# "") changes. | |
| 1192 | +# | |
| 1193 | +run_in_checkout { | |
| 1194 | + | |
| 1195 | +markdownbuild-icons/src.gif]} | |
| 1196 | +} | |
| 1197 | +run_in_checkout {ruhash foo} | |
| 1198 | +test th1-hasrun_in_checkout {run_in_checkout { | |
| 1199 | +oyrun_in_checkout | |
| 1200 | +1run_in_cheeckout {run_in_c |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # heckotsn_in_checkopyright7run_in_checkab "") changes. |
| 835 | #kdownin_checkout { |
| 836 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | |
| 1084 | } |
| 1085 | } |
| 1086 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | o changes. |
| 1088 | #3 of this test if thf654fccc4a4d8out {run_in_checkout { |
| 1089 | oyrun_in_globalState chein_checkout { |
| 1090 | oyrun_in_chec"TH_ERROR: unknow |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # Copyright7run_in_checkout# |
| 835 | # Copyright} |
| 836 | } |
| 837 | run_in_checkout# |
| 838 | # Copyright |
| 839 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 840 | # "") changes. |
| 841 | # |
| 842 | run_in_checkout { |
| 843 | |
| 844 | markdown{run_in_checkout { |
| 845 | oyrun_in_checkout |
| 846 | 1run_in_checkoutcheckout" |
| 847 | } |
| 848 | } |
| 849 | 2run_in_chout {run_in_checkout { |
| 850 | oyrun_in_checkout |
| 851 | 1run_in_checkoutcheckout" |
| 852 | } |
| 853 | } |
| 854 | 2run_in_checkout { |
| 855 | |
| 856 | |
| 857 | test th1-header-2run_in_un_in_checkoutcheckout" |
| 858 | } |
| 859 | } |
| 860 | 2run_in_checkout { |
| 861 | |
| 862 | |
| 863 | test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". |
| 864 | test th1-checkout-heckoutcheckout" |
| 865 | } |
| 866 | } |
| 867 | 2run>out { |
| 868 | oyrun_in_checkout |
| 869 | 1run_in_cheeckout {run_in_checkout { |
| 870 | oyrun_in_checkout |
| 871 | "checkout"; # NOTE: Assumes running "in tree". |
| 872 | test th1-checkout-2eckoutcheckout" |
| 873 | } |
| 874 | } |
| 875 | 2run>out { |
| 876 | oyrun_in_c" |
| 877 | } |
| 878 | } |
| 879 | 2run>out { |
| 880 | oyrun_in_checkout |
| 881 | 1run_in_cheeckout {run_in_checkout { |
| 882 | otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. |
| 883 | #kdownin_checkout { |
| 884 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 885 | oyrun_checkout { |
| 886 | eckout { |
| 887 | #3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. |
| 888 | #kdownin_checkout { |
| 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 890 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | |
| 1137 | } |
| 1138 | } |
| 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | oyrun_in_checkout |
| 1141 | 1run_in_checkoutcheckout" |
| 1142 | } |
| 1143 | } |
| 1144 | 2run_in_checkout { |
| 1145 | |
| 1146 | |
| 1147 | test th1-header-2run_in_checkout { |
| 1148 | #3run_in_checkout { |
| 1149 | # |
| 1150 | # Copyright7run_in_checkout# |
| 1151 | # Copyright} |
| 1152 | } |
| 1153 | run_in_checkout# |
| 1154 | # Copyright |
| 1155 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1156 | # "") changes. |
| 1157 | # |
| 1158 | run_in_checkout { |
| 1159 | |
| 1160 | markdownin_checkout { |
| 1161 | oyrun_in_checkout |
| 1162 | 1run_in_checkoutcheckout" |
| 1163 | } |
| 1164 | } |
| 1165 | 2run_in_checkout { |
| 1166 | |
| 1167 | |
| 1168 | test th1-header-2run_in_checkout { |
| 1169 | #3run_in_checkout { |
| 1170 | # |
| 1171 | # Copyright7run_in_chash foo sha3-512} |
| 1172 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1173 | 4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ |
| 1174 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1175 | test_cleanup |
| 1176 | test_cleanup |
| 1177 | dir nyy1hashaso h" |
| 1178 | 1} iles |
| 1179 | # } |
| 1180 | run_inrun_in_checkout {run_in_hashascap-yes-$perm } |
| 1181 | }in_checkouteckout { |
| 1182 | oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { |
| 1183 | #3run_in_checkout { |
| 1184 | # |
| 1185 | # Copyright7run_in_checkout# |
| 1186 | # Copdirht} |
| 1187 | } |
| 1188 | run_in_checkout# |
| 1189 | # Copyright |
| 1190 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1191 | # "") changes. |
| 1192 | # |
| 1193 | run_in_checkout { |
| 1194 | |
| 1195 | markdownbuild-icons/src.gif]} |
| 1196 | } |
| 1197 | run_in_checkout {ruhash foo} |
| 1198 | test th1-hasrun_in_checkout {run_in_checkout { |
| 1199 | oyrun_in_checkout |
| 1200 | 1run_in_cheeckout {run_in_c |
+101
-121
| --- a/test/th1.test | ||
| +++ b/test/th1.test | ||
| @@ -831,7 +831,60 @@ | ||
| 831 | 831 | test th1-header-2run_in_checkout { |
| 832 | 832 | #3run_in_checkout { |
| 833 | 833 | # |
| 834 | -# heckotsn_in_checkopyright7run_in_checkab "") changes. | |
| 834 | +# Copyright7run_in_checkout# | |
| 835 | +# Copyright} | |
| 836 | +} | |
| 837 | +run_in_checkout# | |
| 838 | +# Copyright | |
| 839 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 840 | +# "") changes. | |
| 841 | +# | |
| 842 | +run_in_checkout { | |
| 843 | + | |
| 844 | +markdown{run_in_checkout { | |
| 845 | +oyrun_in_checkout | |
| 846 | +1run_in_checkoutcheckout" | |
| 847 | + } | |
| 848 | +} | |
| 849 | +2run_in_chout {run_in_checkout { | |
| 850 | +oyrun_in_checkout | |
| 851 | +1run_in_checkoutcheckout" | |
| 852 | + } | |
| 853 | +} | |
| 854 | +2run_in_checkout { | |
| 855 | + | |
| 856 | + | |
| 857 | +test th1-header-2run_in_un_in_checkoutcheckout" | |
| 858 | + } | |
| 859 | +} | |
| 860 | +2run_in_checkout { | |
| 861 | + | |
| 862 | + | |
| 863 | +test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". | |
| 864 | +test th1-checkout-heckoutcheckout" | |
| 865 | + } | |
| 866 | +} | |
| 867 | +2run>out { | |
| 868 | +oyrun_in_checkout | |
| 869 | +1run_in_cheeckout {run_in_checkout { | |
| 870 | +oyrun_in_checkout | |
| 871 | +"checkout"; # NOTE: Assumes running "in tree". | |
| 872 | +test th1-checkout-2eckoutcheckout" | |
| 873 | + } | |
| 874 | +} | |
| 875 | +2run>out { | |
| 876 | +oyrun_in_c" | |
| 877 | + } | |
| 878 | +} | |
| 879 | +2run>out { | |
| 880 | +oyrun_in_checkout | |
| 881 | +1run_in_cheeckout {run_in_checkout { | |
| 882 | +otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. | |
| 883 | +#kdownin_checkout { | |
| 884 | +oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { | |
| 885 | +oyrun_checkout { | |
| 886 | +eckout { | |
| 887 | +#3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. | |
| 835 | 888 | #kdownin_checkout { |
| 836 | 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | 890 | oyrun_checkout { |
| @@ -1084,122 +1137,32 @@ | ||
| 1084 | 1137 | } |
| 1085 | 1138 | } |
| 1086 | 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | -o changes. | |
| 1088 | -#3 of this test if thf654fccc4a4d8out {run_in_checkout { | |
| 1089 | -oyrun_in_globalState chein_checkout { | |
| 1090 | -oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { | |
| 1091 | -oyrun_checkout { | |
| 1092 | -oyrkopyright7run_in_checkab "") heckout { | |
| 1093 | -oyrun_in_che\"hash STRING ?ALGORITHM?\"out {run_in_checkout { | |
| 1094 | -oyrun_in_checkout | |
| 1095 | -1run_in_checkoutcheckout" | |
| 1096 | - } | |
| 1097 | -} | |
| 1098 | -2run_i{run_in_checkout { | |
| 1099 | -oyrun_ineckout {run_in_checkout { | |
| 1100 | -oyrun_in_checkout | |
| 1101 | -1run_in_checkoutcheckout" | |
| 1102 | - } | |
| 1103 | -} | |
| 1104 | -2run_in_checkout { | |
| 1105 | - | |
| 1106 | - | |
| 1107 | -test th1-header-2run_in_checkout { | |
| 1108 | -#3run_in_checkout { | |
| 1109 | -# | |
| 1110 | -# Copyright7run_in_checkoutckout { | |
| 1111 | -oyrun_in_che\"tsn_in_checkopyright7run_in_chekopyright7run_in_checkab ckout { | |
| 1112 | - | |
| 1113 | - | |
| 1114 | -test th1-header-2run_in_checkout { | |
| 1115 | -#3run_in_checkout { | |
| 1116 | -# | |
| 1117 | -# Copyright7run_in_checkout# | |
| 1118 | -eckout { | |
| 1119 | -#3run_in_checkout { | |
| 1120 | -# | |
| 1121 | -# Copyright7run_in_checkout# | |
| 1122 | -# Copyright} | |
| 1123 | -} | |
| 1124 | -run_in_checkout# | |
| 1125 | -# Copyright | |
| 1126 | -8run_in_checkout9ODO: Modify the result of this test if the source file (i.echeckout { | |
| 1140 | +oyrun_in_checkout | |
| 1141 | +1run_in_checkoutcheckout" | |
| 1142 | + } | |
| 1143 | +} | |
| 1144 | +2run_in_checkout { | |
| 1145 | + | |
| 1146 | + | |
| 1147 | +test th1-header-2run_in_checkout { | |
| 1148 | +#3run_in_checkout { | |
| 1149 | +# | |
| 1150 | +# Copyright7run_in_checkout# | |
| 1151 | +# Copyright} | |
| 1152 | +} | |
| 1153 | +run_in_checkout# | |
| 1154 | +# Copyright | |
| 1155 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1156 | +# "") changes. | |
| 1157 | +# | |
| 1158 | +run_in_checkout { | |
| 1127 | 1159 | |
| 1128 | 1160 | markdownin_checkout { |
| 1129 | -oyrun_in_chec"TH_ERROR: unknown haorithout {run_in_checkout { | |
| 1130 | -oyrun_in_checkout | |
| 1131 | -1run_in_checkoutcheckout" | |
| 1132 | - }un_iacbd18db4cc2f85cedef654fccc4a4d8out {run_in_checkout { | |
| 1133 | -oyrun_in_ anoncap\ | |
| 1134 | -_checkoutcheckout" | |
| 1135 | - } | |
| 1136 | -} | |
| 1137 | -2run_i{run return checkout\ | |
| 1138 | -out { | |
| 1139 | - | |
| 1140 | - | |
| 1141 | -test th1-header-2run_in_chhascapout { | |
| 1142 | -# | |
| 1143 | -# Copyright7run_in_checkou\ | |
| 1144 | -# Copyrighrun_in_che\ | |
| 1145 | -ult of this test if the source file anycap httpizut# | |
| 1146 | -# Copyright | |
| 1147 | -8run_in_checkout9ODO: Modify the result of this test if the source filtcheckout" | |
| 1148 | - } | |
| 1149 | -} | |
| 1150 | -2runinfo varsthe result of thn_in_out {run_in_checkokout { | |
| 1151 | -oyrun_in_checkout | |
| 1152 | -1run_in_checkoutcheckout" | |
| 1153 | - } | |
| 1154 | -} | |
| 1155 | -2run_in_chout {run_in_cx 1; info varsthe result of thvars-2urce file (i.e. | |
| 1156 | -# "") changes. | |
| 1157 | -# | |
| 1158 | -run_in_checkout { | |
| 1159 | - | |
| 1160 | -markdownbuild-icons/src.gif]} | |
| 1161 | -} | |
| 1162 | -run_in_cchanges. | |
| 1163 | -# | |
| 1164 | -run_in_checkout9ODO: Modify the r3changes. | |
| 1165 | -#3 of this test if thf654fccc4a4d8out {run_in_checkout { | |
| 1166 | -oyrun_in_checkout | |
| 1167 | -1run_in_un_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1168 | -# "") changes. | |
| 1169 | -# | |
| 1170 | -run_in_checkout { | |
| 1171 | - | |
| 1172 | -markdownbuild-icons/src.gif]} | |
| 1173 | -} | |
| 1174 | -run_in_checkout {ruhash foo} | |
| 1175 | -test th1-hasrun_in_checkout {run_int9ODO: Modify the r5 {$RESULT eq "y | |
| 1176 | -# | |
| 1177 | -# Copyright7run_in_chash foo sha3-512} | |
| 1178 | -test th1-hash-9 {$RESULT eq [appendAun_in_checkout { | |
| 1179 | -#3run_in_checkout { | |
| 1180 | -# | |
| 1181 | -# Copyright7run_in_checkout# | |
| 1182 | -# Copdirht} | |
| 1183 | -repo_inits. | |
| 1184 | -# | |
| 1185 | -run_in_checkout { | |
| 1186 | - | |
| 1187 | -markdownbuild-icons/src.gif]} | |
| 1188 | -} | |
| 1189 | -run_in_checkout {ruhash foo} | |
| 1190 | -test th1-hasrun_in_checkodef654fccc4a4d8out {run_in_checkoutsetting tcl" | |
| 1191 | -set th1Tcl [exprash algorithout || [info exisn_in_checkout { | |
| 1192 | - | |
| 1193 | - | |
| 1194 | -test th1-header-2run_ test if the source file (iht7run_in_checkout# | |
| 1195 | -# Copyright} | |
| 1196 | -} | |
| 1197 | -run_in_checkout# | |
| 1198 | -# Copyright | |
| 1199 | -8run_in_checkout9ODO: Mon_in_checkout | |
| 1200 | -1run_in_checkoutcheckout" | |
| 1201 | - } | |
| 1202 | -}string map [list \r\t { | |
| 1161 | +oyrun_in_checkout | |
| 1162 | +1run_in_checkoutcheckout" | |
| 1163 | + } | |
| 1164 | +} | |
| 1165 | +2run_in_checkout { | |
| 1203 | 1166 | |
| 1204 | 1167 | |
| 1205 | 1168 | test th1-header-2run_in_checkout { |
| @@ -1207,14 +1170,31 @@ | ||
| 1207 | 1170 | # |
| 1208 | 1171 | # Copyright7run_in_chash foo sha3-512} |
| 1209 | 1172 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1210 | -4bcastring map [list \r\839d6d7392452a63c83cbebc68e3b7 \ | |
| 1173 | +4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ | |
| 1211 | 1174 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1212 | 1175 | test_cleanup |
| 1213 | 1176 | test_cleanup |
| 1214 | 1177 | dir nyy1hashaso h" |
| 1215 | 1178 | 1} iles |
| 1216 | -# 42run_in_checkout { | |
| 1217 | -#3run_in_checkout { | |
| 1218 | -# | |
| 1219 | -# Copyright7run_in_checkout# | |
| 1220 | -# Co | |
| 1179 | +# } | |
| 1180 | +run_inrun_in_checkout {run_in_hashascap-yes-$perm } | |
| 1181 | +}in_checkouteckout { | |
| 1182 | +oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { | |
| 1183 | +#3run_in_checkout { | |
| 1184 | +# | |
| 1185 | +# Copyright7run_in_checkout# | |
| 1186 | +# Copdirht} | |
| 1187 | +} | |
| 1188 | +run_in_checkout# | |
| 1189 | +# Copyright | |
| 1190 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1191 | +# "") changes. | |
| 1192 | +# | |
| 1193 | +run_in_checkout { | |
| 1194 | + | |
| 1195 | +markdownbuild-icons/src.gif]} | |
| 1196 | +} | |
| 1197 | +run_in_checkout {ruhash foo} | |
| 1198 | +test th1-hasrun_in_checkout {run_in_checkout { | |
| 1199 | +oyrun_in_checkout | |
| 1200 | +1run_in_cheeckout {run_in_c |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # heckotsn_in_checkopyright7run_in_checkab "") changes. |
| 835 | #kdownin_checkout { |
| 836 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | oyrun_checkout { |
| @@ -1084,122 +1137,32 @@ | |
| 1084 | } |
| 1085 | } |
| 1086 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | o changes. |
| 1088 | #3 of this test if thf654fccc4a4d8out {run_in_checkout { |
| 1089 | oyrun_in_globalState chein_checkout { |
| 1090 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 1091 | oyrun_checkout { |
| 1092 | oyrkopyright7run_in_checkab "") heckout { |
| 1093 | oyrun_in_che\"hash STRING ?ALGORITHM?\"out {run_in_checkout { |
| 1094 | oyrun_in_checkout |
| 1095 | 1run_in_checkoutcheckout" |
| 1096 | } |
| 1097 | } |
| 1098 | 2run_i{run_in_checkout { |
| 1099 | oyrun_ineckout {run_in_checkout { |
| 1100 | oyrun_in_checkout |
| 1101 | 1run_in_checkoutcheckout" |
| 1102 | } |
| 1103 | } |
| 1104 | 2run_in_checkout { |
| 1105 | |
| 1106 | |
| 1107 | test th1-header-2run_in_checkout { |
| 1108 | #3run_in_checkout { |
| 1109 | # |
| 1110 | # Copyright7run_in_checkoutckout { |
| 1111 | oyrun_in_che\"tsn_in_checkopyright7run_in_chekopyright7run_in_checkab ckout { |
| 1112 | |
| 1113 | |
| 1114 | test th1-header-2run_in_checkout { |
| 1115 | #3run_in_checkout { |
| 1116 | # |
| 1117 | # Copyright7run_in_checkout# |
| 1118 | eckout { |
| 1119 | #3run_in_checkout { |
| 1120 | # |
| 1121 | # Copyright7run_in_checkout# |
| 1122 | # Copyright} |
| 1123 | } |
| 1124 | run_in_checkout# |
| 1125 | # Copyright |
| 1126 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.echeckout { |
| 1127 | |
| 1128 | markdownin_checkout { |
| 1129 | oyrun_in_chec"TH_ERROR: unknown haorithout {run_in_checkout { |
| 1130 | oyrun_in_checkout |
| 1131 | 1run_in_checkoutcheckout" |
| 1132 | }un_iacbd18db4cc2f85cedef654fccc4a4d8out {run_in_checkout { |
| 1133 | oyrun_in_ anoncap\ |
| 1134 | _checkoutcheckout" |
| 1135 | } |
| 1136 | } |
| 1137 | 2run_i{run return checkout\ |
| 1138 | out { |
| 1139 | |
| 1140 | |
| 1141 | test th1-header-2run_in_chhascapout { |
| 1142 | # |
| 1143 | # Copyright7run_in_checkou\ |
| 1144 | # Copyrighrun_in_che\ |
| 1145 | ult of this test if the source file anycap httpizut# |
| 1146 | # Copyright |
| 1147 | 8run_in_checkout9ODO: Modify the result of this test if the source filtcheckout" |
| 1148 | } |
| 1149 | } |
| 1150 | 2runinfo varsthe result of thn_in_out {run_in_checkokout { |
| 1151 | oyrun_in_checkout |
| 1152 | 1run_in_checkoutcheckout" |
| 1153 | } |
| 1154 | } |
| 1155 | 2run_in_chout {run_in_cx 1; info varsthe result of thvars-2urce file (i.e. |
| 1156 | # "") changes. |
| 1157 | # |
| 1158 | run_in_checkout { |
| 1159 | |
| 1160 | markdownbuild-icons/src.gif]} |
| 1161 | } |
| 1162 | run_in_cchanges. |
| 1163 | # |
| 1164 | run_in_checkout9ODO: Modify the r3changes. |
| 1165 | #3 of this test if thf654fccc4a4d8out {run_in_checkout { |
| 1166 | oyrun_in_checkout |
| 1167 | 1run_in_un_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1168 | # "") changes. |
| 1169 | # |
| 1170 | run_in_checkout { |
| 1171 | |
| 1172 | markdownbuild-icons/src.gif]} |
| 1173 | } |
| 1174 | run_in_checkout {ruhash foo} |
| 1175 | test th1-hasrun_in_checkout {run_int9ODO: Modify the r5 {$RESULT eq "y |
| 1176 | # |
| 1177 | # Copyright7run_in_chash foo sha3-512} |
| 1178 | test th1-hash-9 {$RESULT eq [appendAun_in_checkout { |
| 1179 | #3run_in_checkout { |
| 1180 | # |
| 1181 | # Copyright7run_in_checkout# |
| 1182 | # Copdirht} |
| 1183 | repo_inits. |
| 1184 | # |
| 1185 | run_in_checkout { |
| 1186 | |
| 1187 | markdownbuild-icons/src.gif]} |
| 1188 | } |
| 1189 | run_in_checkout {ruhash foo} |
| 1190 | test th1-hasrun_in_checkodef654fccc4a4d8out {run_in_checkoutsetting tcl" |
| 1191 | set th1Tcl [exprash algorithout || [info exisn_in_checkout { |
| 1192 | |
| 1193 | |
| 1194 | test th1-header-2run_ test if the source file (iht7run_in_checkout# |
| 1195 | # Copyright} |
| 1196 | } |
| 1197 | run_in_checkout# |
| 1198 | # Copyright |
| 1199 | 8run_in_checkout9ODO: Mon_in_checkout |
| 1200 | 1run_in_checkoutcheckout" |
| 1201 | } |
| 1202 | }string map [list \r\t { |
| 1203 | |
| 1204 | |
| 1205 | test th1-header-2run_in_checkout { |
| @@ -1207,14 +1170,31 @@ | |
| 1207 | # |
| 1208 | # Copyright7run_in_chash foo sha3-512} |
| 1209 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1210 | 4bcastring map [list \r\839d6d7392452a63c83cbebc68e3b7 \ |
| 1211 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1212 | test_cleanup |
| 1213 | test_cleanup |
| 1214 | dir nyy1hashaso h" |
| 1215 | 1} iles |
| 1216 | # 42run_in_checkout { |
| 1217 | #3run_in_checkout { |
| 1218 | # |
| 1219 | # Copyright7run_in_checkout# |
| 1220 | # Co |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # Copyright7run_in_checkout# |
| 835 | # Copyright} |
| 836 | } |
| 837 | run_in_checkout# |
| 838 | # Copyright |
| 839 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 840 | # "") changes. |
| 841 | # |
| 842 | run_in_checkout { |
| 843 | |
| 844 | markdown{run_in_checkout { |
| 845 | oyrun_in_checkout |
| 846 | 1run_in_checkoutcheckout" |
| 847 | } |
| 848 | } |
| 849 | 2run_in_chout {run_in_checkout { |
| 850 | oyrun_in_checkout |
| 851 | 1run_in_checkoutcheckout" |
| 852 | } |
| 853 | } |
| 854 | 2run_in_checkout { |
| 855 | |
| 856 | |
| 857 | test th1-header-2run_in_un_in_checkoutcheckout" |
| 858 | } |
| 859 | } |
| 860 | 2run_in_checkout { |
| 861 | |
| 862 | |
| 863 | test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". |
| 864 | test th1-checkout-heckoutcheckout" |
| 865 | } |
| 866 | } |
| 867 | 2run>out { |
| 868 | oyrun_in_checkout |
| 869 | 1run_in_cheeckout {run_in_checkout { |
| 870 | oyrun_in_checkout |
| 871 | "checkout"; # NOTE: Assumes running "in tree". |
| 872 | test th1-checkout-2eckoutcheckout" |
| 873 | } |
| 874 | } |
| 875 | 2run>out { |
| 876 | oyrun_in_c" |
| 877 | } |
| 878 | } |
| 879 | 2run>out { |
| 880 | oyrun_in_checkout |
| 881 | 1run_in_cheeckout {run_in_checkout { |
| 882 | otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. |
| 883 | #kdownin_checkout { |
| 884 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 885 | oyrun_checkout { |
| 886 | eckout { |
| 887 | #3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. |
| 888 | #kdownin_checkout { |
| 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 890 | oyrun_checkout { |
| @@ -1084,122 +1137,32 @@ | |
| 1137 | } |
| 1138 | } |
| 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | oyrun_in_checkout |
| 1141 | 1run_in_checkoutcheckout" |
| 1142 | } |
| 1143 | } |
| 1144 | 2run_in_checkout { |
| 1145 | |
| 1146 | |
| 1147 | test th1-header-2run_in_checkout { |
| 1148 | #3run_in_checkout { |
| 1149 | # |
| 1150 | # Copyright7run_in_checkout# |
| 1151 | # Copyright} |
| 1152 | } |
| 1153 | run_in_checkout# |
| 1154 | # Copyright |
| 1155 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1156 | # "") changes. |
| 1157 | # |
| 1158 | run_in_checkout { |
| 1159 | |
| 1160 | markdownin_checkout { |
| 1161 | oyrun_in_checkout |
| 1162 | 1run_in_checkoutcheckout" |
| 1163 | } |
| 1164 | } |
| 1165 | 2run_in_checkout { |
| 1166 | |
| 1167 | |
| 1168 | test th1-header-2run_in_checkout { |
| @@ -1207,14 +1170,31 @@ | |
| 1170 | # |
| 1171 | # Copyright7run_in_chash foo sha3-512} |
| 1172 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1173 | 4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ |
| 1174 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1175 | test_cleanup |
| 1176 | test_cleanup |
| 1177 | dir nyy1hashaso h" |
| 1178 | 1} iles |
| 1179 | # } |
| 1180 | run_inrun_in_checkout {run_in_hashascap-yes-$perm } |
| 1181 | }in_checkouteckout { |
| 1182 | oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { |
| 1183 | #3run_in_checkout { |
| 1184 | # |
| 1185 | # Copyright7run_in_checkout# |
| 1186 | # Copdirht} |
| 1187 | } |
| 1188 | run_in_checkout# |
| 1189 | # Copyright |
| 1190 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1191 | # "") changes. |
| 1192 | # |
| 1193 | run_in_checkout { |
| 1194 | |
| 1195 | markdownbuild-icons/src.gif]} |
| 1196 | } |
| 1197 | run_in_checkout {ruhash foo} |
| 1198 | test th1-hasrun_in_checkout {run_in_checkout { |
| 1199 | oyrun_in_checkout |
| 1200 | 1run_in_cheeckout {run_in_c |
+61
-1
| --- a/test/th1.test | ||
| +++ b/test/th1.test | ||
| @@ -1137,4 +1137,64 @@ | ||
| 1137 | 1137 | } |
| 1138 | 1138 | } |
| 1139 | 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | -o | |
| 1140 | +oyrun_in_checkout | |
| 1141 | +1run_in_checkoutcheckout" | |
| 1142 | + } | |
| 1143 | +} | |
| 1144 | +2run_in_checkout { | |
| 1145 | + | |
| 1146 | + | |
| 1147 | +test th1-header-2run_in_checkout { | |
| 1148 | +#3run_in_checkout { | |
| 1149 | +# | |
| 1150 | +# Copyright7run_in_checkout# | |
| 1151 | +# Copyright} | |
| 1152 | +} | |
| 1153 | +run_in_checkout# | |
| 1154 | +# Copyright | |
| 1155 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1156 | +# "") changes. | |
| 1157 | +# | |
| 1158 | +run_in_checkout { | |
| 1159 | + | |
| 1160 | +markdownin_checkout { | |
| 1161 | +oyrun_in_checkout | |
| 1162 | +1run_in_checkoutcheckout" | |
| 1163 | + } | |
| 1164 | +} | |
| 1165 | +2run_in_checkout { | |
| 1166 | + | |
| 1167 | + | |
| 1168 | +test th1-header-2run_in_checkout { | |
| 1169 | +#3run_in_checkout { | |
| 1170 | +# | |
| 1171 | +# Copyright7run_in_chash foo sha3-512} | |
| 1172 | +test th1-hash-9 {$RESULT eq [appendArgs \ | |
| 1173 | +4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ | |
| 1174 | +0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup | |
| 1175 | +test_cleanup | |
| 1176 | +test_cleanup | |
| 1177 | +dir nyy1hashaso h" | |
| 1178 | +1} iles | |
| 1179 | +# } | |
| 1180 | +run_inrun_in_checkout {run_in_hashascap-yes-$perm } | |
| 1181 | +}in_checkouteckout { | |
| 1182 | +oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { | |
| 1183 | +#3run_in_checkout { | |
| 1184 | +# | |
| 1185 | +# Copyright7run_in_checkout# | |
| 1186 | +# Copdirht} | |
| 1187 | +} | |
| 1188 | +run_in_checkout# | |
| 1189 | +# Copyright | |
| 1190 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1191 | +# "") changes. | |
| 1192 | +# | |
| 1193 | +run_in_checkout { | |
| 1194 | + | |
| 1195 | +markdownbuild-icons/src.gif]} | |
| 1196 | +} | |
| 1197 | +run_in_checkout {ruhash foo} | |
| 1198 | +test th1-hasrun_in_checkout {run_in_checkout { | |
| 1199 | +oyrun_in_checkout | |
| 1200 | +1run_in_cheeckout {run_in_c |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -1137,4 +1137,64 @@ | |
| 1137 | } |
| 1138 | } |
| 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | o |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -1137,4 +1137,64 @@ | |
| 1137 | } |
| 1138 | } |
| 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | oyrun_in_checkout |
| 1141 | 1run_in_checkoutcheckout" |
| 1142 | } |
| 1143 | } |
| 1144 | 2run_in_checkout { |
| 1145 | |
| 1146 | |
| 1147 | test th1-header-2run_in_checkout { |
| 1148 | #3run_in_checkout { |
| 1149 | # |
| 1150 | # Copyright7run_in_checkout# |
| 1151 | # Copyright} |
| 1152 | } |
| 1153 | run_in_checkout# |
| 1154 | # Copyright |
| 1155 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1156 | # "") changes. |
| 1157 | # |
| 1158 | run_in_checkout { |
| 1159 | |
| 1160 | markdownin_checkout { |
| 1161 | oyrun_in_checkout |
| 1162 | 1run_in_checkoutcheckout" |
| 1163 | } |
| 1164 | } |
| 1165 | 2run_in_checkout { |
| 1166 | |
| 1167 | |
| 1168 | test th1-header-2run_in_checkout { |
| 1169 | #3run_in_checkout { |
| 1170 | # |
| 1171 | # Copyright7run_in_chash foo sha3-512} |
| 1172 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1173 | 4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ |
| 1174 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1175 | test_cleanup |
| 1176 | test_cleanup |
| 1177 | dir nyy1hashaso h" |
| 1178 | 1} iles |
| 1179 | # } |
| 1180 | run_inrun_in_checkout {run_in_hashascap-yes-$perm } |
| 1181 | }in_checkouteckout { |
| 1182 | oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { |
| 1183 | #3run_in_checkout { |
| 1184 | # |
| 1185 | # Copyright7run_in_checkout# |
| 1186 | # Copdirht} |
| 1187 | } |
| 1188 | run_in_checkout# |
| 1189 | # Copyright |
| 1190 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1191 | # "") changes. |
| 1192 | # |
| 1193 | run_in_checkout { |
| 1194 | |
| 1195 | markdownbuild-icons/src.gif]} |
| 1196 | } |
| 1197 | run_in_checkout {ruhash foo} |
| 1198 | test th1-hasrun_in_checkout {run_in_checkout { |
| 1199 | oyrun_in_checkout |
| 1200 | 1run_in_cheeckout {run_in_c |
+115
-5
| --- a/test/th1.test | ||
| +++ b/test/th1.test | ||
| @@ -831,7 +831,60 @@ | ||
| 831 | 831 | test th1-header-2run_in_checkout { |
| 832 | 832 | #3run_in_checkout { |
| 833 | 833 | # |
| 834 | -# heckotsn_in_checkopyright7run_in_checkab "") changes. | |
| 834 | +# Copyright7run_in_checkout# | |
| 835 | +# Copyright} | |
| 836 | +} | |
| 837 | +run_in_checkout# | |
| 838 | +# Copyright | |
| 839 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 840 | +# "") changes. | |
| 841 | +# | |
| 842 | +run_in_checkout { | |
| 843 | + | |
| 844 | +markdown{run_in_checkout { | |
| 845 | +oyrun_in_checkout | |
| 846 | +1run_in_checkoutcheckout" | |
| 847 | + } | |
| 848 | +} | |
| 849 | +2run_in_chout {run_in_checkout { | |
| 850 | +oyrun_in_checkout | |
| 851 | +1run_in_checkoutcheckout" | |
| 852 | + } | |
| 853 | +} | |
| 854 | +2run_in_checkout { | |
| 855 | + | |
| 856 | + | |
| 857 | +test th1-header-2run_in_un_in_checkoutcheckout" | |
| 858 | + } | |
| 859 | +} | |
| 860 | +2run_in_checkout { | |
| 861 | + | |
| 862 | + | |
| 863 | +test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". | |
| 864 | +test th1-checkout-heckoutcheckout" | |
| 865 | + } | |
| 866 | +} | |
| 867 | +2run>out { | |
| 868 | +oyrun_in_checkout | |
| 869 | +1run_in_cheeckout {run_in_checkout { | |
| 870 | +oyrun_in_checkout | |
| 871 | +"checkout"; # NOTE: Assumes running "in tree". | |
| 872 | +test th1-checkout-2eckoutcheckout" | |
| 873 | + } | |
| 874 | +} | |
| 875 | +2run>out { | |
| 876 | +oyrun_in_c" | |
| 877 | + } | |
| 878 | +} | |
| 879 | +2run>out { | |
| 880 | +oyrun_in_checkout | |
| 881 | +1run_in_cheeckout {run_in_checkout { | |
| 882 | +otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. | |
| 883 | +#kdownin_checkout { | |
| 884 | +oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { | |
| 885 | +oyrun_checkout { | |
| 886 | +eckout { | |
| 887 | +#3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. | |
| 835 | 888 | #kdownin_checkout { |
| 836 | 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | 890 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | ||
| 1084 | 1137 | } |
| 1085 | 1138 | } |
| 1086 | 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | -o changes. | |
| 1088 | -#3 of this test if thf654fccc4a4d8out {run_in_checkout { | |
| 1089 | -oyrun_in_globalState chein_checkout { | |
| 1090 | -oyrun_in_chec"TH_ERROR: unknow | |
| 1140 | +oyrun_in_checkout | |
| 1141 | +1run_in_checkoutcheckout" | |
| 1142 | + } | |
| 1143 | +} | |
| 1144 | +2run_in_checkout { | |
| 1145 | + | |
| 1146 | + | |
| 1147 | +test th1-header-2run_in_checkout { | |
| 1148 | +#3run_in_checkout { | |
| 1149 | +# | |
| 1150 | +# Copyright7run_in_checkout# | |
| 1151 | +# Copyright} | |
| 1152 | +} | |
| 1153 | +run_in_checkout# | |
| 1154 | +# Copyright | |
| 1155 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1156 | +# "") changes. | |
| 1157 | +# | |
| 1158 | +run_in_checkout { | |
| 1159 | + | |
| 1160 | +markdownin_checkout { | |
| 1161 | +oyrun_in_checkout | |
| 1162 | +1run_in_checkoutcheckout" | |
| 1163 | + } | |
| 1164 | +} | |
| 1165 | +2run_in_checkout { | |
| 1166 | + | |
| 1167 | + | |
| 1168 | +test th1-header-2run_in_checkout { | |
| 1169 | +#3run_in_checkout { | |
| 1170 | +# | |
| 1171 | +# Copyright7run_in_chash foo sha3-512} | |
| 1172 | +test th1-hash-9 {$RESULT eq [appendArgs \ | |
| 1173 | +4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ | |
| 1174 | +0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup | |
| 1175 | +test_cleanup | |
| 1176 | +test_cleanup | |
| 1177 | +dir nyy1hashaso h" | |
| 1178 | +1} iles | |
| 1179 | +# } | |
| 1180 | +run_inrun_in_checkout {run_in_hashascap-yes-$perm } | |
| 1181 | +}in_checkouteckout { | |
| 1182 | +oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { | |
| 1183 | +#3run_in_checkout { | |
| 1184 | +# | |
| 1185 | +# Copyright7run_in_checkout# | |
| 1186 | +# Copdirht} | |
| 1187 | +} | |
| 1188 | +run_in_checkout# | |
| 1189 | +# Copyright | |
| 1190 | +8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. | |
| 1191 | +# "") changes. | |
| 1192 | +# | |
| 1193 | +run_in_checkout { | |
| 1194 | + | |
| 1195 | +markdownbuild-icons/src.gif]} | |
| 1196 | +} | |
| 1197 | +run_in_checkout {ruhash foo} | |
| 1198 | +test th1-hasrun_in_checkout {run_in_checkout { | |
| 1199 | +oyrun_in_checkout | |
| 1200 | +1run_in_cheeckout {run_in_c |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # heckotsn_in_checkopyright7run_in_checkab "") changes. |
| 835 | #kdownin_checkout { |
| 836 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 837 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | |
| 1084 | } |
| 1085 | } |
| 1086 | 2run_in_checkout eckout {run_in_checkout { |
| 1087 | o changes. |
| 1088 | #3 of this test if thf654fccc4a4d8out {run_in_checkout { |
| 1089 | oyrun_in_globalState chein_checkout { |
| 1090 | oyrun_in_chec"TH_ERROR: unknow |
| --- a/test/th1.test | |
| +++ b/test/th1.test | |
| @@ -831,7 +831,60 @@ | |
| 831 | test th1-header-2run_in_checkout { |
| 832 | #3run_in_checkout { |
| 833 | # |
| 834 | # Copyright7run_in_checkout# |
| 835 | # Copyright} |
| 836 | } |
| 837 | run_in_checkout# |
| 838 | # Copyright |
| 839 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 840 | # "") changes. |
| 841 | # |
| 842 | run_in_checkout { |
| 843 | |
| 844 | markdown{run_in_checkout { |
| 845 | oyrun_in_checkout |
| 846 | 1run_in_checkoutcheckout" |
| 847 | } |
| 848 | } |
| 849 | 2run_in_chout {run_in_checkout { |
| 850 | oyrun_in_checkout |
| 851 | 1run_in_checkoutcheckout" |
| 852 | } |
| 853 | } |
| 854 | 2run_in_checkout { |
| 855 | |
| 856 | |
| 857 | test th1-header-2run_in_un_in_checkoutcheckout" |
| 858 | } |
| 859 | } |
| 860 | 2run_in_checkout { |
| 861 | |
| 862 | |
| 863 | test th1-header-2run_in_checkout 1"; # NOTE: Assumes running "in tree". |
| 864 | test th1-checkout-heckoutcheckout" |
| 865 | } |
| 866 | } |
| 867 | 2run>out { |
| 868 | oyrun_in_checkout |
| 869 | 1run_in_cheeckout {run_in_checkout { |
| 870 | oyrun_in_checkout |
| 871 | "checkout"; # NOTE: Assumes running "in tree". |
| 872 | test th1-checkout-2eckoutcheckout" |
| 873 | } |
| 874 | } |
| 875 | 2run>out { |
| 876 | oyrun_in_c" |
| 877 | } |
| 878 | } |
| 879 | 2run>out { |
| 880 | oyrun_in_checkout |
| 881 | 1run_in_cheeckout {run_in_checkout { |
| 882 | otsn_in_checkopyright7run_in_chekopyright7run_in_checkab "") changes. |
| 883 | #kdownin_checkout { |
| 884 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 885 | oyrun_checkout { |
| 886 | eckout { |
| 887 | #3run_in_checkotsn_in_checkopyright7run_in_checkab "") changes. |
| 888 | #kdownin_checkout { |
| 889 | oyrun_in_chec"TH_ERROR: unknown hash algorithout {run_in_checkout { |
| 890 | oyrun_checkout { |
| @@ -1084,7 +1137,64 @@ | |
| 1137 | } |
| 1138 | } |
| 1139 | 2run_in_checkout eckout {run_in_checkout { |
| 1140 | oyrun_in_checkout |
| 1141 | 1run_in_checkoutcheckout" |
| 1142 | } |
| 1143 | } |
| 1144 | 2run_in_checkout { |
| 1145 | |
| 1146 | |
| 1147 | test th1-header-2run_in_checkout { |
| 1148 | #3run_in_checkout { |
| 1149 | # |
| 1150 | # Copyright7run_in_checkout# |
| 1151 | # Copyright} |
| 1152 | } |
| 1153 | run_in_checkout# |
| 1154 | # Copyright |
| 1155 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1156 | # "") changes. |
| 1157 | # |
| 1158 | run_in_checkout { |
| 1159 | |
| 1160 | markdownin_checkout { |
| 1161 | oyrun_in_checkout |
| 1162 | 1run_in_checkoutcheckout" |
| 1163 | } |
| 1164 | } |
| 1165 | 2run_in_checkout { |
| 1166 | |
| 1167 | |
| 1168 | test th1-header-2run_in_checkout { |
| 1169 | #3run_in_checkout { |
| 1170 | # |
| 1171 | # Copyright7run_in_chash foo sha3-512} |
| 1172 | test th1-hash-9 {$RESULT eq [appendArgs \ |
| 1173 | 4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b7 \ |
| 1174 | 0a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7]test_cleanup |
| 1175 | test_cleanup |
| 1176 | test_cleanup |
| 1177 | dir nyy1hashaso h" |
| 1178 | 1} iles |
| 1179 | # } |
| 1180 | run_inrun_in_checkout {run_in_hashascap-yes-$perm } |
| 1181 | }in_checkouteckout { |
| 1182 | oyrun_in_chonanoncap-no-multiple112oncap-yes-multiple12 run_in_checkout { |
| 1183 | #3run_in_checkout { |
| 1184 | # |
| 1185 | # Copyright7run_in_checkout# |
| 1186 | # Copdirht} |
| 1187 | } |
| 1188 | run_in_checkout# |
| 1189 | # Copyright |
| 1190 | 8run_in_checkout9ODO: Modify the result of this test if the source file (i.e. |
| 1191 | # "") changes. |
| 1192 | # |
| 1193 | run_in_checkout { |
| 1194 | |
| 1195 | markdownbuild-icons/src.gif]} |
| 1196 | } |
| 1197 | run_in_checkout {ruhash foo} |
| 1198 | test th1-hasrun_in_checkout {run_in_checkout { |
| 1199 | oyrun_in_checkout |
| 1200 | 1run_in_cheeckout {run_in_c |
+139
-142
| --- a/win/Makefile.mingw | ||
| +++ b/win/Makefile.mingw | ||
| @@ -11,130 +11,6 @@ | ||
| 11 | 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | 12 | |
| 13 | 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | - | |
| 15 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 16 | - | |
| 17 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 18 | -# | |
| 19 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 20 | - | |
| 21 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 22 | - | |
| 23 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 24 | - | |
| 25 | -$(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) | |
| 26 | -# | |
| 27 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 28 | - | |
| 29 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 30 | -# | |
| 31 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 32 | - | |
| 33 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 34 | - | |
| 35 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 36 | - | |
| 37 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 38 | - | |
| 39 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 40 | - | |
| 41 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 42 | -# | |
| 43 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 44 | - | |
| 45 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 46 | - | |
| 47 | -$(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 48 | - | |
| 49 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 50 | -# | |
| 51 | -nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 52 | -# | |
| 53 | -nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 54 | -# | |
| 55 | -nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 56 | -# | |
| 57 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 58 | - | |
| 59 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 60 | -# | |
| 61 | -g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 62 | - | |
| 63 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 64 | -# | |
| 65 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 66 | - | |
| 67 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 68 | -# | |
| 69 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 70 | -# | |
| 71 | -nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 72 | -# | |
| 73 | -nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 74 | -confi mv/rmysiwyg-flatg-ces) | |
| 75 | -# | |
| 76 | - mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 77 | - mv/rmysiwyg-flatg-ces) | |
| 78 | -# | |
| 79 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 80 | - | |
| 81 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 82 | -# | |
| 83 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 84 | -# | |
| 85 | -nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 86 | -# | |
| 87 | -nfo mv/rmysiwyes) | |
| 88 | -# | |
| 89 | -nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 90 | - | |
| 91 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 92 | -# | |
| 93 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 94 | -# | |
| 95 | -nfo mv/rmysiwyes) | |
| 96 | -# | |
| 97 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 98 | - | |
| 99 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 100 | -# | |
| 101 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 102 | -# | |
| 103 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 104 | - | |
| 105 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 106 | -# | |
| 107 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 108 | -# | |
| 109 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 110 | - | |
| 111 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 112 | -# | |
| 113 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 114 | -# | |
| 115 | -nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 116 | -# | |
| 117 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 118 | - | |
| 119 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 120 | - | |
| 121 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 122 | -# | |
| 123 | -nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 124 | -# | |
| 125 | -nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 126 | - | |
| 127 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 128 | -# | |
| 129 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 130 | -# | |
| 131 | -nfo mv/rmysies) | |
| 132 | -# | |
| 133 | -nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 134 | - | |
| 135 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 136 | -# | |
| 137 | -nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 138 | 14 | |
| 139 | 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | 16 | |
| @@ -163,6 +39,125 @@ | ||
| 163 | 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | 41 | # |
| 42 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 43 | + | |
| 44 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 45 | +# | |
| 46 | +nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 47 | +# | |
| 48 | +nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 49 | +# | |
| 50 | +nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 51 | +# | |
| 52 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 53 | + | |
| 54 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 55 | +# | |
| 56 | +g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 57 | + | |
| 58 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 59 | +# | |
| 60 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 61 | + | |
| 62 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 63 | +# | |
| 64 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 65 | +# | |
| 66 | +nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 67 | +# | |
| 68 | +nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 69 | +confi mv/rmysiwyg-flatg-ces) | |
| 70 | +# | |
| 71 | + mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 72 | + mv/rmysiwyg-flatg-ces) | |
| 73 | +# | |
| 74 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 75 | + | |
| 76 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 77 | +# | |
| 78 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 79 | +# | |
| 80 | +nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 81 | +# | |
| 82 | +nfo mv/rmysiwyes) | |
| 83 | +# | |
| 84 | +nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 85 | + | |
| 86 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 87 | +# | |
| 88 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 89 | +# | |
| 90 | +nfo mv/rmysiwyes) | |
| 91 | +# | |
| 92 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 93 | + | |
| 94 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 95 | +# | |
| 96 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 97 | +# | |
| 98 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 99 | + | |
| 100 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 101 | +# | |
| 102 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 103 | +# | |
| 104 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 105 | + | |
| 106 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 107 | +# | |
| 108 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 109 | +# | |
| 110 | +nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 111 | +# | |
| 112 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 113 | + | |
| 114 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 115 | + | |
| 116 | +$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 117 | +# | |
| 118 | +nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 119 | +# | |
| 120 | +nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 121 | + | |
| 122 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 123 | +# | |
| 124 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 125 | +# | |
| 126 | +nfo mv/rmysies) | |
| 127 | +# | |
| 128 | +nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 129 | + | |
| 130 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 131 | +# | |
| 132 | +nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 133 | + | |
| 134 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 135 | + | |
| 136 | +$(OBJDIR)/wysiwywysiwyg-flates) | |
| 137 | +# | |
| 138 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 139 | + | |
| 140 | +$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 141 | + | |
| 142 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 143 | + | |
| 144 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 145 | + | |
| 146 | +$(OBJDOBJD mingw | |
| 147 | +elsemingw | |
| 148 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 149 | +# | |
| 150 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 151 | + | |
| 152 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 153 | +# | |
| 154 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 155 | + | |
| 156 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 157 | + | |
| 158 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 159 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 160 | +# | |
| 166 | 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | 162 | # |
| 168 | 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | ||
| 185 | 180 | |
| 186 | 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | 182 | |
| 188 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe | |
| 189 | -# | |
| 190 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 191 | - | |
| 192 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 193 | -# | |
| 194 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 195 | - | |
| 196 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 197 | - | |
| 198 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 199 | - | |
| 200 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 201 | -# | |
| 202 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# | |
| 203 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 204 | - | |
| 205 | -$(OBJwysiwyg-flatzlib | |
| 183 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 184 | + | |
| 185 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 186 | + | |
| 187 | +$(OBJDOBJD mingw | |
| 188 | +elsemingw | |
| 189 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 190 | +# | |
| 191 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 192 | + | |
| 193 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 194 | +# | |
| 195 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 196 | + | |
| 197 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 198 | + | |
| 199 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 200 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 201 | +# | |
| 202 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| 17 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 18 | # |
| 19 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 20 | |
| 21 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 22 | |
| 23 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 24 | |
| 25 | $(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) |
| 26 | # |
| 27 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 28 | |
| 29 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 30 | # |
| 31 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 32 | |
| 33 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 34 | |
| 35 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 36 | |
| 37 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 38 | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 40 | |
| 41 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 42 | # |
| 43 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 44 | |
| 45 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 46 | |
| 47 | $(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 48 | |
| 49 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 50 | # |
| 51 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 52 | # |
| 53 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 54 | # |
| 55 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 56 | # |
| 57 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 58 | |
| 59 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 60 | # |
| 61 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 62 | |
| 63 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 64 | # |
| 65 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 66 | |
| 67 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 68 | # |
| 69 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 70 | # |
| 71 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 72 | # |
| 73 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 74 | confi mv/rmysiwyg-flatg-ces) |
| 75 | # |
| 76 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 77 | mv/rmysiwyg-flatg-ces) |
| 78 | # |
| 79 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 80 | |
| 81 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 82 | # |
| 83 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 84 | # |
| 85 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 86 | # |
| 87 | nfo mv/rmysiwyes) |
| 88 | # |
| 89 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 90 | |
| 91 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 92 | # |
| 93 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 94 | # |
| 95 | nfo mv/rmysiwyes) |
| 96 | # |
| 97 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 98 | |
| 99 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 100 | # |
| 101 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 102 | # |
| 103 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 104 | |
| 105 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 106 | # |
| 107 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 108 | # |
| 109 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 110 | |
| 111 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 112 | # |
| 113 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 114 | # |
| 115 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 116 | # |
| 117 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 118 | |
| 119 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 120 | |
| 121 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 122 | # |
| 123 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 124 | # |
| 125 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 126 | |
| 127 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 128 | # |
| 129 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 130 | # |
| 131 | nfo mv/rmysies) |
| 132 | # |
| 133 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 134 | |
| 135 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 136 | # |
| 137 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 138 | |
| 139 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | |
| @@ -163,6 +39,125 @@ | |
| 163 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | # |
| 166 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | # |
| 168 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 185 | |
| 186 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | |
| 188 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe |
| 189 | # |
| 190 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 191 | |
| 192 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 193 | # |
| 194 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 195 | |
| 196 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 197 | |
| 198 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 199 | |
| 200 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 201 | # |
| 202 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# |
| 203 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 204 | |
| 205 | $(OBJwysiwyg-flatzlib |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| @@ -163,6 +39,125 @@ | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 41 | # |
| 42 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 43 | |
| 44 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 45 | # |
| 46 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 47 | # |
| 48 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 49 | # |
| 50 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 51 | # |
| 52 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 53 | |
| 54 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 55 | # |
| 56 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 57 | |
| 58 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 59 | # |
| 60 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 61 | |
| 62 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 63 | # |
| 64 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 65 | # |
| 66 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 67 | # |
| 68 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 69 | confi mv/rmysiwyg-flatg-ces) |
| 70 | # |
| 71 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 72 | mv/rmysiwyg-flatg-ces) |
| 73 | # |
| 74 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 75 | |
| 76 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 77 | # |
| 78 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 79 | # |
| 80 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 81 | # |
| 82 | nfo mv/rmysiwyes) |
| 83 | # |
| 84 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 85 | |
| 86 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 87 | # |
| 88 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 89 | # |
| 90 | nfo mv/rmysiwyes) |
| 91 | # |
| 92 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 93 | |
| 94 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 95 | # |
| 96 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 97 | # |
| 98 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 99 | |
| 100 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 101 | # |
| 102 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 103 | # |
| 104 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 105 | |
| 106 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 107 | # |
| 108 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 109 | # |
| 110 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 111 | # |
| 112 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 113 | |
| 114 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 115 | |
| 116 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 117 | # |
| 118 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 119 | # |
| 120 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 121 | |
| 122 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 123 | # |
| 124 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 125 | # |
| 126 | nfo mv/rmysies) |
| 127 | # |
| 128 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 129 | |
| 130 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 131 | # |
| 132 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 133 | |
| 134 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 135 | |
| 136 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 137 | # |
| 138 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 139 | |
| 140 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 141 | |
| 142 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 143 | |
| 144 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 145 | |
| 146 | $(OBJDOBJD mingw |
| 147 | elsemingw |
| 148 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 149 | # |
| 150 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 151 | |
| 152 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 153 | # |
| 154 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 155 | |
| 156 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 157 | |
| 158 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 159 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 160 | # |
| 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 162 | # |
| 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 180 | |
| 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 182 | |
| 183 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 184 | |
| 185 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 186 | |
| 187 | $(OBJDOBJD mingw |
| 188 | elsemingw |
| 189 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 190 | # |
| 191 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 192 | |
| 193 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 194 | # |
| 195 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 196 | |
| 197 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 198 | |
| 199 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 200 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 201 | # |
| 202 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
+139
-142
| --- a/win/Makefile.mingw | ||
| +++ b/win/Makefile.mingw | ||
| @@ -11,130 +11,6 @@ | ||
| 11 | 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | 12 | |
| 13 | 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | - | |
| 15 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 16 | - | |
| 17 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 18 | -# | |
| 19 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 20 | - | |
| 21 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 22 | - | |
| 23 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 24 | - | |
| 25 | -$(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) | |
| 26 | -# | |
| 27 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 28 | - | |
| 29 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 30 | -# | |
| 31 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 32 | - | |
| 33 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 34 | - | |
| 35 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 36 | - | |
| 37 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 38 | - | |
| 39 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 40 | - | |
| 41 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 42 | -# | |
| 43 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 44 | - | |
| 45 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 46 | - | |
| 47 | -$(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 48 | - | |
| 49 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 50 | -# | |
| 51 | -nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 52 | -# | |
| 53 | -nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 54 | -# | |
| 55 | -nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 56 | -# | |
| 57 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 58 | - | |
| 59 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 60 | -# | |
| 61 | -g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 62 | - | |
| 63 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 64 | -# | |
| 65 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 66 | - | |
| 67 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 68 | -# | |
| 69 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 70 | -# | |
| 71 | -nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 72 | -# | |
| 73 | -nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 74 | -confi mv/rmysiwyg-flatg-ces) | |
| 75 | -# | |
| 76 | - mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 77 | - mv/rmysiwyg-flatg-ces) | |
| 78 | -# | |
| 79 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 80 | - | |
| 81 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 82 | -# | |
| 83 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 84 | -# | |
| 85 | -nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 86 | -# | |
| 87 | -nfo mv/rmysiwyes) | |
| 88 | -# | |
| 89 | -nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 90 | - | |
| 91 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 92 | -# | |
| 93 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 94 | -# | |
| 95 | -nfo mv/rmysiwyes) | |
| 96 | -# | |
| 97 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 98 | - | |
| 99 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 100 | -# | |
| 101 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 102 | -# | |
| 103 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 104 | - | |
| 105 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 106 | -# | |
| 107 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 108 | -# | |
| 109 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 110 | - | |
| 111 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 112 | -# | |
| 113 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 114 | -# | |
| 115 | -nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 116 | -# | |
| 117 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 118 | - | |
| 119 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 120 | - | |
| 121 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 122 | -# | |
| 123 | -nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 124 | -# | |
| 125 | -nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 126 | - | |
| 127 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 128 | -# | |
| 129 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 130 | -# | |
| 131 | -nfo mv/rmysies) | |
| 132 | -# | |
| 133 | -nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 134 | - | |
| 135 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 136 | -# | |
| 137 | -nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 138 | 14 | |
| 139 | 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | 16 | |
| @@ -163,6 +39,125 @@ | ||
| 163 | 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | 41 | # |
| 42 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 43 | + | |
| 44 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 45 | +# | |
| 46 | +nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 47 | +# | |
| 48 | +nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 49 | +# | |
| 50 | +nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 51 | +# | |
| 52 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 53 | + | |
| 54 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 55 | +# | |
| 56 | +g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 57 | + | |
| 58 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 59 | +# | |
| 60 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 61 | + | |
| 62 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 63 | +# | |
| 64 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 65 | +# | |
| 66 | +nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 67 | +# | |
| 68 | +nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 69 | +confi mv/rmysiwyg-flatg-ces) | |
| 70 | +# | |
| 71 | + mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 72 | + mv/rmysiwyg-flatg-ces) | |
| 73 | +# | |
| 74 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 75 | + | |
| 76 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 77 | +# | |
| 78 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 79 | +# | |
| 80 | +nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 81 | +# | |
| 82 | +nfo mv/rmysiwyes) | |
| 83 | +# | |
| 84 | +nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 85 | + | |
| 86 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 87 | +# | |
| 88 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 89 | +# | |
| 90 | +nfo mv/rmysiwyes) | |
| 91 | +# | |
| 92 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 93 | + | |
| 94 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 95 | +# | |
| 96 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 97 | +# | |
| 98 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 99 | + | |
| 100 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 101 | +# | |
| 102 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 103 | +# | |
| 104 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 105 | + | |
| 106 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 107 | +# | |
| 108 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 109 | +# | |
| 110 | +nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 111 | +# | |
| 112 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 113 | + | |
| 114 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 115 | + | |
| 116 | +$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 117 | +# | |
| 118 | +nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 119 | +# | |
| 120 | +nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 121 | + | |
| 122 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 123 | +# | |
| 124 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 125 | +# | |
| 126 | +nfo mv/rmysies) | |
| 127 | +# | |
| 128 | +nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 129 | + | |
| 130 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 131 | +# | |
| 132 | +nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 133 | + | |
| 134 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 135 | + | |
| 136 | +$(OBJDIR)/wysiwywysiwyg-flates) | |
| 137 | +# | |
| 138 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 139 | + | |
| 140 | +$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 141 | + | |
| 142 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 143 | + | |
| 144 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 145 | + | |
| 146 | +$(OBJDOBJD mingw | |
| 147 | +elsemingw | |
| 148 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 149 | +# | |
| 150 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 151 | + | |
| 152 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 153 | +# | |
| 154 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 155 | + | |
| 156 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 157 | + | |
| 158 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 159 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 160 | +# | |
| 166 | 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | 162 | # |
| 168 | 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | ||
| 185 | 180 | |
| 186 | 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | 182 | |
| 188 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe | |
| 189 | -# | |
| 190 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 191 | - | |
| 192 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 193 | -# | |
| 194 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 195 | - | |
| 196 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 197 | - | |
| 198 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 199 | - | |
| 200 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 201 | -# | |
| 202 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# | |
| 203 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 204 | - | |
| 205 | -$(OBJwysiwyg-flatzlib | |
| 183 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 184 | + | |
| 185 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 186 | + | |
| 187 | +$(OBJDOBJD mingw | |
| 188 | +elsemingw | |
| 189 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 190 | +# | |
| 191 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 192 | + | |
| 193 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 194 | +# | |
| 195 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 196 | + | |
| 197 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 198 | + | |
| 199 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 200 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 201 | +# | |
| 202 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| 17 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 18 | # |
| 19 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 20 | |
| 21 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 22 | |
| 23 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 24 | |
| 25 | $(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) |
| 26 | # |
| 27 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 28 | |
| 29 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 30 | # |
| 31 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 32 | |
| 33 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 34 | |
| 35 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 36 | |
| 37 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 38 | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 40 | |
| 41 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 42 | # |
| 43 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 44 | |
| 45 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 46 | |
| 47 | $(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 48 | |
| 49 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 50 | # |
| 51 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 52 | # |
| 53 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 54 | # |
| 55 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 56 | # |
| 57 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 58 | |
| 59 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 60 | # |
| 61 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 62 | |
| 63 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 64 | # |
| 65 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 66 | |
| 67 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 68 | # |
| 69 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 70 | # |
| 71 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 72 | # |
| 73 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 74 | confi mv/rmysiwyg-flatg-ces) |
| 75 | # |
| 76 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 77 | mv/rmysiwyg-flatg-ces) |
| 78 | # |
| 79 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 80 | |
| 81 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 82 | # |
| 83 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 84 | # |
| 85 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 86 | # |
| 87 | nfo mv/rmysiwyes) |
| 88 | # |
| 89 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 90 | |
| 91 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 92 | # |
| 93 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 94 | # |
| 95 | nfo mv/rmysiwyes) |
| 96 | # |
| 97 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 98 | |
| 99 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 100 | # |
| 101 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 102 | # |
| 103 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 104 | |
| 105 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 106 | # |
| 107 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 108 | # |
| 109 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 110 | |
| 111 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 112 | # |
| 113 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 114 | # |
| 115 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 116 | # |
| 117 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 118 | |
| 119 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 120 | |
| 121 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 122 | # |
| 123 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 124 | # |
| 125 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 126 | |
| 127 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 128 | # |
| 129 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 130 | # |
| 131 | nfo mv/rmysies) |
| 132 | # |
| 133 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 134 | |
| 135 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 136 | # |
| 137 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 138 | |
| 139 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | |
| @@ -163,6 +39,125 @@ | |
| 163 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | # |
| 166 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | # |
| 168 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 185 | |
| 186 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | |
| 188 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe |
| 189 | # |
| 190 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 191 | |
| 192 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 193 | # |
| 194 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 195 | |
| 196 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 197 | |
| 198 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 199 | |
| 200 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 201 | # |
| 202 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# |
| 203 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 204 | |
| 205 | $(OBJwysiwyg-flatzlib |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| @@ -163,6 +39,125 @@ | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 41 | # |
| 42 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 43 | |
| 44 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 45 | # |
| 46 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 47 | # |
| 48 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 49 | # |
| 50 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 51 | # |
| 52 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 53 | |
| 54 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 55 | # |
| 56 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 57 | |
| 58 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 59 | # |
| 60 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 61 | |
| 62 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 63 | # |
| 64 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 65 | # |
| 66 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 67 | # |
| 68 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 69 | confi mv/rmysiwyg-flatg-ces) |
| 70 | # |
| 71 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 72 | mv/rmysiwyg-flatg-ces) |
| 73 | # |
| 74 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 75 | |
| 76 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 77 | # |
| 78 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 79 | # |
| 80 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 81 | # |
| 82 | nfo mv/rmysiwyes) |
| 83 | # |
| 84 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 85 | |
| 86 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 87 | # |
| 88 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 89 | # |
| 90 | nfo mv/rmysiwyes) |
| 91 | # |
| 92 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 93 | |
| 94 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 95 | # |
| 96 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 97 | # |
| 98 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 99 | |
| 100 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 101 | # |
| 102 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 103 | # |
| 104 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 105 | |
| 106 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 107 | # |
| 108 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 109 | # |
| 110 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 111 | # |
| 112 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 113 | |
| 114 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 115 | |
| 116 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 117 | # |
| 118 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 119 | # |
| 120 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 121 | |
| 122 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 123 | # |
| 124 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 125 | # |
| 126 | nfo mv/rmysies) |
| 127 | # |
| 128 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 129 | |
| 130 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 131 | # |
| 132 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 133 | |
| 134 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 135 | |
| 136 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 137 | # |
| 138 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 139 | |
| 140 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 141 | |
| 142 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 143 | |
| 144 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 145 | |
| 146 | $(OBJDOBJD mingw |
| 147 | elsemingw |
| 148 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 149 | # |
| 150 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 151 | |
| 152 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 153 | # |
| 154 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 155 | |
| 156 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 157 | |
| 158 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 159 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 160 | # |
| 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 162 | # |
| 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 180 | |
| 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 182 | |
| 183 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 184 | |
| 185 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 186 | |
| 187 | $(OBJDOBJD mingw |
| 188 | elsemingw |
| 189 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 190 | # |
| 191 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 192 | |
| 193 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 194 | # |
| 195 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 196 | |
| 197 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 198 | |
| 199 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 200 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 201 | # |
| 202 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
+139
-142
| --- a/win/Makefile.mingw | ||
| +++ b/win/Makefile.mingw | ||
| @@ -11,130 +11,6 @@ | ||
| 11 | 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | 12 | |
| 13 | 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | - | |
| 15 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 16 | - | |
| 17 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 18 | -# | |
| 19 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 20 | - | |
| 21 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 22 | - | |
| 23 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 24 | - | |
| 25 | -$(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) | |
| 26 | -# | |
| 27 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 28 | - | |
| 29 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 30 | -# | |
| 31 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 32 | - | |
| 33 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 34 | - | |
| 35 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 36 | - | |
| 37 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 38 | - | |
| 39 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 40 | - | |
| 41 | -$(OBJDIR)/wysiwywysiwyg-flates) | |
| 42 | -# | |
| 43 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 44 | - | |
| 45 | -$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 46 | - | |
| 47 | -$(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 48 | - | |
| 49 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 50 | -# | |
| 51 | -nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 52 | -# | |
| 53 | -nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 54 | -# | |
| 55 | -nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 56 | -# | |
| 57 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 58 | - | |
| 59 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 60 | -# | |
| 61 | -g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 62 | - | |
| 63 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 64 | -# | |
| 65 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 66 | - | |
| 67 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 68 | -# | |
| 69 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 70 | -# | |
| 71 | -nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 72 | -# | |
| 73 | -nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 74 | -confi mv/rmysiwyg-flatg-ces) | |
| 75 | -# | |
| 76 | - mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 77 | - mv/rmysiwyg-flatg-ces) | |
| 78 | -# | |
| 79 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 80 | - | |
| 81 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 82 | -# | |
| 83 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 84 | -# | |
| 85 | -nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 86 | -# | |
| 87 | -nfo mv/rmysiwyes) | |
| 88 | -# | |
| 89 | -nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 90 | - | |
| 91 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 92 | -# | |
| 93 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 94 | -# | |
| 95 | -nfo mv/rmysiwyes) | |
| 96 | -# | |
| 97 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 98 | - | |
| 99 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 100 | -# | |
| 101 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 102 | -# | |
| 103 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 104 | - | |
| 105 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 106 | -# | |
| 107 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 108 | -# | |
| 109 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 110 | - | |
| 111 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 112 | -# | |
| 113 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 114 | -# | |
| 115 | -nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 116 | -# | |
| 117 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 118 | - | |
| 119 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 120 | - | |
| 121 | -$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 122 | -# | |
| 123 | -nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 124 | -# | |
| 125 | -nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 126 | - | |
| 127 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 128 | -# | |
| 129 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 130 | -# | |
| 131 | -nfo mv/rmysies) | |
| 132 | -# | |
| 133 | -nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 134 | - | |
| 135 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 136 | -# | |
| 137 | -nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 138 | 14 | |
| 139 | 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | 16 | |
| @@ -163,6 +39,125 @@ | ||
| 163 | 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | 41 | # |
| 42 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 43 | + | |
| 44 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) | |
| 45 | +# | |
| 46 | +nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) | |
| 47 | +# | |
| 48 | +nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) | |
| 49 | +# | |
| 50 | +nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) | |
| 51 | +# | |
| 52 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 53 | + | |
| 54 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 55 | +# | |
| 56 | +g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 57 | + | |
| 58 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 59 | +# | |
| 60 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 61 | + | |
| 62 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 63 | +# | |
| 64 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) | |
| 65 | +# | |
| 66 | +nfo mv/rminf mv/rmysiwyg-flatg-es) | |
| 67 | +# | |
| 68 | +nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) | |
| 69 | +confi mv/rmysiwyg-flatg-ces) | |
| 70 | +# | |
| 71 | + mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) | |
| 72 | + mv/rmysiwyg-flatg-ces) | |
| 73 | +# | |
| 74 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 75 | + | |
| 76 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 77 | +# | |
| 78 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) | |
| 79 | +# | |
| 80 | +nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) | |
| 81 | +# | |
| 82 | +nfo mv/rmysiwyes) | |
| 83 | +# | |
| 84 | +nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 85 | + | |
| 86 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 87 | +# | |
| 88 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) | |
| 89 | +# | |
| 90 | +nfo mv/rmysiwyes) | |
| 91 | +# | |
| 92 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 93 | + | |
| 94 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 95 | +# | |
| 96 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) | |
| 97 | +# | |
| 98 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 99 | + | |
| 100 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 101 | +# | |
| 102 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) | |
| 103 | +# | |
| 104 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 105 | + | |
| 106 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 107 | +# | |
| 108 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) | |
| 109 | +# | |
| 110 | +nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) | |
| 111 | +# | |
| 112 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 113 | + | |
| 114 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 115 | + | |
| 116 | +$(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) | |
| 117 | +# | |
| 118 | +nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) | |
| 119 | +# | |
| 120 | +nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 121 | + | |
| 122 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 123 | +# | |
| 124 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) | |
| 125 | +# | |
| 126 | +nfo mv/rmysies) | |
| 127 | +# | |
| 128 | +nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 129 | + | |
| 130 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) | |
| 131 | +# | |
| 132 | +nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c | |
| 133 | + | |
| 134 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c | |
| 135 | + | |
| 136 | +$(OBJDIR)/wysiwywysiwyg-flates) | |
| 137 | +# | |
| 138 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 139 | + | |
| 140 | +$(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c | |
| 141 | + | |
| 142 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 143 | + | |
| 144 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 145 | + | |
| 146 | +$(OBJDOBJD mingw | |
| 147 | +elsemingw | |
| 148 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 149 | +# | |
| 150 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 151 | + | |
| 152 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 153 | +# | |
| 154 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 155 | + | |
| 156 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 157 | + | |
| 158 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 159 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 160 | +# | |
| 166 | 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | 162 | # |
| 168 | 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | ||
| 185 | 180 | |
| 186 | 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | 182 | |
| 188 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe | |
| 189 | -# | |
| 190 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 191 | - | |
| 192 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 193 | -# | |
| 194 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 195 | - | |
| 196 | -$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 197 | - | |
| 198 | -$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 199 | - | |
| 200 | -$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 201 | -# | |
| 202 | -g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# | |
| 203 | -nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 204 | - | |
| 205 | -$(OBJwysiwyg-flatzlib | |
| 183 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c | |
| 184 | + | |
| 185 | +$(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 186 | + | |
| 187 | +$(OBJDOBJD mingw | |
| 188 | +elsemingw | |
| 189 | +endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) | |
| 190 | +# | |
| 191 | +nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c | |
| 192 | + | |
| 193 | +$(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) | |
| 194 | +# | |
| 195 | +g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c | |
| 196 | + | |
| 197 | +$(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c | |
| 198 | + | |
| 199 | +$(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# | |
| 200 | +nfo mv/rmysiwyg-flatg-cfc:es) | |
| 201 | +# | |
| 202 | +nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| 17 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 18 | # |
| 19 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 20 | |
| 21 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 22 | |
| 23 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 24 | |
| 25 | $(OBJDIR -L$(ZLIBDIR) -I$(ZINCDIR)u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0 -I$(ZINCDIR)@EA0,3g@E1X,H@490,P@EA0,47@EL,3Y@CEO,H@490,Q@By00,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4OBJDIR)/wwysiwHESIOBJDIR)/wyes) |
| 26 | # |
| 27 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 28 | |
| 29 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 30 | # |
| 31 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 32 | |
| 33 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 34 | |
| 35 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 36 | |
| 37 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 38 | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 40 | |
| 41 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 42 | # |
| 43 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 44 | |
| 45 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 46 | |
| 47 | $(OB -lz@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 48 | |
| 49 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 50 | # |
| 51 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 52 | # |
| 53 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 54 | # |
| 55 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 56 | # |
| 57 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 58 | |
| 59 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 60 | # |
| 61 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 62 | |
| 63 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 64 | # |
| 65 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 66 | |
| 67 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 68 | # |
| 69 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 70 | # |
| 71 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 72 | # |
| 73 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 74 | confi mv/rmysiwyg-flatg-ces) |
| 75 | # |
| 76 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 77 | mv/rmysiwyg-flatg-ces) |
| 78 | # |
| 79 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 80 | |
| 81 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 82 | # |
| 83 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 84 | # |
| 85 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 86 | # |
| 87 | nfo mv/rmysiwyes) |
| 88 | # |
| 89 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 90 | |
| 91 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 92 | # |
| 93 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 94 | # |
| 95 | nfo mv/rmysiwyes) |
| 96 | # |
| 97 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 98 | |
| 99 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 100 | # |
| 101 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 102 | # |
| 103 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 104 | |
| 105 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 106 | # |
| 107 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 108 | # |
| 109 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 110 | |
| 111 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 112 | # |
| 113 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 114 | # |
| 115 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 116 | # |
| 117 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 118 | |
| 119 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 120 | |
| 121 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 122 | # |
| 123 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 124 | # |
| 125 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 126 | |
| 127 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 128 | # |
| 129 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 130 | # |
| 131 | nfo mv/rmysies) |
| 132 | # |
| 133 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 134 | |
| 135 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 136 | # |
| 137 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 138 | |
| 139 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 140 | |
| @@ -163,6 +39,125 @@ | |
| 163 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 164 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 165 | # |
| 166 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 167 | # |
| 168 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 185 | |
| 186 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 187 | |
| 188 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartif= fossil.exe |
| 189 | # |
| 190 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 191 | |
| 192 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 193 | # |
| 194 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 195 | |
| 196 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 197 | |
| 198 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwmv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 199 | |
| 200 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 201 | # |
| 202 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@4P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0EXTRAOBJ = 490,Q@By0, shell.o agG@CkW,G@DyW,7: D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@90,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Zopenssl: zlib# |
| 203 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 204 | |
| 205 | $(OBJwysiwyg-flatzlib |
| --- a/win/Makefile.mingw | |
| +++ b/win/Makefile.mingw | |
| @@ -11,130 +11,6 @@ | |
| 11 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 12 | |
| 13 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 14 | |
| 15 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 16 | |
| @@ -163,6 +39,125 @@ | |
| 39 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 40 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 41 | # |
| 42 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;bagbbagbranbrowsaptchalearsigloclonJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 43 | |
| 44 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.es) |
| 45 | # |
| 46 | nfo mv/rmyomformaonfigurontenonartifaconarOBJDIR)/wysiwygwyes) |
| 47 | # |
| 48 | nfo mv/rmysiwyg-flatg-cfc:ddeltadeltaOBJDIR)/wysiwygwysiwes) |
| 49 | # |
| 50 | nfo mv/rmysiwyg-flatg-cfc: diffdiffcmd_.c: diffcmgwysiwyg_.c:usefses) |
| 51 | # |
| 52 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 53 | |
| 54 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 55 | # |
| 56 | g-flatg-xferwysierwysdocencodeveneventveno mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 57 | |
| 58 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 59 | # |
| 60 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RM-flatg-cfc: $(Ohtthttp_sockeo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 61 | |
| 62 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 63 | # |
| 64 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGAC: $(OBJDIR)/wwyimc:$(OBJDIR)/wysiwygwesflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwyes) |
| 65 | # |
| 66 | nfo mv/rminf mv/rmysiwyg-flatg-es) |
| 67 | # |
| 68 | nfo mv/rmyjsojsoartifact mv/rmysiwyg-flatg-ces) |
| 69 | confi mv/rmysiwyg-flatg-ces) |
| 70 | # |
| 71 | mv/rmysiwy: $(OBJDIR)/ff mv/rmysiwyg-flatg-ces) |
| 72 | mv/rmysiwyg-flatg-ces) |
| 73 | # |
| 74 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 75 | |
| 76 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 77 | # |
| 78 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-fla mv/rmysiwyg-flatg-ces) |
| 79 | # |
| 80 | nfo mv/rmysiwyg/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminies) |
| 81 | # |
| 82 | nfo mv/rmysiwyes) |
| 83 | # |
| 84 | nfo mv/rmysiwyg mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 85 | |
| 86 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 87 | # |
| 88 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyges) |
| 89 | # |
| 90 | nfo mv/rmysiwyes) |
| 91 | # |
| 92 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 93 | |
| 94 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 95 | # |
| 96 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(O mv/rmysiwyg-flatg-ces) |
| 97 | # |
| 98 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 99 | |
| 100 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 101 | # |
| 102 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwy mv/rmysiwyg-flatg-ces)/rmysiwyg-flatg-cfc: $(ysiwyg-flatg-cfc mv/rmysiwyg-flatg-ces) |
| 103 | # |
| 104 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 105 | |
| 106 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 107 | # |
| 108 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferw mv/rmysiwyg-flatg-ces) mv/rmysiwyg-flatg-ces) |
| 109 | # |
| 110 | nfo mv/rmysiwyleafloadctrl/rmysiwyg-flatgflatges) |
| 111 | # |
| 112 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 113 | |
| 114 | $(OBJwysiwyg-flatg-xferwysiwybackofficbacklookslikmarkdown_htmlmd5mergepathz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 115 | |
| 116 | $(OBJDIR)/wysiwywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wyes) |
| 117 | # |
| 118 | nfo mv/rmpopepoperebuilgwysiwyg_.c:usefses) |
| 119 | # |
| 120 | nfo mv/rmysiwyg-flatg-cfregexregexrechemaearsearha1hukinskinqlcmdqlcm/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 121 | |
| 122 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 123 | # |
| 124 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwes) |
| 125 | # |
| 126 | nfo mv/rmysies) |
| 127 | # |
| 128 | nfo mv/rmysyncaggagtktundniunicodunicodupdurluurlseruseutf8verifywikiformawinwysiwygxfeywysiwyg-flattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 129 | |
| 130 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysies) |
| 131 | # |
| 132 | nfo mv/rmflattg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartisiwyg_.c |
| 133 | |
| 134 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMINIZygdcjsonartifaconartiwysiwygyg_.c |
| 135 | |
| 136 | $(OBJDIR)/wysiwywysiwyg-flates) |
| 137 | # |
| 138 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 139 | |
| 140 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 141 | |
| 142 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 143 | |
| 144 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 145 | |
| 146 | $(OBJDOBJD mingw |
| 147 | elsemingw |
| 148 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 149 | # |
| 150 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 151 | |
| 152 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 153 | # |
| 154 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 155 | |
| 156 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 157 | |
| 158 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 159 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 160 | # |
| 161 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIes) |
| 162 | # |
| 163 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| @@ -185,21 +180,23 @@ | |
| 180 | |
| 181 | $(OBJwysiwyg-flatg-xferwysiwybackoificbackofficbagtment of mv/rm (itg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdsiwygdcsiwyg_.c |
| 182 | |
| 183 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminiz compression libraryACY_sha1harehttp_ssMINIZrtiwysiwyg.o: $(OBJDIMsqlZygdcjsonartifaconartiwysiwygyg_.c |
| 184 | |
| 185 | $(OBJDIR)/wysiwywysiwyg-flatMINIZrtifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 186 | |
| 187 | $(OBJDOBJD mingw |
| 188 | elsemingw |
| 189 | endifsqlhook$(OBJwysiwyg-flatg-xferwysiwyes) |
| 190 | # |
| 191 | nfo mv/rmysiwyg-flatg-cfc: $(OBJDIR)/wwysiwHESIOBJDIR)/wysiwysiwyg-fFTS3_PARENTHESIg_.c |
| 192 | |
| 193 | $(OBJwysiwyg-flatg-xferwysiwybackofficbackofficbagtment of mv/rm (skip checkout files) |
| 194 | # |
| 195 | g-flatg-xferwysierwysiwygwysLEGACY_MV_RMLEGACY_MV_RM-xfttpockesockehttp_sslsslertssiwyg-flatg-xferwy_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyg_.c |
| 196 | |
| 197 | $(OBJDIR)/wysiwywysiwyg-flatg-xferwysiwygwysiwyg_.c:usefsgetreelegacy treaiwywysiwygdcjsonartifaconarOBJDIR)/wysiwygwysiwywysiwygdcjsonartifacon#wysiwyg_.c |
| 198 | |
| 199 | $(OBJDOBJDIR)/wwyseaglsiwystoragetreelegacy treatment oflatgshell mv/rmysiwyg-flatgflatg-xferwysiwygwysiwyg_.c:$(OBJDIR)/wysiwygwysiwywysiwygdcjsonartifaconartiwysiwyg.o: $(OBJDIR)/wwysiwygwysiwyminiz compressio# siwygwysiwyminiz compressiowygwysiwyminf)mkindexOBJDIR)/makeheaders: $(Bmakeheaders# |
| 200 | nfo mv/rmysiwyg-flatg-cfc:es) |
| 201 | # |
| 202 | nfo mv/rmys K@4bF,4: $(BH@E7l,7:mkindex15@4bE,F:OBJDIR)/versionN@4bk,Uy@4cn,6:ENABLEAv@56p,F:OBJDIR)/mkindex1B@5Hr,J:OBJDIR)/makeheaders1Ex@5JD,H@490,P@EA0,3V@6Yh,H@490,P@EA0,3y@6bj,H@490,P@EA0,3k@6gE,H@490,P@EA0,3T@6kW,H@490,P@EA0,3m@6oW,H@490,P@EA0,1:bH@8ek,3:bloG@7ol,30@6tP,H@490,P@EA0,3q@6wx,H@490,P@EA0,3o@70K,H@490,P@EA0,3k@74f,H@490,P@EA0,3s@78x,H@490,P@EA0,7:cgi.c >G@7E0,38@7Di,H@490,P@EA0,41@7HO,H@490,P@EA0,4B@7Lx,H@490,P@EA0,4B@7Qf,H@490,P@EA0,3o@7VO,H@490,P@EA0,4J@7Zj,H@490,P@EA0,4F@7d_,H@490,P@EA0,3q@7iM,H@490,P@EA0,3J@7mj,H@490,P@EA0,5:deltaJ@7v0,G@7n0,39@7rC,H@490,P@EA0,5:deltaH@CMl,3u@7vE,H@490,P@EA0,4P@7zf,H@490,P@EA0,3c@83b,H@490,P@EA0,3s@87l,H@490,P@EA0,3T@8CA,H@490,P@EA0,3o@8GA,H@490,P@EA0,3i@8KW,H@490,P@EA0,3m@8Ol,H@490,P@EA0,8:file.c >H@2vV,3A@8TT,H@490,P@EA0,1:fI@9Dz,1:fJ@9EG,9:finfo.o: I@8V~,1: I@5cU,e@DqW,5:finfoG@ECG,1:fJ@9EG,1:fa@9GU,5:fusefG@CHW,8:fusefs.cK@4EG,P@EA0,3m@8aQ,H@490,P@EA0,3Z@8ej,H@490,P@EA0,3e@8ip,H@490,P@EA0,3X@8n0,H@490,P@EA0,4:httpJ@94W,3O@8rR,H@490,P@EA0,4X@8vM,H@490,P@EA0,4L@8~Q,H@490,P@EA0,H@2Kk,1:>O@97j,4B@94x,H@490,P@EA0,2:imI@9zk,3T@99z,H@490,P@EA0,3X@9Dz,H@490,P@EA0,3:jsoK@9pk,I@9Z~,J@AOl,H@A00,h@CBW,3:jsoH@BXF,1b@9KF,H@490,P@EA0,4s@9MO,H@490,P@EA0,5:json_K@6wx,4E@9SB,H@490,P@EA0,4Z@9Wx,H@490,P@EA0,9:json_diffJ@9ul,3q@9bU,H@490,P@EA0,8:json_dirJ@9ul,R@9iW,2:o:G@5ql,35@9gz,H@490,P@EA0,6:json_fI@9Dz,45@9kz,H@490,P@EA0,4T@9pb,H@490,P@EA0,4V@9ub,H@490,P@EA0,4c@9zd,H@490,P@EA0,B:json_statusJ@9ul,43@A4G,H@490,P@EA0,8:json_tagJ@9ul,R@ABW,2:o:G@5ql,3B@A9z,H@490,P@EA0,4o@ADh,H@490,P@EA0,9:json_userJ@9ul,3s@AJU,H@490,P@EA0,49@ANt,H@490,P@EA0,3e@AS_,H@490,P@EA0,43@AWl,H@490,P@EA0,3o@AaM,H@490,P@EA0,49@Aeh,H@490,P@EA0,40@AjO,H@490,P@EA0,49@Anw,H@490,P@EA0,4J@Asc,H@490,P@EA0,4c@AxT,H@490,P@EA0,7:md5.c >G@B0W,34@B1z,H@490,P@EA0,3i@B5a,H@490,P@EA0,3u@B9q,H@490,P@EA0,C:moderate.c >L@BD0,K@BCz,4:.o: L@BD0,2o@BFV,H@490,P@EA0,3X@BIq,H@490,3x@BMW,H@490,Q@BMW,3f@BR0,H@490,Q@BMW,3h@BVE,H@490,Q@BMW,3p@BZU,H@490,Q@BMW,9:rintf.c >G@3p0,3T@BdF,H@490,Q@Bu0,3x@BhG,H@490,Q@Bu0,3p@Bll,H@490,Q@Bu0,J@9zj,S@BsW,3:o: G@Bs0,3:_.cI@Br~,g@Dv0,2:reK@9Bk,1M@BsW,H@490,3r@Bu0,H@490,4E@By0,H@490,Q@By0,3:earG@6x0,S@C4A,3:o: J@C40,H@C3~,i@CBW,5:earchH@CKW,1P@C4B,H@490,Q@By0,3d@C68,H@490,Q@By0,7:ha1.c >H@CB0,38@CAh,H@490,Q@By0,3Y@CEO,H@490,Q@By0,3h@CIU,H@490,Q@By0,3n@CMj,H@490,Q@By0,3d@CR4,H@490,Q@By0,3Y@CVG,H@490,Q@By0,3d@CZM,H@490,Q@By0,3U@CcY,H@490,Q@D0G,2:agG@CkW,G@DyW,7:tag.o: H@3Hl,2S@ChU,H@490,Q@D0G,3U@CkU,H@490,Q@D0G,40@CoW,H@490,Q@D0G,3z@Ct4,H@490,S@D0G,4:.c >G@6J0,3A@Cxx,H@490,4Q@D0G,H@490,Q@DPl,3b@D5E,H@490,Q@DPl,3x@D9O,H@490,Q@DPl,3j@DDt,H@490,3n@DHl,H@490,Q@DPl,3W@DM6,H@490,3v@DPl,H@490,R@DPl,3Z@DUF,H@490,P@EA0,3o@DYL,H@490,P@EA0,3e@Dbg,H@490,P@EA0,3i@Dfs,H@490,P@EA0,4N@Dk7,H@490,P@EA0,B:winfile.c >H@6Rl,I@Dt~,3H@Dpk,H@490,P@EA0,3~@DtZ,H@490,P@EA0,3u@Dy5,H@490,P@EA0,3g@E1X,H@490,P@EA0,47@E5k,H@490,a0@EA0,JHuUT;0 |
+178
-112
| --- a/win/Makefile.mingw.mistachkin | ||
| +++ b/win/Makefile.mingw.mistachkin | ||
| @@ -49,13 +49,42 @@ | ||
| 49 | 49 | #!/usdescr.c |
| 50 | 50 | |
| 51 | 51 | $(ZLIBDIR)/match.o: |
| 52 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c | |
| 53 | - | |
| 54 | -$(ZLI | |
| 55 | -####86/match.SBuG@7Oj,Hh.o" | |
| 56 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 57 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" | |
| 58 | -ZLIBTARGETSake | |
| 52 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 53 | +# | |
| 54 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 55 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 56 | +# | |
| 57 | +# | |
| 58 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 59 | + | |
| 60 | +$(ZLIBDIR)/match.o: | |
| 61 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 62 | +# | |
| 63 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 64 | +# | |
| 65 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 66 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 67 | +# | |
| 68 | +# | |
| 69 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 70 | + | |
| 71 | +$(ZLIBDIR)/match.o: | |
| 72 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 73 | +# | |
| 74 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 75 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 76 | +# | |
| 77 | +# | |
| 78 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 79 | + | |
| 80 | +$(ZLIBDIR)/match.o: | |
| 81 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 82 | + | |
| 83 | +$(ZLIBDIR)/match.o: | |
| 84 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 85 | +# | |
| 86 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 59 | 88 | # |
| 60 | 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | ||
| 63 | 92 | # |
| 64 | 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 95 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 96 | +# | |
| 97 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 67 | 98 | # |
| 68 | 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | ||
| 72 | 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | 104 | |
| 74 | 105 | $(ZLIBDIR)/match.o: |
| 106 | + $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make | |
| 107 | +# | |
| 108 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 109 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 110 | +# | |
| 111 | +# | |
| 112 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 113 | + | |
| 114 | +$(ZLIBDIR)/match.o: | |
| 75 | 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | 116 | # |
| 77 | 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | ||
| 81 | 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | 122 | |
| 83 | 123 | $(ZLIBDIR)/match.o: |
| 84 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make | |
| 85 | -# | |
| 86 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make | |
| 88 | -# | |
| 89 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 90 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 91 | -# | |
| 92 | -# | |
| 93 | - $(TCC) -c -o $@ -DASake | |
| 94 | -# | |
| 95 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 96 | -ZLIBTARGETS | |
| 97 | -miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make | |
| 98 | -# | |
| 99 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 100 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make | |
| 101 | -# | |
| 102 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 103 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 104 | -# | |
| 105 | -# | |
| 106 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake | |
| 107 | -# | |
| 108 | -# LOC="-DASMV -DMINIZ | |
| 109 | -LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 124 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 125 | + | |
| 126 | +$(ZLIBDIR)/match.o: | |
| 127 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 128 | +# | |
| 129 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 130 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 131 | +# | |
| 132 | +# LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw | |
| 133 | +else)/in#!/usr/bin/make | |
| 134 | +# | |
| 135 | +# | |
| 136 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw | |
| 137 | +endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: | |
| 138 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 139 | +# | |
| 140 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 141 | +# | |
| 142 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 110 | 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | 144 | # |
| 112 | 145 | # |
| @@ -316,25 +349,87 @@ | ||
| 316 | 349 | # |
| 317 | 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | 351 | |
| 319 | -$= fossil.exe -JSON1#!/usr/binren/make | |
| 320 | -# | |
| 321 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 322 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 323 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make | |
| 324 | -# | |
| 325 | -# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" | |
| 326 | -Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make | |
| 327 | -# | |
| 328 | -# LOC=ake | |
| 329 | -# | |
| 330 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 331 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 332 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c | |
| 333 | - | |
| 334 | 352 | $(ZLIBDIR)/match.o: |
| 335 | 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | 354 | # |
| 337 | -# L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 355 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 356 | +# | |
| 357 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 358 | + | |
| 359 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 360 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 361 | +# | |
| 362 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 363 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 364 | +# | |
| 365 | +# | |
| 366 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 367 | +# | |
| 368 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 369 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 370 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 371 | +# | |
| 372 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 373 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 374 | +# to 1.MINIZ, or | |
| 375 | +# set to 1. miniz library included in the | |
| 376 | +# source tree should be used; otherwise, it should not. | |
| 377 | +MINIZ_OBJ.0 = | |
| 378 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 379 | +MINIZ_OBJ. = $(MINIZ | |
| 380 | +# 0, ordinary | |
| 381 | +# the | |
| 382 | +# thesqlite3-see.c | |
| 383 | +SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make | |
| 384 | +# | |
| 385 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 386 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 387 | +# | |
| 388 | +# | |
| 389 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 390 | + | |
| 391 | +$(ZLIBDIR)/match.o: | |
| 392 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 393 | +# | |
| 394 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 395 | +# | |
| 396 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 397 | + | |
| 398 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 399 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 400 | +# | |
| 401 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 402 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 403 | +# | |
| 404 | +# | |
| 405 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 406 | +# | |
| 407 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 408 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 409 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 410 | +# | |
| 411 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 412 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 413 | +# to 1.MINIZ, or | |
| 414 | +# set to 1. miniz library included in the | |
| 415 | +# source tree should be used; otherwise, it should not. | |
| 416 | +MINIZ_OBJ.0 = | |
| 417 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 418 | +MINIZ_OBJ. = $(MINIZ | |
| 419 | +# 0, ordinary | |
| 420 | +# the | |
| 421 | +# thesqlite3-see.c | |
| 422 | +SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) | |
| 423 | +.0 = .1 = shell-see.c | |
| 424 | +. = RCDIR)/.$(USE_SEE)) \ | |
| 425 | + $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 426 | + | |
| 427 | +$(ZLIBDIR)/match.o: | |
| 428 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 429 | +# | |
| 430 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 431 | +# | |
| 432 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 338 | 433 | |
| 339 | 434 | #!/usr/bin/make |
| 340 | 435 | # |
| @@ -343,7 +438,12 @@ | ||
| 343 | 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | 439 | :.h \ |
| 345 | 440 | \ |
| 346 | - V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ | |
| 441 | + V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make | |
| 442 | +# | |
| 443 | +# LOC#sr/bin/make | |
| 444 | +# | |
| 445 | +# # | |
| 446 | +# LOC_.c: \ | |
| 347 | 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | 448 | h \ |
| 349 | 449 | :.h \ |
| @@ -417,43 +517,38 @@ | ||
| 417 | 517 | # |
| 418 | 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | 519 | |
| 420 | -$(ZLIBDIEXTRAOBJ = -DA-make | |
| 421 | --JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: | |
| 422 | - $(TCC) -c -o $@ -D | |
| 423 | - | |
| 424 | - \ | |
| 425 | - statusstatus.h \ | |
| 426 | - tagtag.h \ | |
| 427 | - timelinetimeline.h \ | |
| 428 | - adctrl.h \ \ | |
| 429 | - diffdiff.h \ | |
| 430 | - didir.h \ | |
| 431 | - loginlogin.h \ | |
| 432 | - statusstatus.h \ | |
| 433 | - tagtag.h \ | |
| 434 | - timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ | |
| 435 | - piechart.h \ | |
| 436 | - $(OBJDIR)/pikchr.h \ | |
| 437 | - :h \ | |
| 438 | - :popen.h \ | |
| 439 | - _.c:h \ | |
| 440 | - .h \ | |
| 441 | - :.h \ | |
| 442 | - :.h \ | |
| 443 | - \ | |
| 444 | - #h \ | |
| 445 | - #!/usdescr.c | |
| 446 | - | |
| 447 | -$(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 520 | +$(ZLIBDIR)/match.o: | |
| 521 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 522 | +# | |
| 523 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 524 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 525 | +# | |
| 526 | +# | |
| 527 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 528 | + | |
| 529 | +$(ZLIBDIR)/match.o: | |
| 530 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 531 | + | |
| 532 | +$(ZLIBDIR)/match.o: | |
| 533 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 534 | +# | |
| 535 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 536 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 537 | +# | |
| 538 | +# | |
| 539 | + $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz | |
| 540 | +endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make | |
| 541 | +# | |
| 542 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 448 | 543 | # |
| 449 | 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | 546 | # |
| 452 | 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | 548 | |
| 454 | -# The escr#!$(APPNAME)-o $@ | |
| 455 | - | |
| 456 | -#!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make | |
| 549 | +# The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make | |
| 550 | +# | |
| 551 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 457 | 552 | # |
| 458 | 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | ||
| 1486 | 1581 | atch.o" |
| 1487 | 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | 1583 | # |
| 1489 | -# LOC="-DASMV -DASMINF" OBJDIR)/sqlie | |
| 1490 | -# | |
| 1491 | -# LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ | |
| 1492 | -# 0, ordinary | |
| 1493 | -#MV -JSON1#!MINIZifas86.c | |
| 1494 | - | |
| 1495 | -$(ZLIBDIR)/match.o: | |
| 1496 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe | |
| 1497 | -# | |
| 1498 | -# LOC="-DA -JSON1#!/usr/binen/make | |
| 1499 | -# | |
| 1500 | -# LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 1501 | -# | |
| 1502 | -# LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 1503 | -# | |
| 1504 | -# LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 1505 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make | |
| 1506 | -# | |
| 1507 | -#!/usr/bin/make | |
| 1508 | -# | |
| 1509 | -# LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" | |
| 1510 | -ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" | |
| 1511 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 1512 | -# | |
| 1513 | -# | |
| 1514 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" | |
| 1515 | -ZLIB# | |
| 1516 | - | |
| 1517 | -atch.o" | |
| 1518 | -ZL -DASMINF" OBJA="@J_t,1JJtr | |
| 1584 | +# LOC="-DASMV -DASMINF" OBJ |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c |
| 53 | |
| 54 | $(ZLI |
| 55 | ####86/match.SBuG@7Oj,Hh.o" |
| 56 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 57 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" |
| 58 | ZLIBTARGETSake |
| 59 | # |
| 60 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 63 | # |
| 64 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 67 | # |
| 68 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 72 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | |
| 74 | $(ZLIBDIR)/match.o: |
| 75 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | # |
| 77 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 81 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 90 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 91 | # |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASake |
| 94 | # |
| 95 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 96 | ZLIBTARGETS |
| 97 | miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make |
| 101 | # |
| 102 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 103 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 104 | # |
| 105 | # |
| 106 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake |
| 107 | # |
| 108 | # LOC="-DASMV -DMINIZ |
| 109 | LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 110 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | # |
| 112 | # |
| @@ -316,25 +349,87 @@ | |
| 316 | # |
| 317 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | |
| 319 | $= fossil.exe -JSON1#!/usr/binren/make |
| 320 | # |
| 321 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 322 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 323 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make |
| 324 | # |
| 325 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" |
| 326 | Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make |
| 327 | # |
| 328 | # LOC=ake |
| 329 | # |
| 330 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 331 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 332 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c |
| 333 | |
| 334 | $(ZLIBDIR)/match.o: |
| 335 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | # |
| 337 | # L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 338 | |
| 339 | #!/usr/bin/make |
| 340 | # |
| @@ -343,7 +438,12 @@ | |
| 343 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | :.h \ |
| 345 | \ |
| 346 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ |
| 347 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | h \ |
| 349 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 417 | # |
| 418 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | |
| 420 | $(ZLIBDIEXTRAOBJ = -DA-make |
| 421 | -JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: |
| 422 | $(TCC) -c -o $@ -D |
| 423 | |
| 424 | \ |
| 425 | statusstatus.h \ |
| 426 | tagtag.h \ |
| 427 | timelinetimeline.h \ |
| 428 | adctrl.h \ \ |
| 429 | diffdiff.h \ |
| 430 | didir.h \ |
| 431 | loginlogin.h \ |
| 432 | statusstatus.h \ |
| 433 | tagtag.h \ |
| 434 | timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ |
| 435 | piechart.h \ |
| 436 | $(OBJDIR)/pikchr.h \ |
| 437 | :h \ |
| 438 | :popen.h \ |
| 439 | _.c:h \ |
| 440 | .h \ |
| 441 | :.h \ |
| 442 | :.h \ |
| 443 | \ |
| 444 | #h \ |
| 445 | #!/usdescr.c |
| 446 | |
| 447 | $(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 448 | # |
| 449 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | # |
| 452 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | |
| 454 | # The escr#!$(APPNAME)-o $@ |
| 455 | |
| 456 | #!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make |
| 457 | # |
| 458 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1486 | atch.o" |
| 1487 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | # |
| 1489 | # LOC="-DASMV -DASMINF" OBJDIR)/sqlie |
| 1490 | # |
| 1491 | # LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ |
| 1492 | # 0, ordinary |
| 1493 | #MV -JSON1#!MINIZifas86.c |
| 1494 | |
| 1495 | $(ZLIBDIR)/match.o: |
| 1496 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe |
| 1497 | # |
| 1498 | # LOC="-DA -JSON1#!/usr/binen/make |
| 1499 | # |
| 1500 | # LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 1501 | # |
| 1502 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 1503 | # |
| 1504 | # LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 1505 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make |
| 1506 | # |
| 1507 | #!/usr/bin/make |
| 1508 | # |
| 1509 | # LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" |
| 1510 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" |
| 1511 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 1512 | # |
| 1513 | # |
| 1514 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" |
| 1515 | ZLIB# |
| 1516 | |
| 1517 | atch.o" |
| 1518 | ZL -DASMINF" OBJA="@J_t,1JJtr |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 53 | # |
| 54 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 55 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 56 | # |
| 57 | # |
| 58 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 59 | |
| 60 | $(ZLIBDIR)/match.o: |
| 61 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 62 | # |
| 63 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 64 | # |
| 65 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 66 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 67 | # |
| 68 | # |
| 69 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 70 | |
| 71 | $(ZLIBDIR)/match.o: |
| 72 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 73 | # |
| 74 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 75 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 76 | # |
| 77 | # |
| 78 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 79 | |
| 80 | $(ZLIBDIR)/match.o: |
| 81 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 95 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 96 | # |
| 97 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 104 | |
| 105 | $(ZLIBDIR)/match.o: |
| 106 | $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make |
| 107 | # |
| 108 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 109 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 110 | # |
| 111 | # |
| 112 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 113 | |
| 114 | $(ZLIBDIR)/match.o: |
| 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 116 | # |
| 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 122 | |
| 123 | $(ZLIBDIR)/match.o: |
| 124 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 125 | |
| 126 | $(ZLIBDIR)/match.o: |
| 127 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 128 | # |
| 129 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 130 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 131 | # |
| 132 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 133 | else)/in#!/usr/bin/make |
| 134 | # |
| 135 | # |
| 136 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 137 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 138 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 139 | # |
| 140 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 141 | # |
| 142 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 144 | # |
| 145 | # |
| @@ -316,25 +349,87 @@ | |
| 349 | # |
| 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 351 | |
| 352 | $(ZLIBDIR)/match.o: |
| 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 354 | # |
| 355 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 356 | # |
| 357 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 358 | |
| 359 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 360 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 361 | # |
| 362 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 363 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 364 | # |
| 365 | # |
| 366 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 367 | # |
| 368 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 369 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 370 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 371 | # |
| 372 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 373 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 374 | # to 1.MINIZ, or |
| 375 | # set to 1. miniz library included in the |
| 376 | # source tree should be used; otherwise, it should not. |
| 377 | MINIZ_OBJ.0 = |
| 378 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 379 | MINIZ_OBJ. = $(MINIZ |
| 380 | # 0, ordinary |
| 381 | # the |
| 382 | # thesqlite3-see.c |
| 383 | SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make |
| 384 | # |
| 385 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 386 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 387 | # |
| 388 | # |
| 389 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 390 | |
| 391 | $(ZLIBDIR)/match.o: |
| 392 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 393 | # |
| 394 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 395 | # |
| 396 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 397 | |
| 398 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 399 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 400 | # |
| 401 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 402 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 403 | # |
| 404 | # |
| 405 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 406 | # |
| 407 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 408 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 409 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 410 | # |
| 411 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 412 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 413 | # to 1.MINIZ, or |
| 414 | # set to 1. miniz library included in the |
| 415 | # source tree should be used; otherwise, it should not. |
| 416 | MINIZ_OBJ.0 = |
| 417 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 418 | MINIZ_OBJ. = $(MINIZ |
| 419 | # 0, ordinary |
| 420 | # the |
| 421 | # thesqlite3-see.c |
| 422 | SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) |
| 423 | .0 = .1 = shell-see.c |
| 424 | . = RCDIR)/.$(USE_SEE)) \ |
| 425 | $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 426 | |
| 427 | $(ZLIBDIR)/match.o: |
| 428 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 429 | # |
| 430 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 431 | # |
| 432 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 433 | |
| 434 | #!/usr/bin/make |
| 435 | # |
| @@ -343,7 +438,12 @@ | |
| 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 439 | :.h \ |
| 440 | \ |
| 441 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make |
| 442 | # |
| 443 | # LOC#sr/bin/make |
| 444 | # |
| 445 | # # |
| 446 | # LOC_.c: \ |
| 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 448 | h \ |
| 449 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 517 | # |
| 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 519 | |
| 520 | $(ZLIBDIR)/match.o: |
| 521 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 522 | # |
| 523 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 524 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 525 | # |
| 526 | # |
| 527 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 528 | |
| 529 | $(ZLIBDIR)/match.o: |
| 530 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 531 | |
| 532 | $(ZLIBDIR)/match.o: |
| 533 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 534 | # |
| 535 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 536 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 537 | # |
| 538 | # |
| 539 | $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz |
| 540 | endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make |
| 541 | # |
| 542 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 543 | # |
| 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 546 | # |
| 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 548 | |
| 549 | # The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make |
| 550 | # |
| 551 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 552 | # |
| 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1581 | atch.o" |
| 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1583 | # |
| 1584 | # LOC="-DASMV -DASMINF" OBJ |
+178
-112
| --- a/win/Makefile.mingw.mistachkin | ||
| +++ b/win/Makefile.mingw.mistachkin | ||
| @@ -49,13 +49,42 @@ | ||
| 49 | 49 | #!/usdescr.c |
| 50 | 50 | |
| 51 | 51 | $(ZLIBDIR)/match.o: |
| 52 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c | |
| 53 | - | |
| 54 | -$(ZLI | |
| 55 | -####86/match.SBuG@7Oj,Hh.o" | |
| 56 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 57 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" | |
| 58 | -ZLIBTARGETSake | |
| 52 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 53 | +# | |
| 54 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 55 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 56 | +# | |
| 57 | +# | |
| 58 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 59 | + | |
| 60 | +$(ZLIBDIR)/match.o: | |
| 61 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 62 | +# | |
| 63 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 64 | +# | |
| 65 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 66 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 67 | +# | |
| 68 | +# | |
| 69 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 70 | + | |
| 71 | +$(ZLIBDIR)/match.o: | |
| 72 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 73 | +# | |
| 74 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 75 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 76 | +# | |
| 77 | +# | |
| 78 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 79 | + | |
| 80 | +$(ZLIBDIR)/match.o: | |
| 81 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 82 | + | |
| 83 | +$(ZLIBDIR)/match.o: | |
| 84 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 85 | +# | |
| 86 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 59 | 88 | # |
| 60 | 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | ||
| 63 | 92 | # |
| 64 | 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 95 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 96 | +# | |
| 97 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 67 | 98 | # |
| 68 | 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | ||
| 72 | 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | 104 | |
| 74 | 105 | $(ZLIBDIR)/match.o: |
| 106 | + $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make | |
| 107 | +# | |
| 108 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 109 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 110 | +# | |
| 111 | +# | |
| 112 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 113 | + | |
| 114 | +$(ZLIBDIR)/match.o: | |
| 75 | 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | 116 | # |
| 77 | 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | ||
| 81 | 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | 122 | |
| 83 | 123 | $(ZLIBDIR)/match.o: |
| 84 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make | |
| 85 | -# | |
| 86 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make | |
| 88 | -# | |
| 89 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 90 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 91 | -# | |
| 92 | -# | |
| 93 | - $(TCC) -c -o $@ -DASake | |
| 94 | -# | |
| 95 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 96 | -ZLIBTARGETS | |
| 97 | -miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make | |
| 98 | -# | |
| 99 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 100 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make | |
| 101 | -# | |
| 102 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 103 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 104 | -# | |
| 105 | -# | |
| 106 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake | |
| 107 | -# | |
| 108 | -# LOC="-DASMV -DMINIZ | |
| 109 | -LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 124 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 125 | + | |
| 126 | +$(ZLIBDIR)/match.o: | |
| 127 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 128 | +# | |
| 129 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 130 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 131 | +# | |
| 132 | +# LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw | |
| 133 | +else)/in#!/usr/bin/make | |
| 134 | +# | |
| 135 | +# | |
| 136 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw | |
| 137 | +endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: | |
| 138 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 139 | +# | |
| 140 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 141 | +# | |
| 142 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 110 | 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | 144 | # |
| 112 | 145 | # |
| @@ -316,25 +349,87 @@ | ||
| 316 | 349 | # |
| 317 | 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | 351 | |
| 319 | -$= fossil.exe -JSON1#!/usr/binren/make | |
| 320 | -# | |
| 321 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 322 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 323 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make | |
| 324 | -# | |
| 325 | -# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" | |
| 326 | -Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make | |
| 327 | -# | |
| 328 | -# LOC=ake | |
| 329 | -# | |
| 330 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 331 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 332 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c | |
| 333 | - | |
| 334 | 352 | $(ZLIBDIR)/match.o: |
| 335 | 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | 354 | # |
| 337 | -# L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 355 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 356 | +# | |
| 357 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 358 | + | |
| 359 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 360 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 361 | +# | |
| 362 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 363 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 364 | +# | |
| 365 | +# | |
| 366 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 367 | +# | |
| 368 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 369 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 370 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 371 | +# | |
| 372 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 373 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 374 | +# to 1.MINIZ, or | |
| 375 | +# set to 1. miniz library included in the | |
| 376 | +# source tree should be used; otherwise, it should not. | |
| 377 | +MINIZ_OBJ.0 = | |
| 378 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 379 | +MINIZ_OBJ. = $(MINIZ | |
| 380 | +# 0, ordinary | |
| 381 | +# the | |
| 382 | +# thesqlite3-see.c | |
| 383 | +SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make | |
| 384 | +# | |
| 385 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 386 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 387 | +# | |
| 388 | +# | |
| 389 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 390 | + | |
| 391 | +$(ZLIBDIR)/match.o: | |
| 392 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 393 | +# | |
| 394 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 395 | +# | |
| 396 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 397 | + | |
| 398 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 399 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 400 | +# | |
| 401 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 402 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 403 | +# | |
| 404 | +# | |
| 405 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 406 | +# | |
| 407 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 408 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 409 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 410 | +# | |
| 411 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 412 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 413 | +# to 1.MINIZ, or | |
| 414 | +# set to 1. miniz library included in the | |
| 415 | +# source tree should be used; otherwise, it should not. | |
| 416 | +MINIZ_OBJ.0 = | |
| 417 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 418 | +MINIZ_OBJ. = $(MINIZ | |
| 419 | +# 0, ordinary | |
| 420 | +# the | |
| 421 | +# thesqlite3-see.c | |
| 422 | +SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) | |
| 423 | +.0 = .1 = shell-see.c | |
| 424 | +. = RCDIR)/.$(USE_SEE)) \ | |
| 425 | + $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 426 | + | |
| 427 | +$(ZLIBDIR)/match.o: | |
| 428 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 429 | +# | |
| 430 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 431 | +# | |
| 432 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 338 | 433 | |
| 339 | 434 | #!/usr/bin/make |
| 340 | 435 | # |
| @@ -343,7 +438,12 @@ | ||
| 343 | 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | 439 | :.h \ |
| 345 | 440 | \ |
| 346 | - V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ | |
| 441 | + V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make | |
| 442 | +# | |
| 443 | +# LOC#sr/bin/make | |
| 444 | +# | |
| 445 | +# # | |
| 446 | +# LOC_.c: \ | |
| 347 | 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | 448 | h \ |
| 349 | 449 | :.h \ |
| @@ -417,43 +517,38 @@ | ||
| 417 | 517 | # |
| 418 | 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | 519 | |
| 420 | -$(ZLIBDIEXTRAOBJ = -DA-make | |
| 421 | --JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: | |
| 422 | - $(TCC) -c -o $@ -D | |
| 423 | - | |
| 424 | - \ | |
| 425 | - statusstatus.h \ | |
| 426 | - tagtag.h \ | |
| 427 | - timelinetimeline.h \ | |
| 428 | - adctrl.h \ \ | |
| 429 | - diffdiff.h \ | |
| 430 | - didir.h \ | |
| 431 | - loginlogin.h \ | |
| 432 | - statusstatus.h \ | |
| 433 | - tagtag.h \ | |
| 434 | - timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ | |
| 435 | - piechart.h \ | |
| 436 | - $(OBJDIR)/pikchr.h \ | |
| 437 | - :h \ | |
| 438 | - :popen.h \ | |
| 439 | - _.c:h \ | |
| 440 | - .h \ | |
| 441 | - :.h \ | |
| 442 | - :.h \ | |
| 443 | - \ | |
| 444 | - #h \ | |
| 445 | - #!/usdescr.c | |
| 446 | - | |
| 447 | -$(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 520 | +$(ZLIBDIR)/match.o: | |
| 521 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 522 | +# | |
| 523 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 524 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 525 | +# | |
| 526 | +# | |
| 527 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 528 | + | |
| 529 | +$(ZLIBDIR)/match.o: | |
| 530 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 531 | + | |
| 532 | +$(ZLIBDIR)/match.o: | |
| 533 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 534 | +# | |
| 535 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 536 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 537 | +# | |
| 538 | +# | |
| 539 | + $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz | |
| 540 | +endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make | |
| 541 | +# | |
| 542 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 448 | 543 | # |
| 449 | 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | 546 | # |
| 452 | 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | 548 | |
| 454 | -# The escr#!$(APPNAME)-o $@ | |
| 455 | - | |
| 456 | -#!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make | |
| 549 | +# The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make | |
| 550 | +# | |
| 551 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 457 | 552 | # |
| 458 | 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | ||
| 1486 | 1581 | atch.o" |
| 1487 | 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | 1583 | # |
| 1489 | -# LOC="-DASMV -DASMINF" OBJDIR)/sqlie | |
| 1490 | -# | |
| 1491 | -# LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ | |
| 1492 | -# 0, ordinary | |
| 1493 | -#MV -JSON1#!MINIZifas86.c | |
| 1494 | - | |
| 1495 | -$(ZLIBDIR)/match.o: | |
| 1496 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe | |
| 1497 | -# | |
| 1498 | -# LOC="-DA -JSON1#!/usr/binen/make | |
| 1499 | -# | |
| 1500 | -# LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 1501 | -# | |
| 1502 | -# LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 1503 | -# | |
| 1504 | -# LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 1505 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make | |
| 1506 | -# | |
| 1507 | -#!/usr/bin/make | |
| 1508 | -# | |
| 1509 | -# LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" | |
| 1510 | -ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" | |
| 1511 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 1512 | -# | |
| 1513 | -# | |
| 1514 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" | |
| 1515 | -ZLIB# | |
| 1516 | - | |
| 1517 | -atch.o" | |
| 1518 | -ZL -DASMINF" OBJA="@J_t,1JJtr | |
| 1584 | +# LOC="-DASMV -DASMINF" OBJ |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c |
| 53 | |
| 54 | $(ZLI |
| 55 | ####86/match.SBuG@7Oj,Hh.o" |
| 56 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 57 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" |
| 58 | ZLIBTARGETSake |
| 59 | # |
| 60 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 63 | # |
| 64 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 67 | # |
| 68 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 72 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | |
| 74 | $(ZLIBDIR)/match.o: |
| 75 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | # |
| 77 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 81 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 90 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 91 | # |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASake |
| 94 | # |
| 95 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 96 | ZLIBTARGETS |
| 97 | miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make |
| 101 | # |
| 102 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 103 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 104 | # |
| 105 | # |
| 106 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake |
| 107 | # |
| 108 | # LOC="-DASMV -DMINIZ |
| 109 | LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 110 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | # |
| 112 | # |
| @@ -316,25 +349,87 @@ | |
| 316 | # |
| 317 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | |
| 319 | $= fossil.exe -JSON1#!/usr/binren/make |
| 320 | # |
| 321 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 322 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 323 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make |
| 324 | # |
| 325 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" |
| 326 | Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make |
| 327 | # |
| 328 | # LOC=ake |
| 329 | # |
| 330 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 331 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 332 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c |
| 333 | |
| 334 | $(ZLIBDIR)/match.o: |
| 335 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | # |
| 337 | # L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 338 | |
| 339 | #!/usr/bin/make |
| 340 | # |
| @@ -343,7 +438,12 @@ | |
| 343 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | :.h \ |
| 345 | \ |
| 346 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ |
| 347 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | h \ |
| 349 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 417 | # |
| 418 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | |
| 420 | $(ZLIBDIEXTRAOBJ = -DA-make |
| 421 | -JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: |
| 422 | $(TCC) -c -o $@ -D |
| 423 | |
| 424 | \ |
| 425 | statusstatus.h \ |
| 426 | tagtag.h \ |
| 427 | timelinetimeline.h \ |
| 428 | adctrl.h \ \ |
| 429 | diffdiff.h \ |
| 430 | didir.h \ |
| 431 | loginlogin.h \ |
| 432 | statusstatus.h \ |
| 433 | tagtag.h \ |
| 434 | timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ |
| 435 | piechart.h \ |
| 436 | $(OBJDIR)/pikchr.h \ |
| 437 | :h \ |
| 438 | :popen.h \ |
| 439 | _.c:h \ |
| 440 | .h \ |
| 441 | :.h \ |
| 442 | :.h \ |
| 443 | \ |
| 444 | #h \ |
| 445 | #!/usdescr.c |
| 446 | |
| 447 | $(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 448 | # |
| 449 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | # |
| 452 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | |
| 454 | # The escr#!$(APPNAME)-o $@ |
| 455 | |
| 456 | #!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make |
| 457 | # |
| 458 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1486 | atch.o" |
| 1487 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | # |
| 1489 | # LOC="-DASMV -DASMINF" OBJDIR)/sqlie |
| 1490 | # |
| 1491 | # LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ |
| 1492 | # 0, ordinary |
| 1493 | #MV -JSON1#!MINIZifas86.c |
| 1494 | |
| 1495 | $(ZLIBDIR)/match.o: |
| 1496 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe |
| 1497 | # |
| 1498 | # LOC="-DA -JSON1#!/usr/binen/make |
| 1499 | # |
| 1500 | # LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 1501 | # |
| 1502 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 1503 | # |
| 1504 | # LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 1505 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make |
| 1506 | # |
| 1507 | #!/usr/bin/make |
| 1508 | # |
| 1509 | # LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" |
| 1510 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" |
| 1511 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 1512 | # |
| 1513 | # |
| 1514 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" |
| 1515 | ZLIB# |
| 1516 | |
| 1517 | atch.o" |
| 1518 | ZL -DASMINF" OBJA="@J_t,1JJtr |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 53 | # |
| 54 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 55 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 56 | # |
| 57 | # |
| 58 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 59 | |
| 60 | $(ZLIBDIR)/match.o: |
| 61 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 62 | # |
| 63 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 64 | # |
| 65 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 66 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 67 | # |
| 68 | # |
| 69 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 70 | |
| 71 | $(ZLIBDIR)/match.o: |
| 72 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 73 | # |
| 74 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 75 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 76 | # |
| 77 | # |
| 78 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 79 | |
| 80 | $(ZLIBDIR)/match.o: |
| 81 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 95 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 96 | # |
| 97 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 104 | |
| 105 | $(ZLIBDIR)/match.o: |
| 106 | $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make |
| 107 | # |
| 108 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 109 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 110 | # |
| 111 | # |
| 112 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 113 | |
| 114 | $(ZLIBDIR)/match.o: |
| 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 116 | # |
| 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 122 | |
| 123 | $(ZLIBDIR)/match.o: |
| 124 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 125 | |
| 126 | $(ZLIBDIR)/match.o: |
| 127 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 128 | # |
| 129 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 130 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 131 | # |
| 132 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 133 | else)/in#!/usr/bin/make |
| 134 | # |
| 135 | # |
| 136 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 137 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 138 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 139 | # |
| 140 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 141 | # |
| 142 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 144 | # |
| 145 | # |
| @@ -316,25 +349,87 @@ | |
| 349 | # |
| 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 351 | |
| 352 | $(ZLIBDIR)/match.o: |
| 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 354 | # |
| 355 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 356 | # |
| 357 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 358 | |
| 359 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 360 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 361 | # |
| 362 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 363 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 364 | # |
| 365 | # |
| 366 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 367 | # |
| 368 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 369 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 370 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 371 | # |
| 372 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 373 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 374 | # to 1.MINIZ, or |
| 375 | # set to 1. miniz library included in the |
| 376 | # source tree should be used; otherwise, it should not. |
| 377 | MINIZ_OBJ.0 = |
| 378 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 379 | MINIZ_OBJ. = $(MINIZ |
| 380 | # 0, ordinary |
| 381 | # the |
| 382 | # thesqlite3-see.c |
| 383 | SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make |
| 384 | # |
| 385 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 386 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 387 | # |
| 388 | # |
| 389 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 390 | |
| 391 | $(ZLIBDIR)/match.o: |
| 392 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 393 | # |
| 394 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 395 | # |
| 396 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 397 | |
| 398 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 399 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 400 | # |
| 401 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 402 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 403 | # |
| 404 | # |
| 405 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 406 | # |
| 407 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 408 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 409 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 410 | # |
| 411 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 412 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 413 | # to 1.MINIZ, or |
| 414 | # set to 1. miniz library included in the |
| 415 | # source tree should be used; otherwise, it should not. |
| 416 | MINIZ_OBJ.0 = |
| 417 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 418 | MINIZ_OBJ. = $(MINIZ |
| 419 | # 0, ordinary |
| 420 | # the |
| 421 | # thesqlite3-see.c |
| 422 | SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) |
| 423 | .0 = .1 = shell-see.c |
| 424 | . = RCDIR)/.$(USE_SEE)) \ |
| 425 | $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 426 | |
| 427 | $(ZLIBDIR)/match.o: |
| 428 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 429 | # |
| 430 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 431 | # |
| 432 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 433 | |
| 434 | #!/usr/bin/make |
| 435 | # |
| @@ -343,7 +438,12 @@ | |
| 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 439 | :.h \ |
| 440 | \ |
| 441 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make |
| 442 | # |
| 443 | # LOC#sr/bin/make |
| 444 | # |
| 445 | # # |
| 446 | # LOC_.c: \ |
| 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 448 | h \ |
| 449 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 517 | # |
| 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 519 | |
| 520 | $(ZLIBDIR)/match.o: |
| 521 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 522 | # |
| 523 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 524 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 525 | # |
| 526 | # |
| 527 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 528 | |
| 529 | $(ZLIBDIR)/match.o: |
| 530 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 531 | |
| 532 | $(ZLIBDIR)/match.o: |
| 533 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 534 | # |
| 535 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 536 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 537 | # |
| 538 | # |
| 539 | $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz |
| 540 | endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make |
| 541 | # |
| 542 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 543 | # |
| 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 546 | # |
| 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 548 | |
| 549 | # The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make |
| 550 | # |
| 551 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 552 | # |
| 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1581 | atch.o" |
| 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1583 | # |
| 1584 | # LOC="-DASMV -DASMINF" OBJ |
+178
-112
| --- a/win/Makefile.mingw.mistachkin | ||
| +++ b/win/Makefile.mingw.mistachkin | ||
| @@ -49,13 +49,42 @@ | ||
| 49 | 49 | #!/usdescr.c |
| 50 | 50 | |
| 51 | 51 | $(ZLIBDIR)/match.o: |
| 52 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c | |
| 53 | - | |
| 54 | -$(ZLI | |
| 55 | -####86/match.SBuG@7Oj,Hh.o" | |
| 56 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 57 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" | |
| 58 | -ZLIBTARGETSake | |
| 52 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 53 | +# | |
| 54 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 55 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 56 | +# | |
| 57 | +# | |
| 58 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 59 | + | |
| 60 | +$(ZLIBDIR)/match.o: | |
| 61 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 62 | +# | |
| 63 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 64 | +# | |
| 65 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 66 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 67 | +# | |
| 68 | +# | |
| 69 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 70 | + | |
| 71 | +$(ZLIBDIR)/match.o: | |
| 72 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 73 | +# | |
| 74 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 75 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 76 | +# | |
| 77 | +# | |
| 78 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 79 | + | |
| 80 | +$(ZLIBDIR)/match.o: | |
| 81 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 82 | + | |
| 83 | +$(ZLIBDIR)/match.o: | |
| 84 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 85 | +# | |
| 86 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 59 | 88 | # |
| 60 | 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | ||
| 63 | 92 | # |
| 64 | 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 95 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 96 | +# | |
| 97 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 67 | 98 | # |
| 68 | 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | ||
| 72 | 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | 104 | |
| 74 | 105 | $(ZLIBDIR)/match.o: |
| 106 | + $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make | |
| 107 | +# | |
| 108 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 109 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 110 | +# | |
| 111 | +# | |
| 112 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 113 | + | |
| 114 | +$(ZLIBDIR)/match.o: | |
| 75 | 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | 116 | # |
| 77 | 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | ||
| 81 | 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | 122 | |
| 83 | 123 | $(ZLIBDIR)/match.o: |
| 84 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make | |
| 85 | -# | |
| 86 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 87 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make | |
| 88 | -# | |
| 89 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 90 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 91 | -# | |
| 92 | -# | |
| 93 | - $(TCC) -c -o $@ -DASake | |
| 94 | -# | |
| 95 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 96 | -ZLIBTARGETS | |
| 97 | -miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make | |
| 98 | -# | |
| 99 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 100 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make | |
| 101 | -# | |
| 102 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 103 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 104 | -# | |
| 105 | -# | |
| 106 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake | |
| 107 | -# | |
| 108 | -# LOC="-DASMV -DMINIZ | |
| 109 | -LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 124 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 125 | + | |
| 126 | +$(ZLIBDIR)/match.o: | |
| 127 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 128 | +# | |
| 129 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 130 | +ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make | |
| 131 | +# | |
| 132 | +# LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw | |
| 133 | +else)/in#!/usr/bin/make | |
| 134 | +# | |
| 135 | +# | |
| 136 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw | |
| 137 | +endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: | |
| 138 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 139 | +# | |
| 140 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make | |
| 141 | +# | |
| 142 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 110 | 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | 144 | # |
| 112 | 145 | # |
| @@ -316,25 +349,87 @@ | ||
| 316 | 349 | # |
| 317 | 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | 351 | |
| 319 | -$= fossil.exe -JSON1#!/usr/binren/make | |
| 320 | -# | |
| 321 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 322 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 323 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make | |
| 324 | -# | |
| 325 | -# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" | |
| 326 | -Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make | |
| 327 | -# | |
| 328 | -# LOC=ake | |
| 329 | -# | |
| 330 | -# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 331 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 332 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c | |
| 333 | - | |
| 334 | 352 | $(ZLIBDIR)/match.o: |
| 335 | 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | 354 | # |
| 337 | -# L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 355 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 356 | +# | |
| 357 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 358 | + | |
| 359 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 360 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 361 | +# | |
| 362 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 363 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 364 | +# | |
| 365 | +# | |
| 366 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 367 | +# | |
| 368 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 369 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 370 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 371 | +# | |
| 372 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 373 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 374 | +# to 1.MINIZ, or | |
| 375 | +# set to 1. miniz library included in the | |
| 376 | +# source tree should be used; otherwise, it should not. | |
| 377 | +MINIZ_OBJ.0 = | |
| 378 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 379 | +MINIZ_OBJ. = $(MINIZ | |
| 380 | +# 0, ordinary | |
| 381 | +# the | |
| 382 | +# thesqlite3-see.c | |
| 383 | +SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make | |
| 384 | +# | |
| 385 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 386 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 387 | +# | |
| 388 | +# | |
| 389 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 390 | + | |
| 391 | +$(ZLIBDIR)/match.o: | |
| 392 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 393 | +# | |
| 394 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 395 | +# | |
| 396 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 397 | + | |
| 398 | +#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" | |
| 399 | +ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make | |
| 400 | +# | |
| 401 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 402 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 403 | +# | |
| 404 | +# | |
| 405 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make | |
| 406 | +# | |
| 407 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 408 | +ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 409 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake | |
| 410 | +# | |
| 411 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 412 | +ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set | |
| 413 | +# to 1.MINIZ, or | |
| 414 | +# set to 1. miniz library included in the | |
| 415 | +# source tree should be used; otherwise, it should not. | |
| 416 | +MINIZ_OBJ.0 = | |
| 417 | +MINIZ_OBJ.1 = $(OBJDIR)/miniz.o | |
| 418 | +MINIZ_OBJ. = $(MINIZ | |
| 419 | +# 0, ordinary | |
| 420 | +# the | |
| 421 | +# thesqlite3-see.c | |
| 422 | +SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) | |
| 423 | +.0 = .1 = shell-see.c | |
| 424 | +. = RCDIR)/.$(USE_SEE)) \ | |
| 425 | + $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 426 | + | |
| 427 | +$(ZLIBDIR)/match.o: | |
| 428 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make | |
| 429 | +# | |
| 430 | +# L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 431 | +# | |
| 432 | +# LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ | |
| 338 | 433 | |
| 339 | 434 | #!/usr/bin/make |
| 340 | 435 | # |
| @@ -343,7 +438,12 @@ | ||
| 343 | 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | 439 | :.h \ |
| 345 | 440 | \ |
| 346 | - V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ | |
| 441 | + V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make | |
| 442 | +# | |
| 443 | +# LOC#sr/bin/make | |
| 444 | +# | |
| 445 | +# # | |
| 446 | +# LOC_.c: \ | |
| 347 | 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | 448 | h \ |
| 349 | 449 | :.h \ |
| @@ -417,43 +517,38 @@ | ||
| 417 | 517 | # |
| 418 | 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | 519 | |
| 420 | -$(ZLIBDIEXTRAOBJ = -DA-make | |
| 421 | --JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: | |
| 422 | - $(TCC) -c -o $@ -D | |
| 423 | - | |
| 424 | - \ | |
| 425 | - statusstatus.h \ | |
| 426 | - tagtag.h \ | |
| 427 | - timelinetimeline.h \ | |
| 428 | - adctrl.h \ \ | |
| 429 | - diffdiff.h \ | |
| 430 | - didir.h \ | |
| 431 | - loginlogin.h \ | |
| 432 | - statusstatus.h \ | |
| 433 | - tagtag.h \ | |
| 434 | - timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ | |
| 435 | - piechart.h \ | |
| 436 | - $(OBJDIR)/pikchr.h \ | |
| 437 | - :h \ | |
| 438 | - :popen.h \ | |
| 439 | - _.c:h \ | |
| 440 | - .h \ | |
| 441 | - :.h \ | |
| 442 | - :.h \ | |
| 443 | - \ | |
| 444 | - #h \ | |
| 445 | - #!/usdescr.c | |
| 446 | - | |
| 447 | -$(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 520 | +$(ZLIBDIR)/match.o: | |
| 521 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 522 | +# | |
| 523 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 524 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 525 | +# | |
| 526 | +# | |
| 527 | + $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c | |
| 528 | + | |
| 529 | +$(ZLIBDIR)/match.o: | |
| 530 | + $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c | |
| 531 | + | |
| 532 | +$(ZLIBDIR)/match.o: | |
| 533 | + $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make | |
| 534 | +# | |
| 535 | +# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 536 | +ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 537 | +# | |
| 538 | +# | |
| 539 | + $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz | |
| 540 | +endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make | |
| 541 | +# | |
| 542 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 448 | 543 | # |
| 449 | 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | 546 | # |
| 452 | 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | 548 | |
| 454 | -# The escr#!$(APPNAME)-o $@ | |
| 455 | - | |
| 456 | -#!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make | |
| 549 | +# The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make | |
| 550 | +# | |
| 551 | +# LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 457 | 552 | # |
| 458 | 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | ||
| 1486 | 1581 | atch.o" |
| 1487 | 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | 1583 | # |
| 1489 | -# LOC="-DASMV -DASMINF" OBJDIR)/sqlie | |
| 1490 | -# | |
| 1491 | -# LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ | |
| 1492 | -# 0, ordinary | |
| 1493 | -#MV -JSON1#!MINIZifas86.c | |
| 1494 | - | |
| 1495 | -$(ZLIBDIR)/match.o: | |
| 1496 | - $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe | |
| 1497 | -# | |
| 1498 | -# LOC="-DA -JSON1#!/usr/binen/make | |
| 1499 | -# | |
| 1500 | -# LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make | |
| 1501 | -# | |
| 1502 | -# LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make | |
| 1503 | -# | |
| 1504 | -# LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" | |
| 1505 | -ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make | |
| 1506 | -# | |
| 1507 | -#!/usr/bin/make | |
| 1508 | -# | |
| 1509 | -# LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" | |
| 1510 | -ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" | |
| 1511 | -ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make | |
| 1512 | -# | |
| 1513 | -# | |
| 1514 | - $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" | |
| 1515 | -ZLIB# | |
| 1516 | - | |
| 1517 | -atch.o" | |
| 1518 | -ZL -DASMINF" OBJA="@J_t,1JJtr | |
| 1584 | +# LOC="-DASMV -DASMINF" OBJ |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIinflate86/inffas86.c |
| 53 | |
| 54 | $(ZLI |
| 55 | ####86/match.SBuG@7Oj,Hh.o" |
| 56 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 57 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/mSMV -JSON1#!/fas86.o match.o" |
| 58 | ZLIBTARGETSake |
| 59 | # |
| 60 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 61 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 63 | # |
| 64 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 65 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 66 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2A="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 67 | # |
| 68 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 69 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 72 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 73 | |
| 74 | $(ZLIBDIR)/match.o: |
| 75 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 76 | # |
| 77 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 81 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/binren/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlertslertsMKCSS cssMKCSS css/bin/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 90 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 91 | # |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASake |
| 94 | # |
| 95 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 96 | ZLIBTARGETS |
| 97 | miniz.o="-DASMV -JSON1#!MINIZifnMINIZ#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV /bin/make |
| 101 | # |
| 102 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 103 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 104 | # |
| 105 | # |
| 106 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIRake |
| 107 | # |
| 108 | # LOC="-DASMV -DMINIZ |
| 109 | LIBTARGETS += $(LIB1q@6g~,t@6j1,1A@6k6,r@6lT,R@6mW,3:LIB9LX@6mz,9:THREADSAFW@G6~,QE@G8z,E:RCDIR)/shell.c1l@GZT,C:RCDIR)/shellM@Gci,4i@Gan,1YQyv8;-D_HAVE__MINGW_HUSE_MALLOC_HRCDIR)/sqlite3.cPARENTHESIS# LOC="-MINIZfopen=fossil_fopenpikchr.cMINIZ=1itwikiediebmailwikieckihec -lz# LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 110 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 111 | # |
| 112 | # |
| @@ -316,25 +349,87 @@ | |
| 316 | # |
| 317 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 318 | |
| 319 | $= fossil.exe -JSON1#!/usr/binren/make |
| 320 | # |
| 321 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 322 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 323 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSON1#!/usr/bin/make |
| 324 | # |
| 325 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMIh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/binCttcontrib/asm686/maASMV -DASMINF" OBPqlite3.owikiedidikchrtch.SBuG@7Oj,[email protected]_omhZLIBTARGETS = $(ZLIBDIdiffas86.o match.o" |
| 326 | Zession library $(ZLV -DASMINF" OBJA="io_logoblitz_no_logodefault/jusr/bin/make |
| 327 | # |
| 328 | # LOC=ake |
| 329 | # |
| 330 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 331 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBlfas86.o match.o"_.cn# LOC="-DASMV -DAS.o: ffas86.o match.o"-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 332 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bI$="-DASMV -JSnflate86/inffas86.c |
| 333 | |
| 334 | $(ZLIBDIR)/match.o: |
| 335 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 336 | # |
| 337 | # L-DSQLITE_USE_ALLOCAJSON15r/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 338 | |
| 339 | #!/usr/bin/make |
| 340 | # |
| @@ -343,7 +438,12 @@ | |
| 343 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 344 | :.h \ |
| 345 | \ |
| 346 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O\ |
| 347 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 348 | h \ |
| 349 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 417 | # |
| 418 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 419 | |
| 420 | $(ZLIBDIEXTRAOBJ = -DA-make |
| 421 | -JSON1#!/usr/bin/maSMV -JSON1#th.o sr/bin0BJDIR)/sqlit Ht@JIV,QO@J_ match /match.o: |
| 422 | $(TCC) -c -o $@ -D |
| 423 | |
| 424 | \ |
| 425 | statusstatus.h \ |
| 426 | tagtag.h \ |
| 427 | timelinetimeline.h \ |
| 428 | adctrl.h \ \ |
| 429 | diffdiff.h \ |
| 430 | didir.h \ |
| 431 | loginlogin.h \ |
| 432 | statusstatus.h \ |
| 433 | tagtag.h \ |
| 434 | timelinetimeliopenssl: zlib :$(OBJDIR)/name.h \ |
| 435 | piechart.h \ |
| 436 | $(OBJDIR)/pikchr.h \ |
| 437 | :h \ |
| 438 | :popen.h \ |
| 439 | _.c:h \ |
| 440 | .h \ |
| 441 | :.h \ |
| 442 | :.h \ |
| 443 | \ |
| 444 | #h \ |
| 445 | #!/usdescr.c |
| 446 | |
| 447 | $(ZLIBDIRxekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 448 | # |
| 449 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 450 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 451 | # |
| 452 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 453 | |
| 454 | # The escr#!$(APPNAME)-o $@ |
| 455 | |
| 456 | #!/usr.SBuG@hanced1enhanzlibt@JIV,QO@J_t,#!/usr/bin/make |
| 457 | # |
| 458 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 459 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1486 | atch.o" |
| 1487 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1488 | # |
| 1489 | # LOC="-DASMV -DASMINF" OBJDIR)/sqlie |
| 1490 | # |
| 1491 | # LOC="-DA http_ssl7Oj,Ht@rc,QO@J_t,1JJ2sslfigurhpikhNF" OBJA="islZ_OBJ. = $(MINIZ |
| 1492 | # 0, ordinary |
| 1493 | #MV -JSON1#!MINIZifas86.c |
| 1494 | |
| 1495 | $(ZLIBDIR)/match.o: |
| 1496 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedides@J_t,1JJtranslateattach.c >brary included ircLIBDIR)/contc -oe |
| 1497 | # |
| 1498 | # LOC="-DA -JSON1#!/usr/binen/make |
| 1499 | # |
| 1500 | # LOC="-SMV -ed1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 1501 | # |
| 1502 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owiSMV -JSOtranslate/usr OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 1503 | # |
| 1504 | # LOC="-D LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 1505 | ZLIBTARGETS = $(ZLIBDIR)/in# LOC="-DASMV -DASMINF" OBJA="infelse#!/usr/bin/make |
| 1506 | # |
| 1507 | #!/usr/bin/make |
| 1508 | # |
| 1509 | # LOC="-DASMV -DASMINF" OBJA="inFTS3_PARENTHESIS# LOC="-DASMV -DAS@J_t,1JJtranslate="inffas86.o match.o" |
| 1510 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin0BJDIR)/sqlite3.owiko match.o" |
| 1511 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 1512 | # |
| 1513 | # |
| 1514 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR)j,Ht@JIV,QO@J_ match.o" |
| 1515 | ZLIB# |
| 1516 | |
| 1517 | atch.o" |
| 1518 | ZL -DASMINF" OBJA="@J_t,1JJtr |
| --- a/win/Makefile.mingw.mistachkin | |
| +++ b/win/Makefile.mingw.mistachkin | |
| @@ -49,13 +49,42 @@ | |
| 49 | #!/usdescr.c |
| 50 | |
| 51 | $(ZLIBDIR)/match.o: |
| 52 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 53 | # |
| 54 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 55 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 56 | # |
| 57 | # |
| 58 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 59 | |
| 60 | $(ZLIBDIR)/match.o: |
| 61 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 62 | # |
| 63 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 64 | # |
| 65 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 66 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 67 | # |
| 68 | # |
| 69 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 70 | |
| 71 | $(ZLIBDIR)/match.o: |
| 72 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 73 | # |
| 74 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 75 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 76 | # |
| 77 | # |
| 78 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 79 | |
| 80 | $(ZLIBDIR)/match.o: |
| 81 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 82 | |
| 83 | $(ZLIBDIR)/match.o: |
| 84 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 85 | # |
| 86 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 87 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 88 | # |
| 89 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 90 | else)/in#!/usr/bin/make |
| @@ -63,7 +92,9 @@ | |
| 92 | # |
| 93 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 94 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 95 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 96 | # |
| 97 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 98 | # |
| 99 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 100 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| @@ -72,6 +103,15 @@ | |
| 103 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 104 | |
| 105 | $(ZLIBDIR)/match.o: |
| 106 | $(TCC) -c -o $@ -DAsqlDIR) -O3 $#!/usr/bin/make |
| 107 | # |
| 108 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 109 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 110 | # |
| 111 | # |
| 112 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 113 | |
| 114 | $(ZLIBDIR)/match.o: |
| 115 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 116 | # |
| 117 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| @@ -81,32 +121,25 @@ | |
| 121 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 122 | |
| 123 | $(ZLIBDIR)/match.o: |
| 124 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 125 | |
| 126 | $(ZLIBDIR)/match.o: |
| 127 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 128 | # |
| 129 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 130 | ZLIBTARGETRGETS = $(ZLIBDIR)/in# LOC=SMV -JSON1#!/usr/binren/make |
| 131 | # |
| 132 | # LOC="-DASMV -DASMINF" OBJA="inffaf.tclMV -JSON1#!/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/ mingw |
| 133 | else)/in#!/usr/bin/make |
| 134 | # |
| 135 | # |
| 136 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 mingw |
| 137 | endif -c -o $@ -DASMV $(ZLIBDIR)/co(ZLIBDIR)/match.o: |
| 138 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 139 | # |
| 140 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usvopopejsovojsonwysiwygdomfetchage.filettwysiwygxferttpockewysiwyg# The I$(ZLIBDIR) -O3 $#!/usr/bin/make |
| 141 | # |
| 142 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 143 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 144 | # |
| 145 | # |
| @@ -316,25 +349,87 @@ | |
| 349 | # |
| 350 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 351 | |
| 352 | $(ZLIBDIR)/match.o: |
| 353 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 354 | # |
| 355 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 356 | # |
| 357 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 358 | |
| 359 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 360 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 361 | # |
| 362 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 363 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 364 | # |
| 365 | # |
| 366 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 367 | # |
| 368 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 369 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 370 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 371 | # |
| 372 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 373 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 374 | # to 1.MINIZ, or |
| 375 | # set to 1. miniz library included in the |
| 376 | # source tree should be used; otherwise, it should not. |
| 377 | MINIZ_OBJ.0 = |
| 378 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 379 | MINIZ_OBJ. = $(MINIZ |
| 380 | # 0, ordinary |
| 381 | # the |
| 382 | # thesqlite3-see.c |
| 383 | SQLITE3_SRC. = kinsno_logolitz_no_lkin-DASMINF" OBJAskinsLOC="-DASMV -DASMIscr#!/us/bin/make |
| 384 | # |
| 385 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 386 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 387 | # |
| 388 | # |
| 389 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 390 | |
| 391 | $(ZLIBDIR)/match.o: |
| 392 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 393 | # |
| 394 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 395 | # |
| 396 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 397 | |
| 398 | #!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/ma86.o match.o" |
| 399 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 400 | # |
| 401 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 402 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 403 | # |
| 404 | # |
| 405 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) ref.SBuG@7Oj,Ht@JIV,Q#!/usr/bin/make |
| 406 | # |
| 407 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 408 | ZLIB#!/usr.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIRLOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 409 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/biake |
| 410 | # |
| 411 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 412 | ZLIBTARGETS = $(ZLLIBTARGETS#!/usr/bin/m, or set |
| 413 | # to 1.MINIZ, or |
| 414 | # set to 1. miniz library included in the |
| 415 | # source tree should be used; otherwise, it should not. |
| 416 | MINIZ_OBJ.0 = |
| 417 | MINIZ_OBJ.1 = $(OBJDIR)/miniz.o |
| 418 | MINIZ_OBJ. = $(MINIZ |
| 419 | # 0, ordinary |
| 420 | # the |
| 421 | # thesqlite3-see.c |
| 422 | SQLITE3_SRC. = = $(SQLITE3_SRC.$(USE_SEE)) |
| 423 | .0 = .1 = shell-see.c |
| 424 | . = RCDIR)/.$(USE_SEE)) \ |
| 425 | $(MINIZ_elltSMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 426 | |
| 427 | $(ZLIBDIR)/match.o: |
| 428 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.o="-DASMV -JSON1#!/usr/bin/make |
| 429 | # |
| 430 | # L-DSQLITE_USE_ALLOCAJSON15 LOC="-DASMV -DASMINF" OBJA -DASMINF"-DASMINF" OBJA="inffas86.o mat#!/usr/bin/make |
| 431 | # |
| 432 | # LOC="-DASMV -#!/usr/bin/m#!/usr/bin/mak-Dfopen=fossil_fopenpikchr.c -o $@ |
| 433 | |
| 434 | #!/usr/bin/make |
| 435 | # |
| @@ -343,7 +438,12 @@ | |
| 438 | eOBJ) $(EXTRAOBJ)OBJ) $(EXTRAOBJ) :$(OBJDIR)/aja-pre9.h \ |
| 439 | :.h \ |
| 440 | \ |
| 441 | V,QO@J_t,1JJ2gy;OBJDI#V,QO@J_t,1JJ2gy;OB#!/usr/ZLIBDIR) -O3 $(ZLIBDIR)/contri#!/usr/bin sr/bin/make |
| 442 | # |
| 443 | # LOC#sr/bin/make |
| 444 | # |
| 445 | # # |
| 446 | # LOC_.c: \ |
| 447 | SMV -JSON1#!/usr/bi#!/usr/bin/make |
| 448 | h \ |
| 449 | :.h \ |
| @@ -417,43 +517,38 @@ | |
| 517 | # |
| 518 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 519 | |
| 520 | $(ZLIBDIR)/match.o: |
| 521 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 522 | # |
| 523 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 524 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 525 | # |
| 526 | # |
| 527 | $(TCC) -c -o $@ -DASMINF -I$(ZLIBDIR) -O3 $(ZLIBDIR)/contrib/inflate86/inffas86.c |
| 528 | |
| 529 | $(ZLIBDIR)/match.o: |
| 530 | $(TCC) -c -oyle_.c:SON1#!/usr/ -OsrcLsr/ -OsrcLIBDIR)/contrib/inflate86/inffas86.c |
| 531 | |
| 532 | $(ZLIBDIR)/match.o: |
| 533 | $(TCC) -c -o $@ -DASMV $(ZLIBDIR)/contrib/asm686/match.SBuG@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 534 | # |
| 535 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 536 | ZLIBTARGETS = $(ZLIBDIR)/in#!/usr/bin/make |
| 537 | # |
| 538 | # |
| 539 | $(TCC) -c -o $@ -DASMINF -I$(ZLItment of ZLIBTARGETS = $(ZLEGcLIB += -lz |
| 540 | endifeckinmconfigurhpikchrshowebmailwikihtlitz_no_logo_no_logoblitz_no_logolitz_no_logoblitz_no_logodefault/jusr/bin/make |
| 541 | # |
| 542 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 543 | # |
| 544 | # LOC="-DASMV -DASMINF" OBJA="inffas86.o match.o" |
| 545 | ZLIBTAikiikchrtch.SBuG@7Oj,Ht@JIV,QO@J_t#!/usr/bin/make |
| 546 | # |
| 547 | # LOC="-DASMV -s86.o mat >$(OBJDIR)/CODECHECK.txt |
| 548 | |
| 549 | # The escr#!/us/bin="io_logoblitz_no_logodefault/jusr/bin/make |
| 550 | # |
| 551 | # LOC="-DASMV -D#!/uenhanced1enhanced1enhanced1enhanced1rounded1rounded1rounded1rounded1xekrici_omh.SBuG@7Oj,Ht@JIV,QO@J_t,#!/usr/bin/make |
| 552 | # |
| 553 | # LOC="-DASMV -DASMINF" OBJA=diff.tclMV -JSON1#!/usr/ -OsrcLR)/sqlite3.owikiedidescr#!/us/bin/make |
| 554 | 1#!/usr/bin/make |
| @@ -1486,33 +1581,4 @@ | |
| 1581 | atch.o" |
| 1582 | ZL -DASMINF" OBJA="@J_t,1JJtranslate@7Oj,Ht@JIV,QO@J_t,1JJ2gy;OBJDIR)/sqlite3.owikiedidescr#!/us/bin/make |
| 1583 | # |
| 1584 | # LOC="-DASMV -DASMINF" OBJ |
+1
-1
| --- a/win/Makefile.msc | ||
| +++ b/win/Makefile.msc | ||
| @@ -8,4 +8,4 @@ | ||
| 8 | 8 | !elseiano-asm && popdall_.c" |
| 9 | 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | 10 | |
| 11 | -_.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib | |
| 11 | +_.c20 |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 |
+1
-1
| --- a/win/Makefile.msc | ||
| +++ b/win/Makefile.msc | ||
| @@ -8,4 +8,4 @@ | ||
| 8 | 8 | !elseiano-asm && popdall_.c" |
| 9 | 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | 10 | |
| 11 | -_.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib | |
| 11 | +_.c20 |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 |
+1
-1
| --- a/win/Makefile.msc | ||
| +++ b/win/Makefile.msc | ||
| @@ -8,4 +8,4 @@ | ||
| 8 | 8 | !elseiano-asm && popdall_.c" |
| 9 | 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | 10 | |
| 11 | -_.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib | |
| 11 | +_.c20 |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 /I$(ZINCDIR)SS$(ZLIB) /LIBPATH:$(ZLIBDIR)zlib |
| --- a/win/Makefile.msc | |
| +++ b/win/Makefile.msc | |
| @@ -8,4 +8,4 @@ | |
| 8 | !elseiano-asm && popdall_.c" |
| 9 | opensslVC-WIN32ms\do_ms.batms\nt.makludePERLDIR = $(APPTARGETS) |
| 10 | |
| 11 | _.c20 |
-47
| --- a/win/fossil.rc | ||
| +++ b/win/fossil.rc | ||
| @@ -1,41 +1,4 @@ | ||
| 1 | 1 | /* |
| 2 | -** Copyright (c) 2012 D. Richard Hipp | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the Simplified BSD License (also | |
| 6 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | - | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but without any warranty; without even the implied warranty of | |
| 10 | -** merchantability or fitness for a particular purpose. | |
| 11 | -** | |
| 12 | -** Author contact information: | |
| 13 | -** [email protected] | |
| 14 | -** http://www.hwaci.com/drh/ | |
| 15 | -** | |
| 16 | -******************************************************************************* | |
| 17 | -** | |
| 18 | -** This file contains resource information for the executable on Windows. | |
| 19 | -*/ | |
| 20 | - | |
| 21 | -#if !defined(_WIN32_WCE) | |
| 22 | -#include "winresrc.h" | |
| 23 | -#else | |
| 24 | -#include "windows.h" | |
| 25 | -#endif /* !defined(_WIN32_WCE) */ | |
| 26 | - | |
| 27 | -#if !defined(VS_FF_NONE) | |
| 28 | -# define VS_FF_NONE 0x00000000L | |
| 29 | -#endif /* !defined(VS_FF_NONE) */ | |
| 30 | - | |
| 31 | -#include "VERSION.h" | |
| 32 | -#define _RC_COMPILE_ | |
| 33 | -#include "config.h" | |
| 34 | -#include "sqlite3.h" | |
| 35 | -#include "zlib.h" | |
| 36 | -rd Hipp | |
| 37 | -** | |
| 38 | -** This program /* | |
| 39 | 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | 3 | ** |
| 41 | 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | ||
| 89 | 52 | ** This program is distributed in the hope that it will be useful, |
| 90 | 53 | ** but without any warranty; without even the implied warranty of |
| 91 | 54 | ** merchantability or fitness for a particular purpose. |
| 92 | -*HOOKAShipp | |
| 93 | -** | |
| 94 | -** Thisif".) | |
| 95 | - | |
| 96 | -** This program is distrie (also | |
| 97 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 98 | - | |
| 99 | -** This program is distributed in the hope that it will be useful, | |
| 100 | -** but without any warranty; without even the implied warranty of | |
| 101 | -** merchantability or fitness for a particular purpose. | |
| 102 | 55 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | 56 | se (also |
| 104 | 57 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains resource information for the executable on Windows. |
| 19 | */ |
| 20 | |
| 21 | #if !defined(_WIN32_WCE) |
| 22 | #include "winresrc.h" |
| 23 | #else |
| 24 | #include "windows.h" |
| 25 | #endif /* !defined(_WIN32_WCE) */ |
| 26 | |
| 27 | #if !defined(VS_FF_NONE) |
| 28 | # define VS_FF_NONE 0x00000000L |
| 29 | #endif /* !defined(VS_FF_NONE) */ |
| 30 | |
| 31 | #include "VERSION.h" |
| 32 | #define _RC_COMPILE_ |
| 33 | #include "config.h" |
| 34 | #include "sqlite3.h" |
| 35 | #include "zlib.h" |
| 36 | rd Hipp |
| 37 | ** |
| 38 | ** This program /* |
| 39 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | ** |
| 41 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 89 | ** This program is distributed in the hope that it will be useful, |
| 90 | ** but without any warranty; without even the implied warranty of |
| 91 | ** merchantability or fitness for a particular purpose. |
| 92 | *HOOKAShipp |
| 93 | ** |
| 94 | ** Thisif".) |
| 95 | |
| 96 | ** This program is distrie (also |
| 97 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 98 | |
| 99 | ** This program is distributed in the hope that it will be useful, |
| 100 | ** but without any warranty; without even the implied warranty of |
| 101 | ** merchantability or fitness for a particular purpose. |
| 102 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | se (also |
| 104 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 52 | ** This program is distributed in the hope that it will be useful, |
| 53 | ** but without any warranty; without even the implied warranty of |
| 54 | ** merchantability or fitness for a particular purpose. |
| 55 | *HOOKASh1Hooks_MINIZ) */ |
| 56 | se (also |
| 57 | ** known aF_NONE 0x00000000L |
-47
| --- a/win/fossil.rc | ||
| +++ b/win/fossil.rc | ||
| @@ -1,41 +1,4 @@ | ||
| 1 | 1 | /* |
| 2 | -** Copyright (c) 2012 D. Richard Hipp | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the Simplified BSD License (also | |
| 6 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | - | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but without any warranty; without even the implied warranty of | |
| 10 | -** merchantability or fitness for a particular purpose. | |
| 11 | -** | |
| 12 | -** Author contact information: | |
| 13 | -** [email protected] | |
| 14 | -** http://www.hwaci.com/drh/ | |
| 15 | -** | |
| 16 | -******************************************************************************* | |
| 17 | -** | |
| 18 | -** This file contains resource information for the executable on Windows. | |
| 19 | -*/ | |
| 20 | - | |
| 21 | -#if !defined(_WIN32_WCE) | |
| 22 | -#include "winresrc.h" | |
| 23 | -#else | |
| 24 | -#include "windows.h" | |
| 25 | -#endif /* !defined(_WIN32_WCE) */ | |
| 26 | - | |
| 27 | -#if !defined(VS_FF_NONE) | |
| 28 | -# define VS_FF_NONE 0x00000000L | |
| 29 | -#endif /* !defined(VS_FF_NONE) */ | |
| 30 | - | |
| 31 | -#include "VERSION.h" | |
| 32 | -#define _RC_COMPILE_ | |
| 33 | -#include "config.h" | |
| 34 | -#include "sqlite3.h" | |
| 35 | -#include "zlib.h" | |
| 36 | -rd Hipp | |
| 37 | -** | |
| 38 | -** This program /* | |
| 39 | 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | 3 | ** |
| 41 | 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | ||
| 89 | 52 | ** This program is distributed in the hope that it will be useful, |
| 90 | 53 | ** but without any warranty; without even the implied warranty of |
| 91 | 54 | ** merchantability or fitness for a particular purpose. |
| 92 | -*HOOKAShipp | |
| 93 | -** | |
| 94 | -** Thisif".) | |
| 95 | - | |
| 96 | -** This program is distrie (also | |
| 97 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 98 | - | |
| 99 | -** This program is distributed in the hope that it will be useful, | |
| 100 | -** but without any warranty; without even the implied warranty of | |
| 101 | -** merchantability or fitness for a particular purpose. | |
| 102 | 55 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | 56 | se (also |
| 104 | 57 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains resource information for the executable on Windows. |
| 19 | */ |
| 20 | |
| 21 | #if !defined(_WIN32_WCE) |
| 22 | #include "winresrc.h" |
| 23 | #else |
| 24 | #include "windows.h" |
| 25 | #endif /* !defined(_WIN32_WCE) */ |
| 26 | |
| 27 | #if !defined(VS_FF_NONE) |
| 28 | # define VS_FF_NONE 0x00000000L |
| 29 | #endif /* !defined(VS_FF_NONE) */ |
| 30 | |
| 31 | #include "VERSION.h" |
| 32 | #define _RC_COMPILE_ |
| 33 | #include "config.h" |
| 34 | #include "sqlite3.h" |
| 35 | #include "zlib.h" |
| 36 | rd Hipp |
| 37 | ** |
| 38 | ** This program /* |
| 39 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | ** |
| 41 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 89 | ** This program is distributed in the hope that it will be useful, |
| 90 | ** but without any warranty; without even the implied warranty of |
| 91 | ** merchantability or fitness for a particular purpose. |
| 92 | *HOOKAShipp |
| 93 | ** |
| 94 | ** Thisif".) |
| 95 | |
| 96 | ** This program is distrie (also |
| 97 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 98 | |
| 99 | ** This program is distributed in the hope that it will be useful, |
| 100 | ** but without any warranty; without even the implied warranty of |
| 101 | ** merchantability or fitness for a particular purpose. |
| 102 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | se (also |
| 104 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 52 | ** This program is distributed in the hope that it will be useful, |
| 53 | ** but without any warranty; without even the implied warranty of |
| 54 | ** merchantability or fitness for a particular purpose. |
| 55 | *HOOKASh1Hooks_MINIZ) */ |
| 56 | se (also |
| 57 | ** known aF_NONE 0x00000000L |
-47
| --- a/win/fossil.rc | ||
| +++ b/win/fossil.rc | ||
| @@ -1,41 +1,4 @@ | ||
| 1 | 1 | /* |
| 2 | -** Copyright (c) 2012 D. Richard Hipp | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the Simplified BSD License (also | |
| 6 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | - | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but without any warranty; without even the implied warranty of | |
| 10 | -** merchantability or fitness for a particular purpose. | |
| 11 | -** | |
| 12 | -** Author contact information: | |
| 13 | -** [email protected] | |
| 14 | -** http://www.hwaci.com/drh/ | |
| 15 | -** | |
| 16 | -******************************************************************************* | |
| 17 | -** | |
| 18 | -** This file contains resource information for the executable on Windows. | |
| 19 | -*/ | |
| 20 | - | |
| 21 | -#if !defined(_WIN32_WCE) | |
| 22 | -#include "winresrc.h" | |
| 23 | -#else | |
| 24 | -#include "windows.h" | |
| 25 | -#endif /* !defined(_WIN32_WCE) */ | |
| 26 | - | |
| 27 | -#if !defined(VS_FF_NONE) | |
| 28 | -# define VS_FF_NONE 0x00000000L | |
| 29 | -#endif /* !defined(VS_FF_NONE) */ | |
| 30 | - | |
| 31 | -#include "VERSION.h" | |
| 32 | -#define _RC_COMPILE_ | |
| 33 | -#include "config.h" | |
| 34 | -#include "sqlite3.h" | |
| 35 | -#include "zlib.h" | |
| 36 | -rd Hipp | |
| 37 | -** | |
| 38 | -** This program /* | |
| 39 | 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | 3 | ** |
| 41 | 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | ||
| 89 | 52 | ** This program is distributed in the hope that it will be useful, |
| 90 | 53 | ** but without any warranty; without even the implied warranty of |
| 91 | 54 | ** merchantability or fitness for a particular purpose. |
| 92 | -*HOOKAShipp | |
| 93 | -** | |
| 94 | -** Thisif".) | |
| 95 | - | |
| 96 | -** This program is distrie (also | |
| 97 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 98 | - | |
| 99 | -** This program is distributed in the hope that it will be useful, | |
| 100 | -** but without any warranty; without even the implied warranty of | |
| 101 | -** merchantability or fitness for a particular purpose. | |
| 102 | 55 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | 56 | se (also |
| 104 | 57 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains resource information for the executable on Windows. |
| 19 | */ |
| 20 | |
| 21 | #if !defined(_WIN32_WCE) |
| 22 | #include "winresrc.h" |
| 23 | #else |
| 24 | #include "windows.h" |
| 25 | #endif /* !defined(_WIN32_WCE) */ |
| 26 | |
| 27 | #if !defined(VS_FF_NONE) |
| 28 | # define VS_FF_NONE 0x00000000L |
| 29 | #endif /* !defined(VS_FF_NONE) */ |
| 30 | |
| 31 | #include "VERSION.h" |
| 32 | #define _RC_COMPILE_ |
| 33 | #include "config.h" |
| 34 | #include "sqlite3.h" |
| 35 | #include "zlib.h" |
| 36 | rd Hipp |
| 37 | ** |
| 38 | ** This program /* |
| 39 | ** Copyright (c) 2012 D. Richard Hipp |
| 40 | ** |
| 41 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 89 | ** This program is distributed in the hope that it will be useful, |
| 90 | ** but without any warranty; without even the implied warranty of |
| 91 | ** merchantability or fitness for a particular purpose. |
| 92 | *HOOKAShipp |
| 93 | ** |
| 94 | ** Thisif".) |
| 95 | |
| 96 | ** This program is distrie (also |
| 97 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 98 | |
| 99 | ** This program is distributed in the hope that it will be useful, |
| 100 | ** but without any warranty; without even the implied warranty of |
| 101 | ** merchantability or fitness for a particular purpose. |
| 102 | *HOOKASh1Hooks_MINIZ) */ |
| 103 | se (also |
| 104 | ** known aF_NONE 0x00000000L |
| --- a/win/fossil.rc | |
| +++ b/win/fossil.rc | |
| @@ -1,41 +1,4 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2012 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| @@ -89,16 +52,6 @@ | |
| 52 | ** This program is distributed in the hope that it will be useful, |
| 53 | ** but without any warranty; without even the implied warranty of |
| 54 | ** merchantability or fitness for a particular purpose. |
| 55 | *HOOKASh1Hooks_MINIZ) */ |
| 56 | se (also |
| 57 | ** known aF_NONE 0x00000000L |
+1
-1
| --- a/www/changes.wiki | ||
| +++ b/www/changes.wiki | ||
| @@ -1,2 +1,2 @@ | ||
| 1 | 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | - MAKING ANY DECISION ON IT!)and [artif | |
| 2 | + MAKING ANY DECISION ON IT!) |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,2 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!)and [artif |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,2 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!) |
+1
-4
| --- a/www/changes.wiki | ||
| +++ b/www/changes.wiki | ||
| @@ -1,5 +1,2 @@ | ||
| 1 | 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | - MAKING ANY DECISION ON IT!)and [artifthe full | |
| 3 | - importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE | |
| 4 | - MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede disS[artifact], and | |
| 5 | - [globalState | |
| 2 | + MAKING ANY DECISION ON IT!) |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,5 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!)and [artifthe full |
| 3 | importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 4 | MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede disS[artifact], and |
| 5 | [globalState |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,5 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!) |
+1
-3
| --- a/www/changes.wiki | ||
| +++ b/www/changes.wiki | ||
| @@ -1,4 +1,2 @@ | ||
| 1 | 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | - MAKING ANY DECISION ON IT!)and [artifthe full | |
| 3 | - importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE | |
| 4 | - MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede disSeveral fixes t | |
| 2 | + MAKING ANY DECISION ON IT!) |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,4 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!)and [artifthe full |
| 3 | importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 4 | MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede disSeveral fixes t |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,4 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!) |
-3
| --- a/www/changes.wiki | ||
| +++ b/www/changes.wiki | ||
| @@ -1,5 +1,2 @@ | ||
| 1 | 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | - MAKING ANY DECISION ON IT!)and [artifthe full | |
| 3 | - importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE | |
| 4 | - MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE | |
| 5 | 2 | MAKING ANY DECISION ON IT!) |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,5 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!)and [artifthe full |
| 3 | importwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 4 | MAKING ANY DECISION ON IT!)wewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 5 | MAKING ANY DECISION ON IT!) |
| --- a/www/changes.wiki | |
| +++ b/www/changes.wiki | |
| @@ -1,5 +1,2 @@ | |
| 1 | importimportwuuwewwneuimpor??aas yet unreleasede display by fiLetAdd check t (NOT PLANNED Fnew|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 2 | MAKING ANY DECISION ON IT!) |