7,8 → 7,8 |
dd stacktop |
dd 0, app_path |
|
version equ '0.61' |
version_dword equ 0*10000h + 61 |
version equ '0.6' |
version_dword equ 0*10000h + 60 |
|
min_width = 54 |
max_width = 255 |
160,8 → 160,8 |
; load libini.obj and kfar.ini |
mov eax, libini_name |
mov esi, ini_import |
push 6 |
pop ebp ; we use version 6 of libini |
push 3 |
pop ebp ; we use version 3 of libini |
call load_dll_and_import |
test eax, eax |
jnz .noini |
401,7 → 401,7 |
pop esi ecx |
jmp .unload |
.unload_done: |
;if 0 ; commented due to bug in libini |
if 0 ; commented due to bug in libini |
cmp [ini.set_int], aIniSetInt |
jz .nosave |
push [panel1_colmode] |
415,7 → 415,7 |
push app_path |
call [ini.set_int] |
.nosave: |
;end if |
end if |
if CHECK_FOR_LEAKS |
mov ecx, [panel1_files] |
call pgfree |
815,8 → 815,8 |
ret |
|
enum_associations_callback: |
; LongBool __stdcall callback(f_name,sec_name,key_name,key_value); |
; [esp+4] = f_name, [esp+8] = sec_name, [esp+12] = key_name, [esp+16] = key_value |
; LongBool __stdcall callback(f_name,sec_name,key_name); |
; [esp+4] = f_name, [esp+8] = sec_name, [esp+12] = key_name |
mov esi, [esp+12] |
mov edi, esi |
@@: |
824,7 → 824,16 |
test al, al |
jnz @b |
sub esi, edi ; esi = size of key name |
mov eax, [esp+16] |
push nullstr |
push 1024 |
push saved_file_name |
push edi |
push dword [esp+16+8] |
push dword [esp+20+4] |
call [ini.get_str] |
test eax, eax |
jnz .ret |
mov eax, saved_file_name |
@@: |
inc esi |
inc eax |
861,7 → 870,7 |
stosb |
test al, al |
jnz @b |
mov esi, [esp+16] |
mov esi, saved_file_name |
@@: |
lodsb |
stosb |
869,30 → 878,37 |
jnz @b |
.ret: |
mov al, 1 |
ret 16 |
ret 12 |
.err: |
mov ecx, edx |
call pgfree |
xor eax, eax |
ret 16 |
ret 12 |
|
enum_plugins_callback: |
; LongBool __stdcall callback(f_name,sec_name,key_name,key_value); |
; [esp+4] = f_name, [esp+8] = sec_name, [esp+12] = key_name, [esp+16] = key_value |
mov esi, [esp+16] |
; LongBool __stdcall callback(f_name,sec_name,key_name); |
; [esp+4] = f_name, [esp+8] = sec_name, [esp+12] = key_name |
push nullstr |
push 1024 |
push saved_file_name |
push dword [esp+12+12] |
push dword [esp+16+8] |
push dword [esp+20+4] |
call [ini.get_str] |
test eax, eax |
jnz .ret |
mov esi, saved_file_name |
cmp byte [esi], '/' |
jz .absolute |
; convert path to absolute |
mov edi, execdata |
push esi |
@@: |
cmp edi, execdata+1024 |
jae .overflow |
lodsb |
stosb |
test al, al |
jnz @b |
mov edi, saved_file_name |
mov [esp+16], edi |
pop edi |
mov esi, app_path |
push esi |
xor ecx, ecx |
907,11 → 923,6 |
@@: |
pop esi |
sub ecx, esi |
push edi |
add edi, ecx |
cmp edi, saved_file_name+1024 |
pop edi |
ja .overflow |
rep movsb |
mov esi, execdata |
.z: |
937,20 → 948,18 |
jnz @b |
jmp .z |
.c: |
cmp edi, saved_file_name+1024 |
jae .overflow |
lodsb |
stosb |
test al, al |
jnz .c |
jmp .absolute |
.overflow: |
jz @f |
cmp edi, saved_file_name+1024 |
jb .c |
mov esi, execdata |
mov byte [esi+1023], 0 |
call load_dll_and_import.big |
.ret: |
mov al, 1 |
ret 12 |
@@: |
.absolute: |
; allocate space for plugin info |
mov eax, [num_plugins] |
976,7 → 985,7 |
lea esi, [esi+ecx-PluginInfo.size] |
; load plugin DLL |
or ebp, -1 |
mov eax, [esp+16] |
mov eax, saved_file_name |
call load_dll_and_import.do |
test eax, eax |
jnz .dec_ret |
995,7 → 1004,7 |
@@: |
push aIncompatibleVersion |
.cantload: |
push dword [esp+4+16] |
push saved_file_name |
push aCannotLoadPlugin |
mov eax, esp |
push ContinueBtn |
1032,7 → 1041,7 |
jmp .cantload |
.ok: |
mov al, 1 |
ret 16 |
ret 12 |
|
plugin_unload_default: |
ret |
6375,13 → 6384,13 |
mov al, [esi] |
cmp al, '*' |
jz .asterisk |
cmp al, '?' |
jz .quest |
cmp al, ']' |
jz .list |
dec edi |
cmp edi, edx |
jb .done_fail |
cmp al, '?' |
jz .mask_symbol |
cmp al, ']' |
jz .list_check |
cmp al, [edi] |
jz .mask_symbol |
.done_fail: |
6395,6 → 6404,15 |
clc |
pop eax edi esi |
ret |
.quest: |
dec edi |
cmp edi, edx |
jb .done_fail |
jmp .mask_symbol |
.list: |
dec edi |
cmp edi, edx |
jb .done_fail |
.list_check: |
dec esi |
cmp esi, ecx |
6432,7 → 6450,6 |
cmp edi, edx |
jz .done_fail |
dec esi |
dec edi |
jmp .asterisk |
@@: |
cmp byte [esi-1], ']' |
6441,12 → 6458,14 |
.asterisk_normal: |
mov al, [esi-1] |
@@: |
dec edi |
cmp edi, edx |
jb .done_fail |
jz .done_fail |
cmp al, [edi] |
jnz @b |
jz @f |
dec edi |
jmp @b |
@@: |
dec edi |
dec esi |
call match_single_mask_rev_lowercase |
jnc .done_succ |