Apps: fixed 3 programs for using a long path in parameters
git-svn-id: svn://kolibrios.org@10017 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6fbd7cd2f9
commit
9c44899099
@ -1,7 +1,9 @@
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
dd 1, @ENTRY, @end, @memory, @stack, @params, 0
|
||||
dd 1, @ENTRY, @end, @memory, @stack
|
||||
M01header.params:
|
||||
dd @params, 0
|
||||
|
||||
include "../../macros.inc"
|
||||
include "../../proc32.inc"
|
||||
@ -31,8 +33,8 @@
|
||||
mcall 18, 25, 2, -1, 1
|
||||
|
||||
;; SET STD PARAMS, IF IT NEEDS
|
||||
mov eax, @params
|
||||
cmpne byte [@params], 0, @f
|
||||
mov eax, [M01header.params]
|
||||
cmpne byte [eax], 0, @f
|
||||
mov eax, sz_std
|
||||
@@:
|
||||
mov [params.source], eax
|
||||
@ -852,6 +854,6 @@
|
||||
;=====================================================================
|
||||
rb 2048
|
||||
@stack:
|
||||
@params rb 2048
|
||||
@params rb 256
|
||||
|
||||
@memory:
|
||||
|
@ -10,7 +10,9 @@
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
dd 1, main, dataend, memory, memory, params, 0
|
||||
dd 1, main, dataend, memory, memory
|
||||
M01header.params:
|
||||
dd params, 0
|
||||
|
||||
include "../../proc32.inc"
|
||||
include "../../macros.inc"
|
||||
@ -178,18 +180,18 @@ end if
|
||||
stdcall dll.Load, imports
|
||||
|
||||
if DEBUG eq 1
|
||||
stdcall string.copy, std_param, params
|
||||
stdcall string.copy, std_param, [M01header.params]
|
||||
end if
|
||||
|
||||
;; trim params
|
||||
stdcall string.copy, params, paramorig
|
||||
stdcall string.copy, [M01header.params], paramorig
|
||||
stdcall string.trim_last, paramorig
|
||||
stdcall string.trim_first, paramorig
|
||||
mov [param_s], eax
|
||||
|
||||
stdcall string.to_lower_case, params
|
||||
stdcall string.trim_last, params
|
||||
stdcall string.trim_first, params
|
||||
stdcall string.to_lower_case, [M01header.params]
|
||||
stdcall string.trim_last, [M01header.params]
|
||||
stdcall string.trim_first, [M01header.params]
|
||||
mov [param_lwr], eax
|
||||
|
||||
;; if empty - exit
|
||||
@ -1058,7 +1060,7 @@ end if
|
||||
buffer6 rb 2048 ;check existance
|
||||
buffer7 rb 32 ;for sorting
|
||||
buffer8 rd 2048
|
||||
params rb 2048
|
||||
paramorig rb 2048
|
||||
_stack rb 2048
|
||||
params rb 256
|
||||
memory:
|
||||
|
@ -23,6 +23,7 @@
|
||||
dd IM_END ; file size
|
||||
dd I_END ; memory
|
||||
dd stacktop ; stack pointer
|
||||
M01header.params:
|
||||
dd app_param ; parameters
|
||||
dd cur_dir_path ; path to file
|
||||
|
||||
@ -115,8 +116,8 @@ load_libraries l_libs_start,end_l_libs
|
||||
stdcall string.copy, default_dtp, dtp_name
|
||||
;---------------------------------------------------------------------
|
||||
; check app param
|
||||
stdcall string.length, app_param
|
||||
add eax, app_param
|
||||
stdcall string.length, [M01header.params]
|
||||
add eax, [M01header.params]
|
||||
mov ecx, [eax-4]
|
||||
or ecx, 0x20202000 ;letters to lowercase
|
||||
cmp ecx, '.skn'
|
||||
@ -126,12 +127,12 @@ load_libraries l_libs_start,end_l_libs
|
||||
jmp no_param
|
||||
|
||||
load_dtp_from_param:
|
||||
stdcall string.copy, app_param, dtp_name
|
||||
stdcall string.copy, [M01header.params], dtp_name
|
||||
call load_dtp_file.1
|
||||
jmp skin_path_ready
|
||||
|
||||
load_skin_from_param:
|
||||
stdcall string.copy, app_param, skin_info
|
||||
stdcall string.copy, [M01header.params], skin_info
|
||||
call load_skin_file.2
|
||||
jmp skin_path_ready
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user