From 44b9cd219323b81755313527ba40642e8f0065f2 Mon Sep 17 00:00:00 2001 From: crc <> Date: Mon, 16 Sep 2024 22:59:49 +0000 Subject: [PATCH] add library stubs for openbsd: device (vm support coming soon) FossilOrigin-Name: acfaa8caead4e0c4229bdf48180ad52cb99330da3f7dbd315477c59ad3a7792b --- RELEASE-NOTES | 6 +++++- interface/descriptions.retro | 5 +++-- library/openbsd.retro | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 library/openbsd.retro diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3a94bf5..93bc7f6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -46,13 +46,17 @@ - stack comments & descriptions are now part of the standard system image - add `d:words-missing-details` - - add `describe` + - add `add-description` - library - added "tob", a text output buffer - added "c:get/ext", for reading keys and returning unique codes for arrows + - added "openbsd", for interacting with an openbsd-specific + i/o extension + - adds "openbsd:pledge" + - adds "openbsd:unveil" - retro-compiler diff --git a/interface/descriptions.retro b/interface/descriptions.retro index 4dea26b..0b36c9c 100644 --- a/interface/descriptions.retro +++ b/interface/descriptions.retro @@ -3,9 +3,10 @@ d:lookup dup n:-zero? [ d:descr &s:keep dip store ] &drop-pair choose ; 'add_a_description_to_a_word 'd:set-description d:set-description -:describe (:s-) +:add-description (:s-) s:keep d:last d:descr store ; - 'add_a_description_for_the_most_recently_defined_word describe + 'add_a_description_for_the_most_recently_defined_word + add-description ~~~ ~~~ diff --git a/library/openbsd.retro b/library/openbsd.retro new file mode 100644 index 0000000..8e8e467 --- /dev/null +++ b/library/openbsd.retro @@ -0,0 +1,16 @@ +Extensions relating to OpenBSD-specific functionality + +~~~ +:io:openbsd (:...n-) + ; +'For_use_on_OpenBSD_only:_invoke_host_specific_functionality. +add-description + +:openbsd:pledge (:s-) ; +'For_use_on_OpenBSD_only:_invoke_pledge()_with_the_provided_string. +add-description + +:openbsd:unveil (:s-) ; +'For_use_on_OpenBSD_only:_invoke_unveil()_with_the_provided_string._A_pointer_to_0_can_also_be_passed. +add-description +~~~