Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6851 → Rev 6850

/programs/fs/kfar/trunk/zlib/zutil.asm
107,7 → 107,8
ret
endp
 
;void (char *m)
;void (m)
; char *m
align 4
proc z_error, m:dword
; fprintf(stderr, "%s\n", m);
118,7 → 119,8
; exported to allow conversion of error code to string for compress() and
; uncompress()
 
;const char * (int err)
;const char * (err)
; int err
align 4
proc zError uses ecx, err:dword
ERR_MSG [err]
171,28 → 173,15
ret
endp
 
;void (Bytef* dest, uInt len)
;void (dest, len)
; Bytef* dest
; uInt len
align 4
proc zmemzero uses eax ecx edi, dest:dword, len:dword
mov ecx,[len]
test ecx,ecx
jz .end0
xor eax,eax
mov edi,[dest]
bt ecx,0 ;кратно 2 ?
jnc @f
rep stosb
jmp .end0
@@:
bt ecx,1 ;кратно 4 ?
jnc @f
shr ecx,1
rep stosw
jmp .end0
@@:
shr ecx,2
rep stosd
.end0:
proc zmemzero, dest:dword, len:dword
; if (len == 0) return;
; do {
; *dest++ = 0; /* ??? to be unrolled */
; } while (--len != 0);
ret
endp
;end if