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