Subversion Repositories Kolibri OS

Rev

Rev 4290 | Rev 4810 | 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.         mov     dword [is_notify + 8], edx
  259.         mcall   70, is_notify
  260.         mov     [param],0
  261.         mov     [hidden],0
  262.         stdcall _lstrcpy,fname_buf,ini_path
  263.         jmp     no_params
  264.  
  265. print_ok:
  266.         cmp      [hidden],1
  267.         je       @f
  268.         cmp      [param],1
  269.         je       @f
  270.         stdcall  _lstrcpy,msg,ok
  271.         mov      ecx,[sc.work_text]
  272.         or       ecx,0xc0008800
  273.         mov      [color],ecx
  274.         call     print_msg
  275.         mcall    5,100
  276.         cmp      [autoclose],1
  277.         je       close
  278.         ret
  279. @@:
  280.         stdcall  _lstrcpy,msg,ok
  281.         stdcall  _lstrcat,msg,fname_buf
  282.         mov      edx,msg
  283.         mov      dword [is_notify + 8], edx
  284.         mcall    70, is_notify
  285.         mcall    5,100
  286.         jmp      close
  287. ;---------------------------------------------------------------------
  288. print_msg:
  289.         mcall   13,<5,380>,<96,10>,[sc.work]
  290.         stdcall _lstrlen,msg
  291.         lea     eax,[eax+eax*2]
  292.         add     eax,eax
  293.         mov     ebx,390
  294.         sub     ebx,eax
  295.         shl     ebx,15
  296.         add     ebx,96
  297.         mcall   4, ,[color],msg, ,[sc.work]
  298.         ret
  299. ;---------------------------------------------------------------------
  300. draw_PathShow:
  301.         pusha
  302.         mcall   13,<15,280>,<32,16>,0xffffff
  303.         push    dword PathShow_data_1
  304.         call    [PathShow_draw]
  305.         popa
  306.         ret
  307. ;---------------------------------------------------------------------
  308. save_ini:
  309.         pusha
  310.         stdcall _lstrlen,fname_buf
  311.         invoke  ini_set_str,ini_file,apath,apath,fname_buf,eax
  312.         invoke  ini_set_int,ini_file,asettings,aautoclose,[autoclose]
  313.         popa
  314.         ret
  315. ;---------------------------------------------------------------------
  316. check_path:
  317. stdcall _lstrlen,check_dir
  318.         add     eax,check_dir
  319. @@:
  320.         dec     eax
  321.         cmp     byte [eax],'/'
  322.         jne     @b
  323.         mov     byte [eax+1],0
  324.  
  325.         mcall   70,read_folder
  326.         ret
  327. ;---------------------------------------------------------------------
  328. ;---  Draw window  ---------------------------------------------------
  329. ;---------------------------------------------------------------------
  330. draw_window:
  331.         mcall   12,1
  332.  
  333.         mov     edx,[sc.work]
  334.         or      edx,0x34000000
  335.         mcall   0,<200,400>,<200,130>, , ,title
  336.  
  337. ;buttons
  338.         mcall   8,<198,70>,<68,20>,1,[sc.work_button]
  339.         inc     edx
  340.         mcall    ,<125,70>,
  341.         inc     edx
  342.         mcall    ,<300,75>,<30,20>
  343.  
  344. ;labels
  345.         mov     ecx,[sc.work_button_text]
  346.         or      ecx,0x80000000
  347.         mcall   4,<134,75>, ,save
  348.         mcall    ,<215,75>, ,cancel
  349.         mcall    ,<315,36>, ,select
  350.        
  351.         mov     ecx,[sc.work]
  352.         mov     dword [frame_data.font_backgr_color],ecx
  353.         push    dword frame_data
  354.         call    [Frame_draw]
  355.  
  356.         call    draw_PathShow
  357.         call    print_msg
  358.  
  359.         mcall   12,2
  360.         ret
  361.  
  362. ;---------------------------------------------------------------------
  363. ;---  Data  ----------------------------------------------------------
  364. ;---------------------------------------------------------------------
  365. if lang eq ru
  366. save            db '‘®åà ­¨âì',0
  367. cancel          db 'Žâ¬¥­ ',0
  368. select          db 'ˆ§¬¥­¨âì',0
  369. label1          db ' Ž¡à § ¡ã¤¥â á®åà ­¥­ ¢: ',0
  370. label2          db '‘®åà ­¥­¨¥ ®¡à § ...',0
  371. ok              db 'RAM-¤¨áª á®åà ­¥­ ãᯥ譮 ',0
  372. error1          db '­¥ ®¯à¥¤¥«¥­  ¡ §  ¨/¨«¨ à §¤¥« ¦ñá⪮£® ¤¨áª ',0
  373. error2          db 'äã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï ¤ ­­®© ä ©«®¢®© á¨á⥬ë',0
  374. error3          db '­¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0
  375. error4          db 'áâà ­­®... Žè¨¡ª  4',0
  376. error5          db '­¥áãé¥áâ¢ãî騩 ¯ãâì',0
  377. error6          db 'ä ©« § ª®­ç¨«áï',0
  378. error7          db '㪠§ â¥«ì ¢­¥ ¯ ¬ï⨠¯à¨«®¦¥­¨ï',0
  379. error8          db '¤¨áª § ¯®«­¥­',0
  380. error9          db 'ä ©«®¢ ï áâàãªâãà  à §àã襭 ',0
  381. error10         db '¤®áâ㯠§ ¯à¥éñ­',0
  382. error11         db 'Žè¨¡ª  ãáâனá⢠',0
  383. aUnknownError   db '¥¨§¢¥áâ­ ï ®è¨¡ª ',0
  384. rdError         db '¥«ì§ï á®åà ­ïâì ®¡à § ¢ á ¬®£® ᥡï',0
  385. error           db 'Žè¨¡ª : ',0
  386. ;---------------------------------------------------------------------
  387. else if lang eq et
  388. save            db 'Salvesta',0
  389. cancel          db 'Cancel',0
  390. select          db ' Valige',0
  391. label1          db ' RAM-drive will be saved as: ',0
  392. label2          db 'Saving in progress...',0
  393. ok              db 'RAM-ketas salvestatud edukalt ',0
  394. error1          db 'hard disk base and/or partition not defined',0
  395. error2          db 'the file system does not support this function',0
  396. error3          db 'tundmatu failisüsteem',0
  397. error4          db 'strange... Error 4',0
  398. error5          db 'vigane teekond',0
  399. error6          db 'end of file',0
  400. error7          db 'pointer is outside of application memory',0
  401. error8          db 'ketas täis',0
  402. error9          db 'FAT tabel vigane',0
  403. error10         db 'juurdepääs keelatud',0
  404. error11         db 'Seadme viga',0
  405. aUnknownError   db 'Tundmatu viga',0
  406. rdError         db "You can't save image on itself",0
  407. error           db 'Viga: ',0
  408. ;---------------------------------------------------------------------
  409. else if lang eq it
  410. save            db '  Salva',0
  411. cancel          db 'Cancel',0
  412. select          db 'Seleziona',0
  413. label1          db ' RAM-drive will be saved as: ',0
  414. label2          db 'Saving in progress...',0
  415. ok              db 'Il RAM-drivet e stato salvato ',0
  416. error1          db 'hard disk base and/or partition not defined',0
  417. error2          db 'the file system does not support this function',0
  418. error3          db 'filesystem sconosciuto',0
  419. error4          db 'strange... Error 4',0
  420. error5          db 'percorso non valido',0
  421. error6          db 'end of file',0
  422. error7          db 'pointer is outside of application memory',0
  423. error8          db 'disco pieno',0
  424. error9          db 'tabella FAT corrotta',0
  425. error10         db 'accesso negato',0
  426. error11         db 'Errore di device',0
  427. aUnknownError   db 'Errore sconosciuto',0
  428. rdError         db "You can't save image on itself",0
  429. error           db 'Errore: ',0
  430. ;---------------------------------------------------------------------
  431. else
  432. save            db '  Save',0
  433. cancel          db 'Cancel',0
  434. select          db ' Select',0
  435. label1          db ' RAM-drive will be saved as: ',0
  436. label2          db 'Saving in progress...',0
  437. ok              db 'RAM-drive was saved successfully ',0
  438. error1          db 'hard disk base and/or partition not defined',0
  439. error2          db 'the file system does not support this function',0
  440. error3          db 'unknown file system',0
  441. error4          db 'strange... Error 4',0
  442. error5          db 'incorrect path',0
  443. error6          db 'end of file',0
  444. error7          db 'pointer is outside of application memory',0
  445. error8          db 'disk is full',0
  446. error9          db 'file structure is destroyed',0
  447. error10         db 'access denied',0
  448. error11         db 'Device error',0
  449. aUnknownError   db 'Unknown error',0
  450. rdError         db "You can't save image on itself",0
  451. error           db 'Error: ',0
  452. end if
  453. ;---------------------------------------------------------------------
  454. errors:
  455.         dd      ok
  456.         dd      error1
  457.         dd      error2
  458.         dd      error3
  459.         dd      error4
  460.         dd      error5
  461.         dd      error6
  462.         dd      error7
  463.         dd      error8
  464.         dd      error9
  465.         dd      error10
  466.         dd      error11
  467. ;---------------------------------------------------------------------
  468.  
  469. title   db appname,version,0
  470.  
  471. ;Lib_DATA
  472. ;‚ᥣ¤  ᮡ«î¤ âì ¯®á«¥¤®¢ â¥«ì­®áâì ¢ ¨¬¥­¨.
  473. system_dir_Boxlib       db '/sys/lib/box_lib.obj',0
  474. system_dir_ProcLib      db '/sys/lib/proc_lib.obj',0
  475. system_dir_libini       db '/sys/lib/libini.obj',0
  476. ;---------------------------------------------------------------------
  477. head_f_i:
  478. head_f_l        db 'System error',0
  479.  
  480. err_message_found_lib1  db 'box_lib.obj - Not found!',0
  481. err_message_found_lib2  db 'proc_lib.obj - Not found!',0
  482. err_message_found_lib3  db 'libini.obj - Not found!',0
  483.  
  484. err_message_import1     db 'box_lib.obj - Wrong import!',0
  485. err_message_import2     db 'proc_lib.obj - Wrong import!',0
  486. err_message_import3     db 'libini.obj - Wrong import!',0
  487. ;---------------------------------------------------------------------
  488. l_libs_start:
  489.  
  490. library01  l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
  491. err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
  492.  
  493. library02  l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
  494. err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
  495.  
  496. library03  l_libs system_dir_libini+9, cur_dir_path, library_path, system_dir_libini, \
  497. err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
  498.  
  499. end_l_libs:
  500. ;---------------------------------------------------------------------
  501. OpenDialog_data:
  502. .type                   dd 1    ; Save
  503. .procinfo               dd procinfo     ;+4
  504. .com_area_name          dd communication_area_name      ;+8
  505. .com_area               dd 0    ;+12
  506. .opendir_path           dd temp_dir_path        ;+16
  507. .dir_default_path       dd communication_area_default_path      ;+20
  508. .start_path             dd open_dialog_path     ;+24
  509. .draw_window            dd draw_window  ;+28
  510. .status                 dd 0    ;+32
  511. .openfile_pach          dd fname_buf    ;+36
  512. .filename_area          dd filename_area        ;+40
  513. .filter_area            dd Filter
  514. .x:
  515. .x_size                 dw 420 ;+48 ; Window X size
  516. .x_start                dw 200 ;+50 ; Window X position
  517. .y:
  518. .y_size                 dw 320 ;+52 ; Window y size
  519. .y_start                dw 120 ;+54 ; Window Y position
  520.  
  521. communication_area_name:
  522.         db 'FFFFFFFF_open_dialog',0
  523. open_dialog_path:
  524. if __nightbuild eq yes
  525.     db '/sys/MANAGERS/opendial',0
  526. else
  527.     db '/sys/File Managers/opendial',0
  528. end if
  529. communication_area_default_path:
  530.         db '/',0
  531.  
  532. Filter:
  533. dd      Filter.end - Filter
  534. .1:
  535. db      'IMG',0
  536. db      'IMA',0
  537. .end:
  538. db      0
  539.  
  540. start_temp_file_name:   db 'kolibri.img',0
  541.  
  542. ;---------------------------------------------------------------------
  543. align 4
  544. ProcLib_import:
  545. OpenDialog_Init         dd aOpenDialog_Init
  546. OpenDialog_Start        dd aOpenDialog_Start
  547.         dd      0
  548.         dd      0
  549. aOpenDialog_Init        db 'OpenDialog_init',0
  550. aOpenDialog_Start       db 'OpenDialog_start',0
  551. ;---------------------------------------------------------------------
  552. PathShow_data_1:
  553. .type                   dd 0    ;+0
  554. .start_y                dw 36   ;+4
  555. .start_x                dw 20   ;+6
  556. .font_size_x            dw 6    ;+8     ; 6 - for font 0, 8 - for font 1
  557. .area_size_x            dw 270  ;+10
  558. .font_number            dd 0    ;+12    ; 0 - monospace, 1 - variable
  559. .background_flag        dd 0    ;+16
  560. .font_color             dd 0    ;+20
  561. .background_color       dd 0    ;+24
  562. .text_pointer           dd fname_buf    ;+28
  563. .work_area_pointer      dd text_work_area       ;+32
  564. .temp_text_length       dd 0    ;+36
  565. ;---------------------------------------------------------------------
  566. align 4
  567. Box_lib_import:
  568. ;edit_box_draw           dd aEdit_box_draw
  569. ;edit_box_key            dd aEdit_box_key
  570. ;edit_box_mouse          dd aEdit_box_mouse
  571. ;version_ed              dd aVersion_ed
  572.  
  573. PathShow_prepare        dd sz_PathShow_prepare
  574. PathShow_draw           dd sz_PathShow_draw
  575. Frame_draw              dd sz_Frame_draw
  576.                         dd 0
  577.                         dd 0
  578.  
  579. ;aEdit_box_draw          db 'edit_box',0
  580. ;aEdit_box_key           db 'edit_box_key',0
  581. ;aEdit_box_mouse         db 'edit_box_mouse',0
  582. ;aVersion_ed             db 'version_ed',0
  583.  
  584. sz_PathShow_prepare     db 'PathShow_prepare',0
  585. sz_PathShow_draw        db 'PathShow_draw',0
  586.  
  587. sz_Frame_draw           db 'frame_draw',0
  588. ;szVersion_frame        db 'version_frame',0
  589. ;---------------------------------------------------------------------
  590. frame_data:
  591. .type                   dd 0 ;+0
  592. .x:
  593. .x_size                 dw 374 ;+4
  594. .x_start                dw 8 ;+6
  595. .y:
  596. .y_size                 dw 45 ;+8
  597. .y_start                dw 17 ;+10
  598. .ext_fr_col             dd 0x888888 ;+12
  599. .int_fr_col             dd 0xffffff ;+16
  600. .draw_text_flag         dd 1 ;+20
  601. .text_pointer           dd label1 ;+24
  602. .text_position          dd 0 ;+28
  603. .font_number            dd 0 ;+32
  604. .font_size_y            dd 9 ;+36
  605. .font_color             dd 0x0 ;+40
  606. .font_backgr_color      dd 0xdddddd ;+44
  607. ;---------------------------------------------------------------------
  608. align 4
  609. libini_import:
  610. init_lib     dd a_init
  611. ini_get_str  dd aini_get_str
  612. ini_get_int  dd aini_get_int
  613. ini_set_str  dd aini_set_str
  614. ini_set_int  dd aini_set_int
  615.              dd 0
  616.              dd 0
  617. a_init       db 'lib_init',0
  618. aini_get_str db 'ini_get_str',0
  619. aini_get_int db 'ini_get_int',0
  620. aini_set_str db 'ini_set_str',0
  621. aini_set_int db 'ini_set_int',0
  622. ;---------------------------------------------------------------------
  623.  
  624. apath db 'path',0
  625. asettings db 'settings',0
  626. aautoclose db 'autoclose',0
  627. path    db '/hd2/1/kolibri.img',0
  628. ini_file db  '/sys/settings/rdsave.ini',0
  629. ;ini_file db  '/sys/rdsave.ini',0
  630. ;---------------------------------------------------------------------
  631. is_notify:
  632.     dd    7, 0, ok, 0, 0
  633.     db    "/rd/1/@notify", 0
  634.    
  635. read_folder:
  636. .subfunction    dd 1
  637. .start          dd 0
  638. .flags          dd 0
  639. .size           dd 1
  640. .return         dd folder_data
  641.                 db 0
  642. .name:          dd check_dir
  643.  
  644. param dd 0
  645. hidden dd 0
  646. ;---------------------------------------------------------------------
  647. IM_END:
  648. ;---------------------------------------------------------------------
  649. align 4
  650. PARAMS:
  651.        rb 256
  652. ini_path:
  653.         rb 4096
  654. check_dir:
  655.         rb 4096
  656.  
  657. sc     system_colors
  658.  
  659. autoclose rd 1
  660.  
  661. color   rd 1
  662.  
  663. msg:
  664.         rb 1024
  665.  
  666. folder_data:
  667.         rb 304*32+32 ; 9 Kb
  668. ;---------------------------------------------------------------------
  669. cur_dir_path:
  670.         rb 4096
  671. ;---------------------------------------------------------------------
  672. library_path:
  673.         rb 4096
  674. ;---------------------------------------------------------------------
  675. temp_dir_path:
  676.         rb 4096
  677. ;---------------------------------------------------------------------
  678. fname_buf:
  679.         rb 4096
  680. ;---------------------------------------------------------------------
  681. procinfo:
  682.         rb 1024
  683. ;---------------------------------------------------------------------
  684. filename_area:
  685.         rb 256
  686. ;---------------------------------------------------------------------
  687. text_work_area:
  688.         rb 1024
  689. ;---------------------------------------------------------------------
  690. align 32
  691.         rb 4096
  692. stacktop:
  693. I_END: