1) Use OpenDialog calls of Proc_Lib now
2) Removed old code for invoke Sysxtree

git-svn-id: svn://kolibrios.org@1512 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2010-07-03 15:26:02 +00:00
parent 753474ef6b
commit 8cf0d4890e
3 changed files with 69 additions and 19 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
# This script does for linux the same as build.bat for DOS,
# it compiles the KoOS kernel, hopefully ;-)
echo "lang fix en"
echo "lang fix en" > lang.inc
mkdir bin
fasm -m 16384 rtfread.asm ./bin/rtfread
rm -f lang.inc
exit 0

View File

@ -50,19 +50,18 @@ syms equ 12
dd esp_end ; ª®«¨ç¥á⢮ ¯ ¬ï⨠dd esp_end ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd sys_mem ;  ¤à¥á ¢¥à設ë áâíª  dd sys_mem ;  ¤à¥á ¢¥à設ë áâíª 
dd fname_buf ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï) dd fname_buf ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­® dd cur_dir_path ; § à¥§¥à¢¨à®¢ ­®
include '..\..\..\MACROS.INC' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢! include '..\..\..\macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
include '..\..\..\develop\libraries\box_lib\load_lib.mac' include '..\..\..\develop\libraries\box_lib\load_lib.mac'
include '..\..\..\develop\libraries\box_lib\asm\trunk\opendial.mac'
;include 'MACROS.INC' ;include 'MACROS.INC'
;include 'load_lib.mac' ;include 'load_lib.mac'
;include 'opendial.mac'
@use_library
include 'debug.inc' include 'debug.inc'
use_OpenDialog
if ~ RENDER eq PIX if ~ RENDER eq PIX
TOP=TOP+4 TOP=TOP+4
include 'bgifont.inc' include 'bgifont.inc'
@ -78,8 +77,12 @@ help_end:
START: START:
mcall 68, 11 mcall 68, 11
load_libraries l_libs_start,end_l_libs
;OpenDialog initialisation ;OpenDialog initialisation
init_OpenDialog OpenDialog_data push dword OpenDialog_data
call [OpenDialog_Init]
mov [pitch],2 mov [pitch],2
if ~ RENDER eq PIX if ~ RENDER eq PIX
@ -257,28 +260,29 @@ still:
.nominus: .nominus:
end if end if
cmp ah,108 ; L - load cmp ah,108 ; L - load
jne stilld jne still
.file_open: .file_open:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;OpenDialog_start: ;OpenDialog_start:
; copy_path open_dialog_name,path,library_path,0 ; copy_path open_dialog_name,path,library_path,0
start_OpenDialog OpenDialog_data push dword OpenDialog_data
call [OpenDialog_Start]
cmp [OpenDialog_data.status],2 ; OpenDialog does not start ; cmp [OpenDialog_data.status],2 ; OpenDialog does not start
je .sysxtree ; some kind of alternative, instead OpenDialog ; je .sysxtree ; some kind of alternative, instead OpenDialog
cmp [OpenDialog_data.status],1 cmp [OpenDialog_data.status],1
je prep_load je prep_load
jmp still jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.sysxtree: ;.sysxtree:
or [mode],RTF_OPENING ; or [mode],RTF_OPENING
opendialog draw_window, prep_load, st_1, fname_buf ; opendialog draw_window, prep_load, st_1, fname_buf
st_1: ; st_1:
and [mode],not RTF_OPENING ; and [mode],not RTF_OPENING
jmp still;red ; jmp still;red
stilld: ; stilld:
jmp still ; jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
button: button:
@ -529,6 +533,34 @@ if RENDER eq FREE
end if end if
btn_end: btn_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
l_libs_start:
library01 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
end_l_libs:
;---------------------------------------------------------------------
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
head_f_i:
head_f_l db 'error',0
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
err_message_import2 db 'proc_lib.obj - Wrong import!',0
;---------------------------------------------------------------------
align 4
ProcLib_import:
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
;OpenDialog__Version dd aOpenDialog_Version
dd 0
dd 0
aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
;aOpenDialog_Version db 'Version_OpenDialog',0
;---------------------------------------------------------------------
OpenDialog_data: OpenDialog_data:
.type dd 0 .type dd 0
.procinfo dd procinfo ;+4 .procinfo dd procinfo ;+4
@ -679,5 +711,9 @@ rb ESPSIZE
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
temp_dir_pach: temp_dir_pach:
rb 4096 rb 4096
cur_dir_path:
rb 4096
library_path:
rb 4096
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
esp_end: esp_end: