(doc-group sys «OS-specific functions.»)(defdoc +endianness+ «Endianess of the CPU the VM is running on, a constant. Set to either `:big-endian` or `:little-endian`.» :doc-group sys)(defdoc *directory-separator* «OS-specific path separator. It is preferred over hardcoded `"/"`, for portability.» :doc-group sys :doc-see *linefeed*)(defdoc *linefeed* «OS-specific _linefeed_ value. It is preferred over hardcoded `"\n"`, for portability.» :doc-group sys :doc-see newline :doc-see *directory-separator*)(defdoc +os-name+ «The name of the operating system this StreetLISP VM executable was built for. It's set to a lowercase string and its value is considered "best effort" - it might not always be accurate. Possible values: `"unknown"`, `"plan9"`, `"linux"`, `"openbsd"`, `"netbsd"`, `"dragonflybsd"`, `"freebsd"`, `"haiku"`, `"macosx"`, `"macos"`, `"dos"`.» :doc-group sys :doc-see +os-version+)(defdoc +os-version+ «The "version" of the operating system StreetLISP VM is running on. The availability of the constant and its value depends on the operating system and is only provided for the user to see. No logic should depend on it.» :doc-example «; on Alpine Linux +os-version+ ; ↳ "6.14.5-0-edge" ; kernel version» :doc-example «; on 9front +os-version+ ; ↳ NIL ; 9front does not define one» :doc-group sys :doc-see +os-name+)(defdoc (os-getenv name) «Return the value of the environment variable `name` or `NIL` if it's not set.» :doc-group sys :doc-see os-setenv)(defdoc (os-setenv name value) «Add or replace the value of the environment variable `name` to `value`. If `value` is `NIL`, the variable is deleted from the environment if it exists.» :doc-group sys :doc-see os-getenv)(defdoc (exit (msg NIL) (code 0)) «Terminate the process with the specified message and code. Does not return. The message is expected to be a non-empty string in case of an error. The code is expected to be a positive integer in case of an error.» :doc-example «(exit) ; exit with code 0 (message '' on Plan 9)» :doc-example «(exit "error") ; exit with code 1 (message "error" on Plan 9)» :doc-group sys)(defdoc (getpid) «Return the process ID of the StreetLISP VM within the operating system it's running on.» :doc-group sys)
(doc-group sys
«OS-specific functions.»)
(defdoc +endianness+
«Endianess of the CPU the VM is running on, a constant.
Set to either `:big-endian` or `:little-endian`.»
:doc-group sys)
(defdoc *directory-separator*
«OS-specific path separator.
It is preferred over hardcoded `"/"`, for portability.»
:doc-group sys
:doc-see *linefeed*)
(defdoc *linefeed*
«OS-specific _linefeed_ value.
It is preferred over hardcoded `"\n"`, for portability.»
:doc-group sys
:doc-see newline
:doc-see *directory-separator*)
(defdoc +os-name+
«The name of the operating system this StreetLISP VM executable was
built for.
It's set to a lowercase string and its value is considered "best
effort" - it might not always be accurate.
Possible values: `"unknown"`, `"plan9"`, `"linux"`, `"openbsd"`,
`"netbsd"`, `"dragonflybsd"`, `"freebsd"`, `"haiku"`, `"macosx"`,
`"macos"`, `"dos"`.»
:doc-group sys
:doc-see +os-version+)
(defdoc +os-version+
«The "version" of the operating system StreetLISP VM is running on.
The availability of the constant and its value depends on the
operating system and is only provided for the user to see. No logic
should depend on it.»
:doc-example
«; on Alpine Linux
+os-version+
; ↳ "6.14.5-0-edge" ; kernel version»
:doc-example
«; on 9front
+os-version+
; ↳ NIL ; 9front does not define one»
:doc-group sys
:doc-see +os-name+)
(defdoc (os-getenv name)
«Return the value of the environment variable `name` or `NIL` if it's
not set.»
:doc-group sys
:doc-see os-setenv)
(defdoc (os-setenv name value)
«Add or replace the value of the environment variable `name` to
`value`.
If `value` is `NIL`, the variable is deleted from the environment if
it exists.»
:doc-group sys
:doc-see os-getenv)
(defdoc (exit (msg NIL) (code 0))
«Terminate the process with the specified message and code. Does not return.
The message is expected to be a non-empty string in case of an error.
The code is expected to be a positive integer in case of an error.»
:doc-example
«(exit) ; exit with code 0 (message '' on Plan 9)»
:doc-example
«(exit "error") ; exit with code 1 (message "error" on Plan 9)»
:doc-group sys)
(defdoc (getpid)
«Return the process ID of the StreetLISP VM within the operating system
it's running on.»
:doc-group sys)