Subversion Repositories Kolibri OS

Rev

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

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