From 94aff4944b9c8ca059cc7ed44a7fc59ee0622295 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 6 Feb 2021 15:59:06 -0800 Subject: [PATCH] Hide posix internal words in a separate vocabulary. --- ueforth/common/testing.fs | 2 ++ ueforth/posix/posix.fs | 35 ++++++++++++++++++++------------ ueforth/posix/posix_highlevel.fs | 2 ++ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ueforth/common/testing.fs b/ueforth/common/testing.fs index 47774f3..5167677 100644 --- a/ueforth/common/testing.fs +++ b/ueforth/common/testing.fs @@ -60,7 +60,9 @@ variable tests-found variable tests-run variable tests-passed else ." FAILED: " red tests-run @ tests-passed @ - . normal cr then hr ; +posix : run-tests reset-test-counters ['] count-test for-tests ['] run-test for-tests show-test-results tests-passed @ tests-found @ <> sysexit ; +forth diff --git a/ueforth/posix/posix.fs b/ueforth/posix/posix.fs index 79b2e83..660285a 100644 --- a/ueforth/posix/posix.fs +++ b/ueforth/posix/posix.fs @@ -1,3 +1,5 @@ +vocabulary posix posix definitions + ( Shared Library Handling ) 1 constant RTLD_LAZY 2 constant RTLD_NOW @@ -81,11 +83,29 @@ decimal ( I/O Error Helpers ) : d0r s>z r> 0777 open sign-extend d0r s>z r> O_CREAT or 0777 open sign-extend d0