diff --git a/data/common/settings/assoc.ini b/data/common/settings/assoc.ini index 573af519a6..c7deecd361 100644 --- a/data/common/settings/assoc.ini +++ b/data/common/settings/assoc.ini @@ -67,8 +67,12 @@ icon=75 [cObj] exec=/sys/develop/cObj +[Eolite] +exec=/sys/file managers/eolite +icon=1 + [Assoc] -/=/sys/file managers/eolite +/=$Eolite kf=$FontViewer @@ -131,4 +135,4 @@ asc=$View3DS skn=/sys/desktop lif=/sys/demos/life2 -kla=/sys/games/klavisha \ No newline at end of file +kla=/sys/games/klavisha diff --git a/programs/system/open/macros.inc b/programs/system/open/macros.inc deleted file mode 100644 index a5ea74720e..0000000000 --- a/programs/system/open/macros.inc +++ /dev/null @@ -1,47 +0,0 @@ -macro cmpe a, b, c -{ - cmp a, b - je c -} - -macro cmpne a, b, c -{ - cmp a, b - jne c -} - -macro cmpg a, b, c -{ - cmp a, b - jg c -} - -macro cmpl a, b, c -{ - cmp a, b - jl c -} - -macro cmpnl a, b, c -{ - cmp a, b - jnl c -} - -macro cmpng a, b, c -{ - cmp a, b - jng c -} - -macro cmpge a, b, c -{ - cmp a, b - jge c -} - -macro cmple a, b, c -{ - cmp a, b - jle c -} \ No newline at end of file diff --git a/programs/system/open/open.asm b/programs/system/open/open.asm index 028ce78c8e..93c1d94a79 100644 --- a/programs/system/open/open.asm +++ b/programs/system/open/open.asm @@ -15,6 +15,7 @@ include "../../proc32.inc" include "../../macros.inc" include "../../dll.inc" + include "../../cmp.inc" include "../../string.inc" include "../../develop/libraries/box_lib/trunk/box_lib.mac" @@ -24,8 +25,6 @@ if DEBUG eq 1 include "../../debug.inc" end if - include "macros.inc" - ;=============================== if lang eq ru @@ -134,11 +133,16 @@ end if db 0 dd icons + is_file_exists: + dd 0, 0, 0, 0, buffer6 + db 0 + dd buffer + last_x dd -1 last_y dd -1 if DEBUG eq 1 - std_param db "~/sys/settings/assoc.ini", 0 + std_param db "~/sys/example.asm", 0 end if imports: @@ -233,7 +237,10 @@ end if open: invoke libini.get_str, assoc_ini, assoc_ini.sec, slash, buffer, 2048, undefined + cmpne [buffer], byte "$", @f + invoke libini.get_str, assoc_ini, buffer + 1, assoc_ini.exec, buffer, 2048, undefined cmpe [buffer], byte 0, ini_error + @@: mov eax, [param_s] mov [is_open + 8], eax mcall 70, is_open @@ -707,6 +714,11 @@ end if ;---------------------- proc section_cb, _file, _sec + ;; CHECK IF EXISTS + invoke libini.get_str, assoc_ini, [_sec], assoc_ini.exec, buffer, 2048, undefined + mcall 70, is_file_exists + cmpe ebx, -1, .exit + mov ebx, [list.size] shl ebx, 5 add ebx, list @@ -721,6 +733,7 @@ end if inc [sb_apps.max_area] @@: mov eax, 1 + .exit: ret endp @@ -752,6 +765,7 @@ end if buffer3 rb 2048 buffer4 rb 4096 buffer5 rb 4096 + buffer6 rb 2048 params rb 2048 _stack rb 2048 - memory: \ No newline at end of file + memory: