Subversion Repositories Kolibri OS

Rev

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

  1. ;-----------------------------------------------------------------------------
  2. ; project name:      TINYPAD
  3. ; compiler:          flat assembler 1.67.21
  4. ; memory to compile: 3.0/9.0 MBytes (without/with size optimizations)
  5. ; version:           SVN (4.0.5)
  6. ; last update:       2008-07-18 (Jul 18, 2008)
  7. ; minimal kernel:    revision #823 (svn://kolibrios.org/kernel/trunk)
  8. ;-----------------------------------------------------------------------------
  9. ; originally by:     Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
  10. ; maintained by:     Mike Semenyako          >> mike.dld@gmail.com
  11. ;                    Ivan Poddubny           >> ivan-yar@bk.ru
  12. ;-----------------------------------------------------------------------------
  13. ; TODO (4.1.0):
  14. ;   - add vertical selection, undo, goto position, overwrite mode, smart tabulation
  15. ;   - improve window drawing with small dimensions
  16. ;   - save/load settings to/from ini file, not executable
  17. ;   - path autocompletion for open/save dialogs
  18. ;   - other bug-fixes and speed/size optimizations
  19. ;-----------------------------------------------------------------------------
  20. ; See history.txt for complete changelog
  21. ;-----------------------------------------------------------------------------
  22.  
  23. include 'lang.inc'
  24.  
  25. include '../../../config.inc'           ;for nightbuild
  26. include '../../../macros.inc'           ; useful stuff
  27. include '../../../struct.inc'
  28. include '../../../proc32.inc'
  29.  
  30. include 'external/libio.inc'
  31.  
  32. include 'tinypad.inc'
  33.  
  34. ;purge mov,add,sub            ;  SPEED
  35.  
  36. header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path
  37.  
  38. APP_VERSION equ 'SVN (4.0.6)'
  39.  
  40. TRUE = 1
  41. FALSE = 0
  42.  
  43. ;include 'debug.inc'
  44. ;define __DEBUG__ 1
  45. ;define __DEBUG_LEVEL__ 1
  46. ;include 'debug-fdo.inc'
  47.  
  48. ; compiled-in options
  49.  
  50. ASEPC = '-'  ; separator character (char)
  51. ATOPH = 19   ; menu bar height (pixels)
  52. SCRLW = 16   ; scrollbar widht/height (pixels)
  53. ATABW = 8    ; tab key indent width (chars)
  54. LINEH = 10   ; line height (pixels)
  55. PATHL = 256  ; maximum path length (chars) !!! don't change !!!
  56. AMINS = 8    ; minimal scroll thumb size (pixels)
  57. LCHGW = 3    ; changed/saved marker width (pixels)
  58.  
  59. STATH = 16   ; status bar height (pixels)
  60. TBARH = 18   ; tab bar height (pixels)
  61.  
  62. INI_SEC_PREFIX equ ''
  63.  
  64. ;-----------------------------------------------------------------------------
  65. section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  66. ;-----------------------------------------------------------------------------
  67.  
  68.         cld
  69.         mov     edi,@UDATA
  70.         mov     ecx,@PARAMS-@UDATA
  71.         mov     al,0
  72.         rep     stosb
  73.  
  74.         mcall   68,11
  75.         or      eax,eax
  76.         jz      key.alt_x.close
  77.  
  78.         stdcall dll.Load,@IMPORT
  79.         or      eax,eax
  80.         jnz     key.alt_x.close
  81.  
  82.         mov     edi,ini_path
  83.         xor     al,al
  84.         mov     ecx,PATHL
  85.         repne   scasb
  86.         mov     dword[edi-1],'.ini'
  87.         mov     byte[edi+3],0
  88.  
  89.         stdcall load_settings
  90.  
  91.         stdcall mem.Alloc,65536
  92.         mov     [temp_buf],eax
  93.  
  94.         inc     [do_not_draw]
  95.  
  96.         mov     dword[app_start],7
  97.  
  98.         mov     esi,s_example
  99.         mov     edi,tb_opensave.text
  100.         mov     ecx,s_example.size
  101.         mov     [tb_opensave.length],cl
  102.         rep     movsb
  103.  
  104.         mov     esi,s_still
  105.         mov     edi,s_search
  106.         mov     ecx,s_still.size
  107.         mov     [s_search.size],ecx
  108.         rep     movsb
  109.  
  110.         cmp     byte[@PARAMS],0
  111.         jz      no_params
  112.  
  113. ;// Willow's code to support DOCPAK [
  114.  
  115.         cmp     byte[@PARAMS],'*'
  116.         jne     .noipc
  117.  
  118. ;// diamond [ (convert size from decimal representation to dword)
  119. ;--     mov     edx,dword[@PARAMS+1]
  120.         mov     esi,@PARAMS+1
  121.         xor     edx,edx
  122.         xor     eax,eax
  123.     @@: lodsb
  124.         test    al,al
  125.         jz      @f
  126.         lea     edx,[edx*4+edx]
  127.         lea     edx,[edx*2+eax-'0']
  128.         jmp     @b
  129.     @@:
  130. ;// diamond ]
  131.  
  132.         add     edx,20
  133.  
  134.         stdcall mem.Alloc,edx
  135.         mov     ebp,eax
  136.         push    eax
  137.  
  138.         mov     dword[ebp+0],0
  139.         mov     dword[ebp+4],8
  140.         mcall   60,1,ebp
  141.         mcall   40,1000000b
  142.  
  143.         mcall   23,200
  144.  
  145.         cmp     eax,7
  146.         jne     key.alt_x.close
  147.         mov     byte[ebp],1
  148.  
  149.         mov     ecx,[ebp+12]
  150.         lea     esi,[ebp+16]
  151.         call    create_tab
  152.         call    load_from_memory
  153.  
  154.         pop     ebp
  155.         stdcall mem.Free,ebp
  156.  
  157.         jmp     @f
  158.   .noipc:
  159.  
  160. ;// Willow's code to support DOCPAK ]
  161.  
  162.         mov     esi,@PARAMS
  163.         mov     edi,tb_opensave.text
  164.         mov     ecx,PATHL
  165.         rep     movsb
  166.         mov     edi,tb_opensave.text
  167.         mov     ecx,PATHL
  168.         xor     al,al
  169.         repne   scasb
  170.         jne     key.alt_x.close
  171.         lea     eax,[edi-tb_opensave.text-1]
  172.         mov     [tb_opensave.length],al
  173.         call    load_file
  174.         jnc     @f
  175.  
  176.   no_params:
  177.         call    create_tab
  178.  
  179.     @@:
  180.         mov     [s_status],0
  181.         dec     [do_not_draw]
  182.  
  183.         mov     al,[tabs_pos]
  184.         mov     [tab_bar.Style],al
  185.  
  186. ;---------------------------------------------------------------------
  187.         mov     edi,filename_area
  188.         mov     esi,s_example+5
  189.         call    copy_str_1
  190.  
  191.         mov     esi,tb_opensave.text
  192.         mov     edi,fname_Info
  193.         call    copy_str_1
  194.         xor     eax,eax
  195.         mov     [edi],al
  196. ;---------------------------------------------------------------------
  197. ;OpenDialog     initialisation
  198.         push    dword OpenDialog_data
  199.         call    [OpenDialog_Init]
  200. ;---------------------------------------------------------------------
  201.  
  202.  
  203.         mcall   66,1,1
  204.         mcall   40,00100111b
  205. red:
  206.         call    drawwindow
  207.  
  208. ;-----------------------------------------------------------------------------
  209.  
  210. still:
  211.         call    draw_statusbar ; write current position & number of strings
  212.  
  213.   .skip_write:
  214.         cmp     [open_dialog],1
  215.         je      .open_dialog
  216.         mcall   10      ; wait here until event
  217.         cmp     [main_closed],0
  218.         jne     key.alt_x
  219.         dec     eax     ; redraw ?
  220.         jz      red
  221.         dec     eax     ; key ?
  222.         jz      key
  223.         dec     eax     ; button ?
  224.         jz      button
  225.         sub     eax,3   ; mouse ?
  226.         jz      mouse
  227.  
  228.         jmp     still.skip_write
  229. ;---------------------------------------------------------------------
  230. .open_dialog:
  231.         pusha
  232.  
  233.         call    btn.bot.cancel
  234.  
  235.         mov     esi,tb_opensave.text
  236.         mov     edi,[OpenDialog_data.openfile_pach]
  237.         movzx   ecx,[tb_opensave.length]
  238.         mov     edx,[OpenDialog_data.filename_area]
  239.         mov     ebx,[OpenDialog_data.opendir_pach]
  240.         call    copy_str_2
  241.         movzx   eax,byte [bot_mode2]
  242.         mov     [OpenDialog_data.type],eax
  243.         popa
  244. ; invoke OpenDialog
  245.         push    dword OpenDialog_data
  246.         call    [OpenDialog_Start]
  247.  
  248.         cmp     [OpenDialog_data.status],1
  249.         jne     .3
  250.  
  251.         pusha
  252.         mov     edi,tb_opensave.text
  253.         mov     esi,[OpenDialog_data.openfile_pach]
  254.         call    copy_str_1
  255.         sub     edi,tb_opensave.text
  256.         dec     edi
  257.         mov     eax,edi
  258.         mov     [tb_opensave.length],al
  259.         popa
  260.        
  261.         cmp     [bot_mode2],0
  262.         je      .2
  263.         call    save_file
  264.         jmp     .3
  265. .2:
  266.         call    load_file
  267. .3:
  268.         mov     [open_dialog],0
  269.         jmp     red
  270. ;-----------------------------------------------------------------------------
  271. draw_window_for_OD:
  272.         call    drawwindow
  273.         call    draw_statusbar
  274.         ret
  275. ;-----------------------------------------------------------------------------
  276. copy_str_2:
  277.         cld
  278.         push    esi ecx
  279.         rep     movsb   ; edi  openfile_pach
  280.         xor     eax,eax
  281.         mov     [edi],al
  282.         pop     ecx esi
  283.         mov     edi,ebx
  284.         rep     movsb   ; edi opendir_pach
  285.         mov     [edi],al
  286.         mov     esi,edi
  287.         std
  288. @@:
  289.         lodsb
  290.         cmp     al,byte '/'
  291.         jne     @b
  292.         inc     esi
  293.         xor     eax,eax
  294.         mov     [esi],al
  295.         inc     esi
  296.         mov     edi,edx ; edi filename_area
  297.         call    copy_str_1
  298.         ret
  299. ;-----------------------------------------------------------------------------
  300. copy_str_1:
  301.         xor     eax,eax
  302.         cld
  303. @@:
  304.         lodsb
  305.         stosb
  306.         test    eax,eax
  307.         jnz     @b
  308.         ret
  309. ;-----------------------------------------------------------------------------
  310. proc get_event ctx ;//////////////////////////////////////////////////////////
  311. ;-----------------------------------------------------------------------------
  312.         mcall   10
  313.         dec     eax     ; redraw ?
  314.         jz      .redraw
  315.         dec     eax     ; key ?
  316.         jz      .key
  317.         dec     eax     ; button ?
  318.         jz      .button
  319.         sub     eax,2   ; background ?
  320.         jz      .background
  321.         dec     eax     ; mouse ?
  322.         jz      .mouse
  323.         dec     eax     ; ipc ?
  324.         jz      .ipc
  325.         dec     eax     ; network ?
  326.         jz      .network
  327.         dec     eax     ; debug ?
  328.         jz      .debug
  329.         sub     eax,7   ; irq ?
  330.         js      .nothing
  331.         cmp     eax,15
  332.         jg      .nothing
  333.         jmp     .irq
  334.  
  335.   .nothing:
  336.         mov     eax,EV_IDLE
  337.         ret
  338.  
  339.   .redraw:
  340.         mov     eax,EV_REDRAW
  341.         ret
  342.  
  343.   .key:
  344.         mov     eax,EV_KEY
  345.         ret
  346.  
  347.   .button:
  348.         mov     eax,EV_BUTTON
  349.         ret
  350.  
  351.   .background:
  352.         mov     eax,EV_BACKGROUND
  353.         ret
  354.  
  355.   .mouse:
  356.         mov     eax,EV_MOUSE
  357.         ret
  358.  
  359.   .ipc:
  360.         mov     eax,EV_IPC
  361.         ret
  362.  
  363.   .network:
  364.         mov     eax,EV_NETWORK
  365.         ret
  366.  
  367.   .debug:
  368.         mov     eax,EV_DEBUG
  369.         ret
  370. endp
  371.  
  372. ;-----------------------------------------------------------------------------
  373. proc load_settings ;//////////////////////////////////////////////////////////
  374. ;-----------------------------------------------------------------------------
  375.         pushad
  376.  
  377.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_tabs_pos,2
  378.         mov     [tabs_pos],al
  379.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_secure_sel,0
  380.         mov     [secure_sel],al
  381.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_auto_braces,0
  382.         mov     [auto_braces],al
  383.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1
  384.         mov     [auto_indent],al
  385.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_smart_tab,1
  386.         mov     [smart_tab],al
  387.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1
  388.         mov     [optim_save],al
  389.         invoke  ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0
  390.         mov     [line_nums],al
  391.  
  392.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_text,0x00000000
  393.         mov     [color_tbl.text],eax
  394.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_back,0x00ffffff
  395.         mov     [color_tbl.back],eax
  396.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_text_sel,0x00ffffff
  397.         mov     [color_tbl.text.sel],eax
  398.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_back_sel,0x000a246a
  399.         mov     [color_tbl.back.sel],eax
  400.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_symbol,0x003030f0
  401.         mov     [color_tbl.symbol],eax
  402.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_number,0x00009000
  403.         mov     [color_tbl.number],eax
  404.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_string,0x00b00000
  405.         mov     [color_tbl.string],eax
  406.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_comment,0x00808080
  407.         mov     [color_tbl.comment],eax
  408.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_line_moded,0x00ffee62
  409.         mov     [color_tbl.line.moded],eax
  410.         invoke  ini.get_color,ini_path,ini_sec_colors,ini_colors_line_saved,0x006ce26c
  411.         mov     [color_tbl.line.saved],eax
  412.  
  413.         invoke  ini.get_int,ini_path,ini_sec_window,ini_window_left,250
  414.         mov     [mainwnd_pos.x],eax
  415.         invoke  ini.get_int,ini_path,ini_sec_window,ini_window_top,75
  416.         mov     [mainwnd_pos.y],eax
  417.         invoke  ini.get_int,ini_path,ini_sec_window,ini_window_width,6*80+6+SCRLW+5
  418.         mov     [mainwnd_pos.w],eax
  419.         invoke  ini.get_int,ini_path,ini_sec_window,ini_window_height,402
  420.         mov     [mainwnd_pos.h],eax
  421.  
  422.         popad
  423.         ret
  424. endp
  425.  
  426. ;-----------------------------------------------------------------------------
  427. proc save_settings ;//////////////////////////////////////////////////////////
  428. ;-----------------------------------------------------------------------------
  429.         pushad
  430.  
  431.         movzx   eax,[tabs_pos]
  432.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_tabs_pos,eax
  433.         movzx   eax,[secure_sel]
  434.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_secure_sel,eax
  435.         movzx   eax,[auto_braces]
  436.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_auto_braces,eax
  437.         movzx   eax,[auto_indent]
  438.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_auto_indent,eax
  439.         movzx   eax,[smart_tab]
  440.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_smart_tab,eax
  441.         movzx   eax,[optim_save]
  442.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_optim_save,eax
  443.         movzx   eax,[line_nums]
  444.         invoke  ini.set_int,ini_path,ini_sec_options,ini_options_line_nums,eax
  445.  
  446.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_text,[color_tbl.text]
  447.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_back,[color_tbl.back]
  448.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_text_sel,[color_tbl.text.sel]
  449.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_back_sel,[color_tbl.back.sel]
  450.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_symbol,[color_tbl.symbol]
  451.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_number,[color_tbl.number]
  452.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_string,[color_tbl.string]
  453.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_comment,[color_tbl.comment]
  454.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_line_moded,[color_tbl.line.moded]
  455.         invoke  ini.set_color,ini_path,ini_sec_colors,ini_colors_line_saved,[color_tbl.line.saved]
  456.  
  457.         invoke  ini.set_int,ini_path,ini_sec_window,ini_window_left,[mainwnd_pos.x]
  458.         invoke  ini.set_int,ini_path,ini_sec_window,ini_window_top,[mainwnd_pos.y]
  459.         invoke  ini.set_int,ini_path,ini_sec_window,ini_window_width,[mainwnd_pos.w]
  460.         invoke  ini.set_int,ini_path,ini_sec_window,ini_window_height,[mainwnd_pos.h]
  461.  
  462.         popad
  463.         ret
  464. endp
  465.  
  466. ;-----------------------------------------------------------------------------
  467. proc start_fasm ;/////////////////////////////////////////////////////////////
  468. ;-----------------------------------------------------------------------------
  469. ; BL = run after compile
  470. ;-----------------------------------------------------------------------------
  471. ; FASM infile,outfile,/path/to/files[,run]
  472. ;-----------------------------------------------------------------------------
  473.         cmp     [cur_editor.AsmMode],0
  474.         jne     @f
  475.         ret
  476.     @@:
  477.         mov     eax,[tab_bar.Default.Ptr]
  478.         or      eax,eax
  479.         jnz     @f
  480.         mov     eax,[tab_bar.Current.Ptr]
  481.     @@: cmp     byte[eax+TABITEM.Editor.FilePath],'/'
  482.         je      @f
  483.         ret
  484.     @@:
  485.         mov     edi,fasm_parameters
  486.         push    eax
  487.  
  488.         cld
  489.  
  490.         lea     esi,[eax+TABITEM.Editor.FilePath]
  491.         add     esi,[eax+TABITEM.Editor.FileName]
  492.         push    esi esi
  493.     @@: lodsb
  494.         cmp     al,0
  495.         je      @f
  496.         stosb
  497.         cmp     al,'.'
  498.         jne     @b
  499.         mov     ecx,esi
  500.         jmp     @b
  501.     @@:
  502.         mov     al,','
  503.         stosb
  504.  
  505.         pop     esi
  506.         sub     ecx,esi
  507.         dec     ecx
  508.         jz      @f
  509.         rep     movsb
  510.     @@:
  511.         mov     al,','
  512.         stosb
  513.  
  514.         pop     ecx esi
  515.         add     esi,TABITEM.Editor.FilePath
  516.         sub     ecx,esi
  517.         rep     movsb
  518.  
  519.         cmp     bl,0 ; run outfile ?
  520.         je      @f
  521.         mov     dword[edi],',run'
  522.         add     edi,4
  523.     @@:
  524.         mov     al,0
  525.         stosb
  526.  
  527.         mov     [app_start.filename],app_fasm
  528.         mov     [app_start.params],fasm_parameters
  529. start_ret:
  530.         mcall   70,app_start
  531.         ret
  532. endp
  533.  
  534. ;-----------------------------------------------------------------------------
  535. proc open_debug_board ;///////////////////////////////////////////////////////
  536. ;-----------------------------------------------------------------------------
  537.         mov     [app_start.filename],app_board
  538.         mov     [app_start.params],0
  539.         jmp     start_ret
  540. endp
  541.  
  542. ;-----------------------------------------------------------------------------
  543. proc open_sysfuncs_txt ;//////////////////////////////////////////////////////
  544. ;-----------------------------------------------------------------------------
  545.         mov     [app_start.filename],app_docpak
  546.         mov     [app_start.params],sysfuncs_param
  547.         call    start_ret
  548.         cmp     eax,0xfffffff0
  549.         jb      @f
  550.         mov     [app_start.filename],app_tinypad
  551.         mov     [app_start.params],sysfuncs_filename
  552.         call    start_ret
  553.     @@: ret
  554. endp
  555.  
  556. set_opt:
  557.  
  558.   .dialog:
  559.         mov     [bot_mode],1
  560.         mov     [bot_dlg_height],128
  561.         mov     [bot_dlg_handler],optsdlg_handler
  562.         mov     [focused_tb],tb_color
  563.         mov     al,[tb_color.length]
  564.         mov     [tb_color.pos.x],al
  565.         mov     [tb_color.sel.x],0
  566.         mov     [tb_casesen],1
  567.         mov     [cur_part],0
  568.         m2m     [cur_color],dword[color_tbl.text]
  569.         mov     esi,color_tbl
  570.         mov     edi,cur_colors
  571.         mov     ecx,10
  572.         cld
  573.         rep     movsd
  574.         call    drawwindow
  575.         ret
  576.  
  577.   .line_numbers:
  578.         xor     [line_nums],1
  579.         ret
  580.   .optimal_fill:
  581.         xor     [optim_save],1
  582.         ret
  583.   .auto_indents:
  584.         xor     [auto_indent],1
  585.         ret
  586.   .auto_braces:
  587.         xor     [auto_braces],1
  588.         ret
  589.   .secure_sel:
  590.         xor     [secure_sel],1
  591.         ret
  592.  
  593. ;-----------------------------------------------------------------------------
  594.  
  595. include 'data/tp-defines.inc'
  596.  
  597. include 'tp-draw.asm'
  598. include 'tp-key.asm'
  599. include 'tp-button.asm'
  600. include 'tp-mouse.asm'
  601. include 'tp-files.asm'
  602. include 'tp-common.asm'
  603. include 'tp-dialog.asm'
  604. include 'tp-popup.asm'
  605. include 'tp-tbox.asm'
  606. include 'tp-tabctl.asm'
  607. include 'tp-editor.asm'
  608. include 'tp-recode.asm'
  609.  
  610. include '../../../dll.inc'
  611.  
  612. ;-----------------------------------------------------------------------------
  613. section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  614. ;-----------------------------------------------------------------------------
  615.  
  616. ;include_debug_strings
  617.  
  618. include 'data/tp-idata.inc'
  619.  
  620. ;-----------------------------------------------------------------------------
  621. section @IMPORT ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  622. ;-----------------------------------------------------------------------------
  623.  
  624. library \
  625.         libini,'libini.obj',\
  626.         libio,'libio.obj',\
  627.         libgfx,'libgfx.obj',\
  628.         proc_lib,'proc_lib.obj'
  629.  
  630. import  libini, \
  631.         ini.get_str  ,'ini_get_str',\
  632.         ini.set_str  ,'ini_set_str',\
  633.         ini.get_int  ,'ini_get_int',\
  634.         ini.set_int  ,'ini_set_int',\
  635.         ini.get_color,'ini_get_color',\
  636.         ini.set_color,'ini_set_color'
  637.  
  638. import  libio, \
  639.         file.find_first,'file_find_first',\
  640.         file.find_next ,'file_find_next',\
  641.         file.find_close,'file_find_close',\
  642.         file.size      ,'file_size',\
  643.         file.open      ,'file_open',\
  644.         file.read      ,'file_read',\
  645.         file.write     ,'file_write',\
  646.         file.seek      ,'file_seek',\
  647.         file.tell      ,'file_tell',\
  648.         file.eof?      ,'file_iseof',\
  649.         file.truncate  ,'file_truncate',\
  650.         file.close     ,'file_close'
  651.  
  652. import  libgfx, \
  653.         gfx.open        ,'gfx_open',\
  654.         gfx.close       ,'gfx_close',\
  655.         gfx.pen.color   ,'gfx_pen_color',\
  656.         gfx.brush.color ,'gfx_brush_color',\
  657.         gfx.pixel       ,'gfx_pixel',\
  658.         gfx.move.to     ,'gfx_move_to',\
  659.         gfx.line.to     ,'gfx_line_to',\
  660.         gfx.line        ,'gfx_line',\
  661.         gfx.polyline    ,'gfx_polyline',\
  662.         gfx.polyline.to ,'gfx_polyline_to',\
  663.         gfx.fillrect    ,'gfx_fillrect',\
  664.         gfx.fillrect.ex ,'gfx_fillrect_ex',\
  665.         gfx.framerect   ,'gfx_framerect',\
  666.         gfx.framerect.ex,'gfx_framerect_ex',\
  667.         gfx.rectangle   ,'gfx_rectangle',\
  668.         gfx.rectangle.ex,'gfx_rectangle_ex'
  669.  
  670. import  proc_lib, \
  671.         OpenDialog_Init  ,'OpenDialog_init',\
  672.         OpenDialog_Start  ,'OpenDialog_start'
  673.  
  674. TINYPAD_END:     ; end of file
  675.  
  676. ;-----------------------------------------------------------------------------
  677. section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  678. ;-----------------------------------------------------------------------------
  679.  
  680. include 'data/tp-udata.inc'
  681.  
  682. ;-----------------------------------------------------------------------------
  683. section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  684. ;-----------------------------------------------------------------------------
  685.  
  686. fasm_parameters:
  687.  
  688. p_info  process_information
  689. p_info2 process_information
  690. sc      system_colors
  691.  
  692. ini_path rb PATHL
  693.  
  694. ;---------------------------------------------------------------------
  695. temp_dir_pach:
  696.         rb 4096
  697. ;---------------------------------------------------------------------
  698. fname_Info:
  699.         rb 4096            ; filename
  700. ;---------------------------------------------------------------------
  701. filename_area:
  702.         rb 256
  703. ;---------------------------------------------------------------------
  704. rb 1024*4
  705. MAIN_STACK:
  706. rb 1024*4
  707. POPUP_STACK:
  708.  
  709. STATIC_MEM_END:
  710.  
  711. diff10 'Main memory size',0,$
  712.