forked from KolibriOS/kolibrios
process_replace_file_name - uses the correct direction of search is now
git-svn-id: svn://kolibrios.org@3689 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a9e3d23cfe
commit
13b10bc06f
@ -932,31 +932,30 @@ biosdisk_enum_root:
|
|||||||
pop eax
|
pop eax
|
||||||
inc eax
|
inc eax
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
process_replace_file_name:
|
process_replace_file_name:
|
||||||
; in
|
; in
|
||||||
; esi - path with filename(f.70)
|
; esi - path with filename(f.70)
|
||||||
;
|
;
|
||||||
; out
|
; out
|
||||||
; ebp - full filename
|
; ebp - full filename
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
mov ebp, [full_file_name_table]
|
mov ebp, [full_file_name_table]
|
||||||
mov edi, [full_file_name_table.size]
|
xor edi, edi
|
||||||
dec edi
|
|
||||||
shl edi, 7
|
|
||||||
add edi, ebp
|
|
||||||
.loop:
|
.loop:
|
||||||
cmp edi, ebp
|
cmp edi,[full_file_name_table.size]
|
||||||
jb .notfound
|
jae .notfound
|
||||||
push esi edi
|
push esi edi
|
||||||
|
shl edi, 7 ; edi*128
|
||||||
|
add edi, ebp
|
||||||
@@:
|
@@:
|
||||||
cmp byte [edi], 0
|
cmp byte [edi], 0 ; end of dir_name
|
||||||
jz .dest_done
|
jz .dest_done
|
||||||
lodsb
|
lodsb
|
||||||
test al, al
|
test al, al
|
||||||
jz .cont
|
jz .cont
|
||||||
or al, 20h
|
or al, 20h ; 32 - space char
|
||||||
scasb
|
scasb
|
||||||
jz @b
|
jz @b
|
||||||
jmp .cont
|
jmp .cont
|
||||||
@ -969,10 +968,12 @@ process_replace_file_name:
|
|||||||
jmp .found
|
jmp .found
|
||||||
.cont:
|
.cont:
|
||||||
pop edi esi
|
pop edi esi
|
||||||
sub edi, 128
|
inc edi
|
||||||
jmp .loop
|
jmp .loop
|
||||||
.found:
|
.found:
|
||||||
pop edi eax
|
pop edi eax
|
||||||
|
shl edi, 7 ; edi*128
|
||||||
|
add edi, ebp
|
||||||
mov ebp, esi
|
mov ebp, esi
|
||||||
cmp byte [esi], 0
|
cmp byte [esi], 0
|
||||||
lea esi, [edi+64]
|
lea esi, [edi+64]
|
||||||
@ -980,9 +981,9 @@ process_replace_file_name:
|
|||||||
.notfound:
|
.notfound:
|
||||||
xor ebp, ebp
|
xor ebp, ebp
|
||||||
.ret:
|
.ret:
|
||||||
popfd
|
popfd
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
uglobal
|
uglobal
|
||||||
lock_flag_for_f30_3 rb 1
|
lock_flag_for_f30_3 rb 1
|
||||||
endg
|
endg
|
||||||
|
Loading…
Reference in New Issue
Block a user