forked from KolibriOS/kolibrios
revert changes in libini+libio from rev. 1573
git-svn-id: svn://kolibrios.org@1574 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
be3cceaea6
commit
5736af21d8
@ -81,14 +81,12 @@ proc libini._.get_char _f ;/////////////////////////////////////////////////////
|
|||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;< --- TBD --- ;;
|
;< --- TBD --- ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
push ecx
|
|
||||||
mov ecx, [_f]
|
mov ecx, [_f]
|
||||||
dec [ecx + IniFile.cnt]
|
dec [ecx + IniFile.cnt]
|
||||||
jns @f
|
jns @f
|
||||||
stdcall libini._.preload_block, [_f]
|
stdcall libini._.preload_block, [_f]
|
||||||
dec [ecx + IniFile.cnt]
|
dec [ecx + IniFile.cnt]
|
||||||
@@: lodsb
|
@@: lodsb
|
||||||
pop ecx
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -101,7 +99,6 @@ proc libini._.skip_nonblanks _f ;///////////////////////////////////////////////
|
|||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;< --- TBD --- ;;
|
;< --- TBD --- ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
push ecx
|
|
||||||
mov ecx, [_f]
|
mov ecx, [_f]
|
||||||
@@: stdcall libini._.get_char, [_f]
|
@@: stdcall libini._.get_char, [_f]
|
||||||
cmp al, 32
|
cmp al, 32
|
||||||
@ -117,7 +114,6 @@ proc libini._.skip_nonblanks _f ;///////////////////////////////////////////////
|
|||||||
stdcall libini._.skip_line, [_f]
|
stdcall libini._.skip_line, [_f]
|
||||||
jmp @b
|
jmp @b
|
||||||
@@: stdcall libini._.unget_char, [_f]
|
@@: stdcall libini._.unget_char, [_f]
|
||||||
pop ecx
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -130,7 +126,6 @@ proc libini._.skip_spaces _f ;//////////////////////////////////////////////////
|
|||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;< --- TBD --- ;;
|
;< --- TBD --- ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
push ecx
|
|
||||||
mov ecx, [_f]
|
mov ecx, [_f]
|
||||||
@@: stdcall libini._.get_char, [_f]
|
@@: stdcall libini._.get_char, [_f]
|
||||||
cmp al, 32
|
cmp al, 32
|
||||||
@ -138,7 +133,6 @@ proc libini._.skip_spaces _f ;//////////////////////////////////////////////////
|
|||||||
cmp al, 9
|
cmp al, 9
|
||||||
je @b
|
je @b
|
||||||
@@: stdcall libini._.unget_char, [_f]
|
@@: stdcall libini._.unget_char, [_f]
|
||||||
pop ecx
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -151,7 +145,6 @@ proc libini._.skip_line _f ;////////////////////////////////////////////////////
|
|||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;< --- TBD --- ;;
|
;< --- TBD --- ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
push ecx
|
|
||||||
mov ecx, [_f]
|
mov ecx, [_f]
|
||||||
@@: stdcall libini._.get_char, [_f]
|
@@: stdcall libini._.get_char, [_f]
|
||||||
or al, al
|
or al, al
|
||||||
@ -161,7 +154,6 @@ proc libini._.skip_line _f ;////////////////////////////////////////////////////
|
|||||||
cmp al, 10
|
cmp al, 10
|
||||||
jne @b
|
jne @b
|
||||||
@@: stdcall libini._.unget_char, [_f]
|
@@: stdcall libini._.unget_char, [_f]
|
||||||
pop ecx
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -433,7 +425,7 @@ proc libini._.find_section _f, _sec_name ;//////////////////////////////////////
|
|||||||
;< eax = -1 (fail) / 0 (ok) ;;
|
;< eax = -1 (fail) / 0 (ok) ;;
|
||||||
;< [_f.pos] = new cursor position (right after ']' char if eax = 0, at the end of file otherwise) ;;
|
;< [_f.pos] = new cursor position (right after ']' char if eax = 0, at the end of file otherwise) ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
push ebx ecx edi
|
push ebx edi
|
||||||
|
|
||||||
mov ecx, [_f]
|
mov ecx, [_f]
|
||||||
invoke file.seek, [ecx + IniFile.fh], 0, SEEK_SET
|
invoke file.seek, [ecx + IniFile.fh], 0, SEEK_SET
|
||||||
@ -469,12 +461,12 @@ proc libini._.find_section _f, _sec_name ;//////////////////////////////////////
|
|||||||
@@:
|
@@:
|
||||||
cmp byte[edi], 0
|
cmp byte[edi], 0
|
||||||
jne .next_section
|
jne .next_section
|
||||||
pop edi ecx ebx
|
pop edi ebx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.exit_error:
|
.exit_error:
|
||||||
pop edi ecx ebx
|
pop edi ebx
|
||||||
or eax, -1
|
or eax, -1
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
@ -179,7 +179,7 @@ locals
|
|||||||
loc_buf rb 40
|
loc_buf rb 40
|
||||||
endl
|
endl
|
||||||
|
|
||||||
push ebx ecx esi edi
|
push ebx esi edi
|
||||||
|
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
invoke mem.alloc, sizeof.InternalFileInfo
|
invoke mem.alloc, sizeof.InternalFileInfo
|
||||||
@ -212,7 +212,7 @@ endl
|
|||||||
jne .exit_error.ex
|
jne .exit_error.ex
|
||||||
@@:
|
@@:
|
||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
pop edi esi ecx ebx
|
pop edi esi ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.exit_error.ex:
|
.exit_error.ex:
|
||||||
@ -233,7 +233,7 @@ endl
|
|||||||
.exit_error:
|
.exit_error:
|
||||||
invoke mem.free, ebx
|
invoke mem.free, ebx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
pop edi esi ecx ebx
|
pop edi esi ebx
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user