Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6652 → Rev 6651

/programs/fs/kfar/trunk/zlib/deflate.asm
934,7 → 934,8
cmp dword[flush],Z_BLOCK
jg @f
cmp dword[flush],0
jge .end10 ;if (..==0 || ..==0 || ..>.. || ..<0)
jl @f ;if (..==0 || ..==0 || ..>.. || ..<0)
jmp .end10
@@:
mov eax,Z_STREAM_ERROR
jmp .end_f
950,7 → 951,7
jne .end0
cmp dword[flush],Z_FINISH
je .end0
.beg0: ;if (..==0 || (..==0 && ..!=0) || (..==.. && ..!=..))
.beg0: ;if (..==0 || (..==0 && ..!=0) || (..=.. && ..!=..))
ERR_RETURN ebx, Z_STREAM_ERROR
jmp .end_f
.end0:
1067,13 → 1068,12
 
mov esi,3
cmp word[edi+deflate_state.strategy],Z_HUFFMAN_ONLY
jge @f
jl @f
cmp word[edi+deflate_state.level],2
jge .end30 ;if (..>=.. || ..<..)
@@:
jge @f ;if (..>=.. || ..<..)
xor esi,esi
jmp .end4
.end30:
@@:
cmp word[edi+deflate_state.level],6
jge @f ;else if (..<..)
mov esi,1
1391,7 → 1391,8
cmp edx,finish_started
je @f
cmp edx,finish_done
jne .end18
je @f
jmp .end18
@@: ;if (..==.. || ..==..)
mov dword[edi+deflate_state.status],FINISH_STATE
.end18:
1398,7 → 1399,8
cmp edx,need_more
je @f
cmp edx,finish_started
jne .end19
je @f
jmp .end19
@@: ;if (..==.. || ..==..)
cmp word[ebx+z_stream.avail_out],0
jne @f ;if (..==0)
2745,10 → 2747,11
proc deflate_rle uses ecx edx edi esi, s:dword, flush:dword
locals
bflush dd ? ;int ;set if current block must be flushed
; uInt prev; /* byte at distance one to match */
; Bytef *scan, *strend; /* scan goes up to strend for length of run */
endl
mov edx,[s]
zlib_debug 'deflate_rle'
align 4
.cycle0: ;for (;;)
; Make sure that we always have enough lookahead, except
; at the end of the input file. We need MAX_MATCH bytes
2786,8 → 2789,8
jnz .end2
scasb
jnz .end2 ;if (..==.. && ..==.. && ..==..)
;edi = scan ;scan goes up to strend for length of run
; al = prev ;byte at distance one to match
;edi = scan
; al = prev
;ecx = strend-scan
mov ecx,MAX_MATCH-2
repz scasb
2870,7 → 2873,6
endl
mov edi,[s]
zlib_debug 'deflate_huff'
align 4
.cycle0: ;for (;;)
; Make sure that we have a literal to write.
cmp dword[edi+deflate_state.lookahead],0
2879,11 → 2881,13
cmp dword[edi+deflate_state.lookahead],0
jne .end0 ;if (..==0)
cmp dword[flush],Z_NO_FLUSH
jne .cycle0end ;if (..==..)
jne @f ;if (..==..)
mov eax,need_more
jmp .end_f
;flush the current block
align 4
@@:
jmp .cycle0end ;flush the current block
align 4
.end0:
 
; Output a literal byte