Skip to content

Commit

Permalink
Fixed the compress/gzip/hide bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
vermaseren committed Jan 15, 2016
1 parent 258f42e commit 43a5b1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ WORD PutOut(PHEAD WORD *term, POSITION *position, FILEHANDLE *fi, WORD ncomp)
}
#ifdef WITHZLIB
if ( !AR.NoCompress && ncomp > 0 && AR.gzipCompress > 0
&& dobracketindex == 0 ) {
&& dobracketindex == 0 && fi->zsp != 0 ) {
fi->POfill = p;
if ( PutOutputGZIP(fi) ) return(-1);
p = fi->PObuffer;
Expand Down Expand Up @@ -1691,7 +1691,7 @@ WORD FlushOut(POSITION *position, FILEHANDLE *fi, int compr)
}
#ifdef WITHZLIB
if ( AT.SS == AT.S0 && !AR.NoCompress && AR.gzipCompress > 0
&& dobracketindex == 0 && ( compr > 0 ) ) {
&& dobracketindex == 0 && ( compr > 0 ) && fi->zsp != 0 ) {
if ( PutOutputGZIP(fi) ) return(-1);
fi->POfill = fi->PObuffer;
}
Expand Down Expand Up @@ -1754,7 +1754,7 @@ WORD FlushOut(POSITION *position, FILEHANDLE *fi, int compr)
if ( fi->handle >= 0 ) {
#ifdef WITHZLIB
if ( AT.SS == AT.S0 && !AR.NoCompress && AR.gzipCompress > 0
&& dobracketindex == 0 && ( compr > 0 ) ) {
&& dobracketindex == 0 && ( compr > 0 ) && fi->zsp != 0 ) {
if ( FlushOutputGZIP(fi) ) return(-1);
fi->POfill = fi->PObuffer;
}
Expand Down Expand Up @@ -1810,7 +1810,7 @@ WORD FlushOut(POSITION *position, FILEHANDLE *fi, int compr)
}
#ifdef WITHZLIB
if ( AT.SS == AT.S0 && !AR.NoCompress && AR.gzipCompress > 0
&& dobracketindex == 0 && ( compr > 0 ) ) {
&& dobracketindex == 0 && ( compr > 0 ) && fi->zsp != 0 ) {
PUTZERO(*position);
if ( fi->handle >= 0 ) {
#ifdef ALLLOCK
Expand Down
2 changes: 1 addition & 1 deletion sources/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ WORD IniVars()
AC.OutNumberType = RATIONALMODE;
AM.gOutNumberType = RATIONALMODE;
#ifdef WITHZLIB
AR.gzipCompress = 0;
AR.gzipCompress = GZIPDEFAULT;
#endif
AR.BracketOn = 0;
AC.bracketindexflag = 0;
Expand Down

0 comments on commit 43a5b1e

Please sign in to comment.