Subversion Repositories Kolibri OS

Rev

Rev 3731 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1792 yogev_ezra 1
;---------------------------------------------------------------------
2
get_icon_number:
3
    mov   ebp,[extension_size]	;[icons_end_tag]
4
    mov   edx,[icons_end_tag]
5
    mov   edi,[ini_file_start]
6
    dec   edi
7
.search_association:
8
    cmp   edx,edi
9
    jbe   .end
10
    mov   esi,[extension_start]
11
    mov   ecx,ebp
12
    test  ecx,ecx
13
    je	  @f
14
    sub   ecx,2
15
@@:
16
    inc   edi
17
    mov   ebx,edi
18
    cld
19
    rep   cmpsb
20
    mov   edi,ebx
21
    jne   .search_association
22
    mov   esi,edi
23
    add   esi,ebp
24
    test  ebp,ebp
25
    je	  @f
26
    sub   esi,2
27
@@:
28
    cmp   [esi],byte ' '
29
    jne   .search_association
30
    inc   esi
31
    xor   ebx,ebx
32
    call  .calculate
33
    imul  eax,1000
34
    call  .calculate_1
35
    imul  eax,100
36
    call  .calculate_1
37
    imul  eax,10
38
    call  .calculate_1
39
    add   ebx,eax
40
    ret
41
.end:
42
    mov  ebx,2
43
    ret
44
;---------------------------------------------------------------------
45
.calculate_1:
46
    add   ebx,eax
47
.calculate:
48
    xor   eax,eax
49
    cld
50
    lodsb
51
    sub   eax,0x30
52
    ret
53
;---------------------------------------------------------------------
54
open_file_with_appl_1:
55
    mov   ebp,files_associations_1
56
    jmp   open_file_with_appl.1
57
;---------------------------------------------------------------------
58
open_file_with_appl:
59
; edx - start file name
60
; esi - start extension
61
    mov   ebp,files_associations
62
.1:
63
    mov   [extension_start],esi
64
    call  search_star_and_end_tags
65
    cmp   ebp,-1
66
    je	  .end
67
.search_association:
68
    cmp   [end_tag],edi
69
    jbe   .end
70
    mov   esi,[extension_start] ;extension_temp_area
71
    mov   ecx,[extension_size]
72
    inc   edi
73
    cld
74
    push   edi
75
    rep  cmpsb
76
    pop    edi
77
    jne   .search_association
78
    push  esi
79
    mov   esi,edi
80
    add   esi,[extension_size] ;4
81
    cmp   [esi],byte ' '
82
    je	  @f
83
    pop   esi
84
    jmp   .search_association
85
@@:
86
    add   esp,4
87
    inc   esi
88
    mov   edi,file_name  ;start_file_data.name
89
    xor   eax,eax
90
@@:
91
    cld
92
    lodsb
93
    stosb
94
    cmp    al,' '
95
    cmp   al,13
96
    jnz   @b
97
    mov   [edi-1],byte 0 ;'#'
98
    cmp   [use_patch],0
99
    je	  @f
100
    mov   [use_patch],0
101
    jmp   .continue
102
@@:
103
    cmp   [select_panel_counter],0
104
    jne   @f
105
    mov   esi,read_folder_name	    ;read_folder.name
106
    jmp   .start
107
@@:
108
    mov   esi,read_folder_1_name    ;read_folder_1.name
109
.start:
110
    mov   edi,start_parameter
111
    cmp   [open_param],0
112
    je    .start_1
113
    mov   eax,[open_param]
114
    mov   eax,[eax]
115
    cld
116
    stosd
117
;    call draw_window
118
;    mov   eax,0
119
;    ret
120
.start_1:
121
    xor   eax,eax
122
@@:
123
    cld
124
    lodsb
125
    stosb
126
    test  eax,eax
127
    jnz   @b
128
    mov   [edi-1], byte '/'
129
    mov   esi,edx
130
    mov   [error_pointer],edx  ;start_file_data.name
131
@@:
132
    cld
133
    lodsb
134
    stosb
135
    test  eax,eax
136
    jnz   @b
137
.continue:
138
    mov   [start_file_data.param],start_parameter
139
    call  start_appl
140
    cmp   eax,0
141
    jge   @f
142
    mov  ebx,0
143
    sub  ebx,eax
144
    mov  eax,ebx
145
    call start_error_window_thread
146
@@:
147
    mov   eax,0
148
    ret
149
.end:
150
    mov   eax,1
151
    ret
152
;---------------------------------------------------------------------
153
search_star_and_end_tags:
154
    mov   edi,[ini_file_start]
155
    dec   edi
156
.search_tag1:
157
    cmp   [left_folder_data],edi
158
    jbe  .end
159
    mov   esi,ebp
160
    mov   ecx,22
161
    inc   edi
162
    cld
163
    push   edi
164
    rep  cmpsb
165
    pop    edi
166
    jne     .search_tag1
167
    dec    edi
168
    push   edi
169
.search_end_tag:
170
    cmp   [left_folder_data],edi
171
    jbe  .end
172
    mov   esi,end_section_tag
173
    mov   ecx,7
174
    inc   edi
175
    cld
176
    push   edi
177
    rep  cmpsb
178
    pop    edi
179
    jne     .search_end_tag
180
    mov   [end_tag],edi
181
    pop   edi
182
    ret
183
.end:
184
    mov   ebp,-1
185
    ret
186
;---------------------------------------------------------------------