8,6 → 8,7 |
dd 0, app_path |
|
include 'lang.inc' |
include '..\..\..\macros.inc' |
include 'font.inc' |
include 'sort.inc' |
include 'kglobals.inc' |
60,7 → 61,7 |
pop eax |
push 11 |
pop ebx |
int 0x40 |
mcall |
call init_console |
call draw_window |
push 66 |
68,7 → 69,7 |
push 1 |
pop ebx |
mov ecx, ebx |
int 40h ; set keyboard mode to scancodes |
mcall ; set keyboard mode to scancodes |
mov eax, 200 |
mov [panel1_nfa], eax |
mov [panel2_nfa], eax |
79,7 → 80,7 |
mov [panel2_files], eax |
test eax, eax |
jz exit |
cmp [panel1_files], 0 |
cmp [panel1_files], eax |
jz exit |
mov [panel1_sortmode], 0 ; sort by name |
mov [panel2_sortmode], 0 |
99,8 → 100,8 |
; load libini.obj and kfar.ini |
mov eax, libini_name |
mov esi, ini_import |
push 3 |
pop ebp ; we use version 3 of libini |
push 2 |
pop ebp ; we use version 2 of libini |
call load_dll_and_import |
test eax, eax |
jnz .noini |
125,14 → 126,33 |
call xpgalloc |
test eax, eax |
jz .skip_assoc |
mov [associations], eax |
push enum_associations_callback |
push aAssociations |
push app_path |
call [ini.enum_keys] |
.skip_assoc: |
@@: |
mov edx, eax |
push edx ecx |
push ecx |
push edx |
push dword aAssociations |
push dword app_path |
call [ini.query_sec] |
pop ecx edx |
cmp eax, ecx |
jbe @f |
add ecx, ecx |
call xpgrealloc |
test eax, eax |
jz .skip_assoc |
jmp @b |
@@: |
cmp ecx, 0x1000 |
jbe @f |
mov ecx, eax |
call xpgrealloc ; must succeed, because we decrease size |
mov edx, eax |
@@: |
mov [associations], edx |
xor ebp, ebp |
xor esi, esi |
.skip_assoc: |
mov edi, saved_file_name |
push dword nullstr |
push 512 |
230,7 → 250,7 |
event: |
push 10 |
pop eax |
int 40h |
mcall |
dec eax |
jz redraw |
dec eax |
238,13 → 258,13 |
; button - we have only one button, close |
exit: |
or eax, -1 |
int 40h |
mcall |
redraw: |
; query kbd state from OS |
mov al, 66 |
push 3 |
pop ebx |
int 0x40 |
mcall |
and eax, 0x3F |
cmp al, [ctrlstate] |
mov [ctrlstate], al |
254,7 → 274,7 |
mov al, 9 |
mov ebx, procinfo |
or ecx, -1 |
int 40h |
mcall |
; test if rolled up |
; height of rolled up window is [skinh]+3 |
mov eax, [ebx+46] |
264,14 → 284,14 |
mov al, 12 |
push 1 |
pop ebx |
int 0x40 |
mcall |
xor eax, eax |
; ebx, ecx, edi are ignored by function 0 after first redraw |
mov edx, 0x53000000 |
int 0x40 |
mcall |
mov al, 12 |
inc ebx |
int 0x40 |
mcall |
jmp event |
@@: |
xor ecx, ecx |
345,7 → 365,7 |
imul esi, font_height |
add esi, [skinh] |
add esi, 5-1 |
int 40h |
mcall |
.resize_draw: |
mov ecx, [MemForImage] |
call pgfree |
375,7 → 395,7 |
pop eax |
push 5 |
pop ebx |
int 0x40 |
mcall |
push eax |
sub eax, [esp+2] |
inc eax |
408,11 → 428,11 |
add esi, 4 |
push 67 |
pop eax |
int 0x40 |
mcall |
jmp redraw.resize_draw |
key: |
mov al, 2 |
int 40h |
mcall |
test al, al |
jnz event |
xchg al, ah |
567,77 → 587,6 |
setz al |
ret |
|
enum_associations_callback: |
; 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 |
@@: |
lodsb |
test al, al |
jnz @b |
sub esi, edi ; esi = size of key name |
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 |
cmp byte [eax-1], 0 |
jnz @b |
; esi = total size of entry |
push esi |
add esi, [associations_size] |
mov ecx, [associations_allocated] |
@@: |
cmp esi, ecx |
jbe @f |
add ecx, ecx |
jmp @b |
@@: |
pop esi |
cmp [associations_allocated], ecx |
jz @f |
mov [associations_allocated], ecx |
mov edx, [associations] |
call xpgrealloc |
mov [associations], eax |
test eax, eax |
jz .err |
@@: |
mov eax, esi |
mov esi, edi |
mov edi, [associations] |
add edi, [associations_size] |
dec edi |
add [associations_size], eax |
@@: |
lodsb |
stosb |
test al, al |
jnz @b |
mov esi, saved_file_name |
@@: |
lodsb |
stosb |
test al, al |
jnz @b |
.ret: |
mov al, 1 |
ret 12 |
.err: |
mov ecx, edx |
call pgfree |
xor eax, eax |
ret 12 |
|
new_screen: |
; in: ecx=sizeof(screen data), edx->vtable |
; out: ebp=pointer or NULL, eax!=0 if successful |
1060,7 → 1009,7 |
.nofasm: |
mov ebx, execinfo |
; if command line is more than 256 symbols, the kernel will truncate it |
; we do not want this! |
; we does not want this! |
; N.B. We know that command line is either NULL or execdata, which is always ASCIIZ string, |
; but can be up to 1023 symbols |
mov esi, [ebx+8] |
1077,7 → 1026,7 |
.cmdlinelenok: |
push 70 |
pop eax |
int 40h |
mcall |
xor esi, esi |
xchg esi, [restore_semicolon] |
test esi, esi |
1086,11 → 1035,13 |
@@: |
neg eax |
js @f |
push dword aContinue |
mov esi, esp |
call get_error_msg |
push eax |
push dword aRunError |
mov eax, esp |
push ContinueBtn |
push esi |
push 1 |
push eax |
push 2 |
1098,8 → 1049,7 |
push -1 |
push dword aError |
call SayErr |
pop eax |
pop eax |
add esp, 3*4 |
ret |
@@: |
test edx, edx |
1108,7 → 1058,7 |
pop eax |
push 20 |
pop ebx |
int 0x40 |
mcall |
jmp .ctrl_r |
@@: |
ret |
1125,9 → 1075,11 |
jz @f |
mov byte [esi], ';' |
@@: |
push dword aContinue |
mov esi, esp |
push eax |
mov eax, esp |
push ContinueBtn |
push esi |
push 1 |
push eax |
push 1 |
1135,7 → 1087,7 |
push -1 |
push dword aError |
call SayErr |
pop eax |
add esp, 2*4 |
ret |
.bigcmdline: |
mov eax, aCmdLineTooBig |
1145,6 → 1097,9 |
.bigfoldername: |
mov eax, aFolderNameTooBig |
jmp .l2 |
.copytoself: |
mov eax, aCannotCopyToSelf |
jmp .l2 |
.enter_folder: |
lea esi, [ecx+40] |
cmp word [esi], '..' |
1281,7 → 1236,7 |
mov byte [tmpname+1], 0 |
push 70 |
pop eax |
int 40h |
mcall |
mov ebx, dirinfo |
test eax, eax |
jnz .drive_loop_e_done |
1297,7 → 1252,7 |
.drive_loop_i: |
push 70 |
pop eax |
int 40h |
mcall |
mov ebx, dirinfo |
test eax, eax |
jnz .drive_loop_i_done |
1408,9 → 1363,6 |
call read_folder |
jmp .done_redraw |
.shift_f5: |
mov esi, ebp |
cmp [ebp + panel1_selected_num - panel1_data], 0 |
jnz .f5_2 |
call get_curfile_folder_entry |
lea esi, [ecx+40] |
mov edi, CopyDestEditBuf |
1427,10 → 1379,6 |
stosb |
jmp @b |
.f5: |
mov esi, ebp |
xor esi, panel1_data xor panel2_data |
.f5_2: |
add esi, panel1_dir - panel1_data |
mov edi, CopyDestEditBuf |
mov eax, CopyDestEditBuf.length |
stosd |
1438,6 → 1386,9 |
xor eax, eax |
stosd |
mov edx, edi |
mov esi, ebp |
xor esi, panel1_data xor panel2_data |
add esi, panel1_dir - panel1_data |
@@: |
lodsb |
test al, al |
1462,53 → 1413,6 |
stosb |
jmp @b |
@@: |
mov eax, [ebp + panel1_selected_num - panel1_data] |
test eax, eax |
jz .f5_noselected1 |
mov ebx, eax |
push 10 |
pop ecx |
push -'0' |
@@: |
xor edx, edx |
div ecx |
push edx |
test eax, eax |
jnz @b |
@@: |
pop eax |
add al, '0' |
jz @f |
stosb |
jmp @b |
@@: |
if lang eq ru |
mov dword [edi], ' í«¥' |
mov dword [edi+4], '¬¥â' |
add edi, 8 |
cmp ebx, 1 |
jz @f |
mov al, ' ' |
stosb |
cmp ebx, 4 |
jbe @f |
mov word [edi-1], '®¢' |
inc edi |
@@: |
else |
mov dword [edi], ' ite' |
mov byte [edi+4], 'm' |
add edi, 5 |
cmp ebx, 1 |
jz @f |
mov al, 's' |
stosb |
@@: |
end if |
jmp .f5_selected1 |
.f5_noselected1: |
mov al, '"' |
stosb |
call get_curfile_folder_entry |
lea esi, [ecx+40] |
lea eax, [esi+1] |
1535,9 → 1439,6 |
stosb |
jmp @b |
@@: |
mov al, '"' |
stosb |
.f5_selected1: |
mov esi, aCopy2 |
@@: |
lodsb |
1579,14 → 1480,13 |
dec edi |
cmp edi, esi |
jb .ret2 |
mov [bEndSlash], 0 |
cmp byte [edi], '/' |
jnz @f |
; «¨ç¨¥/®âáãâá⢨¥ § ª 稢 î饣® á«íè ¢ ¦® ⮫쪮 ¤«ï ª®¯¨à®¢ ¨ï ¯ ¯®ª |
cmp edi, esi |
jz @f |
mov byte [edi], 0 |
dec edi |
mov [bEndSlash], 1 |
@@: |
;
᫨ ¯ãâì ¥ ç¨ ¥âáï á® á«íè , áç¨â ¥¬ ¥£® ®â®á¨â¥«ì® ⥪ã饩 ¯ ¯ª¨ |
cmp byte [esi], '/' |
1623,30 → 1523,8 |
mov byte [edi-1], '/' |
pop esi |
.copy_absolute_path: |
; ç « ᮧ¤ ñ¬ ¢á¥ ¢ë襫¥¦ 騥 ¯ ¯ª¨, ª®â®àë¥ ¥éñ ¥ áãé¥áâ¢ãîâ |
; ®á«¥¤¨© ¨§ í«¥¬¥â®¢ ¬®¦¥â ¡ëâì ª ª ä ©«®¬, â ª ¨ ¯ ¯ª®©; |
; ä®àá¨à㥬 ¯ ¯ªã ¢ á«ãç ¥, ¥á«¨ å®âï ¡ë ®¤¨ ¨§ ¨áâ®ç¨ª®¢ ï¥âáï ¯ ¯ª®© |
xor edx, edx |
cmp [ebp + panel1_selected_num - panel1_data], 0 |
jz .f5_noselected2 |
mov ecx, [ebp + panel1_numfiles - panel1_data] |
mov edi, [ebp + panel1_files - panel1_data] |
.scanselected2: |
mov eax, [edi] |
add edi, 4 |
test byte [eax+303], 1 |
jz @f |
test byte [eax], 10h |
jz @f |
inc edx |
@@: |
loop .scanselected2 |
jmp .f5_selected2 |
.f5_noselected2: |
call get_curfile_folder_entry |
test byte [ecx], 10h |
setnz dl |
.f5_selected2: |
; ®«ãç ¥¬ âਡãâë § 票ï |
mov cl, 0x10 |
xor eax, eax |
mov edi, esi |
.countslashloop: |
1653,120 → 1531,145 |
cmp byte [edi], '/' |
jnz @f |
inc eax |
mov ecx, edi |
@@: |
inc edi |
cmp byte [edi], 0 |
jnz .countslashloop |
mov [bNeedRestoreName], 0 |
; "/file-system/partition" folders already exist, so we don't need to create them |
cmp eax, 2 |
jbe .createupdone |
; we interpret destination as folder if edx!=0 or bEndSlash!=0 |
test edx, edx |
jnz @f |
cmp [bEndSlash], 0 |
jnz @f |
mov edi, ecx |
dec eax |
jbe @f |
mov ebx, attrinfo |
mov [attrinfo.attr], 0 |
mov [ebx + attrinfo.name - attrinfo], esi |
push 70 |
pop eax |
mcall |
mov cl, byte [attrinfo.attr] |
@@: |
mov [attrinfo.name], esi |
mov ecx, eax |
; ¨é¥¬ ¯®á«¥¤îî ¯ ¯ªã, ª®â®à ï ¥éñ áãé¥áâ¢ã¥â |
.createuploop1: |
cmp eax, 2 |
jbe .createupdone1 |
mov dl, [edi] |
mov byte [edi], 0 |
push eax |
test cl, 0x10 |
jz .copyfile |
; ¬ ¯®¤áã㫨 ª â «®£ § 票ï, ¤®¯¨áë¢ ¥¬ ¨¬ï ä ©« |
cmp edi, CopyDestEditBuf+12+513 |
jae .bigfilename |
mov al, '/' |
stosb |
push esi |
call get_curfile_folder_entry |
lea esi, [ecx+40] |
@@: |
lodsb |
cmp edi, CopyDestEditBuf+12+513 |
jae .bigfilename2 |
stosb |
test al, al |
jnz @b |
pop esi |
.copyfile: |
; ¬ï ¨á室®£® ä ©« |
push esi |
lea esi, [ebp+panel1_dir-panel1_data] |
mov edi, saved_file_name |
push edi |
@@: |
lodsb |
test al, al |
jz @f |
stosb |
jmp @b |
@@: |
mov al, '/' |
stosb |
call get_curfile_folder_entry |
lea esi, [ecx+40] |
@@: |
lodsb |
cmp edi, saved_file_name+1024 |
jae .bigfilename3 |
stosb |
test al, al |
jnz @b |
pop esi |
pop edi |
; ¥«ì§ï ᪮¯¨à®¢ âì ä ©« ¯®¢¥àå á ¬®£® ᥡï! |
push esi edi |
call strcmpi |
pop edi esi |
jz .copytoself |
; ®¡á⢥®, ª®¯¨à㥬 |
; esi->source name, edi->destination name |
mov [writeinfo.code], 2 |
mov [writeinfo.name], edi |
and dword [writeinfo.first], 0 |
and dword [writeinfo.first+4], 0 |
mov [writeinfo.data], copy_buffer |
mov ebx, readinfo |
and dword [ebx+readinfo.first-readinfo], 0 |
and dword [ebx+readinfo.first+4-readinfo], 0 |
mov [ebx+readinfo.size-readinfo], copy_buffer_size |
mov [ebx+readinfo.data-readinfo], copy_buffer |
mov [ebx+readinfo.name-readinfo], esi |
.copyloop: |
mov ebx, readinfo |
push 70 |
pop eax |
mov ebx, attrinfo |
int 0x40 |
mcall |
test eax, eax |
pop eax |
jnz .createupcont1 |
test byte [attrinfo.attr], 10h |
jnz .createupdone1 |
; the item required to be a folder, but is file |
push aNotFolder |
jz .copyreadok |
cmp eax, 6 |
jz .copyreadok |
push esi |
push dword aCannotReadFile |
call get_error_msg |
push eax |
mov eax, esp |
push ContinueBtn |
push 1 |
push dword RetryOrCancelBtn |
push 2 |
push eax |
push 2 |
push 3 |
push -1 |
push -1 |
push aError |
push dword aError |
call SayErr |
add esp, 3*4 |
test eax, eax |
jz .copyloop |
jmp .copyfailed |
.copyreadok: |
test ebx, ebx |
jz .copydone |
add dword [readinfo.first], ebx |
adc dword [readinfo.first+4], 0 |
mov [writeinfo.size], ebx |
.copywrite: |
mov ebx, writeinfo |
push 70 |
pop eax |
pop eax |
.ret3: |
ret |
.createupcont1: |
mov [edi], dl |
dec eax |
@@: |
dec edi |
cmp byte [edi], '/' |
jnz @b |
jmp .createuploop1 |
.createupdone1: |
; ᮧ¤ ñ¬ ¢á¥ ¯ ¯ª¨, ª®â®àë¥ ¬ ã¦ë |
cmp eax, ecx |
jae .createupdone |
@@: |
inc edi |
cmp byte [edi], 0 |
jz @f |
cmp byte [edi], '/' |
jnz @b |
@@: |
mov dl, byte [edi] |
mov byte [edi], 0 |
mcall |
test eax, eax |
jz .copywriteok |
push edi |
push dword aCannotWriteFile |
call get_error_msg |
push eax |
push RetryOrCancelBtn |
mov eax, esp |
push dword RetryOrCancelBtn |
push 2 |
call makedir |
mov [bNeedRestoreName], 1 |
pop eax |
jnz .ret3 |
inc eax |
jmp .createupdone1 |
.createupdone: |
mov dl, 1 |
cmp byte [edi], 1 |
sbb eax, -1 |
cmp eax, 2 |
jbe .docopy |
mov [attrinfo.attr], 0 ; assume zero attributes if error |
push 70 |
pop eax |
mov ebx, attrinfo |
int 0x40 |
test [attrinfo.attr], 10h |
setnz dl |
.docopy: |
call get_curfile_folder_entry |
mov eax, ecx |
cmp [bNeedRestoreName], 0 |
jz @f |
cmp [bEndSlash], 0 |
jnz @f |
cmp [ebp + panel1_selected_num - panel1_data], 0 |
jnz @f |
test byte [eax], 10h |
jz @f |
mov dl, 0 |
@@: |
; ç¨ ¥¬ ᮡá⢥® ª®¯¨à®¢ ¨¥ |
mov [bDestIsFolder], dl |
mov [copy_bSkipAll], 0 |
mov [copy_bSkipAll2], 0 |
cmp [ebp + panel1_selected_num - panel1_data], 0 |
jnz .f5_selected3 |
call copy_file |
push eax |
push 3 |
push -1 |
push -1 |
push dword aError |
call SayErr |
add esp, 3*4 |
test eax, eax |
jz .copywrite |
jmp .copyfailed |
.copywriteok: |
mov ecx, [writeinfo.size] |
add dword [writeinfo.first], ecx |
adc dword [writeinfo.first+4], 0 |
mov [writeinfo.code], 3 |
cmp ecx, copy_buffer_size |
jz .copyloop |
.copydone: |
push ebp |
call .ctrl_r |
1773,28 → 1676,33 |
pop ebp |
xor ebp, panel1_data xor panel2_data |
jmp .ctrl_r |
.f5_selected3: |
mov ecx, [ebp + panel1_numfiles - panel1_data] |
mov esi, [ebp + panel1_files - panel1_data] |
.f5_selected_copyloop: |
lodsd |
test byte [eax+303], 1 |
jz .f5_selected_copycont |
mov [bDestIsFolder], dl |
call copy_file |
ja .f5_multiple_cancel |
and byte [eax+303], not 1 |
pushad |
call draw_panel |
cmp [bNeedRestoreName], 0 |
.copyfailed: |
cmp [bConfirmDeleteIncomplete], 0 |
jz @f |
mov esi, CopyDestEditBuf+12 |
call delete_last_name_from_end |
cmp [writeinfo.code], 2 |
jz .copydone |
push dword aIncompleteFile |
mov eax, esp |
push dword DeleteOrKeepBtn |
push 2 |
push eax |
push 1 |
push -1 |
push -1 |
push dword aCopyCaption |
call SayErr |
add esp, 4 |
test eax, eax |
jnz .copydone |
@@: |
popad |
.f5_selected_copycont: |
loop .f5_selected_copyloop |
.f5_multiple_cancel: |
mov ebx, delinfo |
push dword [ebx+21] |
mov dword [ebx+21], edi |
push 70 |
pop eax |
mcall |
; ignore errors |
pop dword [delinfo+21] |
jmp .copydone |
|
.f3: |
2229,9 → 2137,30 |
mov byte [edi-1], '/' |
pop esi |
.mkdir_absolute_path: |
push RetryOrCancelBtn |
.mkdir_retry: |
push 70 |
pop eax |
mov ebx, mkdirinfo |
mcall |
test eax, eax |
jz @f |
push dword CopyDestEditBuf+12 |
push dword aCannotMakeFolder |
call get_error_msg |
push eax |
mov eax, esp |
push dword RetryOrCancelBtn |
push 2 |
call makedir |
push eax |
push 3 |
push -1 |
push -1 |
push dword aError |
call SayErr |
add esp, 3*4 |
test eax, eax |
jz .mkdir_retry |
@@: |
jmp .copydone |
.change_mode: |
dec eax |
2349,35 → 2278,6 |
jnz .selectloop |
pop eax |
jmp .done_redraw |
.greyasterisk: |
mov ecx, [ebp + panel1_numfiles - panel1_data] |
mov esi, [ebp + panel1_files - panel1_data] |
jecxz .galoopdone |
.galoop: |
lodsd |
cmp word [eax+40], '..' |
jnz @f |
cmp byte [eax+42], 0 |
jz .gacont |
@@: |
xor byte [eax+303], 1 |
mov edx, [eax+32] |
test byte [eax+303], 1 |
jz .gadel |
add dword [ebp + panel1_selected_size - panel1_data], edx |
mov edx, [eax+36] |
adc dword [ebp + panel1_selected_size+4 - panel1_data], edx |
inc dword [ebp + panel1_selected_num - panel1_data] |
jmp .gacont |
.gadel: |
sub dword [ebp + panel1_selected_size - panel1_data], edx |
mov edx, [eax+36] |
sbb dword [ebp + panel1_selected_size+4 - panel1_data], edx |
dec dword [ebp + panel1_selected_num - panel1_data] |
.gacont: |
loop .galoop |
.galoopdone: |
jmp .done_redraw |
|
panels_OnRedraw: |
call draw_cmdbar |
2536,10 → 2436,10 |
pop eax |
push 1 |
pop ebx |
int 40h |
mcall |
mov al, 48 |
mov bl, 4 |
int 40h |
mcall |
mov [skinh], eax |
mov ebx, [cur_width] |
imul ebx, font_width |
2549,8 → 2449,8 |
lea ecx, [eax+ecx+5-1+100*65536] |
xor eax, eax |
mov edx, 0x53000000 |
mov edi, header |
int 40h |
mov edi, title |
mcall |
mov al, 13 |
xor edx, edx |
cmp [fill_width], 0 |
2564,7 → 2464,7 |
mov cx, word [wnd_height] |
sub cx, word [skinh] |
sub cx, 5-1 |
int 0x40 |
mcall |
@@: |
cmp [fill_height], 0 |
jz @f |
2577,7 → 2477,7 |
sub ecx, 5-1 |
shl ecx, 16 |
mov cx, word [fill_height] |
int 0x40 |
mcall |
@@: |
; xor ecx, ecx |
; call draw_image |
2594,12 → 2494,12 |
mov esi, 8 |
mov edi, console_colors |
xor ebp, ebp |
int 0x40 |
mcall |
@@: |
mov al, 12 |
push 2 |
pop ebx |
int 40h |
mcall |
ret |
|
draw_image.nomem: |
2611,7 → 2511,7 |
mov ecx, [skinh-2] |
mov cx, word [cur_height] |
imul cx, font_height |
int 40h |
mcall |
mov al, 4 |
mov ebx, 32*65536+32 |
mov ecx, 0xFFFFFF |
2618,7 → 2518,7 |
mov edx, nomem_draw |
push nomem_draw.size |
pop esi |
int 40h |
mcall |
ret |
|
draw_image: |
2815,7 → 2715,7 |
mov edi, console_colors |
push 8 |
pop esi |
int 40h |
mcall |
.nodraw: |
ret |
|
4037,7 → 3937,7 |
push 70 |
pop eax |
mov ebx, dirinfo |
int 40h |
mcall |
test eax, eax |
jz .ok |
cmp eax, 6 |
5243,8 → 5143,6 |
.found_ext: |
inc esi |
mov edi, [associations] |
test edi, edi |
jz .notfound |
.find_loop: |
push esi edi |
call strcmpi |
5262,7 → 5160,6 |
jnz @b |
cmp byte [edi], 0 |
jnz .find_loop |
.notfound: |
; unknown extension |
stc |
.found: |
5269,7 → 5166,7 |
pop esi |
ret |
|
header db 'Kolibri Far 0.34',0 |
title db 'Kolibri Far 0.32',0 |
|
nomem_draw db 'No memory for redraw.',0 |
.size = $ - nomem_draw |
5663,8 → 5560,6 |
active_panel dd panel1_data |
|
associations dd 0 |
associations_size dd 1 ; terminating zero |
associations_allocated dd 0x1000 ; start with one page |
|
console_colors dd 0x000000, 0x000080, 0x008000, 0x008080 |
dd 0x800000, 0x800080, 0x808000, 0xC0C0C0 |
5893,8 → 5788,6 |
dd panels_OnKey.greyplus |
dw 0x4A, 0 |
dd panels_OnKey.greyminus |
dw 0x37, 0 |
dd panels_OnKey.greyasterisk |
db 0 |
|
viewer_ctrlkeys: |
6286,8 → 6179,6 |
dd aSkip |
dd aSkipAll |
dd a_Cancel |
ContinueBtn: |
dd aContinue |
|
if lang eq ru |
aDeleteCaption db '¤ «¥¨¥',0 |
6302,8 → 6193,8 |
aCopyLength = $ - aCopy - 1 |
a_Continue db '[ த®«¦¨âì ]',0 |
a_ContinueLength = $ - a_Continue - 1 |
aCopy1 db '®¯¨à®¢ âì ',0 |
aCopy2 db ' ¢:',0 |
aCopy1 db '®¯¨à®¢ âì "',0 |
aCopy2 db '" ¢:',0 |
aError db '訡ª ',0 |
aContinue db 'த®«¦¨âì',0 |
aRetry db '®¢â®à¨âì',0 |
6339,7 → 6230,6 |
aCannotWriteFile db '¥ ¬®£ã § ¯¨á âì ¢ ä ©«',0 |
aCannotDeleteFile db '¥ ¬®£ã 㤠«¨âì ä ©«',0 |
aCannotDeleteFolder db '¥ ¬®£ã 㤠«¨âì ¯ ¯ªã',0 |
aNotFolder db '¥ ï¥âáï ¯ ¯ª®©',0 |
aIgnore db '£®à¨à®¢ âì',0 |
aMkDirCaption db '®§¤ ¨¥ ¯ ¯ª¨',0 |
aMkDir db '®§¤ âì ¯ ¯ªã',0 |
6411,7 → 6301,6 |
aCannotWriteFile db 'Cannot write to the file',0 |
aCannotDeleteFile db 'Cannot delete the file',0 |
aCannotDeleteFolder db 'Cannot delete the folder',0 |
aNotFolder db 'is not a folder',0 |
aIgnore db 'Ignore',0 |
aMkDirCaption db 'Make folder',0 |
aMkDir db 'Create the folder',0 |
6443,7 → 6332,7 |
aVersion db 'version',0 |
aIniGetInt db 'ini.get_int',0 |
aIniGetStr db 'ini.get_str',0 |
aIniEnumKeys db 'ini.enum_keys',0 |
aIniQuerySec db 'ini.query_sec',0 |
|
aConfirmations db 'Confirmations',0 |
aConfirmDelete db 'Delete',0 |
6459,7 → 6348,7 |
ini_import: |
ini.get_int dd aIniGetInt |
ini.get_str dd aIniGetStr |
ini.enum_keys dd aIniEnumKeys |
ini.query_sec dd aIniQuerySec |
dd 0 |
|
virtual at 0 |
6679,7 → 6568,7 |
tolower_table rb 256 |
layout rb 128 |
|
copy_buffer_size = 65536 |
copy_buffer_size = 32768 |
copy_buffer rb copy_buffer_size |
|
; data for directory delete |
6689,19 → 6578,8 |
del_dir_stack_ptr dd ? |
del_dir_query_size = 32 |
del_dir_query_area rb 32+304*del_dir_query_size |
del_bSkipAll db ? |
|
label copy_dir_stack dword at del_dir_stack |
label copy_dir_stack_ptr dword at del_dir_stack_ptr |
copy_dir_query_size = del_dir_query_size |
copy_dir_query_area = del_dir_query_area |
del_bSkipAll db ? ; for directory errors |
label copy_bSkipAll byte at del_bSkipAll |
copy_bSkipAll2 db ? ; for file read/write errors |
|
bEndSlash db ? |
bDestIsFolder db ? |
bNeedRestoreName db ? |
|
; stack |
align 4 |
rb 512 |