Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4831 → Rev 4830

/programs/develop/libraries/http/http.asm
1118,19 → 1118,15
 
 
;;================================================================================================;;
proc HTTP_escape URI ;////////////////////////////////////////////////////////////////////////////;;
proc URI_escape URI ;/////////////////////////////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;;
;? ;;
;;------------------------------------------------------------------------------------------------;;
;> URI = ptr to ASCIIZ URI ;;
;;------------------------------------------------------------------------------------------------;;
;< eax = 0 (error) / ptr to ASCIIZ URI/data ;;
;< ebx = length of escaped URI/data ;;
;< eax = 0 (error) / ptr to ASCIIZ URI ;;
;;================================================================================================;;
 
 
; TODO: instead of static buffer allocation, make it 4096 bytes and larger only if needed
 
pusha
 
invoke mem.alloc, URLMAXLEN
1149,8 → 1145,7
mov cl, al
and cl, 0x1f
mov bl, al
shr bl, 3
and bl, not 3
shr bl, 5
bt dword[bits_must_escape + ebx], ecx
jc .escape
 
1173,9 → 1168,6
 
.done:
stosb
sub edi, [esp + 7 * 4]
dec edi
mov [esp + 4 * 4], edi
 
popa
ret
1190,7 → 1182,7
 
 
;;================================================================================================;;
proc HTTP_unescape URI ;//////////////////////////////////////////////////////////////////////////;;
proc URI_unescape URI ;///////////////////////////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;;
;? ;;
;;------------------------------------------------------------------------------------------------;;
1695,8 → 1687,8
HTTP_process , 'process' , \
HTTP_free , 'free' , \
HTTP_stop , 'stop' , \
HTTP_escape , 'escape' , \
HTTP_unescape , 'unescape'
URI_escape , 'escape' , \
URI_unescape , 'unescape'
 
; HTTP_put , 'put' , \
; HTTP_delete , 'delete' , \