Subversion Repositories Kolibri OS

Rev

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

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