Verified Commit 93521319 authored by Bernd Paysan's avatar Bernd Paysan
Browse files

Use !wrapper to wrap config-throw

parent f0a2514c
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -100,10 +100,17 @@ previous
Variable configured?
Variable config-file$  s" ~/.minos2rc" config-file$ $!

[IFUNDEF] !wrapper
    : !wrapper ( val addr xt -- .. ) { a xt -- .. }
	a !@ >r xt catch r> a ! throw ;
[THEN]

: ?.minos-config ( -- )  true configured? !@ ?EXIT
    s" MINOS2_CONF" getenv dup IF  config-file$ $!  ELSE  2drop  THEN
    config-file$ $@ 2dup file-status nip ['] m2c >body swap
    no-file# = IF  write-config  ELSE  read-config  THEN ;
    no-file# = IF  write-config  ELSE
	0 addr config-throw ['] read-config !wrapper
    THEN ;

?.minos-config