Commit 6b076ca4 authored by Bernd Paysan's avatar Bernd Paysan

Some small fixes

parent 083d02a5
......@@ -341,7 +341,7 @@ Variable skip-frames
ELSE 2drop THEN
THEN
0>framebuffer skip-frames @ 0= IF visual-frame THEN
need-sync off skip-frames @ 0> skip-frames +! ;
-sync skip-frames @ 0> skip-frames +! ;
: scan-loop ( -- ) scanned-flags off \ start with empty flags
1 level# +! BEGIN scan-once >looper level# @ 0= UNTIL ;
: scan-start ( -- )
......@@ -377,4 +377,4 @@ forth-local-indent-words:
(("net2o:" "+net2o:") (0 . 2) (0 . 2) non-immediate)
)
End:
[THEN]
\ No newline at end of file
[THEN]
......@@ -43,23 +43,24 @@ Create nat64-ip4 $0064 w, $ff9b w, $0000 w, $0000 w, $0000 w, $0000 w,
Variable host$
: default-host ( -- )
pad $100 gethostname drop pad cstring>sstring host$ $!
: get-host$ ( -- )
pad $100 gethostname drop pad cstring>sstring host$ $! ;
: skip.site ( -- )
host$ $@ s" .site" string-suffix? IF
host$ dup $@len 5 - 5 $del
THEN
THEN ;
: replace-host ( -- )
config:orighost$ $@ host$ $@ str= IF
config:host$ $@ host$ $!
ELSE
config:host$ $free host$ $@ config:orighost$ $!
THEN
THEN ;
: default-host ( -- )
get-host$ skip.site replace-host
[IFDEF] android 20 [ELSE] 10 [THEN] \ mobile has lower prio
config:prio# ! ;
default-host
:noname defers 'cold default-host ; is 'cold
Create ip6::0 here 16 dup allot erase
: .ip6::0 ( -- ) ip6::0 $10 type ;
: .ip4::0 ( -- ) ip6::0 4 type ;
......
......@@ -422,10 +422,13 @@ Variable configured?
: rootdirs>path ( -- )
config:rootdirs$ $@ bounds ?DO I c@ ':' = IF 0 I c! THEN LOOP ;
forward default-host
: ?.net2o-config ( -- ) true configured? !@ ?EXIT
"NET2O_CONF" getenv ?dup-IF config-file$ $! ELSE drop THEN
config-file$ $@ 2dup file-status nip ['] config >body swap
no-file# = IF ?.net2o write-config ELSE read-config ?.net2o THEN
no-file# = IF ?.net2o write-config
ELSE read-config ?.net2o default-host THEN
rootdirs>path ;
: init-dirs ( -- ) ?.net2o-config fsane-init ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment