| system string | STKLOS Procedure |
Sends the given string to the system shell /bin/sh. The result of
system is the integer status code the shell returns.
|
| exec str | STKLOS Procedure |
| exec-list str | STKLOS Procedure |
These procedures execute the command given in str. The command given
in str is passed to /bin/sh. Exec returns a strings which contains
all the characters that the command str has printed on it's standard
output, whereas exec-list returns a list of the lines which constitute
the output of str.
(exec "echo A; echo B") => "A\nB\n"
(exec-list "echo A; echo B") => ("A" "B")
|
| register-exit-function! proc | STKLOS Procedure |
This function registers proc as an exit function. This function will
be called when the program exits. When called, proc will be passed one
parmater which is the status given to the exit function. The result of
register-exit-function! is undefined.
(let* ((tmp (temporary-file-name))
(out (open-output-file tmp)))
(register-exit-function! (lambda (n)
(when (zero? n)
(remove-file tmp))))
out)
|
| exit | STKLOS Procedure |
| exit ret-code | STKLOS Procedure |
Exits the program with the specified integer return code. If ret-code
is omitted, the program terminates with a return code of 0.
If program has registerd exit functions with register-exit-function!,
they are called (in an order which is the reverse of their call order).
|
| die message | STKLOS Procedure |
| die message status | STKLOS Procedure |
Die prints the given message on the current error port and exits
the program with the status value. If status is omitted, it
defaults to 1.
|
| address-of obj | R5RS |
Returns the address of the object obj as an integer.
|
| gc | R5RS |
Returns the address of the object obj as an integer.
|
| void | STKLOS Procedure |
| void arg1 ... | STKLOS Procedure |
Returns the special void object. If arguments are passed to void,
they are evalued and simply ignored.
|
| error str obj ... | STKLOS Procedure |
| error name str obj ... | STKLOS Procedure |
error is used to signal an error to the user. The second form
of error takes a symbol as first parameter; it is generally used for the
name of the procedure which raises the error.
Note: The specification string may follow the "tilde conventions"
of Hereafter, are some calls of the (error "bad integer ~A" "a")
-| bad integer a
(error 'vector-ref "bad integer ~S" "a")
-| vector-ref: bad integer "a"
(error 'foo "~A is not between ~A and ~A" "bar" 0 5)
-| foo: bar is not between 0 and 5
and some conform to SRFI-23 (error "bad integer" "a")
-| bad integer "a"
(error 'vector-ref "bad integer" "a")
-| vector-ref: bad integer "a"
(error "bar" "is not between" 0 "and" 5)
-| bar "is not between" 0 "and" 5
|
| apropos obj | STKLOS Procedure |
| apropos obj module | STKLOS Procedure |
Apropos returns a list of symbols whose print name contains the
characters of obj as a substring . The given obj can be a string or
symbol. This function returns the list of matched symbols which can
be accessed from the given module (defaults to the current module if not
provided).
|
| trace f-name ... | STKLOS Syntax |
Invoking trace with one or more function names causes the functions
named to be traced. Henceforth, whenever such a function is invoked,
information about the call and the returned values, if any, will be
printed on the current error port.
Calling |
| untrace f-name ... | STKLOS Syntax |
Invoking untrace with one or more function names causes the functions
named not to be traced anymore.
Calling |
| pretty-print sexpr :key port width | STKLOS Procedure |
| pp sexpr :key port width | STKLOS Procedure |
This function tries to obtain a pretty-printed representation of sexpr.
The pretty-printed form is written on port with lines which are no
more long than width characters. If port is omitted if defaults to
the current error port. As a special convention, if port is #t,
output goes to the current output port and if port is #f, the output
is returned as a string by pretty-print.
Note that pp is another name for pretty-print.
|
| uri-parse str | STKLOS Procedure |
Parses the string str as a RFC-2396 URI and return a keyed list with the
following components
(uri-parse "http://google.com")
=> (:scheme "http" :host "google.com" :port 80 :path "/"
:query "" :fragment "")
(uri-parse "http://stklos.net:8080/a/file?x=1;y=2#end")
=> (:scheme "http" :host "stklos.net" :port 8080
:path "/a/file" :query "x=1;y=2" :fragment "end")
(uri-parse "/a/file")
=> (:scheme "file" :host "" :port 0 :path "/a/file"
:query "" :fragment "")
(uri-parse "")
=> (:scheme "file" :host "" :port 0 :path ""
:query "" :fragment "")
|
| string->html str | STKLOS Procedure |
This primitive is a convenience function; it returns a string where
the HTML special chars are properly translated. It can easily written
in Scheme, but this version is fast.
(string->html "Just a <test>")
=> "Just a <test>"
|