System
is a module for wrapping system calls and other OS utilities.
carp-init-globals
(Fn [Int, (Ptr (Ptr CChar))] ())
Initializes all global variables (in correct order, based on interdependencies). Called automatically by main
if the project is compiled as an executable. Client code needs to call this function manually when using a library written in Carp.
error-text
(Fn [] String)
(error-text)
returns a description for the last function from the C standard library to set System.errno. Please note that System.errno may change if strerror() does not know it (and thus sets it to EINVAL), so consider copying it before, if you should need it. Calling error-text after a successful call will return 'SUCCESS' and leave System.errno unchanged.
exit
(Fn [Int] a)
exits the program with the supplied exit code (thin wrapper for the C standard library).
strerror
(Fn [Int] String)
(strerror error-no)
get error description for error code in standard C library (thin wrapper for the C standard library).