Subversion Repositories Kolibri OS

Rev

Rev 7573 | Rev 7576 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. struct symbol
  2.         c db ?    ; +0 ᨬ¢®«
  3.         col db ?  ; +1 梥â
  4.         perv dd ? ; +2
  5.         next dd ? ; +6 㪠§ â¥«¨
  6.         tc dd ?   ;+10 ¢à¥¬. ᮧ¤ ­¨ï
  7.         td dd ?   ;+14 ¢à¥¬. 㤠«¥­¨ï
  8. ends
  9.  
  10. ID_BUT_0 equ 3 ;¬¨­¨¬ «ì­ë© ID ª­®¯ª¨ ­  ¯ ­¥«¨
  11.  
  12. ID_BUT_NEW equ 3
  13. ID_BUT_OPEN equ 4
  14. ID_BUT_SAVE equ 5
  15. ID_BUT_SAVE_AS equ 6
  16. ID_BUT_SELECT equ 7
  17. ID_BUT_CUT equ 8
  18. ID_BUT_COPY equ 9
  19. ID_BUT_PASTE equ 10
  20. ID_BUT_FIND equ 11
  21. ID_BUT_REPLACE equ 12
  22. ID_BUT_KEY_WORDS equ 13
  23. ID_BUT_UPPER equ 14
  24. ID_BUT_LOWER equ 15
  25. ID_BUT_REVERSE equ 16
  26. ID_BUT_UNDO equ 17
  27. ID_BUT_REDO equ 18
  28. ID_BUT_INVISIBLE equ 19
  29. ID_BUT_SYNTAX_LIST equ 20
  30. ID_BUT_SYNTAX_MODE equ 21
  31. ID_BUT_CONVERT_1251_866 equ 22
  32. ID_BUT_CONVERT_866_1251 equ 23
  33.  
  34. macro ini_panel b_key,b_id
  35. {
  36.         stdcall [ini_get_int],file_name,ini_sec_window,b_key,1
  37.         mov byte[panel_but+b_id-ID_BUT_0],al
  38. }
  39.  
  40. bmp_icon dd 0
  41.  
  42. align 16
  43. button:
  44.         mcall SF_GET_BUTTON
  45.         cmp ah,ID_BUT_NEW
  46.         jne @f
  47.                 call ted_but_new_file
  48.                 jmp still
  49.         @@:
  50.         cmp ah,ID_BUT_OPEN
  51.         jne @f
  52.                 call ted_but_open_file
  53.                 jmp still
  54.         @@:
  55.         cmp ah,ID_BUT_SAVE
  56.         jne @f
  57.                 xor eax,eax
  58.                 call ted_but_save_file ;á®åà ­¥­¨¥ ¡¥§ ¤¨ «®£ 
  59.                 jmp still
  60.         @@:
  61.         cmp ah,ID_BUT_SAVE_AS
  62.         jne @f
  63.                 xor eax,eax
  64.                 inc eax
  65.                 call ted_but_save_file ;á®åà ­¥­¨¥ á ¤¨ «®£®¬
  66.                 jmp still
  67.         @@:
  68.         cmp ah,ID_BUT_SELECT
  69.         jne @f
  70.                 stdcall [ted_but_select_word], tedit0
  71.                 jmp still
  72.         @@:
  73.         cmp ah,ID_BUT_CUT
  74.         jne @f
  75.                 stdcall [ted_but_cut], tedit0
  76.                 jmp still
  77.         @@:
  78.         cmp ah,ID_BUT_COPY
  79.         jne @f
  80.                 stdcall [ted_but_copy], tedit0
  81.                 jmp still
  82.         @@:
  83.         cmp ah,ID_BUT_PASTE
  84.         jne @f
  85.                 stdcall [ted_but_paste], tedit0
  86.                 jmp still
  87.         @@:
  88.         cmp ah,ID_BUT_FIND
  89.         jne @f
  90.                 call ted_but_find
  91.                 jmp still
  92.         @@:
  93.         cmp ah,ID_BUT_REPLACE
  94.         jne @f
  95.                 call but_replace
  96.                 jmp still
  97.         @@:
  98.         cmp ah,ID_BUT_KEY_WORDS
  99.         jne @f
  100.                 call but_find_key_w
  101.                 jmp still
  102.         @@:
  103.         cmp ah,ID_BUT_UPPER
  104.         jne @f
  105.                 stdcall [ted_but_sumb_upper], tedit0
  106.                 jmp still
  107.         @@:
  108.         cmp ah,ID_BUT_LOWER
  109.         jne @f
  110.                 stdcall [ted_but_sumb_lover], tedit0
  111.                 jmp still
  112.         @@:
  113.         cmp ah,ID_BUT_REVERSE
  114.         jne @f
  115.                 stdcall [ted_but_reverse], tedit0
  116.                 jmp still
  117.         @@:
  118.         cmp ah,ID_BUT_UNDO
  119.         jne @f
  120.                 stdcall [ted_but_undo], tedit0
  121.                 jmp still
  122.         @@:
  123.         cmp ah,ID_BUT_REDO
  124.         jne @f
  125.                 stdcall [ted_but_redo], tedit0
  126.                 jmp still
  127.         @@:
  128.         cmp ah,ID_BUT_INVISIBLE
  129.         jne @f
  130.                 stdcall but_sumb_invis, tedit0
  131.                 jmp still
  132.         @@:
  133.         cmp ah,ID_BUT_SYNTAX_LIST
  134.         jne @f
  135.                 stdcall but_use_syntax, tedit0
  136.                 jmp still
  137.         @@:
  138.         cmp ah,ID_BUT_SYNTAX_MODE
  139.         jne @f
  140.                 stdcall but_choose_syntax, tedit0
  141.                 jmp still
  142.         @@:
  143.         cmp ah,ID_BUT_CONVERT_1251_866
  144.         jne @f
  145.                 stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
  146.                 jmp still
  147.         @@:
  148.         cmp ah,ID_BUT_CONVERT_866_1251
  149.         jne @f
  150.                 stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
  151.                 jmp still
  152.         @@:
  153.  
  154.         cmp ah,200
  155.         jne @f
  156.                 stdcall ted_but_open_syntax, tedit0
  157.                 jmp still
  158.         @@:
  159.         cmp ah,201
  160.         jne @f
  161.                 stdcall [ted_but_find_next], tedit0
  162.                 jmp still
  163.         @@:
  164.  
  165.         cmp ah,1
  166.         jne @f
  167.                 call ted_Exit
  168.                 jmp still
  169.         @@:
  170.  
  171.         cmp ah,199
  172.         jne still
  173.                 call ted_Exit
  174.         jmp still
  175.  
  176. align 4
  177. ted_Exit:
  178.         cmp dword[wnd_k_words_run],0
  179.         je @f
  180.                 push ebx ecx
  181.                 mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID,[wnd_k_words_run]
  182.                 pop ecx ebx
  183.                 mov dword[wnd_k_words_run],0
  184.                 ;test eax,eax
  185.         @@:
  186.         cmp dword[exit_code],1
  187.         je @f
  188.         stdcall [ted_can_save], tedit0
  189.         cmp al,1
  190.         jne @f
  191.                 stdcall [mb_create],msgbox_2,thread ;message: save buf in file?
  192.                 stdcall [mb_setfunctions],msgbox_2E_funct
  193.                 ret
  194.         @@:
  195.         stdcall mem.Free,[bmp_icon]
  196.         cmp dword[unpac_mem],0
  197.         je @f
  198.                 stdcall mem.Free,[unpac_mem]
  199.         @@:
  200.         stdcall [ted_delete], tedit0
  201.         stdcall [tl_data_clear], tree1
  202.         mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
  203.         ;ret
  204.  
  205. ;input:
  206. ; al = ª®¤ ®è¨¡ª¨
  207. align 4
  208. ted_on_init_synt_err:
  209.         mov byte[msgbox_3.err],'0'
  210.         add byte[msgbox_3.err],al
  211.         stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
  212.         ret
  213.  
  214. align 4
  215. ted_but_new_file:
  216.         push eax ebx
  217.         stdcall [ted_can_save], tedit0
  218.         cmp al,1
  219.         jne @f
  220.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  221.                 stdcall [mb_setfunctions],msgbox_2N_funct
  222.                 jmp .ret_f
  223.         @@:
  224.         call On_NewFile
  225.         .ret_f:
  226.                 mov byte[openfile_path],0
  227.                 mcall SF_SET_CAPTION,1,hed
  228.         pop ebx eax
  229.         ret
  230.  
  231. align 4
  232. On_NewFile:
  233.         stdcall [ted_clear], tedit0,1
  234.         call draw_but_toolbar
  235.         stdcall [ted_draw], tedit0
  236.         mov dword[openfile_path],0
  237.         ret
  238.  
  239. align 4
  240. On_SaveAndNewFile:
  241.         push edi
  242.         mov edi, tedit0
  243.  
  244.         call ted_but_save_file
  245.         cmp ted_err_save,0
  246.         jne @f
  247.                 call On_NewFile
  248.         @@:
  249.         pop edi
  250.         ret
  251.  
  252. align 4
  253. On_SaveAndOpenFile:
  254.         push edi
  255.         mov edi, tedit0
  256.  
  257.         call ted_but_save_file
  258.         cmp ted_err_save,0
  259.         jne @f
  260.                 call ted_but_open_file.no_msg
  261.         @@:
  262.         pop edi
  263.         ret
  264.  
  265. align 4
  266. On_SaveAndExit:
  267.         push edi
  268.         mov edi, tedit0
  269.  
  270.         call ted_but_save_file
  271.         cmp ted_err_save,0
  272.         jne @f
  273.                 mov dword[exit_code],1
  274.         @@:
  275.         pop edi
  276.         ret
  277.  
  278. align 4
  279. On_Exit:
  280.         mov dword[exit_code],1
  281.         ret
  282.  
  283. ;description:
  284. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
  285. align 4
  286. proc but_no_msg_OpenFile uses eax ebx esi
  287.         stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  288.         call ted_messages_after_open_file
  289.  
  290.         mov esi,openfile_path
  291.         call strlen
  292.         add esi,eax
  293.         @@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
  294.                 dec esi
  295.                 cmp byte[esi],'/'
  296.                 je @f
  297.                 cmp byte[esi],0x5c ;'\'
  298.                 je @f
  299.                 cmp esi,openfile_path
  300.                 jg @b
  301.         @@:
  302.         inc esi
  303.         call strlen
  304.         cmp eax,255
  305.         jle @f
  306.                 mov eax,255
  307.         @@:
  308.         inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
  309.         stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¤¨ «®£ á®åà ­¥­¨ï
  310.         ret
  311. endp
  312.  
  313. ;description:
  314. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
  315. align 4
  316. ted_but_open_file:
  317.         pushad
  318.  
  319.         stdcall [ted_can_save], tedit0
  320.         cmp al,1
  321.         jne @f
  322.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  323.                 stdcall [mb_setfunctions],msgbox_2O_funct
  324.                 jmp .ret_f
  325.         .no_msg: ;¬¥âª  ¤«ï ¢ë§®¢  ä㭪樨 ç¥à¥§ ª­®¯ªã ¢ á®®¡é¥­¨¨ msgbox_5
  326.                 pushad
  327.         @@:
  328.  
  329.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  330.         mov [OpenDialog_data.type],0
  331.         stdcall [OpenDialog_Start],OpenDialog_data
  332.         cmp [OpenDialog_data.status],2
  333.         jne @f
  334.                 stdcall mem_spac, msgbox_9.fdp,100
  335.                 mov esi,file_name
  336.                 call strlen
  337.                 cmp eax,100
  338.                 jle .no_crop
  339.                         mov eax,100
  340.                 .no_crop:
  341.                 stdcall mem_cpy, msgbox_9.fdp,esi,eax
  342.                 stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
  343.                 jmp .ret_f
  344.         @@:
  345.         cmp [OpenDialog_data.status],1
  346.         jne .ret_f
  347.                 stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
  348.                 stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  349.                 call ted_messages_after_open_file
  350.         .ret_f:
  351.         popad
  352.         ret
  353.  
  354. proc auto_open_syntax, of_path:dword
  355. pushad
  356.         ;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
  357.         mov esi,[of_path]
  358.         call strlen
  359.         mov edx,[of_path]
  360.         add edx,eax
  361.         .f_beg:
  362.         cmp byte[edx],'.'
  363.         je .found
  364.                 dec edx
  365.                 cmp edx,[of_path]
  366.                 jg .f_beg
  367.         .found:
  368.         inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
  369.  
  370.         mov ebx,synt_auto_open
  371.         .cycle_0:
  372.                 add ebx,32
  373.                 stdcall strcmp,ebx,edx ;áà ¢­¨¢ ¥¬ à áè¨à¥­¨¥ ®âªàë⮣® ä ©«  á® §­ ç¥­¨ï¬¨ ®âªàëâ묨 á ini ä ©« 
  374.                 test eax,eax
  375.                 jz .ok
  376.                 add ebx,32
  377.                 cmp byte[ebx],0
  378.                 jne .cycle_0
  379.         jmp .end_0
  380.         .ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
  381.                 sub ebx,32
  382.                 stdcall open_unpac_synt_file,ebx
  383.         .end_0:
  384. popad
  385.         ret
  386. endp
  387.  
  388. ;input:
  389. ; eax ¥á«¨ à ¢¥­: 0 - á®åà ­¥­¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ­¥­¨¥ á ¤¨ «®£®¬
  390. ;description:
  391. ; äã­ªæ¨ï á®åà ­¥­¨ï ä ©« 
  392. align 4
  393. proc ted_but_save_file
  394.         or eax,eax
  395.         jnz .init_dlg
  396.                 ; á®å࠭塞 ¡¥§ ¢ë§®¢  ¤¨ «®£®¢®£® ®ª­ 
  397.                 cmp byte[openfile_path],0
  398.                 jne @f
  399.         .init_dlg:
  400.                 ; ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
  401.                 copy_path open_dialog_name,communication_area_default_path,file_name,0
  402.                 mov [OpenDialog_data.type],1
  403.                 stdcall [OpenDialog_Start],OpenDialog_data
  404.                 cmp [OpenDialog_data.status],1 ;if status==1 then save
  405.                 jne .end_save
  406.         @@:
  407.                 stdcall [ted_save_file],tedit0,run_file_70,openfile_path
  408.         .end_save:
  409.         ret
  410. endp
  411.  
  412. ;description:
  413. ; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
  414. align 4
  415. proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
  416.         cld
  417.         mov esi,[source]
  418.         mov edi,[destination]
  419.         mov ecx,[len]
  420.         rep movsb
  421.         ret
  422. endp
  423.  
  424. ;description:
  425. ; § ¯®«­¥­¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨
  426. align 4
  427. proc mem_spac uses eax ecx edi, mem:dword, len:dword
  428.         cld
  429.         mov al,' '
  430.         mov edi,[mem]
  431.         mov ecx,[len]
  432.         repne stosb
  433.         ret
  434. endp
  435.  
  436. ;input:
  437. ; eax = ª®¤ ®è¨¡ª¨
  438. ; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
  439. align 4
  440. ted_messages_after_open_file:
  441.         push ecx edi
  442.         cmp eax,0
  443.         je @f
  444.                 cmp ax,10
  445.                 jl .zifra_0_9
  446.                         mov al,'?'
  447.                         sub ax,48
  448.                 .zifra_0_9:
  449.                 add ax,48
  450.  
  451.                 mov byte[msgbox_4.err],al
  452.                 stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
  453.                 jmp .ret_f
  454.         @@:
  455.         cmp ebx,-1
  456.         je .ret_f
  457.                 ;if open file
  458.                 mov edi,tedit0
  459.                 mov ecx,ted_max_chars
  460.                 sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
  461.                 cmp ebx,ecx
  462.                 jl .ret_f
  463.                         stdcall [mb_create],msgbox_1,thread
  464.         .ret_f:
  465.         pop edi ecx
  466.         ret
  467.  
  468. align 4
  469. ted_save_err_msg:
  470.         mov byte[msgbox_6.err],al
  471.         stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
  472.         ret
  473.  
  474. ;description:
  475. ; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
  476. align 4
  477. proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
  478.         mov edi,dword[edit]
  479.         cmp ted_panel_id,TED_PANEL_SYNTAX
  480.         jne @f
  481.                 stdcall dword[tl_node_get_data], tree1
  482.                 mov [fn_col_option],eax
  483.                 stdcall open_unpac_synt_file,eax
  484.                 cmp ebx,-1
  485.                 je @f
  486.  
  487.                 call [ted_text_colored]
  488.                 stdcall [ted_draw],edi
  489.         @@:
  490.         ret
  491. endp
  492.  
  493. ;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
  494. ;input:
  495. ; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
  496. ;output:
  497. ; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
  498. ; ecx - à §àãè ¥âáï
  499. align 4
  500. proc open_unpac_synt_file uses eax edi esi, f_name:dword
  501.         mov ebx,[f_name]
  502.         mov edi,last_open_synt_file
  503.         stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
  504.         test eax,eax
  505.         jz @f
  506.  
  507.         ;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
  508.         mov esi,ebx
  509.         mov ecx,32/4
  510.         cld
  511.         rep movsd
  512.  
  513.         copy_path ebx,fn_syntax_dir,syntax_path,0
  514.         copy_path syntax_path,sys_path,file_name,0
  515.         mov edi, tedit0
  516.         mov [run_file_70.Function], SSF_READ_FILE
  517.         mov [run_file_70.Position], 0
  518.         mov [run_file_70.Flags], 0
  519.         mov ecx, ted_syntax_file_size
  520.         mov dword[run_file_70.Count], ecx
  521.         m2m dword[run_file_70.Buffer], ted_syntax_file
  522.         mov byte[run_file_70+20], 0
  523.         mov [run_file_70.FileName], file_name
  524.         mcall SF_FILE, run_file_70
  525.         cmp ebx,-1
  526.         jne .end_0
  527.                 call ted_on_init_synt_err
  528.                 jmp @f
  529.         .end_0:
  530.                 mov eax,ted_syntax_file
  531.                 cmp dword[eax],'KPCK'
  532.                 jne .end_unpack
  533.                 cmp dword[eax+4],ecx
  534.                 jg @f ;¥á«¨ ¤«ï à á¯ ª®¢ ­®£® ä ©«  ­¥ 墠⠥⠢뤥«¥­­®© ¯ ¬ïâ¨
  535.                 cmp dword[unpac_mem],0
  536.                 jne .end_1
  537.                         ;¢ë¤¥«¥­¨¥ ¯ ¬ï⨠¤«ï à á¯ ª®¢ª¨ ä ©« 
  538.                         stdcall mem.Alloc,ecx
  539.                         mov [unpac_mem],eax
  540.                 .end_1:
  541.                 stdcall unpack,ted_syntax_file,[unpac_mem]
  542.                 mov edi,ted_syntax_file
  543.                 mov esi,[unpac_mem]
  544.                 mov ecx,[edi+4]
  545.                 cld
  546.                 rep movsb
  547.                 .end_unpack:
  548.                 stdcall [ted_init_syntax_file], tedit0
  549.         @@:
  550.         ret
  551. endp
  552.  
  553. ;description:
  554. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
  555. align 4
  556. proc ted_but_find uses edi
  557.         mov edi,tedit0
  558.  
  559.         cmp ted_panel_id,TED_PANEL_NULL
  560.         je @f
  561.                 mov ted_panel_id,TED_PANEL_NULL
  562.                 mov ted_wnd_l,0
  563.                 jmp .e_if
  564.         @@:
  565.                 mov ted_panel_id,TED_PANEL_FIND
  566.                 mov ted_wnd_l,TED_PANEL_WIDTH
  567.         .e_if:
  568.         call EvSize
  569.         stdcall [ted_draw],edi
  570.         ret
  571. endp
  572.  
  573. align 4
  574. tbl_1251_866:
  575. rb 128
  576. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;128
  577. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;144
  578. db   0,  0,  0,  0,  0,  0,  0,  0,240,0,0,0,0,0,0,0 ;160
  579. db   0,  0,  0,  0,  0,  0,  0,  0,241,0,0,0,0,0,0,0 ;176
  580. db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
  581. db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
  582. db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
  583. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
  584.  
  585. align 4
  586. tbl_866_1251:
  587. rb 128
  588. db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
  589. db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
  590. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
  591. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
  592. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
  593. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
  594. db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
  595. db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
  596.  
  597. align 4
  598. ted_on_find_err:
  599.         stdcall [mb_create],msgbox_7,thread ;message: Can not find text
  600.         ret
  601.  
  602. ;description:
  603. ; ª­®¯ª  [‡ ¬¥­¨âì] ­  ¯ ­¥«¨
  604. align 4
  605. but_replace:
  606.         ; ¯®ª  ­¥ ᤥ« ­®
  607.         ret
  608.  
  609. ;description:
  610. ; äã­ªæ¨ï ¯®¨áª  ¨­ä®à¬ æ¨¨ ¢ ᯨ᪥ ª«î祢ëå á«®¢
  611. align 4
  612. but_find_key_w:
  613.         cmp dword[wnd_k_words_run],0
  614.         jne @f
  615.                 pushad
  616.                 mcall SF_CREATE_THREAD,1,prop_start,thread_coords
  617.                 mov dword[wnd_k_words_run],eax
  618.                 popad
  619.         @@:
  620.         ret
  621.  
  622. ;description:
  623. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ­¥¯¥ç â ¥¬ëå ᨬ¢®«®¢
  624. align 4
  625. proc but_sumb_invis uses edi, edit:dword
  626.         mov edi,dword[edit]
  627.  
  628.         xor ted_mode_invis,1
  629.         call draw_but_toolbar
  630.         stdcall [ted_draw],edi
  631.         ret
  632. endp
  633.  
  634. ;description:
  635. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ª«î祢ëå á«®¢
  636. align 4
  637. proc but_use_syntax uses edi, edit:dword
  638.         mov edi,dword[edit]
  639.  
  640.         xor ted_mode_color,1
  641.         cmp ted_mode_color,0
  642.         je @f
  643.                 call [ted_text_colored]
  644.         @@:
  645.         call draw_but_toolbar
  646.         stdcall [ted_draw],edi
  647.         ret
  648. endp
  649.  
  650. ;description:
  651. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ á ä ©« ¬¨ ᨭ⠪á¨á 
  652. align 4
  653. proc but_choose_syntax uses edi, edit:dword
  654.         mov edi,[edit]
  655.  
  656.         cmp ted_panel_id,TED_PANEL_NULL
  657.         je @f
  658.                 mov ted_panel_id,TED_PANEL_NULL
  659.                 mov ted_wnd_l,0
  660.                 jmp .e_if
  661.         @@:
  662.                 mov ted_panel_id,TED_PANEL_SYNTAX
  663.                 mov ted_wnd_l,TED_PANEL_WIDTH
  664.         .e_if:
  665.         call EvSize
  666.         stdcall [ted_draw],edi
  667.         ret
  668. endp
  669.