Rev 7579 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7579 | Rev 7583 | ||
---|---|---|---|
1 | struct symbol |
1 | struct symbol |
2 | c db ? ; +0 ᨬ¢®« |
2 | c db ? ; +0 ᨬ¢®« |
3 | col db ? ; +1 梥â |
3 | col db ? ; +1 梥â |
4 | perv dd ? ; +2 |
4 | perv dd ? ; +2 |
5 | next dd ? ; +6 㪠§ ⥫¨ |
5 | next dd ? ; +6 㪠§ ⥫¨ |
6 | tc dd ? ;+10 ¢à¥¬. ᮧ¤ ¨ï |
6 | tc dd ? ;+10 ¢à¥¬. ᮧ¤ ¨ï |
7 | td dd ? ;+14 ¢à¥¬. 㤠«¥¨ï |
7 | td dd ? ;+14 ¢à¥¬. 㤠«¥¨ï |
8 | ends |
8 | ends |
9 | 9 | ||
10 | ID_BUT_0 equ 3 ;¬¨¨¬ «ìë© ID ª®¯ª¨ ¯ ¥«¨ |
10 | ID_BUT_0 equ 3 ;¬¨¨¬ «ìë© ID ª®¯ª¨ ¯ ¥«¨ |
11 | 11 | ||
12 | ID_BUT_NEW equ 3 |
12 | ID_BUT_NEW equ 3 |
13 | ID_BUT_OPEN equ 4 |
13 | ID_BUT_OPEN equ 4 |
14 | ID_BUT_SAVE equ 5 |
14 | ID_BUT_SAVE equ 5 |
15 | ID_BUT_SAVE_AS equ 6 |
15 | ID_BUT_SAVE_AS equ 6 |
16 | ID_BUT_SELECT equ 7 |
16 | ID_BUT_SELECT equ 7 |
17 | ID_BUT_CUT equ 8 |
17 | ID_BUT_CUT equ 8 |
18 | ID_BUT_COPY equ 9 |
18 | ID_BUT_COPY equ 9 |
19 | ID_BUT_PASTE equ 10 |
19 | ID_BUT_PASTE equ 10 |
20 | ID_BUT_FIND equ 11 |
20 | ID_BUT_FIND equ 11 |
21 | ID_BUT_REPLACE equ 12 |
21 | ID_BUT_REPLACE equ 12 |
22 | ID_BUT_KEY_WORDS equ 13 |
22 | ID_BUT_KEY_WORDS equ 13 |
23 | ID_BUT_UPPER equ 14 |
23 | ID_BUT_UPPER equ 14 |
24 | ID_BUT_LOWER equ 15 |
24 | ID_BUT_LOWER equ 15 |
25 | ID_BUT_REVERSE equ 16 |
25 | ID_BUT_REVERSE equ 16 |
26 | ID_BUT_UNDO equ 17 |
26 | ID_BUT_UNDO equ 17 |
27 | ID_BUT_REDO equ 18 |
27 | ID_BUT_REDO equ 18 |
28 | ID_BUT_INVISIBLE equ 19 |
28 | ID_BUT_INVISIBLE equ 19 |
29 | ID_BUT_SYNTAX_LIST equ 20 |
29 | ID_BUT_SYNTAX_LIST equ 20 |
30 | ID_BUT_SYNTAX_MODE equ 21 |
30 | ID_BUT_SYNTAX_MODE equ 21 |
31 | ID_BUT_CONVERT_1251_866 equ 22 |
31 | ID_BUT_CONVERT_1251_866 equ 22 |
32 | ID_BUT_CONVERT_866_1251 equ 23 |
32 | ID_BUT_CONVERT_866_1251 equ 23 |
33 | 33 | ||
34 | macro ini_panel b_key,b_id |
34 | macro ini_panel b_key,b_id |
35 | { |
35 | { |
36 | stdcall [ini_get_int],file_name,ini_sec_window,b_key,1 |
36 | stdcall [ini_get_int],file_name,ini_sec_window,b_key,1 |
37 | mov byte[panel_but+b_id-ID_BUT_0],al |
37 | mov byte[panel_but+b_id-ID_BUT_0],al |
38 | } |
38 | } |
39 | 39 | ||
40 | bmp_icon dd 0 |
40 | bmp_icon dd 0 |
41 | 41 | ||
42 | align 16 |
42 | align 16 |
43 | button: |
43 | button: |
44 | mcall SF_GET_BUTTON |
44 | mcall SF_GET_BUTTON |
45 | cmp ah,ID_BUT_NEW |
45 | cmp ah,ID_BUT_NEW |
46 | jne @f |
46 | jne @f |
47 | call ted_but_new_file |
47 | call ted_but_new_file |
48 | jmp still |
48 | jmp still |
49 | @@: |
49 | @@: |
50 | cmp ah,ID_BUT_OPEN |
50 | cmp ah,ID_BUT_OPEN |
51 | jne @f |
51 | jne @f |
52 | call ted_but_open_file |
52 | call ted_but_open_file |
53 | jmp still |
53 | jmp still |
54 | @@: |
54 | @@: |
55 | cmp ah,ID_BUT_SAVE |
55 | cmp ah,ID_BUT_SAVE |
56 | jne @f |
56 | jne @f |
57 | xor eax,eax |
57 | xor eax,eax |
58 | call ted_but_save_file ;á®åà ¥¨¥ ¡¥§ ¤¨ «®£ |
58 | call ted_but_save_file ;á®åà ¥¨¥ ¡¥§ ¤¨ «®£ |
59 | jmp still |
59 | jmp still |
60 | @@: |
60 | @@: |
61 | cmp ah,ID_BUT_SAVE_AS |
61 | cmp ah,ID_BUT_SAVE_AS |
62 | jne @f |
62 | jne @f |
63 | xor eax,eax |
63 | xor eax,eax |
64 | inc eax |
64 | inc eax |
65 | call ted_but_save_file ;á®åà ¥¨¥ á ¤¨ «®£®¬ |
65 | call ted_but_save_file ;á®åà ¥¨¥ á ¤¨ «®£®¬ |
66 | jmp still |
66 | jmp still |
67 | @@: |
67 | @@: |
68 | cmp ah,ID_BUT_SELECT |
68 | cmp ah,ID_BUT_SELECT |
69 | jne @f |
69 | jne @f |
70 | stdcall [ted_but_select_word], tedit0 |
70 | stdcall [ted_but_select_word], tedit0 |
71 | jmp still |
71 | jmp still |
72 | @@: |
72 | @@: |
73 | cmp ah,ID_BUT_CUT |
73 | cmp ah,ID_BUT_CUT |
74 | jne @f |
74 | jne @f |
75 | stdcall [ted_but_cut], tedit0 |
75 | stdcall [ted_but_cut], tedit0 |
76 | jmp still |
76 | jmp still |
77 | @@: |
77 | @@: |
78 | cmp ah,ID_BUT_COPY |
78 | cmp ah,ID_BUT_COPY |
79 | jne @f |
79 | jne @f |
80 | stdcall [ted_but_copy], tedit0 |
80 | stdcall [ted_but_copy], tedit0 |
81 | jmp still |
81 | jmp still |
82 | @@: |
82 | @@: |
83 | cmp ah,ID_BUT_PASTE |
83 | cmp ah,ID_BUT_PASTE |
84 | jne @f |
84 | jne @f |
85 | stdcall [ted_but_paste], tedit0 |
85 | stdcall [ted_but_paste], tedit0 |
86 | jmp still |
86 | jmp still |
87 | @@: |
87 | @@: |
88 | cmp ah,ID_BUT_FIND |
88 | cmp ah,ID_BUT_FIND |
89 | jne @f |
89 | jne @f |
90 | call but_panel_find |
90 | call but_panel_find |
91 | jmp still |
91 | jmp still |
92 | @@: |
92 | @@: |
93 | cmp ah,ID_BUT_REPLACE |
93 | cmp ah,ID_BUT_REPLACE |
94 | jne @f |
94 | jne @f |
95 | call but_panel_replace |
95 | call but_panel_replace |
96 | jmp still |
96 | jmp still |
97 | @@: |
97 | @@: |
98 | cmp ah,ID_BUT_KEY_WORDS |
98 | cmp ah,ID_BUT_KEY_WORDS |
99 | jne @f |
99 | jne @f |
100 | call but_find_key_w |
100 | call but_find_key_w |
101 | jmp still |
101 | jmp still |
102 | @@: |
102 | @@: |
103 | cmp ah,ID_BUT_UPPER |
103 | cmp ah,ID_BUT_UPPER |
104 | jne @f |
104 | jne @f |
105 | stdcall [ted_but_sumb_upper], tedit0 |
105 | stdcall [ted_but_sumb_upper], tedit0 |
106 | jmp still |
106 | jmp still |
107 | @@: |
107 | @@: |
108 | cmp ah,ID_BUT_LOWER |
108 | cmp ah,ID_BUT_LOWER |
109 | jne @f |
109 | jne @f |
110 | stdcall [ted_but_sumb_lover], tedit0 |
110 | stdcall [ted_but_sumb_lover], tedit0 |
111 | jmp still |
111 | jmp still |
112 | @@: |
112 | @@: |
113 | cmp ah,ID_BUT_REVERSE |
113 | cmp ah,ID_BUT_REVERSE |
114 | jne @f |
114 | jne @f |
115 | stdcall [ted_but_reverse], tedit0 |
115 | stdcall [ted_but_reverse], tedit0 |
116 | jmp still |
116 | jmp still |
117 | @@: |
117 | @@: |
118 | cmp ah,ID_BUT_UNDO |
118 | cmp ah,ID_BUT_UNDO |
119 | jne @f |
119 | jne @f |
120 | stdcall [ted_but_undo], tedit0 |
120 | stdcall [ted_but_undo], tedit0 |
121 | jmp still |
121 | jmp still |
122 | @@: |
122 | @@: |
123 | cmp ah,ID_BUT_REDO |
123 | cmp ah,ID_BUT_REDO |
124 | jne @f |
124 | jne @f |
125 | stdcall [ted_but_redo], tedit0 |
125 | stdcall [ted_but_redo], tedit0 |
126 | jmp still |
126 | jmp still |
127 | @@: |
127 | @@: |
128 | cmp ah,ID_BUT_INVISIBLE |
128 | cmp ah,ID_BUT_INVISIBLE |
129 | jne @f |
129 | jne @f |
130 | stdcall but_sumb_invis, tedit0 |
130 | stdcall but_sumb_invis, tedit0 |
131 | jmp still |
131 | jmp still |
132 | @@: |
132 | @@: |
133 | cmp ah,ID_BUT_SYNTAX_LIST |
133 | cmp ah,ID_BUT_SYNTAX_LIST |
134 | jne @f |
134 | jne @f |
135 | stdcall but_use_syntax, tedit0 |
135 | stdcall but_use_syntax, tedit0 |
136 | jmp still |
136 | jmp still |
137 | @@: |
137 | @@: |
138 | cmp ah,ID_BUT_SYNTAX_MODE |
138 | cmp ah,ID_BUT_SYNTAX_MODE |
139 | jne @f |
139 | jne @f |
140 | call but_panel_choose_syntax |
140 | call but_panel_choose_syntax |
141 | jmp still |
141 | jmp still |
142 | @@: |
142 | @@: |
143 | cmp ah,ID_BUT_CONVERT_1251_866 |
143 | cmp ah,ID_BUT_CONVERT_1251_866 |
144 | jne @f |
144 | jne @f |
145 | stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866 |
145 | stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866 |
146 | jmp still |
146 | jmp still |
147 | @@: |
147 | @@: |
148 | cmp ah,ID_BUT_CONVERT_866_1251 |
148 | cmp ah,ID_BUT_CONVERT_866_1251 |
149 | jne @f |
149 | jne @f |
150 | stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251 |
150 | stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251 |
151 | jmp still |
151 | jmp still |
152 | @@: |
152 | @@: |
153 | 153 | ||
154 | cmp ah,200 |
154 | cmp ah,200 |
155 | jne @f |
155 | jne @f |
156 | stdcall ted_but_open_syntax, tedit0 |
156 | stdcall ted_but_open_syntax, tedit0 |
157 | jmp still |
157 | jmp still |
158 | @@: |
158 | @@: |
159 | cmp ah,201 ; ©â¨ ¤ «¥¥ |
159 | cmp ah,201 ; ©â¨ ¤ «¥¥ |
160 | jne .no_find |
160 | jne .no_find |
161 | call get_find_options |
161 | call get_find_options |
162 | stdcall [ted_but_find], tedit0, eax |
162 | stdcall [ted_but_find], tedit0, eax |
163 | jmp still |
163 | jmp still |
164 | .no_find: |
164 | .no_find: |
165 | cmp ah,202 ;§ ¬¥¨âì |
165 | cmp ah,202 ;§ ¬¥¨âì |
166 | jne .no_change |
166 | jne .no_change |
167 | call get_find_options |
167 | call get_find_options |
168 | stdcall [ted_but_replace], tedit0, buf_replace, eax, 1 |
168 | stdcall [ted_but_replace], tedit0, buf_replace, eax, 1 |
169 | or eax,eax |
169 | or eax,eax |
170 | jz still |
170 | jz still |
171 | stdcall [ted_draw], tedit0 |
171 | stdcall [ted_draw], tedit0 |
172 | jmp still |
172 | jmp still |
173 | .no_change: |
173 | .no_change: |
174 | cmp ah,203 ;§ ¬¥¨âì ¢á¥ |
174 | cmp ah,203 ;§ ¬¥¨âì ¢á¥ |
175 | jne @f |
175 | jne @f |
176 | call but_replace_all |
176 | call but_replace_all |
177 | jmp still |
177 | jmp still |
178 | @@: |
178 | @@: |
179 | cmp ah,204 ;¯¥à¥©â¨ áâபã |
179 | cmp ah,204 ;¯¥à¥©â¨ áâபã |
180 | jne @f |
180 | jne @f |
181 | call but_goto_line |
181 | call but_goto_line |
182 | jmp still |
182 | jmp still |
183 | @@: |
183 | @@: |
184 | 184 | ||
185 | cmp ah,1 |
185 | cmp ah,1 |
186 | jne @f |
186 | jne @f |
187 | call ted_Exit |
187 | call ted_Exit |
188 | jmp still |
188 | jmp still |
189 | @@: |
189 | @@: |
190 | 190 | ||
191 | cmp ah,199 |
191 | cmp ah,199 |
192 | jne still |
192 | jne still |
193 | call ted_Exit |
193 | call ted_Exit |
194 | jmp still |
194 | jmp still |
195 | 195 | ||
196 | align 4 |
196 | align 4 |
197 | ted_Exit: |
197 | ted_Exit: |
198 | cmp dword[wnd_k_words_run],0 |
198 | cmp dword[wnd_k_words_run],0 |
199 | je @f |
199 | je @f |
200 | push ebx ecx |
200 | push ebx ecx |
201 | mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID,[wnd_k_words_run] |
201 | mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID,[wnd_k_words_run] |
202 | pop ecx ebx |
202 | pop ecx ebx |
203 | mov dword[wnd_k_words_run],0 |
203 | mov dword[wnd_k_words_run],0 |
204 | ;test eax,eax |
204 | ;test eax,eax |
205 | @@: |
205 | @@: |
206 | cmp dword[exit_code],1 |
206 | cmp dword[exit_code],1 |
207 | je @f |
207 | je @f |
208 | stdcall [ted_can_save], tedit0 |
208 | stdcall [ted_can_save], tedit0 |
209 | cmp al,1 |
209 | cmp al,1 |
210 | jne @f |
210 | jne @f |
211 | stdcall [mb_create],msgbox_2,thread ;message: save buf in file? |
211 | stdcall [mb_create],msgbox_2,thread ;message: save buf in file? |
212 | stdcall [mb_setfunctions],msgbox_2E_funct |
212 | stdcall [mb_setfunctions],msgbox_2E_funct |
213 | ret |
213 | ret |
214 | @@: |
214 | @@: |
215 | stdcall mem.Free,[bmp_icon] |
215 | stdcall mem.Free,[bmp_icon] |
216 | cmp dword[unpac_mem],0 |
216 | cmp dword[unpac_mem],0 |
217 | je @f |
217 | je @f |
218 | stdcall mem.Free,[unpac_mem] |
218 | stdcall mem.Free,[unpac_mem] |
219 | @@: |
219 | @@: |
220 | stdcall [ted_delete], tedit0 |
220 | stdcall [ted_delete], tedit0 |
221 | stdcall [tl_data_clear], tree1 |
221 | stdcall [tl_data_clear], tree1 |
222 | mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë |
222 | mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë |
223 | ;ret |
223 | ;ret |
224 | 224 | ||
225 | align 4 |
225 | align 4 |
226 | get_find_options: |
226 | get_find_options: |
227 | xor eax,eax |
227 | xor eax,eax |
228 | cmp [opt_gr1],opt1 |
228 | cmp [opt_gr1],opt1 |
229 | je @f |
229 | je @f |
230 | inc eax |
230 | inc eax |
231 | cmp [opt_gr1],opt2 |
231 | cmp [opt_gr1],opt2 |
232 | je @f |
232 | je @f |
233 | inc eax |
233 | inc eax |
234 | @@: |
234 | @@: |
- | 235 | bt dword[ch1.flags],1 |
|
- | 236 | jc @f |
|
- | 237 | bts eax,30 |
|
- | 238 | @@: |
|
235 | ret |
239 | ret |
236 | 240 | ||
237 | align 4 |
241 | align 4 |
238 | proc but_replace_all uses ebx ecx edx |
242 | proc but_replace_all uses ebx ecx edx |
239 | call get_find_options |
243 | call get_find_options |
240 | mov ebx,eax |
244 | mov ebx,eax |
241 | stdcall [ted_but_replace], tedit0, buf_replace, ebx, 1 |
245 | stdcall [ted_but_replace], tedit0, buf_replace, ebx, 1 |
242 | xor edx,edx |
246 | xor edx,edx |
243 | or eax,eax |
247 | or eax,eax |
244 | jz @f |
248 | jz @f |
245 | inc edx |
249 | inc edx |
246 | mov ecx,0x1000 |
250 | mov ecx,0x1000 |
247 | .cycle0: |
251 | .cycle0: |
248 | stdcall [ted_but_replace], tedit0, buf_replace, ebx, 0 |
252 | stdcall [ted_but_replace], tedit0, buf_replace, ebx, 0 |
249 | or eax,eax |
253 | or eax,eax |
250 | jz @f |
254 | jz @f |
251 | inc edx |
255 | inc edx |
252 | loop .cycle0 |
256 | loop .cycle0 |
253 | @@: |
257 | @@: |
254 | or edx,edx |
258 | or edx,edx |
255 | jz @f |
259 | jz @f |
256 | stdcall [ted_draw], tedit0 |
260 | stdcall [ted_draw], tedit0 |
257 | @@: |
261 | @@: |
258 | mov eax,edx |
262 | mov eax,edx |
259 | mov edi,msgbox_1.z |
263 | mov edi,msgbox_1.z |
260 | stdcall convert_int_to_str, 8 |
264 | stdcall convert_int_to_str, 8 |
261 | stdcall str_cat, edi,txt_Info |
265 | stdcall str_cat, edi,txt_Info |
262 | notify_window_run msgbox_1 |
266 | notify_window_run msgbox_1 |
263 | ret |
267 | ret |
264 | endp |
268 | endp |
265 | 269 | ||
266 | align 4 |
270 | align 4 |
267 | proc but_goto_line uses eax |
271 | proc but_goto_line uses eax |
268 | stdcall conv_str_to_int, buf_goto |
272 | stdcall conv_str_to_int, buf_goto |
269 | stdcall [ted_go_to_position], tedit0,eax,1 |
273 | stdcall [ted_go_to_position], tedit0,eax,1 |
270 | ret |
274 | ret |
271 | endp |
275 | endp |
272 | 276 | ||
273 | ;input: |
277 | ;input: |
274 | ; al = ª®¤ ®è¨¡ª¨ |
278 | ; al = ª®¤ ®è¨¡ª¨ |
275 | align 4 |
279 | align 4 |
276 | ted_on_init_synt_err: |
280 | ted_on_init_synt_err: |
277 | mov byte[msgbox_3.err],'0' |
281 | mov byte[msgbox_3.err],'0' |
278 | add byte[msgbox_3.err],al |
282 | add byte[msgbox_3.err],al |
279 | stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file! |
283 | stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file! |
280 | ret |
284 | ret |
281 | 285 | ||
282 | align 4 |
286 | align 4 |
283 | ted_but_new_file: |
287 | ted_but_new_file: |
284 | push eax ebx |
288 | push eax ebx |
285 | stdcall [ted_can_save], tedit0 |
289 | stdcall [ted_can_save], tedit0 |
286 | cmp al,1 |
290 | cmp al,1 |
287 | jne @f |
291 | jne @f |
288 | stdcall [mb_create],msgbox_2,thread ;message: save changes in file? |
292 | stdcall [mb_create],msgbox_2,thread ;message: save changes in file? |
289 | stdcall [mb_setfunctions],msgbox_2N_funct |
293 | stdcall [mb_setfunctions],msgbox_2N_funct |
290 | jmp .ret_f |
294 | jmp .ret_f |
291 | @@: |
295 | @@: |
292 | call On_NewFile |
296 | call On_NewFile |
293 | .ret_f: |
297 | .ret_f: |
294 | mov byte[openfile_path],0 |
298 | mov byte[openfile_path],0 |
295 | mcall SF_SET_CAPTION,1,hed |
299 | mcall SF_SET_CAPTION,1,hed |
296 | pop ebx eax |
300 | pop ebx eax |
297 | ret |
301 | ret |
298 | 302 | ||
299 | align 4 |
303 | align 4 |
300 | On_NewFile: |
304 | On_NewFile: |
301 | stdcall [ted_clear], tedit0,1 |
305 | stdcall [ted_clear], tedit0,1 |
302 | call draw_but_toolbar |
306 | call draw_but_toolbar |
303 | stdcall [ted_draw], tedit0 |
307 | stdcall [ted_draw], tedit0 |
304 | mov dword[openfile_path],0 |
308 | mov dword[openfile_path],0 |
305 | ret |
309 | ret |
306 | 310 | ||
307 | align 4 |
311 | align 4 |
308 | On_SaveAndNewFile: |
312 | On_SaveAndNewFile: |
309 | push edi |
313 | push edi |
310 | mov edi, tedit0 |
314 | mov edi, tedit0 |
311 | 315 | ||
312 | call ted_but_save_file |
316 | call ted_but_save_file |
313 | cmp ted_err_save,0 |
317 | cmp ted_err_save,0 |
314 | jne @f |
318 | jne @f |
315 | call On_NewFile |
319 | call On_NewFile |
316 | @@: |
320 | @@: |
317 | pop edi |
321 | pop edi |
318 | ret |
322 | ret |
319 | 323 | ||
320 | align 4 |
324 | align 4 |
321 | On_SaveAndOpenFile: |
325 | On_SaveAndOpenFile: |
322 | push edi |
326 | push edi |
323 | mov edi, tedit0 |
327 | mov edi, tedit0 |
324 | 328 | ||
325 | call ted_but_save_file |
329 | call ted_but_save_file |
326 | cmp ted_err_save,0 |
330 | cmp ted_err_save,0 |
327 | jne @f |
331 | jne @f |
328 | call ted_but_open_file.no_msg |
332 | call ted_but_open_file.no_msg |
329 | @@: |
333 | @@: |
330 | pop edi |
334 | pop edi |
331 | ret |
335 | ret |
332 | 336 | ||
333 | align 4 |
337 | align 4 |
334 | On_SaveAndExit: |
338 | On_SaveAndExit: |
335 | push edi |
339 | push edi |
336 | mov edi, tedit0 |
340 | mov edi, tedit0 |
337 | 341 | ||
338 | call ted_but_save_file |
342 | call ted_but_save_file |
339 | cmp ted_err_save,0 |
343 | cmp ted_err_save,0 |
340 | jne @f |
344 | jne @f |
341 | mov dword[exit_code],1 |
345 | mov dword[exit_code],1 |
342 | @@: |
346 | @@: |
343 | pop edi |
347 | pop edi |
344 | ret |
348 | ret |
345 | 349 | ||
346 | align 4 |
350 | align 4 |
347 | On_Exit: |
351 | On_Exit: |
348 | mov dword[exit_code],1 |
352 | mov dword[exit_code],1 |
349 | ret |
353 | ret |
350 | 354 | ||
351 | ;description: |
355 | ;description: |
352 | ; äãªæ¨ï ®âªàëâ¨ï ä ©« ¡¥§ ®ª á®®¡é¥¨ï |
356 | ; äãªæ¨ï ®âªàëâ¨ï ä ©« ¡¥§ ®ª á®®¡é¥¨ï |
353 | align 4 |
357 | align 4 |
354 | proc but_no_msg_OpenFile uses eax ebx esi |
358 | proc but_no_msg_OpenFile uses eax ebx esi |
355 | stdcall [ted_open_file], tedit0,run_file_70,openfile_path |
359 | stdcall [ted_open_file], tedit0,run_file_70,openfile_path |
356 | call ted_messages_after_open_file |
360 | call ted_messages_after_open_file |
357 | 361 | ||
358 | mov esi,openfile_path |
362 | mov esi,openfile_path |
359 | stdcall str_len,esi |
363 | stdcall str_len,esi |
360 | add esi,eax |
364 | add esi,eax |
361 | @@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©« |
365 | @@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©« |
362 | dec esi |
366 | dec esi |
363 | cmp byte[esi],'/' |
367 | cmp byte[esi],'/' |
364 | je @f |
368 | je @f |
365 | cmp byte[esi],0x5c ;'\' |
369 | cmp byte[esi],0x5c ;'\' |
366 | je @f |
370 | je @f |
367 | cmp esi,openfile_path |
371 | cmp esi,openfile_path |
368 | jg @b |
372 | jg @b |
369 | @@: |
373 | @@: |
370 | inc esi |
374 | inc esi |
371 | stdcall str_len,esi |
375 | stdcall str_len,esi |
372 | cmp eax,255 |
376 | cmp eax,255 |
373 | jle @f |
377 | jle @f |
374 | mov eax,255 |
378 | mov eax,255 |
375 | @@: |
379 | @@: |
376 | inc eax ;¤«ï 0 ¢ ª®æ¥ áâப¨ |
380 | inc eax ;¤«ï 0 ¢ ª®æ¥ áâப¨ |
377 | stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï |
381 | stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï |
378 | ret |
382 | ret |
379 | endp |
383 | endp |
380 | 384 | ||
381 | ;description: |
385 | ;description: |
382 | ; äãªæ¨ï ¢ë§ë¢ ¥¬ãî ¯à¨ ¦ ⨨ Ctrl+N,O,F,S,H,G |
386 | ; äãªæ¨ï ¢ë§ë¢ ¥¬ãî ¯à¨ ¦ ⨨ Ctrl+N,O,F,S,H,G |
383 | align 4 |
387 | align 4 |
384 | proc ted_but_ctrl_all uses eax, opt_key:dword |
388 | proc ted_but_ctrl_all uses eax, opt_key:dword |
385 | mov eax,[opt_key] |
389 | mov eax,[opt_key] |
386 | cmp al,'N' ;Ctrl+N |
390 | cmp al,'N' ;Ctrl+N |
387 | jne @f |
391 | jne @f |
388 | call ted_but_new_file |
392 | call ted_but_new_file |
389 | jmp .end0 |
393 | jmp .end0 |
390 | @@: |
394 | @@: |
391 | cmp al,'O' ;Ctrl+O |
395 | cmp al,'O' ;Ctrl+O |
392 | jne @f |
396 | jne @f |
393 | call ted_but_open_file |
397 | call ted_but_open_file |
394 | jmp .end0 |
398 | jmp .end0 |
395 | @@: |
399 | @@: |
396 | cmp al,'S' ;Ctrl+S |
400 | cmp al,'S' ;Ctrl+S |
397 | jne @f |
401 | jne @f |
398 | shr eax,8 |
402 | shr eax,8 |
399 | call ted_but_save_file |
403 | call ted_but_save_file |
400 | jmp .end0 |
404 | jmp .end0 |
401 | @@: |
405 | @@: |
402 | cmp al,'F' ;Ctrl+F |
406 | cmp al,'F' ;Ctrl+F |
403 | jne @f |
407 | jne @f |
404 | call but_panel_find |
408 | call but_panel_find |
405 | jmp .end0 |
409 | jmp .end0 |
406 | @@: |
410 | @@: |
407 | cmp al,'G' ;Ctrl+G |
411 | cmp al,'G' ;Ctrl+G |
408 | jne @f |
412 | jne @f |
409 | call but_panel_goto |
413 | call but_panel_goto |
410 | jmp .end0 |
414 | jmp .end0 |
411 | @@: |
415 | @@: |
412 | cmp al,'H' ;Ctrl+H |
416 | cmp al,'H' ;Ctrl+H |
413 | jne .end0 |
417 | jne .end0 |
414 | call but_panel_replace |
418 | call but_panel_replace |
415 | .end0: |
419 | .end0: |
416 | ret |
420 | ret |
417 | endp |
421 | endp |
418 | 422 | ||
419 | ;description: |
423 | ;description: |
420 | ; äãªæ¨ï ®âªàëâ¨ï ä ©« á ¢®§¬®¦ë¬ ®ª®¬ á®®¡é¥¨ï (® ¢®§¬®¦®á⨠®â¬¥¨âì ®âªàë⨥) |
424 | ; äãªæ¨ï ®âªàëâ¨ï ä ©« á ¢®§¬®¦ë¬ ®ª®¬ á®®¡é¥¨ï (® ¢®§¬®¦®á⨠®â¬¥¨âì ®âªàë⨥) |
421 | align 4 |
425 | align 4 |
422 | ted_but_open_file: |
426 | ted_but_open_file: |
423 | pushad |
427 | pushad |
424 | 428 | ||
425 | stdcall [ted_can_save], tedit0 |
429 | stdcall [ted_can_save], tedit0 |
426 | cmp al,1 |
430 | cmp al,1 |
427 | jne @f |
431 | jne @f |
428 | stdcall [mb_create],msgbox_2,thread ;message: save changes in file? |
432 | stdcall [mb_create],msgbox_2,thread ;message: save changes in file? |
429 | stdcall [mb_setfunctions],msgbox_2O_funct |
433 | stdcall [mb_setfunctions],msgbox_2O_funct |
430 | jmp .ret_f |
434 | jmp .ret_f |
431 | .no_msg: ;¬¥âª ¤«ï ¢ë§®¢ äãªæ¨¨ ç¥à¥§ ª®¯ªã ¢ á®®¡é¥¨¨ msgbox_5 |
435 | .no_msg: ;¬¥âª ¤«ï ¢ë§®¢ äãªæ¨¨ ç¥à¥§ ª®¯ªã ¢ á®®¡é¥¨¨ msgbox_5 |
432 | pushad |
436 | pushad |
433 | @@: |
437 | @@: |
434 | 438 | ||
435 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
439 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
436 | mov [OpenDialog_data.type],0 |
440 | mov [OpenDialog_data.type],0 |
437 | stdcall [OpenDialog_Start],OpenDialog_data |
441 | stdcall [OpenDialog_Start],OpenDialog_data |
438 | cmp [OpenDialog_data.status],2 |
442 | cmp [OpenDialog_data.status],2 |
439 | jne @f |
443 | jne @f |
440 | stdcall mem_spac, msgbox_9.fdp,100 |
444 | stdcall mem_spac, msgbox_9.fdp,100 |
441 | stdcall str_len,file_name |
445 | stdcall str_len,file_name |
442 | cmp eax,100 |
446 | cmp eax,100 |
443 | jle .no_crop |
447 | jle .no_crop |
444 | mov eax,100 |
448 | mov eax,100 |
445 | .no_crop: |
449 | .no_crop: |
446 | stdcall mem_cpy, msgbox_9.fdp,esi,eax |
450 | stdcall mem_cpy, msgbox_9.fdp,esi,eax |
447 | stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog' |
451 | stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog' |
448 | jmp .ret_f |
452 | jmp .ret_f |
449 | @@: |
453 | @@: |
450 | cmp [OpenDialog_data.status],1 |
454 | cmp [OpenDialog_data.status],1 |
451 | jne .ret_f |
455 | jne .ret_f |
452 | stdcall auto_open_syntax,[OpenDialog_data.openfile_path] |
456 | stdcall auto_open_syntax,[OpenDialog_data.openfile_path] |
453 | stdcall [ted_open_file], tedit0,run_file_70,openfile_path |
457 | stdcall [ted_open_file], tedit0,run_file_70,openfile_path |
454 | call ted_messages_after_open_file |
458 | call ted_messages_after_open_file |
455 | .ret_f: |
459 | .ret_f: |
456 | popad |
460 | popad |
457 | ret |
461 | ret |
458 | 462 | ||
459 | proc auto_open_syntax, of_path:dword |
463 | proc auto_open_syntax, of_path:dword |
460 | pushad |
464 | pushad |
461 | ;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªàë¢ ¥¬®£® ⥪á⮢®£® ä ©« |
465 | ;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªàë¢ ¥¬®£® ⥪á⮢®£® ä ©« |
462 | stdcall str_len,[of_path] |
466 | stdcall str_len,[of_path] |
463 | mov edx,[of_path] |
467 | mov edx,[of_path] |
464 | add edx,eax |
468 | add edx,eax |
465 | .f_beg: |
469 | .f_beg: |
466 | cmp byte[edx],'.' |
470 | cmp byte[edx],'.' |
467 | je .found |
471 | je .found |
468 | dec edx |
472 | dec edx |
469 | cmp edx,[of_path] |
473 | cmp edx,[of_path] |
470 | jg .f_beg |
474 | jg .f_beg |
471 | .found: |
475 | .found: |
472 | inc edx ;edx - 㪠§ ⥫ì à áè¨à¥¨¥ ®âªàë⮣® ä ©« |
476 | inc edx ;edx - 㪠§ ⥫ì à áè¨à¥¨¥ ®âªàë⮣® ä ©« |
473 | 477 | ||
474 | mov ebx,synt_auto_open |
478 | mov ebx,synt_auto_open |
475 | .cycle_0: |
479 | .cycle_0: |
476 | add ebx,32 |
480 | add ebx,32 |
477 | stdcall strcmp,ebx,edx ;áà ¢¨¢ ¥¬ à áè¨à¥¨¥ ®âªàë⮣® ä ©« á® § 票ﬨ ®âªàëâ묨 á ini ä ©« |
481 | stdcall strcmp,ebx,edx ;áà ¢¨¢ ¥¬ à áè¨à¥¨¥ ®âªàë⮣® ä ©« á® § 票ﬨ ®âªàëâ묨 á ini ä ©« |
478 | test eax,eax |
482 | test eax,eax |
479 | jz .ok |
483 | jz .ok |
480 | add ebx,32 |
484 | add ebx,32 |
481 | cmp byte[ebx],0 |
485 | cmp byte[ebx],0 |
482 | jne .cycle_0 |
486 | jne .cycle_0 |
483 | jmp .end_0 |
487 | jmp .end_0 |
484 | .ok: ;®âªàë⨥ ä ©« ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ©¤¥®£® à áè¨à¥¨ï |
488 | .ok: ;®âªàë⨥ ä ©« ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ©¤¥®£® à áè¨à¥¨ï |
485 | sub ebx,32 |
489 | sub ebx,32 |
486 | stdcall open_unpac_synt_file,ebx |
490 | stdcall open_unpac_synt_file,ebx |
487 | .end_0: |
491 | .end_0: |
488 | popad |
492 | popad |
489 | ret |
493 | ret |
490 | endp |
494 | endp |
491 | 495 | ||
492 | ;input: |
496 | ;input: |
493 | ; eax ¥á«¨ à ¢¥: 0 - á®åà ¥¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ¥¨¥ á ¤¨ «®£®¬ |
497 | ; eax ¥á«¨ à ¢¥: 0 - á®åà ¥¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ¥¨¥ á ¤¨ «®£®¬ |
494 | ;description: |
498 | ;description: |
495 | ; äãªæ¨ï á®åà ¥¨ï ä ©« |
499 | ; äãªæ¨ï á®åà ¥¨ï ä ©« |
496 | align 4 |
500 | align 4 |
497 | proc ted_but_save_file |
501 | proc ted_but_save_file |
498 | or eax,eax |
502 | or eax,eax |
499 | jnz .init_dlg |
503 | jnz .init_dlg |
500 | ; á®åà 塞 ¡¥§ ¢ë§®¢ ¤¨ «®£®¢®£® ®ª |
504 | ; á®åà 塞 ¡¥§ ¢ë§®¢ ¤¨ «®£®¢®£® ®ª |
501 | cmp byte[openfile_path],0 |
505 | cmp byte[openfile_path],0 |
502 | jne @f |
506 | jne @f |
503 | .init_dlg: |
507 | .init_dlg: |
504 | ; ¢ë§®¢ ¤¨ «®£®¢®£® ®ª ¤«ï á®åà ¥¨ï ä ©« |
508 | ; ¢ë§®¢ ¤¨ «®£®¢®£® ®ª ¤«ï á®åà ¥¨ï ä ©« |
505 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
509 | copy_path open_dialog_name,communication_area_default_path,file_name,0 |
506 | mov [OpenDialog_data.type],1 |
510 | mov [OpenDialog_data.type],1 |
507 | stdcall [OpenDialog_Start],OpenDialog_data |
511 | stdcall [OpenDialog_Start],OpenDialog_data |
508 | cmp [OpenDialog_data.status],1 ;if status==1 then save |
512 | cmp [OpenDialog_data.status],1 ;if status==1 then save |
509 | jne .end_save |
513 | jne .end_save |
510 | @@: |
514 | @@: |
511 | stdcall [ted_save_file],tedit0,run_file_70,openfile_path |
515 | stdcall [ted_save_file],tedit0,run_file_70,openfile_path |
512 | .end_save: |
516 | .end_save: |
513 | ret |
517 | ret |
514 | endp |
518 | endp |
515 | 519 | ||
516 | ;description: |
520 | ;description: |
517 | ; ª®¯¨à®¢ ¨¥ ¯ ¬ï⨠|
521 | ; ª®¯¨à®¢ ¨¥ ¯ ¬ï⨠|
518 | align 4 |
522 | align 4 |
519 | proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword |
523 | proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword |
520 | cld |
524 | cld |
521 | mov esi,[source] |
525 | mov esi,[source] |
522 | mov edi,[destination] |
526 | mov edi,[destination] |
523 | mov ecx,[len] |
527 | mov ecx,[len] |
524 | rep movsb |
528 | rep movsb |
525 | ret |
529 | ret |
526 | endp |
530 | endp |
527 | 531 | ||
528 | ;description: |
532 | ;description: |
529 | ; § ¯®«¥¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨ |
533 | ; § ¯®«¥¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨ |
530 | align 4 |
534 | align 4 |
531 | proc mem_spac uses eax ecx edi, mem:dword, len:dword |
535 | proc mem_spac uses eax ecx edi, mem:dword, len:dword |
532 | cld |
536 | cld |
533 | mov al,' ' |
537 | mov al,' ' |
534 | mov edi,[mem] |
538 | mov edi,[mem] |
535 | mov ecx,[len] |
539 | mov ecx,[len] |
536 | repne stosb |
540 | repne stosb |
537 | ret |
541 | ret |
538 | endp |
542 | endp |
539 | 543 | ||
540 | ;input: |
544 | ;input: |
541 | ; eax = ª®¤ ®è¨¡ª¨ |
545 | ; eax = ª®¤ ®è¨¡ª¨ |
542 | ; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ëå ¡ ©â |
546 | ; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ëå ¡ ©â |
543 | align 4 |
547 | align 4 |
544 | ted_messages_after_open_file: |
548 | ted_messages_after_open_file: |
545 | push ecx edi |
549 | push ecx edi |
546 | or eax,eax |
550 | or eax,eax |
547 | jz @f |
551 | jz @f |
548 | cmp ax,10 |
552 | cmp ax,10 |
549 | jl .zifra_0_9 |
553 | jl .zifra_0_9 |
550 | mov al,'?' |
554 | mov al,'?' |
551 | sub ax,48 |
555 | sub ax,48 |
552 | .zifra_0_9: |
556 | .zifra_0_9: |
553 | add ax,48 |
557 | add ax,48 |
554 | 558 | ||
555 | mov byte[msgbox_4.err],al |
559 | mov byte[msgbox_4.err],al |
556 | stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file! |
560 | stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file! |
557 | @@: |
561 | @@: |
558 | pop edi ecx |
562 | pop edi ecx |
559 | ret |
563 | ret |
560 | 564 | ||
561 | align 4 |
565 | align 4 |
562 | ted_save_err_msg: |
566 | ted_save_err_msg: |
563 | mov byte[msgbox_6.err],al |
567 | mov byte[msgbox_6.err],al |
564 | stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file! |
568 | stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file! |
565 | ret |
569 | ret |
566 | 570 | ||
567 | ;description: |
571 | ;description: |
568 | ; äãªæ¨ï ¦ â¨ï ª®¯ªã [ਬ¥¨âì] ¢ ¯ ¥«¨ á¨â ªá¨á |
572 | ; äãªæ¨ï ¦ â¨ï ª®¯ªã [ਬ¥¨âì] ¢ ¯ ¥«¨ á¨â ªá¨á |
569 | align 4 |
573 | align 4 |
570 | proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword |
574 | proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword |
571 | mov edi,[edit] |
575 | mov edi,[edit] |
572 | cmp ted_panel_id,TED_PANEL_SYNTAX |
576 | cmp ted_panel_id,TED_PANEL_SYNTAX |
573 | jne @f |
577 | jne @f |
574 | stdcall [tl_node_get_data], tree1 |
578 | stdcall [tl_node_get_data], tree1 |
575 | mov [fn_col_option],eax |
579 | mov [fn_col_option],eax |
576 | stdcall open_unpac_synt_file,eax |
580 | stdcall open_unpac_synt_file,eax |
577 | cmp ebx,-1 |
581 | cmp ebx,-1 |
578 | je @f |
582 | je @f |
579 | 583 | ||
580 | call [ted_text_colored] |
584 | call [ted_text_colored] |
581 | stdcall [ted_draw],edi |
585 | stdcall [ted_draw],edi |
582 | @@: |
586 | @@: |
583 | ret |
587 | ret |
584 | endp |
588 | endp |
585 | 589 | ||
586 | ;®âªàë⨥ ¨ à ᯠª®¢ª ä ©« ¯®¤á¢¥âª¨ á¨â ªá¨á |
590 | ;®âªàë⨥ ¨ à ᯠª®¢ª ä ©« ¯®¤á¢¥âª¨ á¨â ªá¨á |
587 | ;input: |
591 | ;input: |
588 | ; f_name - 㪠§ â¥«ì ¨¬ï ®âªàë¢ ¥¬®£® ä ©« á¨â ªá¨á (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info) |
592 | ; f_name - 㪠§ â¥«ì ¨¬ï ®âªàë¢ ¥¬®£® ä ©« á¨â ªá¨á (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info) |
589 | ;output: |
593 | ;output: |
590 | ; ebx - ç¨á«® ¯à®ç¨â ëå ¡ ©â ¨§ ä ©« |
594 | ; ebx - ç¨á«® ¯à®ç¨â ëå ¡ ©â ¨§ ä ©« |
591 | ; ecx - à §àãè ¥âáï |
595 | ; ecx - à §àãè ¥âáï |
592 | align 4 |
596 | align 4 |
593 | proc open_unpac_synt_file uses eax edi esi, f_name:dword |
597 | proc open_unpac_synt_file uses eax edi esi, f_name:dword |
594 | mov ebx,[f_name] |
598 | mov ebx,[f_name] |
595 | cmp byte[ebx],0 |
599 | cmp byte[ebx],0 |
596 | je @f |
600 | je @f |
597 | mov edi,last_open_synt_file |
601 | mov edi,last_open_synt_file |
598 | stdcall strcmp,ebx,edi ;áà ¢¨¢ ¥¬ ¨¬ï ¯®¤ª«î祮£® ä ©« á ¯®¤ª«îç¥ë¬ à ¥¥ ä ©«®¬ |
602 | stdcall strcmp,ebx,edi ;áà ¢¨¢ ¥¬ ¨¬ï ¯®¤ª«î祮£® ä ©« á ¯®¤ª«îç¥ë¬ à ¥¥ ä ©«®¬ |
599 | test eax,eax |
603 | test eax,eax |
600 | jz @f |
604 | jz @f |
601 | 605 | ||
602 | ;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祮£® ä ©« (¤«ï ¨§¡¥¦ ¨ï ¯®¢â®àëå ¯®¤ª«î票©) |
606 | ;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祮£® ä ©« (¤«ï ¨§¡¥¦ ¨ï ¯®¢â®àëå ¯®¤ª«î票©) |
603 | mov esi,ebx |
607 | mov esi,ebx |
604 | mov ecx,32/4 |
608 | mov ecx,32/4 |
605 | cld |
609 | cld |
606 | rep movsd |
610 | rep movsd |
607 | 611 | ||
608 | copy_path ebx,fn_syntax_dir,syntax_path,0 |
612 | copy_path ebx,fn_syntax_dir,syntax_path,0 |
609 | copy_path syntax_path,sys_path,file_name,0 |
613 | copy_path syntax_path,sys_path,file_name,0 |
610 | mov edi, tedit0 |
614 | mov edi, tedit0 |
611 | mov [run_file_70.Function], SSF_READ_FILE |
615 | mov [run_file_70.Function], SSF_READ_FILE |
612 | mov [run_file_70.Position], 0 |
616 | mov [run_file_70.Position], 0 |
613 | mov [run_file_70.Flags], 0 |
617 | mov [run_file_70.Flags], 0 |
614 | mov ecx, ted_syntax_file_size |
618 | mov ecx, ted_syntax_file_size |
615 | mov dword[run_file_70.Count], ecx |
619 | mov dword[run_file_70.Count], ecx |
616 | m2m dword[run_file_70.Buffer], ted_syntax_file |
620 | m2m dword[run_file_70.Buffer], ted_syntax_file |
617 | mov byte[run_file_70+20], 0 |
621 | mov byte[run_file_70+20], 0 |
618 | mov [run_file_70.FileName], file_name |
622 | mov [run_file_70.FileName], file_name |
619 | mcall SF_FILE, run_file_70 |
623 | mcall SF_FILE, run_file_70 |
620 | cmp ebx,-1 |
624 | cmp ebx,-1 |
621 | jne .end_0 |
625 | jne .end_0 |
622 | call ted_on_init_synt_err |
626 | call ted_on_init_synt_err |
623 | jmp @f |
627 | jmp @f |
624 | .end_0: |
628 | .end_0: |
625 | mov eax,ted_syntax_file |
629 | mov eax,ted_syntax_file |
626 | cmp dword[eax],'KPCK' |
630 | cmp dword[eax],'KPCK' |
627 | jne .end_unpack |
631 | jne .end_unpack |
628 | cmp dword[eax+4],ecx |
632 | cmp dword[eax+4],ecx |
629 | jg @f ;¥á«¨ ¤«ï à ᯠª®¢ ®£® ä ©« ¥ å¢ â ¥â ¢ë¤¥«¥®© ¯ ¬ï⨠|
633 | jg @f ;¥á«¨ ¤«ï à ᯠª®¢ ®£® ä ©« ¥ å¢ â ¥â ¢ë¤¥«¥®© ¯ ¬ï⨠|
630 | cmp dword[unpac_mem],0 |
634 | cmp dword[unpac_mem],0 |
631 | jne .end_1 |
635 | jne .end_1 |
632 | ;¢ë¤¥«¥¨¥ ¯ ¬ï⨠¤«ï à ᯠª®¢ª¨ ä ©« |
636 | ;¢ë¤¥«¥¨¥ ¯ ¬ï⨠¤«ï à ᯠª®¢ª¨ ä ©« |
633 | stdcall mem.Alloc,ecx |
637 | stdcall mem.Alloc,ecx |
634 | mov [unpac_mem],eax |
638 | mov [unpac_mem],eax |
635 | .end_1: |
639 | .end_1: |
636 | stdcall unpack,ted_syntax_file,[unpac_mem] |
640 | stdcall unpack,ted_syntax_file,[unpac_mem] |
637 | mov edi,ted_syntax_file |
641 | mov edi,ted_syntax_file |
638 | mov esi,[unpac_mem] |
642 | mov esi,[unpac_mem] |
639 | mov ecx,[edi+4] |
643 | mov ecx,[edi+4] |
640 | cld |
644 | cld |
641 | rep movsb |
645 | rep movsb |
642 | .end_unpack: |
646 | .end_unpack: |
643 | stdcall [ted_init_syntax_file], tedit0 |
647 | stdcall [ted_init_syntax_file], tedit0 |
644 | @@: |
648 | @@: |
645 | ret |
649 | ret |
646 | endp |
650 | endp |
647 | 651 | ||
648 | ;description: |
652 | ;description: |
649 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ ¯®¨áª |
653 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ ¯®¨áª |
650 | align 4 |
654 | align 4 |
651 | proc but_panel_find |
655 | proc but_panel_find |
652 | stdcall on_panel_change, tedit0,TED_PANEL_FIND |
656 | stdcall on_panel_change, tedit0,TED_PANEL_FIND |
653 | ;or word[edit_find.flags],ed_focus |
657 | ;or word[edit_find.flags],ed_focus |
654 | ret |
658 | ret |
655 | endp |
659 | endp |
656 | 660 | ||
657 | ;description: |
661 | ;description: |
658 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ ¯¥à¥å®¤ |
662 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ ¯¥à¥å®¤ |
659 | align 4 |
663 | align 4 |
660 | proc but_panel_goto |
664 | proc but_panel_goto |
661 | stdcall on_panel_change, tedit0,TED_PANEL_GOTO |
665 | stdcall on_panel_change, tedit0,TED_PANEL_GOTO |
662 | ;or word[edit_goto.flags],ed_focus |
666 | ;or word[edit_goto.flags],ed_focus |
663 | ret |
667 | ret |
664 | endp |
668 | endp |
665 | 669 | ||
666 | ;description: |
670 | ;description: |
667 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ § ¬¥ë |
671 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ § ¬¥ë |
668 | align 4 |
672 | align 4 |
669 | proc but_panel_replace |
673 | proc but_panel_replace |
670 | stdcall on_panel_change, tedit0,TED_PANEL_REPLACE |
674 | stdcall on_panel_change, tedit0,TED_PANEL_REPLACE |
671 | ;or word[edit_find.flags],ed_focus |
675 | ;or word[edit_find.flags],ed_focus |
672 | ret |
676 | ret |
673 | endp |
677 | endp |
674 | 678 | ||
675 | ;description: |
679 | ;description: |
676 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ á ä ©« ¬¨ á¨â ªá¨á |
680 | ; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ á ä ©« ¬¨ á¨â ªá¨á |
677 | align 4 |
681 | align 4 |
678 | proc but_panel_choose_syntax |
682 | proc but_panel_choose_syntax |
679 | stdcall on_panel_change, tedit0,TED_PANEL_SYNTAX |
683 | stdcall on_panel_change, tedit0,TED_PANEL_SYNTAX |
680 | ret |
684 | ret |
681 | endp |
685 | endp |
682 | 686 | ||
683 | align 4 |
687 | align 4 |
684 | proc on_panel_change uses eax edi, edit:dword, new_id:dword |
688 | proc on_panel_change uses eax edi, edit:dword, new_id:dword |
685 | mov edi,[edit] |
689 | mov edi,[edit] |
686 | mov eax,[new_id] |
690 | mov eax,[new_id] |
687 | 691 | ||
688 | ;if(panel_id==new_id) panel_id=0, draw all |
692 | ;if(panel_id==new_id) panel_id=0, draw all |
689 | cmp ted_panel_id,al |
693 | cmp ted_panel_id,al |
690 | jne @f |
694 | jne @f |
691 | mov ted_panel_id,TED_PANEL_NULL |
695 | mov ted_panel_id,TED_PANEL_NULL |
692 | mov ted_wnd_l,0 |
696 | mov ted_wnd_l,0 |
693 | jmp .e_if |
697 | jmp .e_if |
694 | @@: |
698 | @@: |
695 | ;elseif(panel_id==0) panel_id=new_id, draw all |
699 | ;elseif(panel_id==0) panel_id=new_id, draw all |
696 | cmp ted_panel_id,TED_PANEL_NULL |
700 | cmp ted_panel_id,TED_PANEL_NULL |
697 | jne @f |
701 | jne @f |
698 | mov ted_panel_id,al |
702 | mov ted_panel_id,al |
699 | mov ted_wnd_l,TED_PANEL_WIDTH |
703 | mov ted_wnd_l,TED_PANEL_WIDTH |
700 | .e_if: |
704 | .e_if: |
701 | call EvSize |
705 | call EvSize |
702 | stdcall [ted_draw],edi |
706 | stdcall [ted_draw],edi |
703 | jmp .end0 |
707 | jmp .end0 |
704 | ;else panel_id=new_id, draw panel |
708 | ;else panel_id=new_id, draw panel |
705 | @@: |
709 | @@: |
706 | mov ted_panel_id,al |
710 | mov ted_panel_id,al |
707 | stdcall draw_panels,edi |
711 | stdcall draw_panels,edi |
708 | .end0: |
712 | .end0: |
709 | ret |
713 | ret |
710 | endp |
714 | endp |
711 | 715 | ||
712 | align 4 |
716 | align 4 |
713 | tbl_1251_866: |
717 | tbl_1251_866: |
714 | rb 128 |
718 | rb 128 |
715 | db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;128 |
719 | db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;128 |
716 | db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;144 |
720 | db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;144 |
717 | db 0, 0, 0, 0, 0, 0, 0, 0,240,0,0,0,0,0,0,0 ;160 |
721 | db 0, 0, 0, 0, 0, 0, 0, 0,240,0,0,0,0,0,0,0 ;160 |
718 | db 0, 0, 0, 0, 0, 0, 0, 0,241,0,0,0,0,0,0,0 ;176 |
722 | db 0, 0, 0, 0, 0, 0, 0, 0,241,0,0,0,0,0,0,0 ;176 |
719 | db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192 |
723 | db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192 |
720 | db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208 |
724 | db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208 |
721 | db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224 |
725 | db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224 |
722 | db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240 |
726 | db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240 |
723 | 727 | ||
724 | align 4 |
728 | align 4 |
725 | tbl_866_1251: |
729 | tbl_866_1251: |
726 | rb 128 |
730 | rb 128 |
727 | db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128 |
731 | db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128 |
728 | db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144 |
732 | db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144 |
729 | db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160 |
733 | db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160 |
730 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176 |
734 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176 |
731 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192 |
735 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192 |
732 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208 |
736 | db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208 |
733 | db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224 |
737 | db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224 |
734 | db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240 |
738 | db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240 |
735 | 739 | ||
736 | align 4 |
740 | align 4 |
737 | ted_on_find_err: |
741 | ted_on_find_err: |
738 | notify_window_run msgbox_7 ;message: Can not find text |
742 | notify_window_run msgbox_7 ;message: Can not find text |
739 | ret |
743 | ret |
740 | 744 | ||
741 | ;description: |
745 | ;description: |
742 | ; äãªæ¨ï ¯®¨áª ¨ä®à¬ 樨 ¢ ᯨ᪥ ª«î祢ëå á«®¢ |
746 | ; äãªæ¨ï ¯®¨áª ¨ä®à¬ 樨 ¢ ᯨ᪥ ª«î祢ëå á«®¢ |
743 | align 4 |
747 | align 4 |
744 | but_find_key_w: |
748 | but_find_key_w: |
745 | cmp dword[wnd_k_words_run],0 |
749 | cmp dword[wnd_k_words_run],0 |
746 | jne @f |
750 | jne @f |
747 | pushad |
751 | pushad |
748 | mcall SF_CREATE_THREAD,1,prop_start,thread_coords |
752 | mcall SF_CREATE_THREAD,1,prop_start,thread_coords |
749 | mov [wnd_k_words_run],eax |
753 | mov [wnd_k_words_run],eax |
750 | popad |
754 | popad |
751 | @@: |
755 | @@: |
752 | ret |
756 | ret |
753 | 757 | ||
754 | ;description: |
758 | ;description: |
755 | ; ¢ë¤¥«¥¨¥/áªàë⨥ ¥¯¥ç â ¥¬ëå ᨬ¢®«®¢ |
759 | ; ¢ë¤¥«¥¨¥/áªàë⨥ ¥¯¥ç â ¥¬ëå ᨬ¢®«®¢ |
756 | align 4 |
760 | align 4 |
757 | proc but_sumb_invis uses edi, edit:dword |
761 | proc but_sumb_invis uses edi, edit:dword |
758 | mov edi,[edit] |
762 | mov edi,[edit] |
759 | 763 | ||
760 | xor ted_mode_invis,1 |
764 | xor ted_mode_invis,1 |
761 | call draw_but_toolbar |
765 | call draw_but_toolbar |
762 | stdcall [ted_draw],edi |
766 | stdcall [ted_draw],edi |
763 | ret |
767 | ret |
764 | endp |
768 | endp |
765 | 769 | ||
766 | ;description: |
770 | ;description: |
767 | ; ¢ë¤¥«¥¨¥/áªàë⨥ ª«î祢ëå á«®¢ |
771 | ; ¢ë¤¥«¥¨¥/áªàë⨥ ª«î祢ëå á«®¢ |
768 | align 4 |
772 | align 4 |
769 | proc but_use_syntax uses edi, edit:dword |
773 | proc but_use_syntax uses edi, edit:dword |
770 | mov edi,[edit] |
774 | mov edi,[edit] |
771 | 775 | ||
772 | xor ted_mode_color,1 |
776 | xor ted_mode_color,1 |
773 | cmp ted_mode_color,0 |
777 | cmp ted_mode_color,0 |
774 | je @f |
778 | je @f |
775 | call [ted_text_colored] |
779 | call [ted_text_colored] |
776 | @@: |
780 | @@: |
777 | call draw_but_toolbar |
781 | call draw_but_toolbar |
778 | stdcall [ted_draw],edi |
782 | stdcall [ted_draw],edi |
779 | ret |
783 | ret |
780 | endp |
784 | endp |