Subversion Repositories Kolibri OS

Rev

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

  1. ;Ž£à®¬­ ï ¡« £®¤ à­®áâì ¢á¥¬, ªâ® ¯®¬®£ «: ª®¤®¬/ᮢ¥â®¬/¤¨§ ©­®¬ ...
  2.  
  3. use32
  4.   org 0x0
  5.   db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
  6.   dd 0x01
  7.   dd start
  8.   dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
  9.   dd mem
  10.   dd stacktop
  11.   dd file_name ; command line
  12.   dd sys_path
  13.  
  14. MAX_COLOR_WORD_LEN equ 40
  15. maxChars equ 100002 ;(...+2)
  16. BUF_SIZE equ 4096 ;buffer for copy|paste
  17. maxSyntaxFileSize equ 410000
  18. TOOLBAR_ICONS_SIZE equ 1200*20
  19.  
  20. include '../../proc32.inc'
  21. ;include '../../config.inc'
  22. include '../../macros.inc'
  23. include '../../dll.inc'
  24. include '../../develop/libraries/box_lib/load_lib.mac'
  25. include '../../develop/libraries/box_lib/trunk/box_lib.mac'
  26. include '../../system/desktop/trunk/kglobals.inc'
  27. include '../../system/desktop/trunk/unpacker.inc'
  28. include 'lang.inc'
  29.  
  30. include 't_data.inc'
  31. include 'strlen.inc'
  32. include 't_draw.inc' ;draw main window functions
  33. include 't_button.inc' ;text work functions
  34. include 'wnd_k_words.inc'
  35.  
  36. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  37.  
  38.  
  39. ;Œ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨© á ¨á¯®«ì§®¢ ­¨¥¬ ¡¨¡«¨®â¥ª¨ libimg.obj
  40. ;¤«ï ¨á¯®«ì§®¢ ­¨ï ¬ ªà®á  ­ã¦­ë ¯¥à¥¬¥­­ë¥:
  41. ; - run_file_70 FileInfoBlock
  42. ; - image_data dd 0
  43. macro load_image_file path,buf,size
  44. {
  45.         ;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
  46.         if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
  47.                 jmp @f
  48.                         local .path_str
  49.                         .path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
  50.                         db 0
  51.                 @@:
  52.                 ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
  53.                 copy_path .path_str,[32],file_name,0x0
  54.         else
  55.                 copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
  56.         end if
  57.  
  58.         stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
  59.         mov [buf],eax
  60.  
  61.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  62.         mov [run_file_70.Function], 0
  63.         mov [run_file_70.Position], 0
  64.         mov [run_file_70.Flags], 0
  65.         mov [run_file_70.Count], dword size
  66.         m2m [run_file_70.Buffer], [buf]
  67.         mov byte[run_file_70+20], 0
  68.         mov [run_file_70.FileName], file_name
  69.         mov ebx,run_file_70
  70.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  71.         cmp ebx,0xffffffff
  72.         je @f
  73.                 ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
  74.                 stdcall dword[img_decode], dword[buf],ebx,0
  75.                 mov dword[image_data],eax
  76.                 ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  77.                 stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
  78.                 ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
  79.                 stdcall dword[img_destroy], dword[image_data]
  80.         @@:
  81. }
  82.  
  83. image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  84. icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
  85.  
  86. align 4
  87. start:
  88.         mcall 48,3,sc,sizeof.system_colors
  89.  
  90.         mcall 68,11
  91.         or eax,eax
  92.         jz button.exit
  93.  
  94.         mcall 66,1,1 ;scan code
  95.         mcall 40,0xC0000027
  96.  
  97.         mov esi,file_name
  98.         call strlen
  99.         mov ecx,eax
  100.         mov edi,openfile_path
  101.         cld
  102.         rep movsb ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¡ãä¥à openfile_path
  103.  
  104. load_libraries l_libs_start,load_lib_end
  105.  
  106. ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
  107. mov     ebp,lib0
  108. .test_lib_open:
  109.         cmp     dword [ebp+ll_struc_size-4],0
  110.         jz      @f
  111.         mcall -1 ;exit not correct
  112. @@:
  113.         add ebp,ll_struc_size
  114.         cmp ebp,load_lib_end
  115.         jl .test_lib_open
  116.  
  117. ;---------------------------------------------------------------------
  118.         stdcall [ted_init], tedit0
  119.         stdcall dword[tl_data_init], tree1
  120.  
  121. ; OpenDialog initialisation
  122.         stdcall [OpenDialog_Init],OpenDialog_data
  123.  
  124. ; init toolbar file
  125.         load_image_file 'te_icon.png', bmp_icon,TOOLBAR_ICONS_SIZE*2 ;㬭®¦¥­¨¥ ­  2 ¤«ï á¥àëå ª­®¯®ª
  126.         mov eax,[bmp_icon]
  127.         add eax,TOOLBAR_ICONS_SIZE
  128.         stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
  129. ;---------------------------------------------------------------------
  130. ; ç¨â ¥¬ ä ©« á ªãàá®à ¬¨ ¨ «¨­¨ï¬¨
  131.         load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13
  132.         mov eax,dword[icon_tl_sys]
  133.         mov dword[tree1.data_img_sys],eax
  134. ;---------------------------------------------------------------------
  135. ; ç¨â ¥¬ ä ©« á ¨ª®­ª ¬¨ 㧫®¢
  136.         load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
  137.         mov eax,dword[icon_tl_sys]
  138.         mov dword[tree1.data_img],eax
  139. ;------------------------------------------------------------------------------
  140.   copy_path fn_syntax_dir,sys_path,file_name,0x0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
  141.   mov eax,70
  142.   mov ebx,tree_file_struct
  143.   int 0x40
  144.  
  145. cmp ebx,-1
  146. je .end_dir_init
  147.  
  148.   mov eax,dir_mem
  149.   add eax,32+4+1+3+4*6+8
  150. mov ecx,ebx
  151. @@:
  152.   cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
  153.   je .filter
  154.     ;0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
  155.     stdcall dword[tl_node_add], eax,0x10000, tree1
  156.  
  157.     stdcall dword[tl_cur_next], tree1
  158.   .filter:
  159.   add eax,304
  160.   loop @b
  161.   stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
  162. .end_dir_init:
  163.  
  164. ;--- load ini file ---
  165.         copy_path ini_name,sys_path,file_name,0
  166.         ;window startup pozition
  167.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
  168.         mov word[wnd_s_pos+2],ax
  169.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
  170.         mov word[wnd_s_pos],ax
  171.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
  172.         mov word[wnd_s_pos+6],ax
  173.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
  174.         mov word[wnd_s_pos+4],ax
  175.         ;scrool type
  176.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
  177.         mov [wScr.type],eax
  178.         mov [hScr.type],eax
  179.         mov [ws_dir_lbox.type],eax
  180.     mov [w_scr_t3.type],eax
  181.         ;symbol size
  182.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
  183.         mov dword[tedit0.rec.width],eax
  184.         stdcall dword[ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
  185.         mov dword[tedit0.rec.height],eax
  186.         lea eax,[eax+eax*2]
  187.         mov dword[tedit0.rec.top],eax
  188.         ;ä ©«®¢ë¥ à áè¨à¥­¨ï
  189.         xor edx,edx
  190.         mov ebx,synt_auto_open
  191.         @@:
  192.                 ;¡¥à¥¬ ¨¬ï ä ©« 
  193.                 stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
  194.                 cmp byte[ebx],0
  195.                 je @f
  196.                 inc byte[key_synt_file.numb]
  197.                 add ebx,32
  198.                 ;¡¥à¥¬ à áè¨à¥­¨ï
  199.                 stdcall dword[ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
  200.                 inc byte[key_synt_ext.numb]
  201.                 add ebx,32
  202.                 inc edx
  203.                 cmp edx,max_synt_auto_open
  204.                 jl @b
  205.         @@:
  206.  
  207. ;--- load color option file ---
  208.         mov ebx,dword[fn_col_option]
  209.         call open_unpac_synt_file
  210.  
  211. ;--- get cmd line ---
  212.         cmp byte[openfile_path+3],0 ;openfile_path
  213.         je @f ;if file names exist
  214.                 mov esi,openfile_path
  215.                 call strlen ;eax=strlen
  216.                 call but_no_msg_OpenFile
  217.         @@:
  218.  
  219.  
  220.  
  221. align 4
  222. red_win:
  223.   call draw_window
  224.  
  225. align 4
  226. still:
  227.         mcall 10
  228.         cmp dword[exit_code],1
  229.         je button.exit
  230.  
  231.         cmp al,1 ;¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
  232.         jz red_win
  233.         cmp al,2
  234.         jz key
  235.         cmp al,3
  236.         jz button
  237.         cmp al,6 ;¬ëèì
  238.         jne @f
  239.                 jmp mouse
  240.         @@:
  241.         jmp still
  242.  
  243. align 4
  244. draw_window:
  245.         mcall 12,1
  246.  
  247.         mov edx,[sc.work]
  248.         or  edx,0x73000000
  249.         mov edi,hed
  250.         mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4]
  251.  
  252.         mcall 9,procinfo,-1
  253.         mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
  254.         call EvSize
  255.  
  256.         mov eax,13 ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
  257.         xor ebx,ebx
  258.         mov ecx,ted_wnd_t
  259.         mov bx,word[procinfo.client_box.width]
  260.         inc bx
  261.         int 0x40
  262.  
  263.         ; mov eax,4
  264.         ; mov ebx,185*65536+9
  265.         ; mov ecx,[sc.work_text]
  266.         ; or  ecx,0x80000000
  267.         ; mov edx,txtFile
  268.         ; int 0x40
  269.  
  270.         call draw_but_toolbar
  271.  
  272.         stdcall [ted_draw], tedit0
  273.  
  274.         mcall 12,2
  275.         ret
  276.  
  277. align 4
  278. mouse:
  279.         stdcall [ted_mouse], tedit0
  280.  
  281.         cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
  282.         jne @f
  283.                 stdcall [edit_box_mouse], dword edit2
  284.         @@:
  285.         cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
  286.         jne @f ;.menu_bar_1
  287.         stdcall [tl_mouse], tree1
  288. ;-----------------------------------------------
  289. .menu_bar_1:
  290.         mov [menu_data_1.get_mouse_flag],1
  291. ; mouse event for Menu 1
  292.         stdcall [menu_bar_mouse],dword menu_data_1
  293.         cmp dword[menu_data_1.click],1
  294.         jne .mnu_1
  295.         cmp dword[menu_data_1.cursor_out],4
  296.         je button.exit 
  297.         cmp dword[menu_data_1.cursor_out],3
  298.         jne @f
  299.                 call ted_but_save_file
  300.         @@:
  301.         cmp dword[menu_data_1.cursor_out],2
  302.         jne @f
  303.                 call ted_but_open_file
  304.         @@:
  305.         cmp dword[menu_data_1.cursor_out],1
  306.         jne @f
  307.                 call ted_but_new_file
  308.         @@:
  309. .mnu_1:
  310.         jmp still
  311. ;---------------------------------------------------------------------
  312.  
  313. ;output:
  314. ; ah = symbol
  315. align 4
  316. proc KeyConvertToASCII, table:dword
  317.   push ebx
  318.   mov ebx,dword[table] ;convert scan to ascii
  319.   ror ax,8
  320.   xor ah,ah
  321.   add bx,ax
  322.   mov ah,byte[ebx]
  323.   pop ebx
  324.   ret
  325. endp
  326.  
  327. align 4
  328. key:
  329.   mcall 66,3 ;66.3 ¯®«ãç¨âì á®áâ®ï­¨¥ ã¯à ¢«ïîé¨å ª« ¢¨è
  330.   xor esi,esi
  331.   mov ecx,1
  332.   test al,0x03 ;[Shift]
  333.   jz @f
  334.     mov cl,2
  335.     or esi,KM_SHIFT
  336.   @@:
  337.   test al,0x0c ;[Ctrl]
  338.   jz @f
  339.     or esi,KM_CTRL
  340.   @@:
  341.   test al,0x30 ;[Alt]
  342.   jz @f
  343.     mov cl,3
  344.     or esi,KM_ALT
  345.   @@:
  346.   test al,0x80 ;[NumLock]
  347.   jz @f
  348.     or esi,KM_NUMLOCK
  349.   @@:
  350.  
  351.   mcall 26,2,,conv_tabl ;26.2 ¯®«ãç¨âì à áª« ¤ªã ª« ¢¨ âãàë
  352.   mcall 2 ;¯®«ãç ¥¬ ª®¤ ­ ¦ â®© ª« ¢¨è¨
  353.   stdcall [tl_key], tree1
  354.  
  355.   test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
  356.   je @f
  357.     cmp ah,0x80 ;if key up
  358.     ja still
  359.     cmp ah,42 ;[Shift] (left)
  360.     je still
  361.     cmp ah,54 ;[Shift] (right)
  362.     je still
  363.     cmp ah,56 ;[Alt]
  364.     je still
  365.     cmp ah,29 ;[Ctrl]
  366.     je still
  367.     cmp ah,69 ;[Pause Break]
  368.     je still
  369.  
  370.     stdcall KeyConvertToASCII, dword conv_tabl
  371.     stdcall [edit_box_key], dword edit2
  372.     jmp still
  373.   @@:
  374.  
  375.   stdcall [ted_key], tedit0, conv_tabl,esi
  376.   jmp still
  377.  
  378. align 4
  379. button:
  380. ;  cmp [menu_active],1 ;¥á«¨ ­ ¦ «¨ ¬¥­î, â® á­ ç «  ॠªæ¨ï ­  ¬¥­î
  381. ;  jne @f ;mouse.menu_bar_1
  382. ;    mov [menu_active],0
  383. ;    jmp still
  384. ;  @@:
  385.  
  386.   mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
  387.   cmp ah,3
  388.   jne @f
  389.     call ted_but_new_file
  390.   @@:
  391.   cmp ah,4
  392.   jne @f
  393.     call ted_but_open_file
  394.   @@:
  395.   cmp ah,5
  396.   jne @f
  397.     call ted_but_save_file
  398.   @@:
  399.   cmp ah,6
  400.   jne @f
  401.     stdcall [ted_but_select_word], tedit0
  402.   @@:
  403.   cmp ah,7
  404.   jne @f
  405.     stdcall [ted_but_cut], tedit0
  406.   @@:
  407.   cmp ah,8
  408.   jne @f
  409.     stdcall [ted_but_copy], tedit0
  410.   @@:
  411.   cmp ah,9
  412.   jne @f
  413.     stdcall [ted_but_paste], tedit0
  414.   @@:
  415.   cmp ah,10
  416.   jne @f
  417.     call ted_but_find
  418.   @@:
  419.   cmp ah,11
  420.   jne @f
  421.     call but_replace
  422.   @@:
  423.   cmp ah,12
  424.   jne @f
  425.     call but_find_key_w
  426.   @@:
  427.   cmp ah,13
  428.   jne @f
  429.     stdcall [ted_but_sumb_upper], tedit0
  430.   @@:
  431.   cmp ah,14
  432.   jne @f
  433.     stdcall [ted_but_sumb_lover], tedit0
  434.   @@:
  435.   cmp ah,15
  436.   jne @f
  437.     stdcall [ted_but_reverse], tedit0
  438.   @@:
  439.   cmp ah,16
  440.   jne @f
  441.     stdcall [ted_but_undo], tedit0
  442.   @@:
  443.   cmp ah,17
  444.   jne @f
  445.     stdcall [ted_but_redo], tedit0
  446.   @@:
  447.   cmp ah,18
  448.   jne @f
  449.     stdcall but_sumb_invis, tedit0
  450.   @@:
  451.   cmp ah,19
  452.   jne @f
  453.     stdcall but_k_words_show, tedit0
  454.   @@:
  455.   cmp ah,20
  456.   jne @f
  457.     stdcall but_synt_show, tedit0
  458.   @@:
  459.   cmp ah,21
  460.   jne @f
  461.     stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
  462.   @@:
  463.   cmp ah,22
  464.   jne @f
  465.     stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
  466.   @@:
  467.  
  468.   cmp ah,200
  469.   jne @f
  470.     stdcall ted_but_open_syntax, tedit0
  471.   @@:
  472.   cmp ah,201
  473.   jne @f
  474.     stdcall [ted_but_find_next], tedit0
  475.   @@:
  476.  
  477.   cmp ah,1
  478.   jne still
  479. .exit:
  480.         cmp dword[exit_code],1
  481.         je @f
  482.         stdcall [ted_can_save], tedit0
  483.         cmp al,1
  484.         jne @f
  485.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  486.                 stdcall [mb_setfunctions],msgbox_2E_funct
  487.                 jmp still
  488.         @@:
  489.         stdcall mem.Free,[bmp_icon]
  490.         cmp dword[unpac_mem],0
  491.         je @f
  492.                 stdcall mem.Free,[unpac_mem]
  493.         @@:
  494.  
  495.         stdcall [ted_delete], tedit0
  496.         stdcall dword[tl_data_clear], tree1
  497.         mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
  498.  
  499. edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
  500.  
  501. unpac_mem dd 0
  502.  
  503. if lang eq ru
  504.   head_f_i:
  505.   head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  506.   err_message_found_lib0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'box_lib.obj',39,0
  507.   err_message_import0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib.obj',39,0
  508.   err_message_found_lib1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'msgbox.obj',39,0
  509.   err_message_import1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'msgbox.obj',39,0
  510.   err_message_found_lib2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  511.   err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  512.   err_message_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  513.   err_message_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  514.   err_message_found_lib_4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libini.obj',39,0
  515.   err_message_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini.obj',39,0
  516. else
  517.   head_f_i:
  518.   head_f_l db 'System error',0
  519.   err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
  520.   err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0
  521.   err_message_found_lib1 db 'Sorry I cannot found library ',39,'msgbox.obj',39,0
  522.   err_message_import1 db 'Error on load import library ',39,'msgbox.obj',39,0
  523.   err_message_found_lib2 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0
  524.   err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
  525.   err_message_found_lib_3 db 'Sorry I cannot found library ',39,'libimg.obj',39,0
  526.   err_message_import_3 db 'Error on load import library ',39,'libimg.obj',39,0
  527.   err_message_found_lib_4 db 'Sorry I cannot found library ',39,'libini.obj',39,0
  528.   err_message_import_4 db 'Error on load import library ',39,'libini.obj',39,0
  529. end if
  530.  
  531. ;library structures
  532. l_libs_start:
  533.         lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  534.                 err_message_found_lib0, head_f_l, import_box_lib,err_message_import0, head_f_i
  535.         lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  536.                 err_message_found_lib1, head_f_l, import_msgbox_lib, err_message_import1, head_f_i
  537.         lib2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
  538.                 err_message_found_lib2, head_f_l, import_proclib, err_message_import2, head_f_i
  539.         lib3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
  540.                 err_message_found_lib_3, head_f_l, import_libimg, err_message_import_3, head_f_i
  541.         lib4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\
  542.                 err_message_found_lib_4, head_f_l, import_libini, err_message_import_4, head_f_i
  543. load_lib_end:
  544.  
  545. IncludeIGlobals
  546. hed db 'TextEdit '
  547. i_end:
  548.         openfile_path: ;¯®«­ë© ¯ãâì ª ä ©«ã á ª®â®àë¬ ¨¤¥â à ¡®â 
  549.                 rb 4096
  550.         dir_mem rb 32+304*count_of_dir_list_files
  551.         wnd_s_pos: ;¬¥áâ® ¤«ï ­ áâ஥ª áâ à⮢®© ¯®§¨æ¨¨ ®ª­ 
  552.                 rq 1
  553.         last_open_synt_file rb 32 ;¨¬ï ¯®á«¥¤­¥£® ¯®¤ª«î祭­®£® ä ©«  ᨭ⠪á¨á 
  554.         buf rb BUF_SIZE ;¡ãä¥à ¤«ï ª®¯¨à®¢ ­¨ï ¨ ¢áâ ¢ª¨
  555.         buf_find rb 302 ;¡ãä¥à ¤«ï ¯®¨áª  ⥪áâ 
  556. IncludeUGlobals
  557.         align 16
  558.         procinfo process_information
  559.                 rb 1024
  560.         thread:
  561.         rb 1024
  562.     thread_coords:
  563.         rb 1024
  564. stacktop:
  565.         sys_path: ;¯ãâì ®âªã¤  § ¯ãá⨫áï ¨á¯®«­ï¥¬ë© ä ©«
  566.                 rb 4096
  567.         file_name: ;¯ à ¬¥âàë § ¯ã᪠
  568.                 rb 4096
  569.         syntax_path: ;¨¬ï ¯®¤ª«îç ¥¬®£® ä ©«  ᨭ⠪á¨á 
  570.                 rb 4096
  571.         plugin_path:
  572.                 rb 4096
  573.         text_work_area: ;¯ãâì ª ä ©«ã, ª®â®àë© ¯®ª §ë¢ ¥âáï ¢ ®ª­¥
  574.                 rb 4096
  575.         filename_area: ;¨¬ï ä ©«  ¤«ï ¤¨ «®£  ®âªàëâ¨ï/§ ªàëâ¨ï
  576.                 rb 256
  577.         file_info:
  578.                 rb 40
  579. mem:
  580.