Subversion Repositories Kolibri OS

Rev

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

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