Subversion Repositories Kolibri OS

Rev

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

  1. ;   RDsave ¤«ï Kolibri (0.6.5.0 ¨ áâ àè¥)
  2. ;   Save RAM-disk to hard or floppy drive
  3. ;---------------------------------------------------------------------
  4. ;   Mario79 2005
  5. ;   Heavyiron 12.02.2007
  6. ;   <Lrz>     11.05.2009 - ¤«ï à ¡®âë ­ã¦­  á¨á⥬­ ï ¡¨¡«¨®â¥ª  box_lib.obj
  7. ;   Mario79   08.09.2010 - select path with OpenDialog,keys 1,2,3,4 for select options
  8. ;   Heavyiron 01.12.2013 - new logic
  9. ;---------------------------------------------------------------------
  10. appname equ 'RDsave '
  11. version equ '1.43'
  12. debug   equ no
  13.  
  14. use32        ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
  15. org 0x0      ;  ¤à¥á æ¨ï á ­ã«ï
  16.  
  17. db 'MENUET01'    ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
  18. dd 0x01          ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
  19. dd START         ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
  20. dd IM_END        ; à §¬¥à ¯à®£à ¬¬ë
  21. dd I_END         ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
  22. dd stacktop      ;  ¤à¥á ¢¥à設ë á⥪ 
  23. dd PARAMS        ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢
  24. dd cur_dir_path
  25.  
  26.  
  27. include 'lang.inc'
  28. include '../../../macros.inc'
  29. if debug eq yes
  30. include '../../../debug.inc'
  31. end if
  32. include '../../../proc32.inc'
  33. include '../../../dll.inc'
  34. include '../../../develop/libraries/box_lib/load_lib.mac'
  35. include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
  36. include 'str.inc'
  37.  
  38.         @use_library
  39. ;---------------------------------------------------------------------
  40. ;---  €—€‹Ž Žƒ€ŒŒ›  ----------------------------------------------
  41. ;---------------------------------------------------------------------
  42. align 4
  43. START:
  44. ;---------------------------------------------------------------------
  45.         mcall  48,3,sc,sizeof.system_colors
  46.         mcall  68,11
  47.  
  48. load_libraries l_libs_start,end_l_libs
  49.         inc     eax
  50.         test    eax,eax
  51.         jz      close
  52.  
  53.         stdcall dll.Init,[init_lib]
  54.  
  55.         invoke  ini_get_int,ini_file,asettings,aautoclose,0
  56.         mov     [autoclose],eax
  57.         invoke  ini_get_str,ini_file,apath,apath,fname_buf,4096,path
  58.         stdcall _lstrcpy,ini_path,fname_buf
  59.         stdcall _lstrcpy,filename_area,start_temp_file_name
  60.  
  61.         mov   eax,PARAMS
  62.         cmp   byte[eax], 0
  63.         je    no_params
  64.         cmp   byte[eax], 'h'
  65.         je    @f
  66.         cmp   byte[eax], 'H'
  67.         jne   .no_h
  68. @@:
  69.         mov   [hidden],1
  70.         jmp   no_params
  71. .no_h:
  72.         mov   [param],1
  73.         stdcall _lstrcpy,fname_buf,eax
  74.         mov   ah,2
  75.         jmp   noclose
  76.  
  77. ;---------------------------------------------------------------------
  78. no_params:
  79.         stdcall _lstrcpy,check_dir,ini_path
  80.         call    check_path
  81.         test    eax,eax
  82.         jz      path_ok
  83.         cmp     eax,6
  84.         je      path_ok
  85. ;---------------------------------------------------------------------
  86. if debug eq yes
  87. dps 'read_folder_error'
  88. newline
  89. end if
  90. ;---------------------------------------------------------------------
  91. default_path:
  92.         stdcall _lstrcpy,fname_buf,communication_area_default_path
  93.         mov     [hidden],0
  94.  
  95. ;OpenDialog     initialisation
  96.         push    dword OpenDialog_data
  97.         call    [OpenDialog_Init]
  98.  
  99. ; prepare for PathShow
  100.         push    dword PathShow_data_1
  101.         call    [PathShow_prepare]
  102.  
  103.         mcall   40,0x00000027
  104.  
  105.         call    draw_window
  106.         mov     ah,3
  107.         jmp     noclose
  108. ;---------------------------------------------------------------------
  109. path_ok:
  110. ;OpenDialog     initialisation
  111.         push    dword OpenDialog_data
  112.         call    [OpenDialog_Init]
  113.  
  114. ; prepare for PathShow
  115.         push    dword PathShow_data_1
  116.         call    [PathShow_prepare]
  117.  
  118.         mcall   40,0x00000027
  119.  
  120.         cmp     [hidden],1
  121.         jne     red
  122.         mov     ah,2
  123.         jmp     noclose
  124. red:
  125.         call    draw_window
  126. ;---------------------------------------------------------------------
  127. still:
  128.         mcall 10
  129.  
  130.         dec     eax      ; ¯¥à¥à¨á®¢ âì ®ª­®?
  131.         jz      red      ; ¥á«¨ ¤  - ­  ¬¥âªã red
  132.         dec     eax
  133.         jz      key
  134.         dec     eax
  135.         jz      button
  136.         jmp     still
  137. ;---------------------------------------------------------------------
  138. button:
  139.         mcall   17      ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
  140.         cmp     ah,1             ; ª­®¯ª  á id=1("§ ªàëâì")?
  141.         jne     noclose
  142. close:
  143.         mcall   -1          ; äã­ªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
  144.  
  145. ;---------------------------------------------------------------------
  146. key:
  147.         mcall   2
  148.         cmp     ah,0x1b
  149.         je      close
  150.         cmp     ah,0x0D
  151.         jne     @f
  152.         mov     ah,2
  153.         jmp     noclose
  154. @@:
  155.         cmp     ah,9h
  156.         jne     still
  157. ;---------------------------------------------------------------------
  158. noclose:
  159.         mov     ecx,fname_buf
  160.         push  16
  161.         mov   ebx,1
  162.         cmp   byte[ecx+1],'f'
  163.         je    @f
  164.         cmp   byte[ecx+1],'F'
  165.         jne   not_fdd
  166. @@:
  167.         cmp   byte[ecx+4],'1'
  168.         jne   @f
  169.         cmp   ah,2
  170.         je    doit
  171. @@:
  172.         inc   ebx
  173.         cmp   ah,2
  174.         je    doit
  175. not_fdd:
  176.         push  18
  177.         mov   ebx,6     ; 18.6 = save to specified folder
  178.         cmp   ah,2
  179.         je    doit
  180.  
  181. ; invoke OpenDialog
  182.         push    dword OpenDialog_data
  183.         call    [OpenDialog_Start]
  184.         cmp     [OpenDialog_data.status],1
  185.         jne     still
  186.  
  187. ; prepare for PathShow
  188.         push    dword PathShow_data_1
  189.         call    [PathShow_prepare]
  190.         call    draw_window
  191.         mov     ah,2
  192.         jmp     noclose
  193.  
  194. doit:
  195.         cmp     [param],0
  196.         jne      @f
  197.         call    save_ini
  198. @@:
  199.         cmp     byte[ecx+1],'r'
  200.         je      @f
  201.         cmp     byte[ecx+1],'R'
  202.         jne     not_rd
  203. @@:
  204.         mov     edx,rdError
  205.         call    print_err
  206.         jmp     still
  207. not_rd:
  208.         cmp      [hidden],0
  209.         jne      @f
  210.         pusha
  211.         stdcall  _lstrcpy,msg,label2
  212.         mov      eax,[sc.work_text]
  213.         or       eax,0xc0000088
  214.         mov      [color],eax
  215.         call    print_msg
  216.         popa
  217. @@:
  218.         pop     eax
  219.         mcall
  220.         call    check_for_error
  221.         jmp     still
  222.  
  223. ;---------------------------------------------------------------------
  224. check_for_error:                      ;Ž¡à ¡®â稪 ®è¨¡®ª
  225.         test    eax,eax
  226.         jz      print_ok
  227.         cmp     ebx,6
  228.         je      @f
  229.         mov     edx,error11
  230.         jmp     print_err
  231. @@:
  232.         cmp     eax, 11
  233.         ja      .unknown
  234.         mov     edx, [errors+eax*4]
  235.         stdcall _lstrcpy,msg,error
  236.         stdcall _lstrcat,msg,edx
  237.         mov     edx,msg
  238.         jmp     print_err
  239. .unknown:
  240.         mov     edx, aUnknownError
  241.  
  242. print_err:
  243.         stdcall _lstrlen,ini_path
  244.         pusha
  245.         invoke  ini_set_str,ini_file,apath,apath,ini_path,eax
  246.         popa
  247.         stdcall _lstrcpy,msg,edx
  248.         cmp     [hidden],1
  249.         je      @f
  250.         cmp     [param],1
  251.         je      @f
  252.         mov      ecx,[sc.work_text]
  253.         or       ecx,0xc0880000
  254.         mov      [color],ecx
  255.         call    print_msg
  256.         ret
  257. @@:
  258.         stdcall _lstrcpy, ntf_msg, ntf_start
  259.         stdcall _lstrcat, ntf_msg, edx
  260.         stdcall _lstrcat, ntf_msg, ntf_end_e
  261.         mov     dword [is_notify + 8], ntf_msg
  262.         mcall   70, is_notify
  263.         mov     [param],0
  264.         mov     [hidden],0
  265.         stdcall _lstrcpy,fname_buf,ini_path
  266.         jmp     no_params
  267.  
  268. print_ok:
  269.         cmp      [hidden],1
  270.         je       @f
  271.         cmp      [param],1
  272.         je       @f
  273.         stdcall  _lstrcpy,msg,ok
  274.         mov      ecx,[sc.work_text]
  275.         or       ecx,0xc0008800
  276.         mov      [color],ecx
  277.         call     print_msg
  278.         mcall    5,100
  279.         cmp      [autoclose],1
  280.         je       close
  281.         ret
  282. @@:
  283.         stdcall  _lstrcpy,msg,ok
  284.         stdcall  _lstrcat,msg,fname_buf
  285.         stdcall _lstrcpy, ntf_msg, ntf_start
  286.         stdcall _lstrcat, ntf_msg, msg
  287.         stdcall _lstrcat, ntf_msg, ntf_end_o
  288.         mov      edx,ntf_msg
  289.         mov      dword [is_notify + 8], edx
  290.         mcall    70, is_notify
  291.         mcall    5,100
  292.         jmp      close
  293. ;---------------------------------------------------------------------
  294. print_msg:
  295.         mcall   13,<5,380>,<96,10>,[sc.work]
  296.         stdcall _lstrlen,msg
  297.         lea     eax,[eax+eax*2]
  298.         add     eax,eax
  299.         mov     ebx,390
  300.         sub     ebx,eax
  301.         shl     ebx,15
  302.         add     ebx,96
  303.         mcall   4, ,[color],msg, ,[sc.work]
  304.         ret
  305. ;---------------------------------------------------------------------
  306. draw_PathShow:
  307.         pusha
  308.         mcall   13,<15,280>,<32,16>,0xffffff
  309.         push    dword PathShow_data_1
  310.         call    [PathShow_draw]
  311.         popa
  312.         ret
  313. ;---------------------------------------------------------------------
  314. save_ini:
  315.         pusha
  316.         stdcall _lstrlen,fname_buf
  317.         invoke  ini_set_str,ini_file,apath,apath,fname_buf,eax
  318.         invoke  ini_set_int,ini_file,asettings,aautoclose,[autoclose]
  319.         popa
  320.         ret
  321. ;---------------------------------------------------------------------
  322. check_path:
  323. stdcall _lstrlen,check_dir
  324.         add     eax,check_dir
  325. @@:
  326.         dec     eax
  327.         cmp     byte [eax],'/'
  328.         jne     @b
  329.         mov     byte [eax+1],0
  330.  
  331.         mcall   70,read_folder
  332.         ret
  333. ;---------------------------------------------------------------------
  334. ;---  Draw window  ---------------------------------------------------
  335. ;---------------------------------------------------------------------
  336. draw_window:
  337.         mcall   12,1
  338.  
  339.         mov     edx,[sc.work]
  340.         or      edx,0x34000000
  341.         mcall   0,<200,400>,<200,130>, , ,title
  342.  
  343. ;buttons
  344.         mcall   8,<198,70>,<68,20>,1,[sc.work_button]
  345.         inc     edx
  346.         mcall    ,<125,70>,
  347.         inc     edx
  348.         mcall    ,<300,75>,<30,20>
  349.  
  350. ;labels
  351.         mov     ecx,[sc.work_button_text]
  352.         or      ecx,0x80000000
  353.         mcall   4,<134,75>, ,save
  354.         mcall    ,<215,75>, ,cancel
  355.         mcall    ,<315,36>, ,select
  356.  
  357.         mov     ecx,[sc.work]
  358.         mov     dword [frame_data.font_backgr_color],ecx
  359.         push    dword frame_data
  360.         call    [Frame_draw]
  361.  
  362.         call    draw_PathShow
  363.         call    print_msg
  364.  
  365.         mcall   12,2
  366.         ret
  367.  
  368. ;---------------------------------------------------------------------
  369. ;---  Data  ----------------------------------------------------------
  370. ;---------------------------------------------------------------------
  371. if lang eq ru
  372. save            db '‘®åà ­¨âì',0
  373. cancel          db 'Žâ¬¥­ ',0
  374. select          db 'ˆ§¬¥­¨âì',0
  375. label1          db ' Ž¡à § ¡ã¤¥â á®åà ­¥­ ¢: ',0
  376. label2          db '‘®åà ­¥­¨¥ ®¡à § ...',0
  377. ok              db 'RAM-¤¨áª á®åà ­¥­ ãᯥ譮 ',0
  378. error1          db '­¥ ®¯à¥¤¥«¥­  ¡ §  ¨/¨«¨ à §¤¥« ¦ñá⪮£® ¤¨áª ',0
  379. error2          db 'äã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï ¤ ­­®© ä ©«®¢®© á¨á⥬ë',0
  380. error3          db '­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0
  381. error4          db 'áâà ­­®... Žè¨¡ª  4',0
  382. error5          db '­¥áãé¥áâ¢ãî騩 ¯ãâì',0
  383. error6          db 'ä ©« § ª®­ç¨«áï',0
  384. error7          db '㪠§ â¥«ì ¢­¥ ¯ ¬ï⨠¯à¨«®¦¥­¨ï',0
  385. error8          db '¤¨áª § ¯®«­¥­',0
  386. error9          db 'ä ©«®¢ ï áâàãªâãà  à §àã襭 ',0
  387. error10         db '¤®áâ㯠§ ¯à¥éñ­',0
  388. error11         db 'Žè¨¡ª  ãáâனá⢠',0
  389. aUnknownError   db '¥¨§¢¥áâ­ ï ®è¨¡ª ',0
  390. rdError         db '¥«ì§ï á®åà ­ïâì ®¡à § ¢ á ¬®£® ᥡï',0
  391. error           db 'Žè¨¡ª : ',0
  392. ;---------------------------------------------------------------------
  393. else if lang eq et
  394. save            db 'Salvesta',0
  395. cancel          db 'Cancel',0
  396. select          db ' Valige',0
  397. label1          db ' RAM-drive will be saved as: ',0
  398. label2          db 'Saving in progress...',0
  399. ok              db 'RAM-ketas salvestatud edukalt ',0
  400. error1          db 'hard disk base and/or partition not defined',0
  401. error2          db 'the file system does not support this function',0
  402. error3          db 'tundmatu failisüsteem',0
  403. error4          db 'strange... Error 4',0
  404. error5          db 'vigane teekond',0
  405. error6          db 'end of file',0
  406. error7          db 'pointer is outside of application memory',0
  407. error8          db 'ketas täis',0
  408. error9          db 'FAT tabel vigane',0
  409. error10         db 'juurdepääs keelatud',0
  410. error11         db 'Seadme viga',0
  411. aUnknownError   db 'Tundmatu viga',0
  412. rdError         db "You can't save image on itself",0
  413. error           db 'Viga: ',0
  414. ;---------------------------------------------------------------------
  415. else if lang eq it
  416. save            db '  Salva',0
  417. cancel          db 'Cancel',0
  418. select          db 'Seleziona',0
  419. label1          db ' RAM-drive will be saved as: ',0
  420. label2          db 'Saving in progress...',0
  421. ok              db 'Il RAM-drivet e stato salvato ',0
  422. error1          db 'hard disk base and/or partition not defined',0
  423. error2          db 'the file system does not support this function',0
  424. error3          db 'filesystem sconosciuto',0
  425. error4          db 'strange... Error 4',0
  426. error5          db 'percorso non valido',0
  427. error6          db 'end of file',0
  428. error7          db 'pointer is outside of application memory',0
  429. error8          db 'disco pieno',0
  430. error9          db 'tabella FAT corrotta',0
  431. error10         db 'accesso negato',0
  432. error11         db 'Errore di device',0
  433. aUnknownError   db 'Errore sconosciuto',0
  434. rdError         db "You can't save image on itself",0
  435. error           db 'Errore: ',0
  436. ;---------------------------------------------------------------------
  437. else
  438. save            db '  Save',0
  439. cancel          db 'Cancel',0
  440. select          db ' Select',0
  441. label1          db ' RAM-drive will be saved as: ',0
  442. label2          db 'Saving in progress...',0
  443. ok              db 'RAM-drive was saved successfully ',0
  444. error1          db 'hard disk base and/or partition not defined',0
  445. error2          db 'the file system does not support this function',0
  446. error3          db 'unknown file system',0
  447. error4          db 'strange... Error 4',0
  448. error5          db 'incorrect path',0
  449. error6          db 'end of file',0
  450. error7          db 'pointer is outside of application memory',0
  451. error8          db 'disk is full',0
  452. error9          db 'file structure is destroyed',0
  453. error10         db 'access denied',0
  454. error11         db 'Device error',0
  455. aUnknownError   db 'Unknown error',0
  456. rdError         db "You can't save image on itself",0
  457. error           db 'Error: ',0
  458. end if
  459. ;---------------------------------------------------------------------
  460. ntf_start       db '"RDSave\n', 0
  461. ntf_end_o       db '" -tO', 0
  462. ntf_end_e       db '" -tE', 0
  463. ;---------------------------------------------------------------------
  464. errors:
  465.         dd      ok
  466.         dd      error1
  467.         dd      error2
  468.         dd      error3
  469.         dd      error4
  470.         dd      error5
  471.         dd      error6
  472.         dd      error7
  473.         dd      error8
  474.         dd      error9
  475.         dd      error10
  476.         dd      error11
  477. ;---------------------------------------------------------------------
  478.  
  479. title   db appname,version,0
  480.  
  481. ;Lib_DATA
  482. ;‚ᥣ¤  ᮡ«î¤ âì ¯®á«¥¤®¢ â¥«ì­®áâì ¢ ¨¬¥­¨.
  483. system_dir_Boxlib       db '/sys/lib/box_lib.obj',0
  484. system_dir_ProcLib      db '/sys/lib/proc_lib.obj',0
  485. system_dir_libini       db '/sys/lib/libini.obj',0
  486. ;---------------------------------------------------------------------
  487. head_f_i:
  488. head_f_l        db 'System error',0
  489.  
  490. err_message_found_lib1  db 'box_lib.obj - Not found!',0
  491. err_message_found_lib2  db 'proc_lib.obj - Not found!',0
  492. err_message_found_lib3  db 'libini.obj - Not found!',0
  493.  
  494. err_message_import1     db 'box_lib.obj - Wrong import!',0
  495. err_message_import2     db 'proc_lib.obj - Wrong import!',0
  496. err_message_import3     db 'libini.obj - Wrong import!',0
  497. ;---------------------------------------------------------------------
  498. l_libs_start:
  499.  
  500. library01  l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
  501. err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
  502.  
  503. library02  l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
  504. err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
  505.  
  506. library03  l_libs system_dir_libini+9, cur_dir_path, library_path, system_dir_libini, \
  507. err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
  508.  
  509. end_l_libs:
  510. ;---------------------------------------------------------------------
  511. OpenDialog_data:
  512. .type                   dd 1    ; Save
  513. .procinfo               dd procinfo     ;+4
  514. .com_area_name          dd communication_area_name      ;+8
  515. .com_area               dd 0    ;+12
  516. .opendir_path           dd temp_dir_path        ;+16
  517. .dir_default_path       dd communication_area_default_path      ;+20
  518. .start_path             dd open_dialog_path     ;+24
  519. .draw_window            dd draw_window  ;+28
  520. .status                 dd 0    ;+32
  521. .openfile_pach          dd fname_buf    ;+36
  522. .filename_area          dd filename_area        ;+40
  523. .filter_area            dd Filter
  524. .x:
  525. .x_size                 dw 420 ;+48 ; Window X size
  526. .x_start                dw 200 ;+50 ; Window X position
  527. .y:
  528. .y_size                 dw 320 ;+52 ; Window y size
  529. .y_start                dw 120 ;+54 ; Window Y position
  530.  
  531. communication_area_name:
  532.         db 'FFFFFFFF_open_dialog',0
  533. open_dialog_path:
  534. if __nightbuild eq yes
  535.     db '/sys/MANAGERS/opendial',0
  536. else
  537.     db '/sys/File Managers/opendial',0
  538. end if
  539. communication_area_default_path:
  540.         db '/',0
  541.  
  542. Filter:
  543. dd      Filter.end - Filter
  544. .1:
  545. db      'IMG',0
  546. db      'IMA',0
  547. .end:
  548. db      0
  549.  
  550. start_temp_file_name:   db 'kolibri.img',0
  551.  
  552. ;---------------------------------------------------------------------
  553. align 4
  554. ProcLib_import:
  555. OpenDialog_Init         dd aOpenDialog_Init
  556. OpenDialog_Start        dd aOpenDialog_Start
  557.         dd      0
  558.         dd      0
  559. aOpenDialog_Init        db 'OpenDialog_init',0
  560. aOpenDialog_Start       db 'OpenDialog_start',0
  561. ;---------------------------------------------------------------------
  562. PathShow_data_1:
  563. .type                   dd 0    ;+0
  564. .start_y                dw 36   ;+4
  565. .start_x                dw 20   ;+6
  566. .font_size_x            dw 6    ;+8     ; 6 - for font 0, 8 - for font 1
  567. .area_size_x            dw 270  ;+10
  568. .font_number            dd 0    ;+12    ; 0 - monospace, 1 - variable
  569. .background_flag        dd 0    ;+16
  570. .font_color             dd 0    ;+20
  571. .background_color       dd 0    ;+24
  572. .text_pointer           dd fname_buf    ;+28
  573. .work_area_pointer      dd text_work_area       ;+32
  574. .temp_text_length       dd 0    ;+36
  575. ;---------------------------------------------------------------------
  576. align 4
  577. Box_lib_import:
  578. ;edit_box_draw           dd aEdit_box_draw
  579. ;edit_box_key            dd aEdit_box_key
  580. ;edit_box_mouse          dd aEdit_box_mouse
  581. ;version_ed              dd aVersion_ed
  582.  
  583. PathShow_prepare        dd sz_PathShow_prepare
  584. PathShow_draw           dd sz_PathShow_draw
  585. Frame_draw              dd sz_Frame_draw
  586.                         dd 0
  587.                         dd 0
  588.  
  589. ;aEdit_box_draw          db 'edit_box',0
  590. ;aEdit_box_key           db 'edit_box_key',0
  591. ;aEdit_box_mouse         db 'edit_box_mouse',0
  592. ;aVersion_ed             db 'version_ed',0
  593.  
  594. sz_PathShow_prepare     db 'PathShow_prepare',0
  595. sz_PathShow_draw        db 'PathShow_draw',0
  596.  
  597. sz_Frame_draw           db 'frame_draw',0
  598. ;szVersion_frame        db 'version_frame',0
  599. ;---------------------------------------------------------------------
  600. frame_data:
  601. .type                   dd 0 ;+0
  602. .x:
  603. .x_size                 dw 374 ;+4
  604. .x_start                dw 8 ;+6
  605. .y:
  606. .y_size                 dw 45 ;+8
  607. .y_start                dw 17 ;+10
  608. .ext_fr_col             dd 0x888888 ;+12
  609. .int_fr_col             dd 0xffffff ;+16
  610. .draw_text_flag         dd 1 ;+20
  611. .text_pointer           dd label1 ;+24
  612. .text_position          dd 0 ;+28
  613. .font_number            dd 0 ;+32
  614. .font_size_y            dd 9 ;+36
  615. .font_color             dd 0x0 ;+40
  616. .font_backgr_color      dd 0xdddddd ;+44
  617. ;---------------------------------------------------------------------
  618. align 4
  619. libini_import:
  620. init_lib     dd a_init
  621. ini_get_str  dd aini_get_str
  622. ini_get_int  dd aini_get_int
  623. ini_set_str  dd aini_set_str
  624. ini_set_int  dd aini_set_int
  625.              dd 0
  626.              dd 0
  627. a_init       db 'lib_init',0
  628. aini_get_str db 'ini_get_str',0
  629. aini_get_int db 'ini_get_int',0
  630. aini_set_str db 'ini_set_str',0
  631. aini_set_int db 'ini_set_int',0
  632. ;---------------------------------------------------------------------
  633.  
  634. apath db 'path',0
  635. asettings db 'settings',0
  636. aautoclose db 'autoclose',0
  637. path    db '/hd2/1/kolibri.img',0
  638. ini_file db  '/sys/settings/rdsave.ini',0
  639. ;ini_file db  '/sys/rdsave.ini',0
  640. ;---------------------------------------------------------------------
  641. is_notify:
  642.     dd    7, 0, ok, 0, 0
  643.     db    "/rd/1/@notify", 0
  644.  
  645. read_folder:
  646. .subfunction    dd 1
  647. .start          dd 0
  648. .flags          dd 0
  649. .size           dd 1
  650. .return         dd folder_data
  651.                 db 0
  652. .name:          dd check_dir
  653.  
  654. param dd 0
  655. hidden dd 0
  656. ;---------------------------------------------------------------------
  657. IM_END:
  658. ;---------------------------------------------------------------------
  659. align 4
  660. PARAMS:
  661.        rb 256
  662. ini_path:
  663.         rb 4096
  664. check_dir:
  665.         rb 4096
  666.  
  667. sc     system_colors
  668.  
  669. autoclose rd 1
  670.  
  671. color   rd 1
  672.  
  673. msg:
  674.         rb 1024
  675.  
  676. ntf_msg:
  677.         rb 1024
  678.  
  679. folder_data:
  680.         rb 304*32+32 ; 9 Kb
  681. ;---------------------------------------------------------------------
  682. cur_dir_path:
  683.         rb 4096
  684. ;---------------------------------------------------------------------
  685. library_path:
  686.         rb 4096
  687. ;---------------------------------------------------------------------
  688. temp_dir_path:
  689.         rb 4096
  690. ;---------------------------------------------------------------------
  691. fname_buf:
  692.         rb 4096
  693. ;---------------------------------------------------------------------
  694. procinfo:
  695.         rb 1024
  696. ;---------------------------------------------------------------------
  697. filename_area:
  698.         rb 256
  699. ;---------------------------------------------------------------------
  700. text_work_area:
  701.         rb 1024
  702. ;---------------------------------------------------------------------
  703. align 32
  704.         rb 4096
  705. stacktop:
  706. I_END: