Subversion Repositories Kolibri OS

Rev

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

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