Subversion Repositories Kolibri OS

Rev

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

Rev 5906 Rev 5907
Line 206... Line 206...
206
  @@:
206
  @@:
Line 207... Line 207...
207
 
207
 
208
 ;; if without '.' - execute
208
 ;; if without '.' - execute
209
    stdcall string.last_index_of, [param_s], '.', 1
209
    stdcall string.last_index_of, [param_s], '.', 1
210
    cmpe    eax, -1, execute
-
 
211
 
210
    cmpe    eax, -1, execute
212
 ;; if '.' is part of path - execute
211
 ;; if '.' is part of path - execute
213
    mov     esi, eax
212
    mov     esi, eax
214
    stdcall string.last_index_of, [param_s], '/', 1
213
    stdcall string.last_index_of, [param_s], '/', 1
Line 296... Line 295...
296
    mov     [cb_always.text_color], ecx
295
    mov     [cb_always.text_color], ecx
297
    invoke  checkbox.init, cb_always
296
    invoke  checkbox.init, cb_always
Line 298... Line 297...
298
 
297
 
299
 ;; get list
298
 ;; get list
-
 
299
    invoke  libini.for_each_section, assoc_ini, section_cb
300
    invoke  libini.for_each_section, assoc_ini, section_cb
300
    stdcall sort_list
301
    mov     eax, [sb_apps.max_area]
301
    mov     eax, [sb_apps.max_area]
302
    and     eax, 1b
302
    and     eax, 1b
303
    shr     [sb_apps.max_area], 1
303
    shr     [sb_apps.max_area], 1
Line 909... Line 909...
909
    ret
909
    ret
910
 endp
910
 endp
Line 911... Line 911...
911
 
911
 
Line -... Line 912...
-
 
912
 ;----------------------
-
 
913
 
-
 
914
 proc sort_list
-
 
915
    mov     edi, 0
-
 
916
    mov     ebx, list		 ;; i = 0
-
 
917
    imul    ecx, [list.size], 32 ;; i < n - 1
-
 
918
    sub     ecx, 32
-
 
919
    add     ecx, list
-
 
920
 
-
 
921
 .loop1:
-
 
922
    mov     edx, list		 ;; j = 0
-
 
923
    mov     esi, [list.size]	 ;; j < n - i - 1
-
 
924
    sub     esi, edi
-
 
925
    dec     esi
-
 
926
    imul    esi, 32
-
 
927
    add     esi, list
-
 
928
 .loop2:
-
 
929
    mov     eax, edx
-
 
930
    add     eax, 32
-
 
931
    stdcall string.cmp, edx, eax, 32
-
 
932
    cmpne   eax, 1, .next2
-
 
933
;; swap names
-
 
934
    mov     eax, edx
-
 
935
    add     eax, 32
-
 
936
    stdcall string.copy, edx, buffer7
-
 
937
    stdcall string.copy, eax, edx
-
 
938
    stdcall string.copy, buffer7, eax
-
 
939
;; swap icons
-
 
940
    mov     eax, edx
-
 
941
    sub     eax, list
-
 
942
    shr     eax, 3
-
 
943
    add     eax, list.icon
-
 
944
    push    ebx ecx
-
 
945
    mov     ebx, [eax]
-
 
946
    mov     ecx, [eax + 4]
-
 
947
    mov     [eax], ecx
-
 
948
    mov     [eax + 4], ebx
-
 
949
    pop     ecx ebx
-
 
950
 .next2:
-
 
951
    add     edx, 32
-
 
952
    cmpne   edx, esi, .loop2
-
 
953
 .next1:
-
 
954
    inc     edi
-
 
955
    add     ebx, 32
-
 
956
    cmpne   ebx, ecx, .loop1
-
 
957
 
-
 
958
    ret
-
 
959
 endp
-
 
960
 
912
 ;----------------------
961
 ;----------------------
Line 913... Line 962...
913
 
962
 
Line 914... Line 963...
914
 dataend:
963
 dataend:
Line 931... Line 980...
931
 param_s rd 1
980
 param_s rd 1
932
 param_e rd 1
981
 param_e rd 1
933
 param_a rd 1
982
 param_a rd 1
934
 undefined rb 1
983
 undefined rb 1
935
 buffer rb 2048
984
 buffer  rb 2048
936
 buffer2 rb 2048
985
 buffer2 rb 2048 ;OD
937
 buffer3 rb 2048
986
 buffer3 rb 2048 ;OD
938
 buffer4 rb 4096
987
 buffer4 rb 2048 ;OD
939
 buffer5 rb 4096
988
 buffer5 rb 2048 ;OD
940
 buffer6 rb 2048
989
 buffer6 rb 2048 ;check existance
-
 
990
 buffer7 rb 32	 ;for sorting
941
 params rb 2048
991
 params rb 2048
942
 _stack rb 2048
992
 _stack rb 2048
943
 memory:
993
 memory: