Rev 631 | Rev 893 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 631 | Rev 644 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ; |
1 | ; |
2 | ; project name: KFar_Arc - plugin for KFar, which supports various archives |
2 | ; project name: KFar_Arc - plugin for KFar, which supports various archives |
3 | ; target platform: KolibriOS |
3 | ; target platform: KolibriOS |
4 | ; compiler: FASM 1.67.14 |
4 | ; compiler: FASM 1.67.14 |
5 | ; version: 0.11 |
5 | ; version: 0.12 |
6 | ; last update: 2007-09-20 (Sep 20, 2007) |
6 | ; last update: 2007-10-06 (Oct 06, 2007) |
7 | ; minimal KFar version: 0.41 |
7 | ; minimal KFar version: 0.41 |
8 | ; minimal kernel: no limit |
8 | ; minimal kernel: no limit |
9 | ; |
9 | ; |
10 | ; author: Diamond |
10 | ; author: Diamond |
11 | ; email: diamondz@land.ru |
11 | ; email: diamondz@land.ru |
Line 390... | Line 390... | ||
390 | cmp [ecx+file_common.stamp], eax |
390 | cmp [ecx+file_common.stamp], eax |
391 | jnz .parloopi |
391 | jnz .parloopi |
392 | @@: |
392 | @@: |
393 | mov [edx+file_common.stamp], eax |
393 | mov [edx+file_common.stamp], eax |
394 | push esi |
394 | push esi |
- | 395 | mov ecx, [edx+file_common.name] |
|
- | 396 | add ecx, [edx+file_common.namelen] |
|
- | 397 | xor eax, eax |
|
- | 398 | xchg al, [ecx] |
|
- | 399 | push eax ecx |
|
395 | mov eax, edx |
400 | mov eax, edx |
396 | mov edi, tmp_bdfe |
401 | mov edi, tmp_bdfe |
397 | push edi |
402 | push edi |
398 | sub esi, [ebx+file_common.fullname] |
403 | sub esi, [ebx+file_common.fullname] |
399 | add esi, [edx+file_common.fullname] |
404 | add esi, [edx+file_common.fullname] |
400 | push esi |
405 | push esi |
401 | mov ecx, [ebp] |
406 | mov ecx, [ebp] |
402 | call dword [getattrTable+(ecx-1)*4] |
407 | call dword [getattrTable+(ecx-1)*4] |
403 | mov eax, [esp+16+20] |
408 | mov eax, [esp+24+20] |
404 | call eax |
409 | call eax |
- | 410 | pop ecx edx |
|
- | 411 | mov [ecx], dl |
|
405 | pop esi |
412 | pop esi |
406 | test al, al |
413 | test al, al |
407 | jz .forced_exit |
414 | jz .forced_exit |
408 | jmp .parloope |
415 | jmp .parloope |
409 | .pardone: |
416 | .pardone: |
Line 411... | Line 418... | ||
411 | jz .addfile |
418 | jz .addfile |
412 | mov eax, [cur_stamp] |
419 | mov eax, [cur_stamp] |
413 | cmp [ebx+file_common.stamp], eax |
420 | cmp [ebx+file_common.stamp], eax |
414 | jz .cont |
421 | jz .cont |
415 | mov [ebx+file_common.stamp], eax |
422 | mov [ebx+file_common.stamp], eax |
- | 423 | mov ecx, [ebx+file_common.name] |
|
- | 424 | add ecx, [ebx+file_common.namelen] |
|
- | 425 | xor eax, eax |
|
- | 426 | xchg al, [ecx] |
|
- | 427 | push eax ecx |
|
416 | push esi |
428 | push esi |
417 | mov eax, ebx |
429 | mov eax, ebx |
418 | mov edi, tmp_bdfe |
430 | mov edi, tmp_bdfe |
419 | push edi |
431 | push edi |
420 | push esi |
432 | push esi |
421 | mov ecx, [ebp] |
433 | mov ecx, [ebp] |
422 | call dword [getattrTable+(ecx-1)*4] |
434 | call dword [getattrTable+(ecx-1)*4] |
423 | mov eax, [esp+16+20] |
435 | mov eax, [esp+24+20] |
424 | call eax |
436 | call eax |
- | 437 | pop ecx edx |
|
- | 438 | mov [ecx], dl |
|
425 | pop esi |
439 | pop esi |
426 | test al, al |
440 | test al, al |
427 | jz .forced_exit |
441 | jz .forced_exit |
428 | jmp .cont |
442 | jmp .cont |
429 | .addfile: |
443 | .addfile: |
Line 852... | Line 866... | ||
852 | ; eax -> new item |
866 | ; eax -> new item |
853 | mov [eax+file_common.bIsDirectory], 1 |
867 | mov [eax+file_common.bIsDirectory], 1 |
854 | mov [eax+file_common.bPseudoFolder], 1 |
868 | mov [eax+file_common.bPseudoFolder], 1 |
855 | .newitem: |
869 | .newitem: |
856 | mov [eax+file_common.namelen], ecx |
870 | mov [eax+file_common.namelen], ecx |
- | 871 | ; !!! in this case .fullname is not null-terminated !!! |
|
- | 872 | mov ecx, [edx+file_common.fullname] |
|
- | 873 | mov [eax+file_common.fullname], ecx |
|
857 | pop ecx |
874 | pop ecx |
858 | pop esi |
875 | pop esi |
859 | ; ecx = parent item, eax = current item |
876 | ; ecx = parent item, eax = current item |
860 | mov [eax+file_common.name], esi |
877 | mov [eax+file_common.name], esi |
861 | inc dword [ecx+16] ; new item in parent folder |
878 | inc dword [ecx+16] ; new item in parent folder |