Subversion Repositories Kolibri OS

Rev

Rev 1122 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1122 Rev 1148
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.16
5
; version:              0.17
6
; last update:          2009-07-03 (Jul 03, 2009)
6
; last update:          2009-09-03 (Sep 03, 2009)
7
; minimal KFar version: 0.43
7
; minimal KFar version: 0.43
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
12
; web:                  http://diamondz.land.ru
12
; web:                  http://diamond.kolibrios.org
13
;
13
;
Line 14... Line 14...
14
 
14
 
15
; standard start of Kolibri dynamic library
15
; standard start of Kolibri dynamic library
16
format MS COFF
16
format MS COFF
Line 869... Line 869...
869
.newitem:
869
.newitem:
870
        mov     [eax+file_common.namelen], ecx
870
        mov     [eax+file_common.namelen], ecx
871
; !!! in this case .fullname is not null-terminated !!!
871
; !!! in this case .fullname is not null-terminated !!!
872
        mov     ecx, [edx+file_common.fullname]
872
        mov     ecx, [edx+file_common.fullname]
873
        mov     [eax+file_common.fullname], ecx
873
        mov     [eax+file_common.fullname], ecx
-
 
874
        push    edi eax
-
 
875
        lea     edi, [eax+file_common.parent]
-
 
876
        xor     eax, eax
-
 
877
        push    7
-
 
878
        pop     ecx
-
 
879
        rep     stosd
-
 
880
        pop     eax edi
874
        pop     ecx
881
        pop     ecx
875
        pop     esi
882
        pop     esi
876
; ecx = parent item, eax = current item
883
; ecx = parent item, eax = current item
877
        mov     [eax+file_common.name], esi
884
        mov     [eax+file_common.name], esi
878
        inc     dword [ecx+16]  ; new item in parent folder
885
        inc     dword [ecx+16]  ; new item in parent folder
879
        push    ecx
886
        push    ecx
880
; add new item to end of L2-list
887
; add new item to end of L2-list
881
        and     [eax+file_common.next], 0
-
 
882
        cmp     [eax+file_common.bIsDirectory], 0
888
        cmp     [eax+file_common.bIsDirectory], 0
883
        jnz     @f
889
        jnz     @f
884
        add     ecx, 8
890
        add     ecx, 8
885
@@:
891
@@:
886
        push    eax
892
        push    eax
Line 899... Line 905...
899
        mov     [ecx+file_common.next], eax
905
        mov     [ecx+file_common.next], eax
900
        add     eax, [hOut]
906
        add     eax, [hOut]
901
@@:
907
@@:
902
        pop     ecx
908
        pop     ecx
903
; set parent link
909
; set parent link
904
        and     [eax+file_common.parent], 0
-
 
905
        cmp     ecx, edi
910
        cmp     ecx, edi
906
        jz      @f
911
        jz      @f
907
        sub     ecx, file_common.subfolders
912
        sub     ecx, file_common.subfolders
908
        sub     ecx, [hOut]
913
        sub     ecx, [hOut]
909
        mov     [eax+file_common.parent], ecx
914
        mov     [eax+file_common.parent], ecx