Subversion Repositories Kolibri OS

Rev

Rev 7576 | Rev 7579 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7576 Rev 7577
Line 154... Line 154...
154
	cmp ah,200
154
	cmp ah,200
155
	jne @f
155
	jne @f
156
		stdcall ted_but_open_syntax, tedit0
156
		stdcall ted_but_open_syntax, tedit0
157
		jmp still
157
		jmp still
158
	@@:
158
	@@:
159
	cmp ah,201 ;§ ¬¥­¨âì
159
	cmp ah,201 ;­ ©â¨ ¤ «¥¥
160
	jne .no_find
160
	jne .no_find
161
		call get_find_options
161
		call get_find_options
162
		stdcall [ted_but_find], tedit0, eax
162
		stdcall [ted_but_find], tedit0, eax
163
		jmp still
163
		jmp still
164
	.no_find:
164
	.no_find:
165
	cmp ah,202 ;§ ¬¥­¨âì ¢á¥
165
	cmp ah,202 ;§ ¬¥­¨âì
166
	jne .no_change
166
	jne .no_change
167
		call get_find_options
167
		call get_find_options
168
		stdcall [ted_but_replace], tedit0, buf_replace, eax, 1
168
		stdcall [ted_but_replace], tedit0, buf_replace, eax, 1
169
		or eax,eax
169
		or eax,eax
170
		jz still
170
		jz still
171
		stdcall [ted_draw], tedit0
171
		stdcall [ted_draw], tedit0
172
		jmp still
172
		jmp still
173
	.no_change:
173
	.no_change:
174
	cmp ah,203
174
	cmp ah,203 ;§ ¬¥­¨âì ¢á¥
175
	jne .no_change_a
175
	jne .no_change_a
176
		call but_replace_all
176
		call but_replace_all
177
		jmp still
177
		jmp still
178
	.no_change_a:
178
	.no_change_a:
Line 244... Line 244...
244
		or eax,eax
244
		or eax,eax
245
		jz @f
245
		jz @f
246
		inc edx
246
		inc edx
247
		loop .cycle0
247
		loop .cycle0
248
	@@:
248
	@@:
-
 
249
	or edx,edx
-
 
250
	jz @f
249
	stdcall [ted_draw], tedit0
251
		stdcall [ted_draw], tedit0
-
 
252
	@@:
250
	mov eax,edx
253
	mov eax,edx
-
 
254
	mov edi,msgbox_1.z
-
 
255
	stdcall convert_int_to_str, 8
-
 
256
	stdcall str_cat, edi,txt_Info
-
 
257
	notify_window_run msgbox_1
251
	ret
258
	ret
252
endp
259
endp
Line 253... Line 260...
253
 
260
 
254
;input:
261
;input:
Line 335... Line 342...
335
proc but_no_msg_OpenFile uses eax ebx esi
342
proc but_no_msg_OpenFile uses eax ebx esi
336
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
343
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
337
	call ted_messages_after_open_file
344
	call ted_messages_after_open_file
Line 338... Line 345...
338
 
345
 
339
	mov esi,openfile_path
346
	mov esi,openfile_path
340
	call strlen
347
	stdcall str_len,esi
341
	add esi,eax
348
	add esi,eax
342
	@@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
349
	@@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
343
		dec esi
350
		dec esi
344
		cmp byte[esi],'/'
351
		cmp byte[esi],'/'
Line 347... Line 354...
347
		je @f
354
		je @f
348
		cmp esi,openfile_path
355
		cmp esi,openfile_path
349
		jg @b
356
		jg @b
350
	@@:
357
	@@:
351
	inc esi
358
	inc esi
352
	call strlen
359
	stdcall str_len,esi
353
	cmp eax,255
360
	cmp eax,255
354
	jle @f
361
	jle @f
355
		mov eax,255
362
		mov eax,255
356
	@@:
363
	@@:
357
	inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
364
	inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
Line 379... Line 386...
379
	mov [OpenDialog_data.type],0
386
	mov [OpenDialog_data.type],0
380
	stdcall [OpenDialog_Start],OpenDialog_data
387
	stdcall [OpenDialog_Start],OpenDialog_data
381
	cmp [OpenDialog_data.status],2
388
	cmp [OpenDialog_data.status],2
382
	jne @f
389
	jne @f
383
		stdcall mem_spac, msgbox_9.fdp,100
390
		stdcall mem_spac, msgbox_9.fdp,100
384
		mov esi,file_name
391
		stdcall str_len,file_name
385
		call strlen
-
 
386
		cmp eax,100
392
		cmp eax,100
387
		jle .no_crop
393
		jle .no_crop
388
			mov eax,100
394
			mov eax,100
389
		.no_crop:
395
		.no_crop:
390
		stdcall mem_cpy, msgbox_9.fdp,esi,eax
396
		stdcall mem_cpy, msgbox_9.fdp,esi,eax
Line 401... Line 407...
401
	ret
407
	ret
Line 402... Line 408...
402
 
408
 
403
proc auto_open_syntax, of_path:dword
409
proc auto_open_syntax, of_path:dword
404
pushad
410
pushad
405
	;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
411
	;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
406
	mov esi,[of_path]
-
 
407
	call strlen
412
	stdcall str_len,[of_path]
408
	mov edx,[of_path]
413
	mov edx,[of_path]
409
	add edx,eax
414
	add edx,eax
410
	.f_beg:
415
	.f_beg:
411
	cmp byte[edx],'.'
416
	cmp byte[edx],'.'
Line 486... Line 491...
486
; eax = ª®¤ ®è¨¡ª¨
491
; eax = ª®¤ ®è¨¡ª¨
487
; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
492
; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
488
align 4
493
align 4
489
ted_messages_after_open_file:
494
ted_messages_after_open_file:
490
	push ecx edi
495
	push ecx edi
491
	cmp eax,0
496
	or eax,eax
492
	je @f
497
	jz @f
493
		cmp ax,10
498
		cmp ax,10
494
		jl .zifra_0_9
499
		jl .zifra_0_9
495
			mov al,'?'
500
			mov al,'?'
496
			sub ax,48
501
			sub ax,48
497
		.zifra_0_9:
502
		.zifra_0_9:
498
		add ax,48
503
		add ax,48
Line 499... Line 504...
499
 
504
 
500
		mov byte[msgbox_4.err],al
505
		mov byte[msgbox_4.err],al
501
		stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
-
 
502
		jmp .ret_f
506
		stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
503
	@@:
-
 
504
	cmp ebx,-1
-
 
505
	je .ret_f
-
 
506
		;if open file
-
 
507
		mov edi,tedit0
-
 
508
		mov ecx,ted_max_chars
-
 
509
		sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
-
 
510
		cmp ebx,ecx
-
 
511
		jl .ret_f
-
 
512
			stdcall [mb_create],msgbox_1,thread
-
 
513
	.ret_f:
507
	@@:
514
	pop edi ecx
508
	pop edi ecx
Line 515... Line 509...
515
	ret
509
	ret
516
 
510
 
Line 522... Line 516...
522
 
516
 
523
;description:
517
;description:
524
; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
518
; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
525
align 4
519
align 4
526
proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
520
proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
527
	mov edi,dword[edit]
521
	mov edi,[edit]
528
	cmp ted_panel_id,TED_PANEL_SYNTAX
522
	cmp ted_panel_id,TED_PANEL_SYNTAX
529
	jne @f
523
	jne @f
530
		stdcall dword[tl_node_get_data], tree1
524
		stdcall [tl_node_get_data], tree1
531
		mov [fn_col_option],eax
525
		mov [fn_col_option],eax
532
		stdcall open_unpac_synt_file,eax
526
		stdcall open_unpac_synt_file,eax
533
		cmp ebx,-1
527
		cmp ebx,-1
Line 546... Line 540...
546
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
540
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
547
; ecx - à §àãè ¥âáï
541
; ecx - à §àãè ¥âáï
548
align 4
542
align 4
549
proc open_unpac_synt_file uses eax edi esi, f_name:dword
543
proc open_unpac_synt_file uses eax edi esi, f_name:dword
550
	mov ebx,[f_name]
544
	mov ebx,[f_name]
-
 
545
	cmp byte[ebx],0
-
 
546
	je @f
551
	mov edi,last_open_synt_file
547
	mov edi,last_open_synt_file
552
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
548
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
553
	test eax,eax
549
	test eax,eax
554
	jz @f
550
	jz @f
Line 683... Line 679...
683
db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
679
db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
684
db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
680
db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
Line 685... Line 681...
685
 
681
 
686
align 4
682
align 4
687
ted_on_find_err:
683
ted_on_find_err:
688
	stdcall [mb_create],msgbox_7,thread ;message: Can not find text
684
	notify_window_run msgbox_7 ;message: Can not find text
Line 689... Line 685...
689
	ret
685
	ret
690
 
686
 
691
;description:
687
;description: