75,7 → 75,8 |
;;================================================================================================;; |
proc ini.enum_sections _f_name, _callback ;///////////////////////////////////////////////////////;; |
;;------------------------------------------------------------------------------------------------;; |
;? Enumerate sections, calling c2------------------------------------------------------------------;; |
;? Enumerate sections, calling callback function for each of them ;; |
;;------------------------------------------------------------------------------------------------;; |
;> _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> ;; |
375,20 → 376,6 |
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 |
446,7 → 433,6 |
push edi |
|
mov esi, [_sec_name] |
|
mov byte[edi], '[' |
inc edi |
call libini._.string_copy |
712,11 → 698,10 |
endDel rd 1 |
endl |
push ebx ecx edi esi |
xor eax,eax |
mov dword[funcFile],5 ;get file info |
mov dword[funcFile+4],eax |
mov dword[funcFile+8],eax |
mov dword[funcFile+12],eax |
mov dword[funcFile+4],0 |
mov dword[funcFile+8],0 |
mov dword[funcFile+12],0 |
lea eax,[fileInfo] |
mov dword[funcFile+16],eax |
mov byte[funcFile+20],0 |
814,6 → 799,8 |
endp |
|
|
|
|
;;================================================================================================;; |
proc ini.get_shortcut _f_name, _sec_name, _key_name, _def_val, _modifiers ;///////////////////////;; |
;;------------------------------------------------------------------------------------------------;; |