Rev 485 | Rev 522 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 485 | Rev 517 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | memsize dd mem |
6 | memsize dd mem |
7 | dd stacktop |
7 | dd stacktop |
8 | dd 0, app_path |
8 | dd 0, app_path |
Line 9... | Line 9... | ||
9 | 9 | ||
10 | include 'lang.inc' |
- | |
11 | include '..\..\..\macros.inc' |
10 | include 'lang.inc' |
12 | include 'font.inc' |
11 | include 'font.inc' |
13 | include 'sort.inc' |
12 | include 'sort.inc' |
14 | include 'kglobals.inc' |
13 | include 'kglobals.inc' |
15 | include 'dialogs.inc' |
14 | include 'dialogs.inc' |
Line 59... | Line 58... | ||
59 | mov byte [edi-256+'ð'], 'ñ' |
58 | mov byte [edi-256+'ð'], 'ñ' |
60 | push 68 |
59 | push 68 |
61 | pop eax |
60 | pop eax |
62 | push 11 |
61 | push 11 |
63 | pop ebx |
62 | pop ebx |
64 | mcall |
63 | int 0x40 |
65 | call init_console |
64 | call init_console |
66 | call draw_window |
65 | call draw_window |
67 | push 66 |
66 | push 66 |
68 | pop eax |
67 | pop eax |
69 | push 1 |
68 | push 1 |
70 | pop ebx |
69 | pop ebx |
71 | mov ecx, ebx |
70 | mov ecx, ebx |
72 | mcall ; set keyboard mode to scancodes |
71 | int 40h ; set keyboard mode to scancodes |
73 | mov eax, 200 |
72 | mov eax, 200 |
74 | mov [panel1_nfa], eax |
73 | mov [panel1_nfa], eax |
75 | mov [panel2_nfa], eax |
74 | mov [panel2_nfa], eax |
76 | mov ecx, 200*4 + 32 + 200*304 |
75 | mov ecx, 200*4 + 32 + 200*304 |
77 | call pgalloc |
76 | call pgalloc |
78 | mov [panel1_files], eax |
77 | mov [panel1_files], eax |
79 | call pgalloc |
78 | call pgalloc |
80 | mov [panel2_files], eax |
79 | mov [panel2_files], eax |
81 | test eax, eax |
80 | test eax, eax |
82 | jz exit |
81 | jz exit |
83 | cmp [panel1_files], eax |
82 | cmp [panel1_files], 0 |
84 | jz exit |
83 | jz exit |
85 | mov [panel1_sortmode], 0 ; sort by name |
84 | mov [panel1_sortmode], 0 ; sort by name |
86 | mov [panel2_sortmode], 0 |
85 | mov [panel2_sortmode], 0 |
87 | push 2 ; "á।¨©" ä®à¬ â |
86 | push 2 ; "á।¨©" ä®à¬ â |
88 | pop eax |
87 | pop eax |
Line 98... | Line 97... | ||
98 | mov [eax], ecx |
97 | mov [eax], ecx |
99 | mov [active_screen_vtable], ecx |
98 | mov [active_screen_vtable], ecx |
100 | ; load libini.obj and kfar.ini |
99 | ; load libini.obj and kfar.ini |
101 | mov eax, libini_name |
100 | mov eax, libini_name |
102 | mov esi, ini_import |
101 | mov esi, ini_import |
103 | push 2 |
102 | push 3 |
104 | pop ebp ; we use version 2 of libini |
103 | pop ebp ; we use version 3 of libini |
105 | call load_dll_and_import |
104 | call load_dll_and_import |
106 | test eax, eax |
105 | test eax, eax |
107 | jnz .noini |
106 | jnz .noini |
108 | mov edi, app_path |
107 | mov edi, app_path |
109 | or ecx, -1 |
108 | or ecx, -1 |
Line 124... | Line 123... | ||
124 | mov [bConfirmDeleteIncomplete], al |
123 | mov [bConfirmDeleteIncomplete], al |
125 | mov ecx, 0x1000 |
124 | mov ecx, 0x1000 |
126 | call xpgalloc |
125 | call xpgalloc |
127 | test eax, eax |
126 | test eax, eax |
128 | jz .skip_assoc |
127 | jz .skip_assoc |
129 | @@: |
- | |
130 | mov edx, eax |
128 | mov [associations], eax |
131 | push edx ecx |
129 | push enum_associations_callback |
132 | push ecx |
- | |
133 | push edx |
- | |
134 | push dword aAssociations |
130 | push aAssociations |
135 | push dword app_path |
131 | push app_path |
136 | call [ini.query_sec] |
132 | call [ini.enum_keys] |
137 | pop ecx edx |
- | |
138 | cmp eax, ecx |
- | |
139 | jbe @f |
- | |
140 | add ecx, ecx |
- | |
141 | call xpgrealloc |
- | |
142 | test eax, eax |
- | |
143 | jz .skip_assoc |
133 | .skip_assoc: |
144 | jmp @b |
- | |
145 | @@: |
- | |
146 | cmp ecx, 0x1000 |
- | |
147 | jbe @f |
- | |
148 | mov ecx, eax |
- | |
149 | call xpgrealloc ; must succeed, because we decrease size |
- | |
150 | mov edx, eax |
- | |
151 | @@: |
- | |
152 | mov [associations], edx |
- | |
153 | xor ebp, ebp |
134 | xor ebp, ebp |
154 | xor esi, esi |
135 | xor esi, esi |
155 | .skip_assoc: |
- | |
156 | mov edi, saved_file_name |
136 | mov edi, saved_file_name |
157 | push dword nullstr |
137 | push dword nullstr |
158 | push 512 |
138 | push 512 |
159 | push edi |
139 | push edi |
160 | push dword aShortcut |
140 | push dword aShortcut |
Line 248... | Line 228... | ||
248 | call read_folder |
228 | call read_folder |
249 | call draw_panel |
229 | call draw_panel |
250 | event: |
230 | event: |
251 | push 10 |
231 | push 10 |
252 | pop eax |
232 | pop eax |
253 | mcall |
233 | int 40h |
254 | dec eax |
234 | dec eax |
255 | jz redraw |
235 | jz redraw |
256 | dec eax |
236 | dec eax |
257 | jz key |
237 | jz key |
258 | ; button - we have only one button, close |
238 | ; button - we have only one button, close |
259 | exit: |
239 | exit: |
260 | or eax, -1 |
240 | or eax, -1 |
261 | mcall |
241 | int 40h |
262 | redraw: |
242 | redraw: |
263 | ; query kbd state from OS |
243 | ; query kbd state from OS |
264 | mov al, 66 |
244 | mov al, 66 |
265 | push 3 |
245 | push 3 |
266 | pop ebx |
246 | pop ebx |
267 | mcall |
247 | int 0x40 |
268 | and eax, 0x3F |
248 | and eax, 0x3F |
269 | cmp al, [ctrlstate] |
249 | cmp al, [ctrlstate] |
270 | mov [ctrlstate], al |
250 | mov [ctrlstate], al |
271 | jz @f |
251 | jz @f |
272 | call draw_keybar |
252 | call draw_keybar |
273 | @@: |
253 | @@: |
274 | mov al, 9 |
254 | mov al, 9 |
275 | mov ebx, procinfo |
255 | mov ebx, procinfo |
276 | or ecx, -1 |
256 | or ecx, -1 |
277 | mcall |
257 | int 40h |
278 | ; test if rolled up |
258 | ; test if rolled up |
279 | ; height of rolled up window is [skinh]+3 |
259 | ; height of rolled up window is [skinh]+3 |
280 | mov eax, [ebx+46] |
260 | mov eax, [ebx+46] |
281 | sub eax, [skinh] |
261 | sub eax, [skinh] |
282 | cmp eax, 5 |
262 | cmp eax, 5 |
283 | ja @f |
263 | ja @f |
284 | mov al, 12 |
264 | mov al, 12 |
285 | push 1 |
265 | push 1 |
286 | pop ebx |
266 | pop ebx |
287 | mcall |
267 | int 0x40 |
288 | xor eax, eax |
268 | xor eax, eax |
289 | ; ebx, ecx, edi are ignored by function 0 after first redraw |
269 | ; ebx, ecx, edi are ignored by function 0 after first redraw |
290 | mov edx, 0x53000000 |
270 | mov edx, 0x53000000 |
291 | mcall |
271 | int 0x40 |
292 | mov al, 12 |
272 | mov al, 12 |
293 | inc ebx |
273 | inc ebx |
294 | mcall |
274 | int 0x40 |
295 | jmp event |
275 | jmp event |
296 | @@: |
276 | @@: |
297 | xor ecx, ecx |
277 | xor ecx, ecx |
298 | mov eax, [ebx+42] |
278 | mov eax, [ebx+42] |
299 | mov [wnd_width], eax |
279 | mov [wnd_width], eax |
Line 363... | Line 343... | ||
363 | add edx, 5*2-1 |
343 | add edx, 5*2-1 |
364 | mov esi, [cur_height] |
344 | mov esi, [cur_height] |
365 | imul esi, font_height |
345 | imul esi, font_height |
366 | add esi, [skinh] |
346 | add esi, [skinh] |
367 | add esi, 5-1 |
347 | add esi, 5-1 |
368 | mcall |
348 | int 40h |
369 | .resize_draw: |
349 | .resize_draw: |
370 | mov ecx, [MemForImage] |
350 | mov ecx, [MemForImage] |
371 | call pgfree |
351 | call pgfree |
372 | and [MemForImage], 0 |
352 | and [MemForImage], 0 |
373 | call init_console |
353 | call init_console |
Line 393... | Line 373... | ||
393 | @@: |
373 | @@: |
394 | push 48 |
374 | push 48 |
395 | pop eax |
375 | pop eax |
396 | push 5 |
376 | push 5 |
397 | pop ebx |
377 | pop ebx |
398 | mcall |
378 | int 0x40 |
399 | push eax |
379 | push eax |
400 | sub eax, [esp+2] |
380 | sub eax, [esp+2] |
401 | inc eax |
381 | inc eax |
402 | movzx eax, ax |
382 | movzx eax, ax |
403 | sub eax, 10 |
383 | sub eax, 10 |
Line 426... | Line 406... | ||
426 | imul esi, font_height |
406 | imul esi, font_height |
427 | add esi, [skinh] |
407 | add esi, [skinh] |
428 | add esi, 4 |
408 | add esi, 4 |
429 | push 67 |
409 | push 67 |
430 | pop eax |
410 | pop eax |
431 | mcall |
411 | int 0x40 |
432 | jmp redraw.resize_draw |
412 | jmp redraw.resize_draw |
433 | key: |
413 | key: |
434 | mov al, 2 |
414 | mov al, 2 |
435 | mcall |
415 | int 40h |
436 | test al, al |
416 | test al, al |
437 | jnz event |
417 | jnz event |
438 | xchg al, ah |
418 | xchg al, ah |
439 | cmp al, 0xE0 |
419 | cmp al, 0xE0 |
440 | jnz @f |
420 | jnz @f |
Line 585... | Line 565... | ||
585 | ctrlkey_test4: |
565 | ctrlkey_test4: |
586 | cmp al, 2 |
566 | cmp al, 2 |
587 | setz al |
567 | setz al |
588 | ret |
568 | ret |
Line -... | Line 569... | ||
- | 569 | ||
- | 570 | enum_associations_callback: |
|
- | 571 | ; LongBool __stdcall callback(f_name,sec_name,key_name); |
|
- | 572 | ; [esp+4] = f_name, [esp+8] = sec_name, [esp+12] = key_name |
|
- | 573 | mov esi, [esp+12] |
|
- | 574 | mov edi, esi |
|
- | 575 | @@: |
|
- | 576 | lodsb |
|
- | 577 | test al, al |
|
- | 578 | jnz @b |
|
- | 579 | sub esi, edi ; esi = size of key name |
|
- | 580 | push nullstr |
|
- | 581 | push 1024 |
|
- | 582 | push saved_file_name |
|
- | 583 | push edi |
|
- | 584 | push dword [esp+16+8] |
|
- | 585 | push dword [esp+20+4] |
|
- | 586 | call [ini.get_str] |
|
- | 587 | test eax, eax |
|
- | 588 | jnz .ret |
|
- | 589 | mov eax, saved_file_name |
|
- | 590 | @@: |
|
- | 591 | inc esi |
|
- | 592 | inc eax |
|
- | 593 | cmp byte [eax-1], 0 |
|
- | 594 | jnz @b |
|
- | 595 | ; esi = total size of entry |
|
- | 596 | push esi |
|
- | 597 | add esi, [associations_size] |
|
- | 598 | mov ecx, [associations_allocated] |
|
- | 599 | @@: |
|
- | 600 | cmp esi, ecx |
|
- | 601 | jbe @f |
|
- | 602 | add ecx, ecx |
|
- | 603 | jmp @b |
|
- | 604 | @@: |
|
- | 605 | pop esi |
|
- | 606 | cmp [associations_allocated], ecx |
|
- | 607 | jz @f |
|
- | 608 | mov [associations_allocated], ecx |
|
- | 609 | mov edx, [associations] |
|
- | 610 | call xpgrealloc |
|
- | 611 | mov [associations], eax |
|
- | 612 | test eax, eax |
|
- | 613 | jz .err |
|
- | 614 | @@: |
|
- | 615 | mov eax, esi |
|
- | 616 | mov esi, edi |
|
- | 617 | mov edi, [associations] |
|
- | 618 | add edi, [associations_size] |
|
- | 619 | dec edi |
|
- | 620 | add [associations_size], eax |
|
- | 621 | @@: |
|
- | 622 | lodsb |
|
- | 623 | stosb |
|
- | 624 | test al, al |
|
- | 625 | jnz @b |
|
- | 626 | mov esi, saved_file_name |
|
- | 627 | @@: |
|
- | 628 | lodsb |
|
- | 629 | stosb |
|
- | 630 | test al, al |
|
- | 631 | jnz @b |
|
- | 632 | .ret: |
|
- | 633 | mov al, 1 |
|
- | 634 | ret 12 |
|
- | 635 | .err: |
|
- | 636 | mov ecx, edx |
|
- | 637 | call pgfree |
|
- | 638 | xor eax, eax |
|
- | 639 | ret 12 |
|
589 | 640 | ||
590 | new_screen: |
641 | new_screen: |
591 | ; in: ecx=sizeof(screen data), edx->vtable |
642 | ; in: ecx=sizeof(screen data), edx->vtable |
592 | ; out: ebp=pointer or NULL, eax!=0 if successful |
643 | ; out: ebp=pointer or NULL, eax!=0 if successful |
593 | ; destroys ebx,ecx |
644 | ; destroys ebx,ecx |
Line 1007... | Line 1058... | ||
1007 | mov byte [edi], 0 |
1058 | mov byte [edi], 0 |
1008 | pop edi |
1059 | pop edi |
1009 | .nofasm: |
1060 | .nofasm: |
1010 | mov ebx, execinfo |
1061 | mov ebx, execinfo |
1011 | ; if command line is more than 256 symbols, the kernel will truncate it |
1062 | ; if command line is more than 256 symbols, the kernel will truncate it |
1012 | ; we does not want this! |
1063 | ; we do not want this! |
1013 | ; N.B. We know that command line is either NULL or execdata, which is always ASCIIZ string, |
1064 | ; N.B. We know that command line is either NULL or execdata, which is always ASCIIZ string, |
1014 | ; but can be up to 1023 symbols |
1065 | ; but can be up to 1023 symbols |
1015 | mov esi, [ebx+8] |
1066 | mov esi, [ebx+8] |
1016 | test esi, esi |
1067 | test esi, esi |
1017 | jz .cmdlinelenok |
1068 | jz .cmdlinelenok |
Line 1024... | Line 1075... | ||
1024 | cmp esi, 256 |
1075 | cmp esi, 256 |
1025 | ja .bigcmdline |
1076 | ja .bigcmdline |
1026 | .cmdlinelenok: |
1077 | .cmdlinelenok: |
1027 | push 70 |
1078 | push 70 |
1028 | pop eax |
1079 | pop eax |
1029 | mcall |
1080 | int 40h |
1030 | xor esi, esi |
1081 | xor esi, esi |
1031 | xchg esi, [restore_semicolon] |
1082 | xchg esi, [restore_semicolon] |
1032 | test esi, esi |
1083 | test esi, esi |
1033 | jz @f |
1084 | jz @f |
1034 | mov byte [esi], ';' |
1085 | mov byte [esi], ';' |
1035 | @@: |
1086 | @@: |
1036 | neg eax |
1087 | neg eax |
1037 | js @f |
1088 | js @f |
1038 | push dword aContinue |
- | |
1039 | mov esi, esp |
- | |
1040 | call get_error_msg |
1089 | call get_error_msg |
1041 | push eax |
1090 | push eax |
1042 | push dword aRunError |
1091 | push dword aRunError |
1043 | mov eax, esp |
1092 | mov eax, esp |
1044 | push esi |
1093 | push ContinueBtn |
1045 | push 1 |
1094 | push 1 |
1046 | push eax |
1095 | push eax |
1047 | push 2 |
1096 | push 2 |
1048 | push -1 |
1097 | push -1 |
1049 | push -1 |
1098 | push -1 |
1050 | push dword aError |
1099 | push dword aError |
1051 | call SayErr |
1100 | call SayErr |
- | 1101 | pop eax |
|
1052 | add esp, 3*4 |
1102 | pop eax |
1053 | ret |
1103 | ret |
1054 | @@: |
1104 | @@: |
1055 | test edx, edx |
1105 | test edx, edx |
1056 | jz @f |
1106 | jz @f |
1057 | push 5 |
1107 | push 5 |
1058 | pop eax |
1108 | pop eax |
1059 | push 20 |
1109 | push 20 |
1060 | pop ebx |
1110 | pop ebx |
1061 | mcall |
1111 | int 0x40 |
1062 | jmp .ctrl_r |
1112 | jmp .ctrl_r |
1063 | @@: |
1113 | @@: |
1064 | ret |
1114 | ret |
1065 | .bigfilename3: |
1115 | .bigfilename3: |
1066 | pop esi |
1116 | pop esi |
Line 1073... | Line 1123... | ||
1073 | xchg esi, [restore_semicolon] |
1123 | xchg esi, [restore_semicolon] |
1074 | test esi, esi |
1124 | test esi, esi |
1075 | jz @f |
1125 | jz @f |
1076 | mov byte [esi], ';' |
1126 | mov byte [esi], ';' |
1077 | @@: |
1127 | @@: |
1078 | push dword aContinue |
- | |
1079 | mov esi, esp |
- | |
1080 | push eax |
1128 | push eax |
1081 | mov eax, esp |
1129 | mov eax, esp |
1082 | push esi |
1130 | push ContinueBtn |
1083 | push 1 |
1131 | push 1 |
1084 | push eax |
1132 | push eax |
1085 | push 1 |
1133 | push 1 |
1086 | push -1 |
1134 | push -1 |
1087 | push -1 |
1135 | push -1 |
1088 | push dword aError |
1136 | push dword aError |
1089 | call SayErr |
1137 | call SayErr |
1090 | add esp, 2*4 |
1138 | pop eax |
1091 | ret |
1139 | ret |
1092 | .bigcmdline: |
1140 | .bigcmdline: |
1093 | mov eax, aCmdLineTooBig |
1141 | mov eax, aCmdLineTooBig |
1094 | jmp .l2 |
1142 | jmp .l2 |
1095 | .bigfoldername2: |
1143 | .bigfoldername2: |
1096 | mov byte [ecx], 0 |
1144 | mov byte [ecx], 0 |
1097 | .bigfoldername: |
1145 | .bigfoldername: |
1098 | mov eax, aFolderNameTooBig |
1146 | mov eax, aFolderNameTooBig |
1099 | jmp .l2 |
1147 | jmp .l2 |
1100 | .copytoself: |
- | |
1101 | mov eax, aCannotCopyToSelf |
- | |
1102 | jmp .l2 |
- | |
1103 | .enter_folder: |
1148 | .enter_folder: |
1104 | lea esi, [ecx+40] |
1149 | lea esi, [ecx+40] |
1105 | cmp word [esi], '..' |
1150 | cmp word [esi], '..' |
1106 | jnz @f |
1151 | jnz @f |
1107 | cmp byte [esi+2], 0 |
1152 | cmp byte [esi+2], 0 |
Line 1234... | Line 1279... | ||
1234 | xor ecx, ecx |
1279 | xor ecx, ecx |
1235 | .drive_loop_e: |
1280 | .drive_loop_e: |
1236 | mov byte [tmpname+1], 0 |
1281 | mov byte [tmpname+1], 0 |
1237 | push 70 |
1282 | push 70 |
1238 | pop eax |
1283 | pop eax |
1239 | mcall |
1284 | int 40h |
1240 | mov ebx, dirinfo |
1285 | mov ebx, dirinfo |
1241 | test eax, eax |
1286 | test eax, eax |
1242 | jnz .drive_loop_e_done |
1287 | jnz .drive_loop_e_done |
1243 | mov esi, driveinfo+32+40 |
1288 | mov esi, driveinfo+32+40 |
1244 | mov edi, tmpname+1 |
1289 | mov edi, tmpname+1 |
Line 1250... | Line 1295... | ||
1250 | push [ebx+dirinfo.first-dirinfo] |
1295 | push [ebx+dirinfo.first-dirinfo] |
1251 | and [ebx+dirinfo.first-dirinfo], 0 |
1296 | and [ebx+dirinfo.first-dirinfo], 0 |
1252 | .drive_loop_i: |
1297 | .drive_loop_i: |
1253 | push 70 |
1298 | push 70 |
1254 | pop eax |
1299 | pop eax |
1255 | mcall |
1300 | int 40h |
1256 | mov ebx, dirinfo |
1301 | mov ebx, dirinfo |
1257 | test eax, eax |
1302 | test eax, eax |
1258 | jnz .drive_loop_i_done |
1303 | jnz .drive_loop_i_done |
1259 | add ecx, 32+8 |
1304 | add ecx, 32+8 |
1260 | push ecx |
1305 | push ecx |
Line 1361... | Line 1406... | ||
1361 | mov ecx, edx |
1406 | mov ecx, edx |
1362 | call pgfree |
1407 | call pgfree |
1363 | call read_folder |
1408 | call read_folder |
1364 | jmp .done_redraw |
1409 | jmp .done_redraw |
1365 | .shift_f5: |
1410 | .shift_f5: |
- | 1411 | mov esi, ebp |
|
- | 1412 | cmp [ebp + panel1_selected_num - panel1_data], 0 |
|
- | 1413 | jnz .f5_2 |
|
1366 | call get_curfile_folder_entry |
1414 | call get_curfile_folder_entry |
1367 | lea esi, [ecx+40] |
1415 | lea esi, [ecx+40] |
1368 | mov edi, CopyDestEditBuf |
1416 | mov edi, CopyDestEditBuf |
1369 | mov eax, CopyDestEditBuf.length |
1417 | mov eax, CopyDestEditBuf.length |
1370 | stosd |
1418 | stosd |
Line 1377... | Line 1425... | ||
1377 | test al, al |
1425 | test al, al |
1378 | jz .f5_common |
1426 | jz .f5_common |
1379 | stosb |
1427 | stosb |
1380 | jmp @b |
1428 | jmp @b |
1381 | .f5: |
1429 | .f5: |
- | 1430 | mov esi, ebp |
|
- | 1431 | xor esi, panel1_data xor panel2_data |
|
- | 1432 | .f5_2: |
|
- | 1433 | add esi, panel1_dir - panel1_data |
|
1382 | mov edi, CopyDestEditBuf |
1434 | mov edi, CopyDestEditBuf |
1383 | mov eax, CopyDestEditBuf.length |
1435 | mov eax, CopyDestEditBuf.length |
1384 | stosd |
1436 | stosd |
1385 | scasd |
1437 | scasd |
1386 | xor eax, eax |
1438 | xor eax, eax |
1387 | stosd |
1439 | stosd |
1388 | mov edx, edi |
1440 | mov edx, edi |
1389 | mov esi, ebp |
- | |
1390 | xor esi, panel1_data xor panel2_data |
- | |
1391 | add esi, panel1_dir - panel1_data |
- | |
1392 | @@: |
1441 | @@: |
1393 | lodsb |
1442 | lodsb |
1394 | test al, al |
1443 | test al, al |
1395 | jz @f |
1444 | jz @f |
1396 | cmp edi, CopyDestEditBuf+12+511 |
1445 | cmp edi, CopyDestEditBuf+12+511 |
Line 1411... | Line 1460... | ||
1411 | test al, al |
1460 | test al, al |
1412 | jz @f |
1461 | jz @f |
1413 | stosb |
1462 | stosb |
1414 | jmp @b |
1463 | jmp @b |
1415 | @@: |
1464 | @@: |
- | 1465 | mov eax, [ebp + panel1_selected_num - panel1_data] |
|
- | 1466 | test eax, eax |
|
- | 1467 | jz .f5_noselected1 |
|
- | 1468 | mov ebx, eax |
|
- | 1469 | push 10 |
|
- | 1470 | pop ecx |
|
- | 1471 | push -'0' |
|
- | 1472 | @@: |
|
- | 1473 | xor edx, edx |
|
- | 1474 | div ecx |
|
- | 1475 | push edx |
|
- | 1476 | test eax, eax |
|
- | 1477 | jnz @b |
|
- | 1478 | @@: |
|
- | 1479 | pop eax |
|
- | 1480 | add al, '0' |
|
- | 1481 | jz @f |
|
- | 1482 | stosb |
|
- | 1483 | jmp @b |
|
- | 1484 | @@: |
|
- | 1485 | if lang eq ru |
|
- | 1486 | mov dword [edi], ' í«¥' |
|
- | 1487 | mov dword [edi+4], '¬¥â' |
|
- | 1488 | add edi, 8 |
|
- | 1489 | cmp ebx, 1 |
|
- | 1490 | jz @f |
|
- | 1491 | mov al, ' ' |
|
- | 1492 | stosb |
|
- | 1493 | cmp ebx, 4 |
|
- | 1494 | jbe @f |
|
- | 1495 | mov word [edi-1], '®¢' |
|
- | 1496 | inc edi |
|
- | 1497 | @@: |
|
- | 1498 | else |
|
- | 1499 | mov dword [edi], ' ite' |
|
- | 1500 | mov byte [edi+4], 'm' |
|
- | 1501 | add edi, 5 |
|
- | 1502 | cmp ebx, 1 |
|
- | 1503 | jz @f |
|
- | 1504 | mov al, 's' |
|
- | 1505 | stosb |
|
- | 1506 | @@: |
|
- | 1507 | end if |
|
- | 1508 | jmp .f5_selected1 |
|
- | 1509 | .f5_noselected1: |
|
- | 1510 | mov al, '"' |
|
- | 1511 | stosb |
|
1416 | call get_curfile_folder_entry |
1512 | call get_curfile_folder_entry |
1417 | lea esi, [ecx+40] |
1513 | lea esi, [ecx+40] |
1418 | lea eax, [esi+1] |
1514 | lea eax, [esi+1] |
1419 | @@: |
1515 | @@: |
1420 | inc esi |
1516 | inc esi |
Line 1437... | Line 1533... | ||
1437 | test al, al |
1533 | test al, al |
1438 | jz @f |
1534 | jz @f |
1439 | stosb |
1535 | stosb |
1440 | jmp @b |
1536 | jmp @b |
1441 | @@: |
1537 | @@: |
- | 1538 | mov al, '"' |
|
- | 1539 | stosb |
|
- | 1540 | .f5_selected1: |
|
1442 | mov esi, aCopy2 |
1541 | mov esi, aCopy2 |
1443 | @@: |
1542 | @@: |
1444 | lodsb |
1543 | lodsb |
1445 | stosb |
1544 | stosb |
1446 | test al, al |
1545 | test al, al |
Line 1478... | Line 1577... | ||
1478 | repnz scasb |
1577 | repnz scasb |
1479 | dec edi |
1578 | dec edi |
1480 | dec edi |
1579 | dec edi |
1481 | cmp edi, esi |
1580 | cmp edi, esi |
1482 | jb .ret2 |
1581 | jb .ret2 |
- | 1582 | mov [bEndSlash], 0 |
|
1483 | cmp byte [edi], '/' |
1583 | cmp byte [edi], '/' |
1484 | jnz @f |
1584 | jnz @f |
1485 | ; «¨ç¨¥/®âáãâá⢨¥ § ª 稢 î饣® á«íè ¢ ¦® ⮫쪮 ¤«ï ª®¯¨à®¢ ¨ï ¯ ¯®ª |
- | |
1486 | cmp edi, esi |
1585 | cmp edi, esi |
1487 | jz @f |
1586 | jz @f |
1488 | mov byte [edi], 0 |
1587 | mov byte [edi], 0 |
1489 | dec edi |
1588 | dec edi |
- | 1589 | mov [bEndSlash], 1 |
|
1490 | @@: |
1590 | @@: |
1491 | ; ᫨ ¯ãâì ¥ ç¨ ¥âáï á® á«íè , áç¨â ¥¬ ¥£® ®â®á¨â¥«ì® ⥪ã饩 ¯ ¯ª¨ |
1591 | ; ᫨ ¯ãâì ¥ ç¨ ¥âáï á® á«íè , áç¨â ¥¬ ¥£® ®â®á¨â¥«ì® ⥪ã饩 ¯ ¯ª¨ |
1492 | cmp byte [esi], '/' |
1592 | cmp byte [esi], '/' |
1493 | jz .copy_absolute_path |
1593 | jz .copy_absolute_path |
1494 | push esi |
1594 | push esi |
Line 1521... | Line 1621... | ||
1521 | mov ecx, edx |
1621 | mov ecx, edx |
1522 | rep movsb |
1622 | rep movsb |
1523 | mov byte [edi-1], '/' |
1623 | mov byte [edi-1], '/' |
1524 | pop esi |
1624 | pop esi |
1525 | .copy_absolute_path: |
1625 | .copy_absolute_path: |
- | 1626 | ; ç « ᮧ¤ ñ¬ ¢á¥ ¢ë襫¥¦ 騥 ¯ ¯ª¨, ª®â®àë¥ ¥éñ ¥ áãé¥áâ¢ãîâ |
|
1526 | ; ®«ãç ¥¬ âਡãâë § 票ï |
1627 | ; ®á«¥¤¨© ¨§ í«¥¬¥â®¢ ¬®¦¥â ¡ëâì ª ª ä ©«®¬, â ª ¨ ¯ ¯ª®©; |
- | 1628 | ; ä®àá¨à㥬 ¯ ¯ªã ¢ á«ãç ¥, ¥á«¨ å®âï ¡ë ®¤¨ ¨§ ¨áâ®ç¨ª®¢ ï¥âáï ¯ ¯ª®© |
|
- | 1629 | xor edx, edx |
|
- | 1630 | cmp [ebp + panel1_selected_num - panel1_data], 0 |
|
- | 1631 | jz .f5_noselected2 |
|
- | 1632 | mov ecx, [ebp + panel1_numfiles - panel1_data] |
|
- | 1633 | mov edi, [ebp + panel1_files - panel1_data] |
|
- | 1634 | .scanselected2: |
|
1527 | mov cl, 0x10 |
1635 | mov eax, [edi] |
- | 1636 | add edi, 4 |
|
- | 1637 | test byte [eax+303], 1 |
|
- | 1638 | jz @f |
|
- | 1639 | test byte [eax], 10h |
|
- | 1640 | jz @f |
|
- | 1641 | inc edx |
|
- | 1642 | @@: |
|
- | 1643 | loop .scanselected2 |
|
- | 1644 | jmp .f5_selected2 |
|
- | 1645 | .f5_noselected2: |
|
- | 1646 | call get_curfile_folder_entry |
|
- | 1647 | test byte [ecx], 10h |
|
- | 1648 | setnz dl |
|
- | 1649 | .f5_selected2: |
|
1528 | xor eax, eax |
1650 | xor eax, eax |
1529 | mov edi, esi |
1651 | mov edi, esi |
1530 | .countslashloop: |
1652 | .countslashloop: |
1531 | cmp byte [edi], '/' |
1653 | cmp byte [edi], '/' |
1532 | jnz @f |
1654 | jnz @f |
1533 | inc eax |
1655 | inc eax |
- | 1656 | mov ecx, edi |
|
1534 | @@: |
1657 | @@: |
1535 | inc edi |
1658 | inc edi |
1536 | cmp byte [edi], 0 |
1659 | cmp byte [edi], 0 |
1537 | jnz .countslashloop |
1660 | jnz .countslashloop |
- | 1661 | mov [bNeedRestoreName], 0 |
|
- | 1662 | ; "/file-system/partition" folders already exist, so we don't need to create them |
|
1538 | cmp eax, 2 |
1663 | cmp eax, 2 |
1539 | jbe @f |
- | |
1540 | mov ebx, attrinfo |
- | |
1541 | mov [attrinfo.attr], 0 |
- | |
1542 | mov [ebx + attrinfo.name - attrinfo], esi |
- | |
1543 | push 70 |
- | |
1544 | pop eax |
- | |
1545 | mcall |
- | |
1546 | mov cl, byte [attrinfo.attr] |
- | |
1547 | @@: |
- | |
1548 | test cl, 0x10 |
- | |
1549 | jz .copyfile |
- | |
1550 | ; ¬ ¯®¤áã㫨 ª â «®£ § 票ï, ¤®¯¨áë¢ ¥¬ ¨¬ï ä ©« |
- | |
1551 | cmp edi, CopyDestEditBuf+12+513 |
- | |
1552 | jae .bigfilename |
1664 | jbe .createupdone |
1553 | mov al, '/' |
- | |
1554 | stosb |
- | |
1555 | push esi |
- | |
1556 | call get_curfile_folder_entry |
1665 | ; we interpret destination as folder if edx!=0 or bEndSlash!=0 |
1557 | lea esi, [ecx+40] |
- | |
1558 | @@: |
- | |
1559 | lodsb |
- | |
1560 | cmp edi, CopyDestEditBuf+12+513 |
- | |
1561 | jae .bigfilename2 |
- | |
1562 | stosb |
- | |
1563 | test al, al |
1666 | test edx, edx |
1564 | jnz @b |
1667 | jnz @f |
1565 | pop esi |
1668 | cmp [bEndSlash], 0 |
1566 | .copyfile: |
- | |
1567 | ; ¬ï ¨á室®£® ä ©« |
- | |
1568 | push esi |
- | |
1569 | lea esi, [ebp+panel1_dir-panel1_data] |
- | |
1570 | mov edi, saved_file_name |
- | |
1571 | push edi |
- | |
1572 | @@: |
- | |
1573 | lodsb |
- | |
1574 | test al, al |
- | |
1575 | jz @f |
1669 | jnz @f |
1576 | stosb |
- | |
1577 | jmp @b |
- | |
1578 | @@: |
- | |
1579 | mov al, '/' |
1670 | mov edi, ecx |
1580 | stosb |
- | |
1581 | call get_curfile_folder_entry |
- | |
1582 | lea esi, [ecx+40] |
1671 | dec eax |
1583 | @@: |
1672 | @@: |
1584 | lodsb |
- | |
1585 | cmp edi, saved_file_name+1024 |
- | |
1586 | jae .bigfilename3 |
1673 | mov [attrinfo.name], esi |
1587 | stosb |
- | |
1588 | test al, al |
1674 | mov ecx, eax |
1589 | jnz @b |
- | |
1590 | pop esi |
- | |
1591 | pop edi |
- | |
1592 | ; ¥«ì§ï ᪮¯¨à®¢ âì ä ©« ¯®¢¥àå á ¬®£® ᥡï! |
1675 | ; ¨é¥¬ ¯®á«¥¤îî ¯ ¯ªã, ª®â®à ï ¥éñ áãé¥áâ¢ã¥â |
1593 | push esi edi |
- | |
1594 | call strcmpi |
1676 | .createuploop1: |
1595 | pop edi esi |
1677 | cmp eax, 2 |
1596 | jz .copytoself |
1678 | jbe .createupdone1 |
1597 | ; ®¡á⢥®, ª®¯¨à㥬 |
- | |
1598 | ; esi->source name, edi->destination name |
- | |
1599 | mov [writeinfo.code], 2 |
1679 | mov dl, [edi] |
1600 | mov [writeinfo.name], edi |
- | |
1601 | and dword [writeinfo.first], 0 |
- | |
1602 | and dword [writeinfo.first+4], 0 |
- | |
1603 | mov [writeinfo.data], copy_buffer |
- | |
1604 | mov ebx, readinfo |
1680 | mov byte [edi], 0 |
1605 | and dword [ebx+readinfo.first-readinfo], 0 |
- | |
1606 | and dword [ebx+readinfo.first+4-readinfo], 0 |
- | |
1607 | mov [ebx+readinfo.size-readinfo], copy_buffer_size |
- | |
1608 | mov [ebx+readinfo.data-readinfo], copy_buffer |
- | |
1609 | mov [ebx+readinfo.name-readinfo], esi |
- | |
1610 | .copyloop: |
- | |
1611 | mov ebx, readinfo |
1681 | push eax |
1612 | push 70 |
1682 | push 70 |
1613 | pop eax |
1683 | pop eax |
- | 1684 | mov ebx, attrinfo |
|
1614 | mcall |
1685 | int 0x40 |
1615 | test eax, eax |
1686 | test eax, eax |
1616 | jz .copyreadok |
1687 | pop eax |
1617 | cmp eax, 6 |
1688 | jnz .createupcont1 |
- | 1689 | test byte [attrinfo.attr], 10h |
|
1618 | jz .copyreadok |
1690 | jnz .createupdone1 |
- | 1691 | ; the item required to be a folder, but is file |
|
- | 1692 | push aNotFolder |
|
1619 | push esi |
1693 | push esi |
1620 | push dword aCannotReadFile |
- | |
1621 | call get_error_msg |
- | |
1622 | push eax |
- | |
1623 | mov eax, esp |
1694 | mov eax, esp |
1624 | push dword RetryOrCancelBtn |
1695 | push ContinueBtn |
1625 | push 2 |
1696 | push 1 |
1626 | push eax |
1697 | push eax |
1627 | push 3 |
1698 | push 2 |
1628 | push -1 |
1699 | push -1 |
1629 | push -1 |
1700 | push -1 |
1630 | push dword aError |
1701 | push aError |
1631 | call SayErr |
1702 | call SayErr |
1632 | add esp, 3*4 |
- | |
1633 | test eax, eax |
- | |
1634 | jz .copyloop |
- | |
1635 | jmp .copyfailed |
- | |
1636 | .copyreadok: |
- | |
1637 | test ebx, ebx |
- | |
1638 | jz .copydone |
- | |
1639 | add dword [readinfo.first], ebx |
- | |
1640 | adc dword [readinfo.first+4], 0 |
- | |
1641 | mov [writeinfo.size], ebx |
- | |
1642 | .copywrite: |
- | |
1643 | mov ebx, writeinfo |
- | |
1644 | push 70 |
- | |
1645 | pop eax |
1703 | pop eax |
- | 1704 | pop eax |
|
- | 1705 | .ret3: |
|
1646 | mcall |
1706 | ret |
- | 1707 | .createupcont1: |
|
- | 1708 | mov [edi], dl |
|
- | 1709 | dec eax |
|
- | 1710 | @@: |
|
- | 1711 | dec edi |
|
- | 1712 | cmp byte [edi], '/' |
|
- | 1713 | jnz @b |
|
- | 1714 | jmp .createuploop1 |
|
- | 1715 | .createupdone1: |
|
- | 1716 | ; ᮧ¤ ñ¬ ¢á¥ ¯ ¯ª¨, ª®â®àë¥ ¬ ã¦ë |
|
1647 | test eax, eax |
1717 | cmp eax, ecx |
1648 | jz .copywriteok |
1718 | jae .createupdone |
- | 1719 | @@: |
|
1649 | push edi |
1720 | inc edi |
- | 1721 | cmp byte [edi], 0 |
|
- | 1722 | jz @f |
|
- | 1723 | cmp byte [edi], '/' |
|
- | 1724 | jnz @b |
|
- | 1725 | @@: |
|
1650 | push dword aCannotWriteFile |
1726 | mov dl, byte [edi] |
1651 | call get_error_msg |
1727 | mov byte [edi], 0 |
1652 | push eax |
1728 | push eax |
1653 | mov eax, esp |
- | |
1654 | push dword RetryOrCancelBtn |
1729 | push RetryOrCancelBtn |
1655 | push 2 |
1730 | push 2 |
1656 | push eax |
1731 | call makedir |
- | 1732 | mov [bNeedRestoreName], 1 |
|
1657 | push 3 |
1733 | pop eax |
1658 | push -1 |
1734 | jnz .ret3 |
1659 | push -1 |
1735 | inc eax |
1660 | push dword aError |
1736 | jmp .createupdone1 |
- | 1737 | .createupdone: |
|
1661 | call SayErr |
1738 | mov dl, 1 |
- | 1739 | cmp byte [edi], 1 |
|
1662 | add esp, 3*4 |
1740 | sbb eax, -1 |
1663 | test eax, eax |
1741 | cmp eax, 2 |
1664 | jz .copywrite |
1742 | jbe .docopy |
- | 1743 | mov [attrinfo.attr], 0 ; assume zero attributes if error |
|
- | 1744 | push 70 |
|
1665 | jmp .copyfailed |
1745 | pop eax |
- | 1746 | mov ebx, attrinfo |
|
- | 1747 | int 0x40 |
|
- | 1748 | test [attrinfo.attr], 10h |
|
- | 1749 | setnz dl |
|
1666 | .copywriteok: |
1750 | .docopy: |
- | 1751 | call get_curfile_folder_entry |
|
1667 | mov ecx, [writeinfo.size] |
1752 | mov eax, ecx |
1668 | add dword [writeinfo.first], ecx |
1753 | cmp [bNeedRestoreName], 0 |
- | 1754 | jz @f |
|
1669 | adc dword [writeinfo.first+4], 0 |
1755 | cmp [bEndSlash], 0 |
- | 1756 | jnz @f |
|
- | 1757 | cmp [ebp + panel1_selected_num - panel1_data], 0 |
|
- | 1758 | jnz @f |
|
- | 1759 | test byte [eax], 10h |
|
- | 1760 | jz @f |
|
- | 1761 | mov dl, 0 |
|
- | 1762 | @@: |
|
- | 1763 | ; ç¨ ¥¬ ᮡá⢥® ª®¯¨à®¢ ¨¥ |
|
1670 | mov [writeinfo.code], 3 |
1764 | mov [bDestIsFolder], dl |
1671 | cmp ecx, copy_buffer_size |
1765 | mov [copy_bSkipAll], 0 |
- | 1766 | mov [copy_bSkipAll2], 0 |
|
- | 1767 | cmp [ebp + panel1_selected_num - panel1_data], 0 |
|
- | 1768 | jnz .f5_selected3 |
|
1672 | jz .copyloop |
1769 | call copy_file |
1673 | .copydone: |
1770 | .copydone: |
1674 | push ebp |
1771 | push ebp |
1675 | call .ctrl_r |
1772 | call .ctrl_r |
1676 | pop ebp |
1773 | pop ebp |
1677 | xor ebp, panel1_data xor panel2_data |
1774 | xor ebp, panel1_data xor panel2_data |
1678 | jmp .ctrl_r |
1775 | jmp .ctrl_r |
1679 | .copyfailed: |
1776 | .f5_selected3: |
- | 1777 | mov ecx, [ebp + panel1_numfiles - panel1_data] |
|
- | 1778 | mov esi, [ebp + panel1_files - panel1_data] |
|
- | 1779 | .f5_selected_copyloop: |
|
- | 1780 | lodsd |
|
- | 1781 | test byte [eax+303], 1 |
|
- | 1782 | jz .f5_selected_copycont |
|
- | 1783 | mov [bDestIsFolder], dl |
|
- | 1784 | call copy_file |
|
- | 1785 | ja .f5_multiple_cancel |
|
- | 1786 | and byte [eax+303], not 1 |
|
- | 1787 | pushad |
|
- | 1788 | call draw_panel |
|
1680 | cmp [bConfirmDeleteIncomplete], 0 |
1789 | cmp [bNeedRestoreName], 0 |
1681 | jz @f |
1790 | jz @f |
1682 | cmp [writeinfo.code], 2 |
- | |
1683 | jz .copydone |
- | |
1684 | push dword aIncompleteFile |
- | |
1685 | mov eax, esp |
1791 | mov esi, CopyDestEditBuf+12 |
1686 | push dword DeleteOrKeepBtn |
1792 | call delete_last_name_from_end |
1687 | push 2 |
- | |
1688 | push eax |
- | |
1689 | push 1 |
- | |
1690 | push -1 |
- | |
1691 | push -1 |
- | |
1692 | push dword aCopyCaption |
- | |
1693 | call SayErr |
- | |
1694 | add esp, 4 |
- | |
1695 | test eax, eax |
- | |
1696 | jnz .copydone |
- | |
1697 | @@: |
1793 | @@: |
1698 | mov ebx, delinfo |
1794 | popad |
1699 | push dword [ebx+21] |
1795 | .f5_selected_copycont: |
1700 | mov dword [ebx+21], edi |
1796 | loop .f5_selected_copyloop |
1701 | push 70 |
- | |
1702 | pop eax |
1797 | .f5_multiple_cancel: |
1703 | mcall |
- | |
1704 | ; ignore errors |
- | |
1705 | pop dword [delinfo+21] |
- | |
1706 | jmp .copydone |
1798 | jmp .copydone |
Line 1707... | Line 1799... | ||
1707 | 1799 | ||
1708 | .f3: |
1800 | .f3: |
1709 | call view_file |
1801 | call view_file |
Line 2135... | Line 2227... | ||
2135 | mov ecx, edx |
2227 | mov ecx, edx |
2136 | rep movsb |
2228 | rep movsb |
2137 | mov byte [edi-1], '/' |
2229 | mov byte [edi-1], '/' |
2138 | pop esi |
2230 | pop esi |
2139 | .mkdir_absolute_path: |
2231 | .mkdir_absolute_path: |
2140 | .mkdir_retry: |
- | |
2141 | push 70 |
- | |
2142 | pop eax |
- | |
2143 | mov ebx, mkdirinfo |
- | |
2144 | mcall |
- | |
2145 | test eax, eax |
- | |
2146 | jz @f |
- | |
2147 | push dword CopyDestEditBuf+12 |
- | |
2148 | push dword aCannotMakeFolder |
- | |
2149 | call get_error_msg |
- | |
2150 | push eax |
- | |
2151 | mov eax, esp |
- | |
2152 | push dword RetryOrCancelBtn |
2232 | push RetryOrCancelBtn |
2153 | push 2 |
2233 | push 2 |
2154 | push eax |
- | |
2155 | push 3 |
- | |
2156 | push -1 |
- | |
2157 | push -1 |
- | |
2158 | push dword aError |
- | |
2159 | call SayErr |
2234 | call makedir |
2160 | add esp, 3*4 |
- | |
2161 | test eax, eax |
- | |
2162 | jz .mkdir_retry |
- | |
2163 | @@: |
- | |
2164 | jmp .copydone |
2235 | jmp .copydone |
2165 | .change_mode: |
2236 | .change_mode: |
2166 | dec eax |
2237 | dec eax |
2167 | mov [ebp + panel1_colmode - panel1_data], eax |
2238 | mov [ebp + panel1_colmode - panel1_data], eax |
2168 | call calc_colwidths |
2239 | call calc_colwidths |
Line 2276... | Line 2347... | ||
2276 | add ebx, 4 |
2347 | add ebx, 4 |
2277 | dec ecx |
2348 | dec ecx |
2278 | jnz .selectloop |
2349 | jnz .selectloop |
2279 | pop eax |
2350 | pop eax |
2280 | jmp .done_redraw |
2351 | jmp .done_redraw |
- | 2352 | .greyasterisk: |
|
- | 2353 | mov ecx, [ebp + panel1_numfiles - panel1_data] |
|
- | 2354 | mov esi, [ebp + panel1_files - panel1_data] |
|
- | 2355 | jecxz .galoopdone |
|
- | 2356 | .galoop: |
|
- | 2357 | lodsd |
|
- | 2358 | cmp word [eax+40], '..' |
|
- | 2359 | jnz @f |
|
- | 2360 | cmp byte [eax+42], 0 |
|
- | 2361 | jz .gacont |
|
- | 2362 | @@: |
|
- | 2363 | xor byte [eax+303], 1 |
|
- | 2364 | mov edx, [eax+32] |
|
- | 2365 | test byte [eax+303], 1 |
|
- | 2366 | jz .gadel |
|
- | 2367 | add dword [ebp + panel1_selected_size - panel1_data], edx |
|
- | 2368 | mov edx, [eax+36] |
|
- | 2369 | adc dword [ebp + panel1_selected_size+4 - panel1_data], edx |
|
- | 2370 | inc dword [ebp + panel1_selected_num - panel1_data] |
|
- | 2371 | jmp .gacont |
|
- | 2372 | .gadel: |
|
- | 2373 | sub dword [ebp + panel1_selected_size - panel1_data], edx |
|
- | 2374 | mov edx, [eax+36] |
|
- | 2375 | sbb dword [ebp + panel1_selected_size+4 - panel1_data], edx |
|
- | 2376 | dec dword [ebp + panel1_selected_num - panel1_data] |
|
- | 2377 | .gacont: |
|
- | 2378 | loop .galoop |
|
- | 2379 | .galoopdone: |
|
- | 2380 | jmp .done_redraw |
|
Line 2281... | Line 2381... | ||
2281 | 2381 | ||
2282 | panels_OnRedraw: |
2382 | panels_OnRedraw: |
2283 | call draw_cmdbar |
2383 | call draw_cmdbar |
2284 | mov ebp, panel1_data |
2384 | mov ebp, panel1_data |
Line 2434... | Line 2534... | ||
2434 | draw_window: |
2534 | draw_window: |
2435 | push 12 |
2535 | push 12 |
2436 | pop eax |
2536 | pop eax |
2437 | push 1 |
2537 | push 1 |
2438 | pop ebx |
2538 | pop ebx |
2439 | mcall |
2539 | int 40h |
2440 | mov al, 48 |
2540 | mov al, 48 |
2441 | mov bl, 4 |
2541 | mov bl, 4 |
2442 | mcall |
2542 | int 40h |
2443 | mov [skinh], eax |
2543 | mov [skinh], eax |
2444 | mov ebx, [cur_width] |
2544 | mov ebx, [cur_width] |
2445 | imul ebx, font_width |
2545 | imul ebx, font_width |
2446 | add ebx, 100*65536 + 5*2-1 |
2546 | add ebx, 100*65536 + 5*2-1 |
2447 | mov ecx, [cur_height] |
2547 | mov ecx, [cur_height] |
2448 | imul ecx, font_height |
2548 | imul ecx, font_height |
2449 | lea ecx, [eax+ecx+5-1+100*65536] |
2549 | lea ecx, [eax+ecx+5-1+100*65536] |
2450 | xor eax, eax |
2550 | xor eax, eax |
2451 | mov edx, 0x53000000 |
2551 | mov edx, 0x53000000 |
2452 | mov edi, title |
2552 | mov edi, header |
2453 | mcall |
2553 | int 40h |
2454 | mov al, 13 |
2554 | mov al, 13 |
2455 | xor edx, edx |
2555 | xor edx, edx |
2456 | cmp [fill_width], 0 |
2556 | cmp [fill_width], 0 |
2457 | jz @f |
2557 | jz @f |
2458 | mov ebx, [wnd_width] |
2558 | mov ebx, [wnd_width] |
Line 2462... | Line 2562... | ||
2462 | mov bx, word [fill_width] |
2562 | mov bx, word [fill_width] |
2463 | mov ecx, [skinh-2] |
2563 | mov ecx, [skinh-2] |
2464 | mov cx, word [wnd_height] |
2564 | mov cx, word [wnd_height] |
2465 | sub cx, word [skinh] |
2565 | sub cx, word [skinh] |
2466 | sub cx, 5-1 |
2566 | sub cx, 5-1 |
2467 | mcall |
2567 | int 0x40 |
2468 | @@: |
2568 | @@: |
2469 | cmp [fill_height], 0 |
2569 | cmp [fill_height], 0 |
2470 | jz @f |
2570 | jz @f |
2471 | xor edx, edx |
2571 | xor edx, edx |
2472 | mov ebx, 50000h |
2572 | mov ebx, 50000h |
Line 2475... | Line 2575... | ||
2475 | mov ecx, [wnd_height] |
2575 | mov ecx, [wnd_height] |
2476 | sub ecx, [fill_height] |
2576 | sub ecx, [fill_height] |
2477 | sub ecx, 5-1 |
2577 | sub ecx, 5-1 |
2478 | shl ecx, 16 |
2578 | shl ecx, 16 |
2479 | mov cx, word [fill_height] |
2579 | mov cx, word [fill_height] |
2480 | mcall |
2580 | int 0x40 |
2481 | @@: |
2581 | @@: |
2482 | ; xor ecx, ecx |
2582 | ; xor ecx, ecx |
2483 | ; call draw_image |
2583 | ; call draw_image |
2484 | mov al, 65 |
2584 | mov al, 65 |
2485 | mov ebx, [MemForImage] |
2585 | mov ebx, [MemForImage] |
Line 2492... | Line 2592... | ||
2492 | mov edx, [skinh] |
2592 | mov edx, [skinh] |
2493 | add edx, 5*10000h |
2593 | add edx, 5*10000h |
2494 | mov esi, 8 |
2594 | mov esi, 8 |
2495 | mov edi, console_colors |
2595 | mov edi, console_colors |
2496 | xor ebp, ebp |
2596 | xor ebp, ebp |
2497 | mcall |
2597 | int 0x40 |
2498 | @@: |
2598 | @@: |
2499 | mov al, 12 |
2599 | mov al, 12 |
2500 | push 2 |
2600 | push 2 |
2501 | pop ebx |
2601 | pop ebx |
2502 | mcall |
2602 | int 40h |
2503 | ret |
2603 | ret |
Line 2504... | Line 2604... | ||
2504 | 2604 | ||
2505 | draw_image.nomem: |
2605 | draw_image.nomem: |
2506 | mov al, 13 |
2606 | mov al, 13 |
Line 2509... | Line 2609... | ||
2509 | imul ebx, font_width |
2609 | imul ebx, font_width |
2510 | add ebx, 5*65536 |
2610 | add ebx, 5*65536 |
2511 | mov ecx, [skinh-2] |
2611 | mov ecx, [skinh-2] |
2512 | mov cx, word [cur_height] |
2612 | mov cx, word [cur_height] |
2513 | imul cx, font_height |
2613 | imul cx, font_height |
2514 | mcall |
2614 | int 40h |
2515 | mov al, 4 |
2615 | mov al, 4 |
2516 | mov ebx, 32*65536+32 |
2616 | mov ebx, 32*65536+32 |
2517 | mov ecx, 0xFFFFFF |
2617 | mov ecx, 0xFFFFFF |
2518 | mov edx, nomem_draw |
2618 | mov edx, nomem_draw |
2519 | push nomem_draw.size |
2619 | push nomem_draw.size |
2520 | pop esi |
2620 | pop esi |
2521 | mcall |
2621 | int 40h |
2522 | ret |
2622 | ret |
Line 2523... | Line 2623... | ||
2523 | 2623 | ||
2524 | draw_image: |
2624 | draw_image: |
2525 | mov [bMemForImageValidData], byte 1 |
2625 | mov [bMemForImageValidData], byte 1 |
Line 2713... | Line 2813... | ||
2713 | push 65 |
2813 | push 65 |
2714 | pop eax |
2814 | pop eax |
2715 | mov edi, console_colors |
2815 | mov edi, console_colors |
2716 | push 8 |
2816 | push 8 |
2717 | pop esi |
2817 | pop esi |
2718 | mcall |
2818 | int 40h |
2719 | .nodraw: |
2819 | .nodraw: |
2720 | ret |
2820 | ret |
Line 2721... | Line 2821... | ||
2721 | 2821 | ||
2722 | get_console_ptr: |
2822 | get_console_ptr: |
Line 3935... | Line 4035... | ||
3935 | mov dword [ebp + panel1_selected_size+4 - panel1_data], eax |
4035 | mov dword [ebp + panel1_selected_size+4 - panel1_data], eax |
3936 | .retry: |
4036 | .retry: |
3937 | push 70 |
4037 | push 70 |
3938 | pop eax |
4038 | pop eax |
3939 | mov ebx, dirinfo |
4039 | mov ebx, dirinfo |
3940 | mcall |
4040 | int 40h |
3941 | test eax, eax |
4041 | test eax, eax |
3942 | jz .ok |
4042 | jz .ok |
3943 | cmp eax, 6 |
4043 | cmp eax, 6 |
3944 | jz .ok |
4044 | jz .ok |
3945 | ; Failed to read folder, notify user |
4045 | ; Failed to read folder, notify user |
Line 5141... | Line 5241... | ||
5141 | stc |
5241 | stc |
5142 | ret |
5242 | ret |
5143 | .found_ext: |
5243 | .found_ext: |
5144 | inc esi |
5244 | inc esi |
5145 | mov edi, [associations] |
5245 | mov edi, [associations] |
- | 5246 | test edi, edi |
|
- | 5247 | jz .notfound |
|
5146 | .find_loop: |
5248 | .find_loop: |
5147 | push esi edi |
5249 | push esi edi |
5148 | call strcmpi |
5250 | call strcmpi |
5149 | pop edi esi |
5251 | pop edi esi |
5150 | pushf |
5252 | pushf |
Line 5158... | Line 5260... | ||
5158 | inc edi |
5260 | inc edi |
5159 | cmp byte [edi-1], 0 |
5261 | cmp byte [edi-1], 0 |
5160 | jnz @b |
5262 | jnz @b |
5161 | cmp byte [edi], 0 |
5263 | cmp byte [edi], 0 |
5162 | jnz .find_loop |
5264 | jnz .find_loop |
- | 5265 | .notfound: |
|
5163 | ; unknown extension |
5266 | ; unknown extension |
5164 | stc |
5267 | stc |
5165 | .found: |
5268 | .found: |
5166 | pop esi |
5269 | pop esi |
5167 | ret |
5270 | ret |
Line 5168... | Line 5271... | ||
5168 | 5271 | ||
Line 5169... | Line 5272... | ||
5169 | title db 'Kolibri Far 0.32',0 |
5272 | header db 'Kolibri Far 0.34',0 |
5170 | 5273 | ||
Line 5171... | Line 5274... | ||
5171 | nomem_draw db 'No memory for redraw.',0 |
5274 | nomem_draw db 'No memory for redraw.',0 |
Line 5558... | Line 5661... | ||
5558 | old_cursor_pos dd -1 |
5661 | old_cursor_pos dd -1 |
Line 5559... | Line 5662... | ||
5559 | 5662 | ||
Line 5560... | Line 5663... | ||
5560 | active_panel dd panel1_data |
5663 | active_panel dd panel1_data |
- | 5664 | ||
- | 5665 | associations dd 0 |
|
Line 5561... | Line 5666... | ||
5561 | 5666 | associations_size dd 1 ; terminating zero |
|
5562 | associations dd 0 |
5667 | associations_allocated dd 0x1000 ; start with one page |
5563 | 5668 | ||
5564 | console_colors dd 0x000000, 0x000080, 0x008000, 0x008080 |
5669 | console_colors dd 0x000000, 0x000080, 0x008000, 0x008080 |
Line 5786... | Line 5891... | ||
5786 | dd panels_OnKey.insert |
5891 | dd panels_OnKey.insert |
5787 | dw 0x4E, 0 |
5892 | dw 0x4E, 0 |
5788 | dd panels_OnKey.greyplus |
5893 | dd panels_OnKey.greyplus |
5789 | dw 0x4A, 0 |
5894 | dw 0x4A, 0 |
5790 | dd panels_OnKey.greyminus |
5895 | dd panels_OnKey.greyminus |
- | 5896 | dw 0x37, 0 |
|
- | 5897 | dd panels_OnKey.greyasterisk |
|
5791 | db 0 |
5898 | db 0 |
Line 5792... | Line 5899... | ||
5792 | 5899 | ||
5793 | viewer_ctrlkeys: |
5900 | viewer_ctrlkeys: |
5794 | dw 1, 0 |
5901 | dw 1, 0 |
Line 6177... | Line 6284... | ||
6177 | DeleteErrorBtn: |
6284 | DeleteErrorBtn: |
6178 | dd aRetry |
6285 | dd aRetry |
6179 | dd aSkip |
6286 | dd aSkip |
6180 | dd aSkipAll |
6287 | dd aSkipAll |
6181 | dd a_Cancel |
6288 | dd a_Cancel |
- | 6289 | ContinueBtn: |
|
- | 6290 | dd aContinue |
|
Line 6182... | Line 6291... | ||
6182 | 6291 | ||
6183 | if lang eq ru |
6292 | if lang eq ru |
6184 | aDeleteCaption db '¤ «¥¨¥',0 |
6293 | aDeleteCaption db '¤ «¥¨¥',0 |
6185 | aConfirmDeleteText db 'ë å®â¨â¥ 㤠«¨âì',0 |
6294 | aConfirmDeleteText db 'ë å®â¨â¥ 㤠«¨âì',0 |
Line 6191... | Line 6300... | ||
6191 | aCopyCaption db '®¯¨à®¢ ¨¥',0 |
6300 | aCopyCaption db '®¯¨à®¢ ¨¥',0 |
6192 | aCopy db '[ ®¯¨à®¢ âì ]',0 |
6301 | aCopy db '[ ®¯¨à®¢ âì ]',0 |
6193 | aCopyLength = $ - aCopy - 1 |
6302 | aCopyLength = $ - aCopy - 1 |
6194 | a_Continue db '[ த®«¦¨âì ]',0 |
6303 | a_Continue db '[ த®«¦¨âì ]',0 |
6195 | a_ContinueLength = $ - a_Continue - 1 |
6304 | a_ContinueLength = $ - a_Continue - 1 |
6196 | aCopy1 db '®¯¨à®¢ âì "',0 |
6305 | aCopy1 db '®¯¨à®¢ âì ',0 |
6197 | aCopy2 db '" ¢:',0 |
6306 | aCopy2 db ' ¢:',0 |
6198 | aError db '訡ª ',0 |
6307 | aError db '訡ª ',0 |
6199 | aContinue db 'த®«¦¨âì',0 |
6308 | aContinue db 'த®«¦¨âì',0 |
6200 | aRetry db '®¢â®à¨âì',0 |
6309 | aRetry db '®¢â®à¨âì',0 |
6201 | a_Cancel db '⬥¨âì',0 |
6310 | a_Cancel db '⬥¨âì',0 |
6202 | a_Delete db '¤ «¨âì',0 |
6311 | a_Delete db '¤ «¨âì',0 |
Line 6228... | Line 6337... | ||
6228 | aIncompleteFile db 'ë« ¯®«ãç¥ ¥¯®«ë© ä ©«. ¤ «¨âì ¥£®?',0 |
6337 | aIncompleteFile db 'ë« ¯®«ãç¥ ¥¯®«ë© ä ©«. ¤ «¨âì ¥£®?',0 |
6229 | aKeep db 'áâ ¢¨âì',0 |
6338 | aKeep db 'áâ ¢¨âì',0 |
6230 | aCannotWriteFile db '¥ ¬®£ã § ¯¨á âì ¢ ä ©«',0 |
6339 | aCannotWriteFile db '¥ ¬®£ã § ¯¨á âì ¢ ä ©«',0 |
6231 | aCannotDeleteFile db '¥ ¬®£ã 㤠«¨âì ä ©«',0 |
6340 | aCannotDeleteFile db '¥ ¬®£ã 㤠«¨âì ä ©«',0 |
6232 | aCannotDeleteFolder db '¥ ¬®£ã 㤠«¨âì ¯ ¯ªã',0 |
6341 | aCannotDeleteFolder db '¥ ¬®£ã 㤠«¨âì ¯ ¯ªã',0 |
- | 6342 | aNotFolder db '¥ ï¥âáï ¯ ¯ª®©',0 |
|
6233 | aIgnore db '£®à¨à®¢ âì',0 |
6343 | aIgnore db '£®à¨à®¢ âì',0 |
6234 | aMkDirCaption db '®§¤ ¨¥ ¯ ¯ª¨',0 |
6344 | aMkDirCaption db '®§¤ ¨¥ ¯ ¯ª¨',0 |
6235 | aMkDir db '®§¤ âì ¯ ¯ªã',0 |
6345 | aMkDir db '®§¤ âì ¯ ¯ªã',0 |
6236 | aMkDirLen = $ - aMkDir - 1 |
6346 | aMkDirLen = $ - aMkDir - 1 |
6237 | aCannotMakeFolder db '¥ ¬®£ã ᮧ¤ âì ¯ ¯ªã',0 |
6347 | aCannotMakeFolder db '¥ ¬®£ã ᮧ¤ âì ¯ ¯ªã',0 |
Line 6299... | Line 6409... | ||
6299 | aIncompleteFile db 'Incomplete file was retrieved. Delete it?',0 |
6409 | aIncompleteFile db 'Incomplete file was retrieved. Delete it?',0 |
6300 | aKeep db 'Keep',0 |
6410 | aKeep db 'Keep',0 |
6301 | aCannotWriteFile db 'Cannot write to the file',0 |
6411 | aCannotWriteFile db 'Cannot write to the file',0 |
6302 | aCannotDeleteFile db 'Cannot delete the file',0 |
6412 | aCannotDeleteFile db 'Cannot delete the file',0 |
6303 | aCannotDeleteFolder db 'Cannot delete the folder',0 |
6413 | aCannotDeleteFolder db 'Cannot delete the folder',0 |
- | 6414 | aNotFolder db 'is not a folder',0 |
|
6304 | aIgnore db 'Ignore',0 |
6415 | aIgnore db 'Ignore',0 |
6305 | aMkDirCaption db 'Make folder',0 |
6416 | aMkDirCaption db 'Make folder',0 |
6306 | aMkDir db 'Create the folder',0 |
6417 | aMkDir db 'Create the folder',0 |
6307 | aMkDirLen = $ - aMkDir - 1 |
6418 | aMkDirLen = $ - aMkDir - 1 |
6308 | aCannotMakeFolder db 'Cannot create folder',0 |
6419 | aCannotMakeFolder db 'Cannot create folder',0 |
Line 6330... | Line 6441... | ||
6330 | aStart db 'START',0 |
6441 | aStart db 'START',0 |
6331 | aLibInit db 'lib_init',0 |
6442 | aLibInit db 'lib_init',0 |
6332 | aVersion db 'version',0 |
6443 | aVersion db 'version',0 |
6333 | aIniGetInt db 'ini.get_int',0 |
6444 | aIniGetInt db 'ini.get_int',0 |
6334 | aIniGetStr db 'ini.get_str',0 |
6445 | aIniGetStr db 'ini.get_str',0 |
6335 | aIniQuerySec db 'ini.query_sec',0 |
6446 | aIniEnumKeys db 'ini.enum_keys',0 |
Line 6336... | Line 6447... | ||
6336 | 6447 | ||
6337 | aConfirmations db 'Confirmations',0 |
6448 | aConfirmations db 'Confirmations',0 |
6338 | aConfirmDelete db 'Delete',0 |
6449 | aConfirmDelete db 'Delete',0 |
Line 6346... | Line 6457... | ||
6346 | 6457 | ||
6347 | align 4 |
6458 | align 4 |
6348 | ini_import: |
6459 | ini_import: |
6349 | ini.get_int dd aIniGetInt |
6460 | ini.get_int dd aIniGetInt |
6350 | ini.get_str dd aIniGetStr |
6461 | ini.get_str dd aIniGetStr |
6351 | ini.query_sec dd aIniQuerySec |
6462 | ini.enum_keys dd aIniEnumKeys |
Line 6352... | Line 6463... | ||
6352 | dd 0 |
6463 | dd 0 |
6353 | 6464 | ||
6354 | virtual at 0 |
6465 | virtual at 0 |
Line 6566... | Line 6677... | ||
6566 | 6677 | ||
6567 | align 4 |
6678 | align 4 |
6568 | tolower_table rb 256 |
6679 | tolower_table rb 256 |
Line 6569... | Line 6680... | ||
6569 | layout rb 128 |
6680 | layout rb 128 |
6570 | 6681 | ||
Line 6571... | Line 6682... | ||
6571 | copy_buffer_size = 32768 |
6682 | copy_buffer_size = 65536 |
6572 | copy_buffer rb copy_buffer_size |
6683 | copy_buffer rb copy_buffer_size |
6573 | 6684 | ||
6574 | ; data for directory delete |
6685 | ; data for directory delete |
6575 | ; If directory nested level is >1024, then its full name is too big, |
6686 | ; If directory nested level is >1024, then its full name is too big, |
6576 | ; so we see the overflow when creating full name (we check for this!) |
6687 | ; so we see the overflow when creating full name (we check for this!) |
6577 | del_dir_stack rd 1024 |
6688 | del_dir_stack rd 1024 |
- | 6689 | del_dir_stack_ptr dd ? |
|
- | 6690 | del_dir_query_size = 32 |
|
- | 6691 | del_dir_query_area rb 32+304*del_dir_query_size |
|
- | 6692 | ||
- | 6693 | label copy_dir_stack dword at del_dir_stack |
|
- | 6694 | label copy_dir_stack_ptr dword at del_dir_stack_ptr |
|
- | 6695 | copy_dir_query_size = del_dir_query_size |
|
- | 6696 | copy_dir_query_area = del_dir_query_area |
|
- | 6697 | del_bSkipAll db ? ; for directory errors |
|
6578 | del_dir_stack_ptr dd ? |
6698 | label copy_bSkipAll byte at del_bSkipAll |
- | 6699 | copy_bSkipAll2 db ? ; for file read/write errors |
|
- | 6700 | ||
Line 6579... | Line 6701... | ||
6579 | del_dir_query_size = 32 |
6701 | bEndSlash db ? |
6580 | del_dir_query_area rb 32+304*del_dir_query_size |
6702 | bDestIsFolder db ? |
6581 | del_bSkipAll db ? |
6703 | bNeedRestoreName db ? |
6582 | 6704 |