Subversion Repositories Kolibri OS

Rev

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