Simplify terminate + bye + fix build.
This commit is contained in:
@ -13,12 +13,12 @@
|
||||
\ limitations under the License.
|
||||
|
||||
( Include first argument if any )
|
||||
posix also internals definitions
|
||||
internals definitions
|
||||
: autoexec
|
||||
( Open passed file if any. )
|
||||
argc 2 >= if 1 argv ['] included catch if 1 sysexit then exit then
|
||||
argc 2 >= if 1 argv ['] included catch if 1 terminate then exit then
|
||||
( Open remembered file if any. )
|
||||
['] revive catch drop
|
||||
;
|
||||
' autoexec ( leave on dstack for fini.fs )
|
||||
only forth definitions
|
||||
forth definitions
|
||||
|
||||
@ -105,7 +105,6 @@ decimal
|
||||
( Hookup I/O )
|
||||
: stdout-write ( a n -- ) stdout -rot write drop ;
|
||||
: stdin-key ( -- n ) 0 >r stdin rp@ 1 read drop r> ;
|
||||
: posix-bye 0 sysexit ;
|
||||
|
||||
also forth definitions
|
||||
: default-type stdout-write ;
|
||||
@ -113,7 +112,7 @@ also forth definitions
|
||||
only posix definitions
|
||||
' default-type is type
|
||||
' default-key is key
|
||||
' posix-bye is bye
|
||||
' sysexit is terminate
|
||||
|
||||
( I/O Error Helpers )
|
||||
: 0<ior ( n -- ior ) 0< if errno else 0 then ;
|
||||
|
||||
Reference in New Issue
Block a user