Subversion Repositories Kolibri OS

Rev

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

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