Subversion Repositories Kolibri OS

Rev

Rev 7576 | Rev 7579 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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