Simplify terminate + bye + fix build.

This commit is contained in:
Brad Nelson
2022-12-31 21:02:04 -08:00
parent d60606b4c8
commit 1c500c2233
11 changed files with 14 additions and 27 deletions

View File

@ -93,6 +93,7 @@ e: check-boot
out: space
out: emit
out: bye
out: terminate
out: key?
out: key
out: type
@ -669,7 +670,6 @@ e: check-esp32-builtins
out: analogRead
out: pulseIn
out: MS-TICKS
out: TERMINATE
check-files-reverse
check-files-dir-reverse
out: dacWrite

View File

@ -16,7 +16,8 @@
defer type
defer key
defer key?
defer bye
defer terminate
: bye 0 terminate ;
: emit ( n -- ) >r rp@ 1 type rdrop ;
: space bl emit ; : cr 13 emit nl emit ;

View File

@ -14,17 +14,6 @@
also ansi also internals
DEFINED? windows [IF]
also windows
: sysexit ( n -- ) ExitProcess ;
[ELSE]
DEFINED? posix [IF]
also posix
[ELSE]
: sysexit ( n -- ) terminate ;
[THEN]
[THEN]
( Support for eval tests )
40000 constant expect-limit
create expect-buffer expect-limit allot
@ -117,5 +106,5 @@ variable tests-found variable tests-run variable tests-passed
: run-tests
reset-test-counters ['] count-test for-tests
['] run-test for-tests show-test-results
tests-passed @ tests-found @ <> sysexit ;
tests-passed @ tests-found @ <> terminate ;
only forth