Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3920 → Rev 4422

/programs/develop/libraries/libs-dev/libini/libini.asm
75,8 → 75,7
;;================================================================================================;;
proc ini.enum_sections _f_name, _callback ;///////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;;
;? Enumerate sections, calling callback function for each of them ;;
;;------------------------------------------------------------------------------------------------;;
;? Enumerate sections, calling c2------------------------------------------------------------------;;
;> _f_name = ini filename <asciiz> ;;
;> _callback = callback function address: func(f_name, sec_name), where ;;
;> f_name = ini filename (as passed to the function) <asciiz> ;;
376,6 → 375,20
lea ebx, [f]
mov [f_addr], ebx
 
;/GerdtR - bugfix: at end of file required empty line
invoke file.seek, [f.fh],2,SEEK_END
invoke file.read, [f.fh],[f.buf],2
mov edx,[f.buf]
cmp word[edx],0A0Dh
je @f
mov word[edx],0A0Dh
invoke file.seek, [f.fh],0,SEEK_END
invoke file.write, [f.fh],[f.buf],2
@@:
 
; lea ebx, [f]
;\GerdtR
 
stdcall libini._.find_section, ebx, [_sec_name]
or eax, eax
jnz .create_section
433,6 → 446,7
push edi
 
mov esi, [_sec_name]
 
mov byte[edi], '['
inc edi
call libini._.string_copy
698,10 → 712,11
endDel rd 1
endl
push ebx ecx edi esi
xor eax,eax
mov dword[funcFile],5 ;get file info
mov dword[funcFile+4],0
mov dword[funcFile+8],0
mov dword[funcFile+12],0
mov dword[funcFile+4],eax
mov dword[funcFile+8],eax
mov dword[funcFile+12],eax
lea eax,[fileInfo]
mov dword[funcFile+16],eax
mov byte[funcFile+20],0
799,8 → 814,6
endp
 
 
 
 
;;================================================================================================;;
proc ini.get_shortcut _f_name, _sec_name, _key_name, _def_val, _modifiers ;///////////////////////;;
;;------------------------------------------------------------------------------------------------;;