Debug information for escape and unescape functions.

git-svn-id: svn://kolibrios.org@4848 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-04-17 19:20:35 +00:00
parent 07d1ad18a2
commit 9af689d270

View File

@ -1131,6 +1131,8 @@ proc HTTP_escape URI ;//////////////////////////////////////////////////////////
; TODO: instead of static buffer allocation, make it 4096 bytes and larger only if needed ; TODO: instead of static buffer allocation, make it 4096 bytes and larger only if needed
DEBUGF 1, "HTTP_escape: %s\n", [URI]
pusha pusha
invoke mem.alloc, URLMAXLEN invoke mem.alloc, URLMAXLEN
@ -1178,9 +1180,11 @@ proc HTTP_escape URI ;//////////////////////////////////////////////////////////
mov [esp + 4 * 4], edi mov [esp + 4 * 4], edi
popa popa
DEBUGF 1, "escaped URL: %s\n", eax
ret ret
.error: .error:
DEBUGF 1, "ERROR: out of RAM!\n"
popa popa
xor eax, eax xor eax, eax
ret ret
@ -1199,6 +1203,7 @@ proc HTTP_unescape URI ;////////////////////////////////////////////////////////
;< eax = 0 (error) / ptr to ASCIIZ URI ;; ;< eax = 0 (error) / ptr to ASCIIZ URI ;;
;;================================================================================================;; ;;================================================================================================;;
DEBUGF 1, "HTTP_unescape: %s\n", [URI]
pusha pusha
invoke mem.alloc, URLMAXLEN invoke mem.alloc, URLMAXLEN
@ -1211,10 +1216,8 @@ proc HTTP_unescape URI ;////////////////////////////////////////////////////////
lodsb lodsb
test al, al test al, al
jz .done jz .done
cmp al, '%' cmp al, '%'
je .unescape je .unescape
stosb stosb
jmp .loop jmp .loop
@ -1249,11 +1252,12 @@ proc HTTP_unescape URI ;////////////////////////////////////////////////////////
.done: .done:
stosb stosb
popa popa
DEBUGF 1, "unescaped URL: %s\n", eax
ret ret
.error: .error:
DEBUGF 1, "ERROR: out of RAM!\n"
popa popa
xor eax, eax xor eax, eax
ret ret