Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1305 → Rev 1304

/kernel/trunk/fs/fs_lfn.inc
971,9 → 971,9
; mov esi, [esi+APPDATA.cur_dir]
; mov edx, esi
 
;get length string of appdata.cur_dir
mov eax, [current_slot]
mov edi, [eax+APPDATA.cur_dir]
;get lenght string of appdata.cur_dir
; mov eax, [current_slot]
; mov edi, [eax+APPDATA.cur_dir]
 
dec ebx
jz .set
984,6 → 984,9
; sysfunction 30.2: [for app] eax=30,ebx=2,ecx->buffer,edx=len
; for our code: ebx->buffer,ecx=len
max_cur_dir equ 0x1000
;get lenght string of appdata.cur_dir
mov eax, [current_slot]
mov edi, [eax+APPDATA.cur_dir]
 
mov ebx,edi
 
994,27 → 997,25
mov ecx,max_cur_dir
 
repne scasb ;find zerro at and string
jnz .error ; no zero in cur_dir: internal error, should not happen
jcxz .error ;ecx=0 and destination buffer is too small.
 
sub edi,ebx ;lenght for copy
inc edi
mov [esp+32+8],edi ;return in eax
 
cmp edx, edi
jbe @f
mov edx, edi
@@:
;source string
cmp edx,edi ;edi must have more than 2 (for / and 0x0)
;sourse string
pop esi
;destination string
pop edi
cmp edx, 1
jbe .ret
jb .ret
 
mov al,'/' ;start string with '/'
stosb
mov ecx,edx
rep movsb ;copy string
xor eax,eax
mov byte [edi],al ;set zerro
.ret: ret
 
.error: add esp,8