Subversion Repositories Kolibri OS

Rev

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

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