Subversion Repositories Kolibri OS

Rev

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

Rev 6239 Rev 7035
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
bmp_icon dd 0
10
bmp_icon dd 0
11
 
11
 
12
 
12
 
13
;input:
13
;input:
14
; al = ª®¤ ®è¨¡ª¨
14
; al = ª®¤ ®è¨¡ª¨
15
align 4
15
align 4
16
ted_on_init_synt_err:
16
ted_on_init_synt_err:
17
	mov byte[msgbox_3.err],'0'
17
	mov byte[msgbox_3.err],'0'
18
	add byte[msgbox_3.err],al
18
	add byte[msgbox_3.err],al
19
	stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
19
	stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
20
	ret
20
	ret
21
 
21
 
22
 
22
 
23
align 4
23
align 4
24
ted_but_new_file:
24
ted_but_new_file:
25
	push eax ebx
25
	push eax ebx
26
	stdcall [ted_can_save], tedit0
26
	stdcall [ted_can_save], tedit0
27
	cmp al,1
27
	cmp al,1
28
	jne @f
28
	jne @f
29
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
29
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
30
		stdcall [mb_setfunctions],msgbox_2N_funct
30
		stdcall [mb_setfunctions],msgbox_2N_funct
31
		jmp .ret_f
31
		jmp .ret_f
32
	@@:
32
	@@:
33
	call On_NewFile
33
	call On_NewFile
34
	.ret_f:
34
	.ret_f:
35
		mov byte[openfile_path],0
35
		mov byte[openfile_path],0
36
		mcall SF_SET_CAPTION,1,hed
36
		mcall SF_SET_CAPTION,1,hed
37
	pop ebx eax
37
	pop ebx eax
38
	ret
38
	ret
39
 
39
 
40
align 4
40
align 4
41
On_NewFile:
41
On_NewFile:
42
	stdcall [ted_clear], tedit0,1
42
	stdcall [ted_clear], tedit0,1
43
	call draw_but_toolbar
43
	call draw_but_toolbar
44
	stdcall [ted_draw], tedit0
44
	stdcall [ted_draw], tedit0
45
	ret
45
	ret
46
 
46
 
47
align 4
47
align 4
48
On_SaveAndNewFile:
48
On_SaveAndNewFile:
49
	push edi
49
	push edi
50
	mov edi, tedit0
50
	mov edi, tedit0
51
 
51
 
52
	call ted_but_save_file
52
	call ted_but_save_file
53
	cmp ted_err_save,0
53
	cmp ted_err_save,0
54
	jne @f
54
	jne @f
55
		call On_NewFile
55
		call On_NewFile
56
	@@:
56
	@@:
57
	pop edi
57
	pop edi
58
	ret
58
	ret
59
 
59
 
60
align 4
60
align 4
61
On_SaveAndOpenFile:
61
On_SaveAndOpenFile:
62
	push edi
62
	push edi
63
	mov edi, tedit0
63
	mov edi, tedit0
64
 
64
 
65
	call ted_but_save_file
65
	call ted_but_save_file
66
	cmp ted_err_save,0
66
	cmp ted_err_save,0
67
	jne @f
67
	jne @f
68
		call ted_but_open_file.no_msg
68
		call ted_but_open_file.no_msg
69
	@@:
69
	@@:
70
	pop edi
70
	pop edi
71
	ret
71
	ret
72
 
72
 
73
align 4
73
align 4
74
On_SaveAndExit:
74
On_SaveAndExit:
75
	push edi
75
	push edi
76
	mov edi, tedit0
76
	mov edi, tedit0
77
 
77
 
78
	call ted_but_save_file
78
	call ted_but_save_file
79
	cmp ted_err_save,0
79
	cmp ted_err_save,0
80
	jne @f
80
	jne @f
81
		mov dword[exit_code],1
81
		mov dword[exit_code],1
82
	@@:
82
	@@:
83
	pop edi
83
	pop edi
84
	ret
84
	ret
85
 
85
 
86
align 4
86
align 4
87
On_Exit:
87
On_Exit:
88
	mov dword[exit_code],1
88
	mov dword[exit_code],1
89
	ret
89
	ret
90
 
90
 
91
;description:
91
;description:
92
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
92
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
93
align 4
93
align 4
94
but_no_msg_OpenFile:
94
but_no_msg_OpenFile:
95
	push eax ebx
95
	push eax ebx
96
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
96
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
97
	call ted_messages_after_open_file
97
	call ted_messages_after_open_file
98
	pop ebx eax
98
	pop ebx eax
99
	ret
99
	ret
100
 
100
 
101
;description:
101
;description:
102
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
102
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
103
align 4
103
align 4
104
ted_but_open_file:
104
ted_but_open_file:
105
	pushad
105
	pushad
106
 
106
 
107
	stdcall [ted_can_save], tedit0
107
	stdcall [ted_can_save], tedit0
108
	cmp al,1
108
	cmp al,1
109
	jne @f
109
	jne @f
110
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
110
		stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
111
		stdcall [mb_setfunctions],msgbox_2O_funct
111
		stdcall [mb_setfunctions],msgbox_2O_funct
112
		jmp .ret_f
112
		jmp .ret_f
113
	.no_msg: ;¬¥âª  ¤«ï ¢ë§®¢  ä㭪樨 ç¥à¥§ ª­®¯ªã ¢ á®®¡é¥­¨¨ msgbox_5
113
	.no_msg: ;¬¥âª  ¤«ï ¢ë§®¢  ä㭪樨 ç¥à¥§ ª­®¯ªã ¢ á®®¡é¥­¨¨ msgbox_5
114
		pushad
114
		pushad
115
	@@:
115
	@@:
116
 
116
 
117
	copy_path open_dialog_name,communication_area_default_path,file_name,0
117
	copy_path open_dialog_name,communication_area_default_path,file_name,0
118
	mov [OpenDialog_data.type],0
118
	mov [OpenDialog_data.type],0
119
	stdcall [OpenDialog_Start],OpenDialog_data
119
	stdcall [OpenDialog_Start],OpenDialog_data
120
	cmp [OpenDialog_data.status],2
120
	cmp [OpenDialog_data.status],2
121
	jne @f
121
	jne @f
122
		stdcall mem_spac, msgbox_9.fdp,100
122
		stdcall mem_spac, msgbox_9.fdp,100
123
		mov esi,file_name
123
		mov esi,file_name
124
		call strlen
124
		call strlen
125
		cmp eax,100
125
		cmp eax,100
126
		jle .no_crop
126
		jle .no_crop
127
			mov eax,100
127
			mov eax,100
128
		.no_crop:
128
		.no_crop:
129
		stdcall mem_copy, esi,msgbox_9.fdp,eax
129
		stdcall mem_copy, esi,msgbox_9.fdp,eax
130
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
130
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
131
		jmp .ret_f
131
		jmp .ret_f
132
	@@:
132
	@@:
133
	cmp [OpenDialog_data.status],1
133
	cmp [OpenDialog_data.status],1
134
	jne .ret_f
134
	jne .ret_f
135
		stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
135
		stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
136
		stdcall [ted_open_file], tedit0,run_file_70,openfile_path
136
		stdcall [ted_open_file], tedit0,run_file_70,openfile_path
137
		call ted_messages_after_open_file
137
		call ted_messages_after_open_file
138
	.ret_f:
138
	.ret_f:
139
	popad
139
	popad
140
	ret
140
	ret
141
 
141
 
142
proc auto_open_syntax, of_path:dword
142
proc auto_open_syntax, of_path:dword
143
pushad
143
pushad
144
	;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
144
	;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
145
	mov esi,[of_path]
145
	mov esi,[of_path]
146
	call strlen
146
	call strlen
147
	mov edx,[of_path]
147
	mov edx,[of_path]
148
	add edx,eax
148
	add edx,eax
149
	.f_beg:
149
	.f_beg:
150
	cmp byte[edx],'.'
150
	cmp byte[edx],'.'
151
	je .found
151
	je .found
152
		dec edx
152
		dec edx
153
		cmp edx,[of_path]
153
		cmp edx,[of_path]
154
		jg .f_beg
154
		jg .f_beg
155
	.found:
155
	.found:
156
	inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
156
	inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
157
 
157
 
158
	mov ebx,synt_auto_open
158
	mov ebx,synt_auto_open
159
	.cycle_0:
159
	.cycle_0:
160
		add ebx,32
160
		add ebx,32
161
		stdcall strcmp,ebx,edx ;áà ¢­¨¢ ¥¬ à áè¨à¥­¨¥ ®âªàë⮣® ä ©«  á® §­ ç¥­¨ï¬¨ ®âªàëâ묨 á ini ä ©« 
161
		stdcall strcmp,ebx,edx ;áà ¢­¨¢ ¥¬ à áè¨à¥­¨¥ ®âªàë⮣® ä ©«  á® §­ ç¥­¨ï¬¨ ®âªàëâ묨 á ini ä ©« 
162
		test eax,eax
162
		test eax,eax
163
		jz .ok
163
		jz .ok
164
		add ebx,32
164
		add ebx,32
165
		cmp byte[ebx],0
165
		cmp byte[ebx],0
166
		jne .cycle_0
166
		jne .cycle_0
167
	jmp .end_0
167
	jmp .end_0
168
	.ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
168
	.ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
169
		sub ebx,32
169
		sub ebx,32
170
		stdcall open_unpac_synt_file,ebx
170
		stdcall open_unpac_synt_file,ebx
171
	.end_0:
171
	.end_0:
172
popad
172
popad
173
	ret
173
	ret
174
endp
174
endp
175
 
175
 
176
;description:
176
;description:
177
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
177
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
178
align 4
178
align 4
179
proc ted_but_save_file
179
proc ted_but_save_file
180
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
180
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
181
	copy_path open_dialog_name,communication_area_default_path,file_name,0
181
	copy_path open_dialog_name,communication_area_default_path,file_name,0
182
	mov [OpenDialog_data.type],1
182
	mov [OpenDialog_data.type],1
183
	stdcall [OpenDialog_Start],OpenDialog_data
183
	stdcall [OpenDialog_Start],OpenDialog_data
184
	cmp [OpenDialog_data.status],1 ;if status==1 then save
184
	cmp [OpenDialog_data.status],1 ;if status==1 then save
185
	jne .end_save_file
185
	jne .end_save_file
186
		stdcall [ted_save_file],tedit0,run_file_70,openfile_path
186
		stdcall [ted_save_file],tedit0,run_file_70,openfile_path
187
	.end_save_file:
187
	.end_save_file:
188
	ret
188
	ret
189
endp
189
endp
190
 
190
 
191
;description:
191
;description:
192
; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
192
; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
193
align 4
193
align 4
194
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
194
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
195
	cld
195
	cld
196
	mov esi, dword[source]
196
	mov esi, dword[source]
197
	mov edi, dword[destination]
197
	mov edi, dword[destination]
198
	mov ecx, dword[len]
198
	mov ecx, dword[len]
199
	rep movsb
199
	rep movsb
200
	ret
200
	ret
201
endp
201
endp
202
 
202
 
203
;description:
203
;description:
204
; § ¯®«­¥­¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨
204
; § ¯®«­¥­¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨
205
align 4
205
align 4
206
proc mem_spac uses eax ecx edi, mem:dword, len:dword
206
proc mem_spac uses eax ecx edi, mem:dword, len:dword
207
	cld
207
	cld
208
	mov al,' '
208
	mov al,' '
209
	mov edi, dword[mem]
209
	mov edi, dword[mem]
210
	mov ecx, dword[len]
210
	mov ecx, dword[len]
211
	repne stosb
211
	repne stosb
212
	ret
212
	ret
213
endp
213
endp
214
 
214
 
215
;input:
215
;input:
216
; eax = ª®¤ ®è¨¡ª¨
216
; eax = ª®¤ ®è¨¡ª¨
217
; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
217
; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
218
align 4
218
align 4
219
ted_messages_after_open_file:
219
ted_messages_after_open_file:
220
	push ecx edi
220
	push ecx edi
221
	cmp eax,0
221
	cmp eax,0
222
	je @f
222
	je @f
223
	cmp eax,6
223
	cmp eax,6
224
	je @f
224
	je @f
225
		cmp ax,10
225
		cmp ax,10
226
		jl .zifra_0_9
226
		jl .zifra_0_9
227
			mov al,'?'
227
			mov al,'?'
228
			sub ax,48
228
			sub ax,48
229
		.zifra_0_9:
229
		.zifra_0_9:
230
		add ax,48
230
		add ax,48
231
 
231
 
232
		mov byte[msgbox_4.err],al
232
		mov byte[msgbox_4.err],al
233
		stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
233
		stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
234
		jmp .ret_f
234
		jmp .ret_f
235
	@@:
235
	@@:
236
	cmp ebx,-1
236
	cmp ebx,-1
237
	je .ret_f
237
	je .ret_f
238
		;if open file
238
		;if open file
239
		mov edi,tedit0
239
		mov edi,tedit0
240
		mov ecx,ted_max_chars
240
		mov ecx,ted_max_chars
241
		sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
241
		sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
242
		cmp ebx,ecx
242
		cmp ebx,ecx
243
		jl .ret_f
243
		jl .ret_f
244
			stdcall [mb_create],msgbox_1,thread
244
			stdcall [mb_create],msgbox_1,thread
245
	.ret_f:
245
	.ret_f:
246
	pop edi ecx
246
	pop edi ecx
247
	ret
247
	ret
248
 
248
 
249
align 4
249
align 4
250
ted_save_err_msg:
250
ted_save_err_msg:
251
	mov byte[msgbox_6.err],al
251
	mov byte[msgbox_6.err],al
252
	stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
252
	stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
253
	ret
253
	ret
254
 
254
 
255
;description:
255
;description:
256
; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
256
; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
257
align 4
257
align 4
258
proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
258
proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
259
	mov edi,dword[edit]
259
	mov edi,dword[edit]
260
	cmp ted_panel_id,TED_PANEL_SYNTAX
260
	cmp ted_panel_id,TED_PANEL_SYNTAX
261
	jne @f
261
	jne @f
262
		stdcall dword[tl_node_get_data], tree1
262
		stdcall dword[tl_node_get_data], tree1
263
		mov [fn_col_option],eax
263
		mov [fn_col_option],eax
264
		stdcall open_unpac_synt_file,eax
264
		stdcall open_unpac_synt_file,eax
265
		cmp ebx,-1
265
		cmp ebx,-1
266
		je @f
266
		je @f
267
 
267
 
268
		call [ted_text_colored]
268
		call [ted_text_colored]
269
		stdcall [ted_draw],edi
269
		stdcall [ted_draw],edi
270
	@@:
270
	@@:
271
	ret
271
	ret
272
endp
272
endp
273
 
273
 
274
;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
274
;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
275
;input:
275
;input:
276
; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
276
; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
277
;output:
277
;output:
278
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
278
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
279
; ecx - à §àãè ¥âáï
279
; ecx - à §àãè ¥âáï
280
align 4
280
align 4
281
proc open_unpac_synt_file uses eax edi esi, f_name:dword
281
proc open_unpac_synt_file uses eax edi esi, f_name:dword
282
	mov ebx,[f_name]
282
	mov ebx,[f_name]
283
	mov edi,last_open_synt_file
283
	mov edi,last_open_synt_file
284
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
284
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
285
	test eax,eax
285
	test eax,eax
286
	jz @f
286
	jz @f
287
 
287
 
288
	;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
288
	;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
289
	mov esi,ebx
289
	mov esi,ebx
290
	mov ecx,32/4
290
	mov ecx,32/4
291
	cld
291
	cld
292
	rep movsd
292
	rep movsd
293
 
293
 
294
	copy_path ebx,fn_syntax_dir,syntax_path,0
294
	copy_path ebx,fn_syntax_dir,syntax_path,0
295
	copy_path syntax_path,sys_path,file_name,0
295
	copy_path syntax_path,sys_path,file_name,0
296
	mov edi, tedit0
296
	mov edi, tedit0
297
	mov [run_file_70.Function], SSF_READ_FILE
297
	mov [run_file_70.Function], SSF_READ_FILE
298
	mov [run_file_70.Position], 0
298
	mov [run_file_70.Position], 0
299
	mov [run_file_70.Flags], 0
299
	mov [run_file_70.Flags], 0
300
	mov ecx, ted_syntax_file_size
300
	mov ecx, ted_syntax_file_size
301
	mov dword[run_file_70.Count], ecx
301
	mov dword[run_file_70.Count], ecx
302
	m2m dword[run_file_70.Buffer], ted_syntax_file
302
	m2m dword[run_file_70.Buffer], ted_syntax_file
303
	mov byte[run_file_70+20], 0
303
	mov byte[run_file_70+20], 0
304
	mov [run_file_70.FileName], file_name
304
	mov [run_file_70.FileName], file_name
305
	mcall SF_FILE, run_file_70
305
	mcall SF_FILE, run_file_70
306
	cmp ebx,-1
306
	cmp ebx,-1
307
	jne .end_0
307
	jne .end_0
308
		call ted_on_init_synt_err
308
		call ted_on_init_synt_err
309
		jmp @f
309
		jmp @f
310
	.end_0:
310
	.end_0:
311
		mov eax,ted_syntax_file
311
		mov eax,ted_syntax_file
312
		cmp dword[eax],'KPCK'
312
		cmp dword[eax],'KPCK'
313
		jne .end_unpack
313
		jne .end_unpack
314
		cmp dword[eax+4],ecx
314
		cmp dword[eax+4],ecx
315
		jg @f ;¥á«¨ ¤«ï à á¯ ª®¢ ­®£® ä ©«  ­¥ 墠⠥⠢뤥«¥­­®© ¯ ¬ïâ¨
315
		jg @f ;¥á«¨ ¤«ï à á¯ ª®¢ ­®£® ä ©«  ­¥ 墠⠥⠢뤥«¥­­®© ¯ ¬ïâ¨
316
		cmp dword[unpac_mem],0
316
		cmp dword[unpac_mem],0
317
		jne .end_1
317
		jne .end_1
318
			;¢ë¤¥«¥­¨¥ ¯ ¬ï⨠¤«ï à á¯ ª®¢ª¨ ä ©« 
318
			;¢ë¤¥«¥­¨¥ ¯ ¬ï⨠¤«ï à á¯ ª®¢ª¨ ä ©« 
319
			stdcall mem.Alloc,ecx
319
			stdcall mem.Alloc,ecx
320
			mov [unpac_mem],eax
320
			mov [unpac_mem],eax
321
		.end_1:
321
		.end_1:
322
		stdcall unpack,ted_syntax_file,[unpac_mem]
322
		stdcall unpack,ted_syntax_file,[unpac_mem]
323
		mov edi,ted_syntax_file
323
		mov edi,ted_syntax_file
324
		mov esi,[unpac_mem]
324
		mov esi,[unpac_mem]
325
		mov ecx,[edi+4]
325
		mov ecx,[edi+4]
326
		cld
326
		cld
327
		rep movsb
327
		rep movsb
328
		.end_unpack:
328
		.end_unpack:
329
		stdcall [ted_init_syntax_file], tedit0
329
		stdcall [ted_init_syntax_file], tedit0
330
	@@:
330
	@@:
331
	ret
331
	ret
332
endp
332
endp
333
 
333
 
334
;description:
334
;description:
335
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
335
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
336
align 4
336
align 4
337
proc ted_but_find uses edi
337
proc ted_but_find uses edi
338
	mov edi,tedit0
338
	mov edi,tedit0
339
 
339
 
340
	cmp ted_panel_id,TED_PANEL_NULL
340
	cmp ted_panel_id,TED_PANEL_NULL
341
	je @f
341
	je @f
342
		mov ted_panel_id,TED_PANEL_NULL
342
		mov ted_panel_id,TED_PANEL_NULL
343
		mov ted_wnd_l,0
343
		mov ted_wnd_l,0
344
		jmp .e_if
344
		jmp .e_if
345
	@@:
345
	@@:
346
		mov ted_panel_id,TED_PANEL_FIND
346
		mov ted_panel_id,TED_PANEL_FIND
347
		mov ted_wnd_l,TED_PANEL_WIDTH
347
		mov ted_wnd_l,TED_PANEL_WIDTH
348
	.e_if:
348
	.e_if:
349
	call EvSize
349
	call EvSize
350
	stdcall [ted_draw],edi
350
	stdcall [ted_draw],edi
351
	ret
351
	ret
352
endp
352
endp
353
 
353
 
354
align 4
354
align 4
355
tbl_1251_866:
355
tbl_1251_866:
356
rb 128
356
rb 128
357
db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;128
357
db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;128
358
db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;144
358
db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;144
359
db   0,  0,  0,  0,  0,  0,  0,  0,240,0,0,0,0,0,0,0 ;160
359
db   0,  0,  0,  0,  0,  0,  0,  0,240,0,0,0,0,0,0,0 ;160
360
db   0,  0,  0,  0,  0,  0,  0,  0,241,0,0,0,0,0,0,0 ;176
360
db   0,  0,  0,  0,  0,  0,  0,  0,241,0,0,0,0,0,0,0 ;176
361
db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
361
db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
362
db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
362
db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
363
db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
363
db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
364
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
364
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
365
 
365
 
366
align 4
366
align 4
367
tbl_866_1251:
367
tbl_866_1251:
368
rb 128
368
rb 128
369
db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
369
db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
370
db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
370
db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
371
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
371
db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
372
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
372
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
373
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
373
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
374
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
374
db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
375
db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
375
db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
376
db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
376
db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
377
 
377
 
378
align 4
378
align 4
379
ted_on_find_err:
379
ted_on_find_err:
380
	stdcall [mb_create],msgbox_7,thread ;message: Can not find text
380
	stdcall [mb_create],msgbox_7,thread ;message: Can not find text
381
	ret
381
	ret
382
 
382
 
383
;description:
383
;description:
384
; ª­®¯ª  [‡ ¬¥­¨âì] ­  ¯ ­¥«¨
384
; ª­®¯ª  [‡ ¬¥­¨âì] ­  ¯ ­¥«¨
385
align 4
385
align 4
386
but_replace:
386
but_replace:
387
	; ¯®ª  ­¥ ᤥ« ­®
387
	; ¯®ª  ­¥ ᤥ« ­®
388
	ret
388
	ret
389
 
389
 
390
;description:
390
;description:
391
; äã­ªæ¨ï ¯®¨áª  ¨­ä®à¬ æ¨¨ ¢ ᯨ᪥ ª«î祢ëå á«®¢
391
; äã­ªæ¨ï ¯®¨áª  ¨­ä®à¬ æ¨¨ ¢ ᯨ᪥ ª«î祢ëå á«®¢
392
align 4
392
align 4
393
but_find_key_w:
393
but_find_key_w:
394
	cmp byte[wnd_k_words_run],0
394
	cmp dword[wnd_k_words_run],0
395
	jne @f
395
	jne @f
396
		pushad
396
		pushad
397
		mcall SF_CREATE_THREAD,1,prop_start,thread_coords
397
		mcall SF_CREATE_THREAD,1,prop_start,thread_coords
-
 
398
		mov dword[wnd_k_words_run],eax
398
		popad
399
		popad
399
	@@:
400
	@@:
400
	ret
401
	ret
401
 
402
 
402
;description:
403
;description:
403
; ¢ë¤¥«¥­¨¥/áªàë⨥ ­¥¯¥ç â ¥¬ëå ᨬ¢®«®¢
404
; ¢ë¤¥«¥­¨¥/áªàë⨥ ­¥¯¥ç â ¥¬ëå ᨬ¢®«®¢
404
align 4
405
align 4
405
proc but_sumb_invis uses edi, edit:dword
406
proc but_sumb_invis uses edi, edit:dword
406
	mov edi,dword[edit]
407
	mov edi,dword[edit]
407
 
408
 
408
	xor ted_mode_invis,1
409
	xor ted_mode_invis,1
409
	call draw_but_toolbar
410
	call draw_but_toolbar
410
	stdcall [ted_draw],edi
411
	stdcall [ted_draw],edi
411
	ret
412
	ret
412
endp
413
endp
413
 
414
 
414
;description:
415
;description:
415
; ¢ë¤¥«¥­¨¥/áªàë⨥ ª«î祢ëå á«®¢
416
; ¢ë¤¥«¥­¨¥/áªàë⨥ ª«î祢ëå á«®¢
416
align 4
417
align 4
417
proc but_k_words_show uses edi, edit:dword
418
proc but_k_words_show uses edi, edit:dword
418
	mov edi,dword[edit]
419
	mov edi,dword[edit]
419
 
420
 
420
	xor ted_mode_color,1
421
	xor ted_mode_color,1
421
	cmp ted_mode_color,0
422
	cmp ted_mode_color,0
422
	je @f
423
	je @f
423
		call [ted_text_colored]
424
		call [ted_text_colored]
424
	@@:
425
	@@:
425
	call draw_but_toolbar
426
	call draw_but_toolbar
426
	stdcall [ted_draw],edi
427
	stdcall [ted_draw],edi
427
	ret
428
	ret
428
endp
429
endp
429
 
430
 
430
;description:
431
;description:
431
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ á ä ©« ¬¨ ᨭ⠪á¨á 
432
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ á ä ©« ¬¨ ᨭ⠪á¨á 
432
align 4
433
align 4
433
proc but_synt_show uses edi, edit:dword
434
proc but_synt_show uses edi, edit:dword
434
	mov edi,[edit]
435
	mov edi,[edit]
435
 
436
 
436
	cmp ted_panel_id,TED_PANEL_NULL
437
	cmp ted_panel_id,TED_PANEL_NULL
437
	je @f
438
	je @f
438
		mov ted_panel_id,TED_PANEL_NULL
439
		mov ted_panel_id,TED_PANEL_NULL
439
		mov ted_wnd_l,0
440
		mov ted_wnd_l,0
440
		jmp .e_if
441
		jmp .e_if
441
	@@:
442
	@@:
442
		mov ted_panel_id,TED_PANEL_SYNTAX
443
		mov ted_panel_id,TED_PANEL_SYNTAX
443
		mov ted_wnd_l,TED_PANEL_WIDTH
444
		mov ted_wnd_l,TED_PANEL_WIDTH
444
	.e_if:
445
	.e_if:
445
	call EvSize
446
	call EvSize
446
	stdcall [ted_draw],edi
447
	stdcall [ted_draw],edi
447
	ret
448
	ret
448
endp
449
endp