Name |
Meaning |
MISC_FALSE |
false value, #f |
MISC_TRUE |
true value, #t |
MISC_NULL |
null value, #z |
MISC_EOL |
end of list/empty list, () |
MISC_UNDEFINED |
undefined value, used within interpreter to flag
errors |
MISC_EOF |
end of file object, result of some operations on
ports |
Name |
Description |
ELEM_FROMCONS(c) |
Takes a pointer of type 'elem *' and gives a cons
reference. |
ELEM_FROMWEAKCONS(c) |
Takes a pointer of type 'elem *' and gives a weak
cons reference. |
ELEM_TOCONS(c) |
Takes a reference to a cons and gives a pointer
of type 'elem *'. |
CONS(a, b) |
Takes the 2 references and generates a cons (a
. b) |
CAR(c) |
Extracts the car of the cons reference c. |
CDR(c) |
Extracts the cdr of the cons reference c. |
CAAR(c) |
A compound: CAR(CAR(c)) |
CAAAR(c) |
... |
CAAAAR(c) |
|
CADR(c) |
|
CDDR(c) |
|
CADDR(c) |
|
CDDDR(c) |
|
CADDDR(c) |
|
CDDDDR(c) |
|
... |
Other compounds may be added later, these are the
most common in my experience. |
Name |
Description |
LENGTH(c) |
Get the length of the list referred to by c, EOL/terminals
are not counted, the result is a c integer. |
LIST_REF(a, b) |
Refer to element b in list a, b is a c integer. |
Name |
Description |
ELEM_FROMOBJECT(c) |
Takes a pointer of type 'elem *' and gives an object
reference. |
ELEM_FROMWEAKOBJECT(c) |
Takes a pointer of type 'elem *' and gives a weak
object reference. |
ELEM_TOOBJECT(c) |
Takes a reference to an object and gives a pointer
of type 'elem *'. |
Name |
Description |
ELEM_FROMFIXNUM(c) |
Converts a c integer c into an fixnum. |
ELEM_TOFIXNUM(c) |
Converts a fixnum c into a c integer (may not do
type checking, is only safe for fixnums). |
FIXNUM(a) |
Converts a c integer c into an fixnum (this is
a shorthand for ELEM_FROMFIXNUM). |
TOINT(a) |
Converts a number into a c integer, handles types
besides fixnum as well. |
ELEM_FROMFLONUM(c) |
Converts a c double into a flonum. |
ELEM_TOFLONUM(c) |
Converts a flonum into a c double. |
FLONUM(a) |
Converts a c double into a flonum (shorthand for
ELEM_FROMFLONUM). |
TOFLOAT(a) |
Converts a number into a c double (safe for fixnum
or other numbers). |
ELEM_FROMCHAR(c) |
Takes a c integer and generates a character value. |
ELEM_TOCHAR(c) |
Takes a character value and generates a c integer. |
ELEM_FROMSPECIAL(c) |
Takes a c integer and generates a special value
(the meaning of 'specials' is context dependent). |
ELEM_TOSPECIAL(c) |
Takes a special value and generates a c integer. |
ELEM_FROMBOOL(c) |
Takes a c integer, generating MISC_FALSE if 0,
MISC_TRUE otherwise |
ELEM_TOBOOL(c) |
Converts MISC_FALSE to 0, all other values to non-zero
values. |
Name |
Description |
ELEM_FROMSTRING(a) |
Takes a c string and converts it to a string-object. |
ELEM_TOSTRING(c) |
Takes a string object and converts to a c-string (the
returned string is not in a stable location). |
ELEM_TOSTRING16(c) |
Takes a string object and converts to a short string
(0 terminated string of shorts). |
STRING(a) |
Shorthand for ELEM_FROMSTRING. |
STRING16(a) |
Takes a short string and generates a string-object. |
Name |
Description |
ELEM_TOSYMBOL(c) |
Takes a symbol object and returns a c-string (volatile). |
SYM(a) |
Takes a c-string and returns a symbol-object. |
SYMG(a, b) |
Cache the symbol-object of 'b' in the variable referenced
by a 'a'. 'a' is to initially contain MISC_NULL. |
Name |
Description |
VECTOR_REF(a, b) |
Refer to the slot 'b '(c-int) within vector 'a'. |
VECTOR_SET(a, b, c) |
Assign the slot 'b' in vector 'a' to value 'c' (reference). |
VECTOR_REFF(a, b) |
Refer to the slot 'b '(c-int) within vector 'a', in
this case the return value is a double containing the numeric value within
the slot. |
VECTOR_NEW(a) |
Creates a new vector with 'a' (c-int) slots. |
VECTOR_LEN(a) |
Returns the lenght of the vector 'a' in the form of
a c-int. |
VECTOR_NEWT(a, b) |
Creates a new vector with 'a' (c-int) slots and being
of type 'b'. |
Name |
Description |
VECTOR_VARIABLE |
Undefined contents. |
VECTOR_ELEMENT |
Array of references. |
VECTOR_F32 |
Array of 32 bit floats. |
VECTOR_F64 |
Array of 64 bit doubles. |
VECTOR_U8 |
Array of unsigned bytes. |
VECTOR_U16 |
Array of unsigned shorts. |
VECTOR_U32 |
Array of unsigned longs. |
VECTOR_U64 |
Array of unsigned long longs. |
VECTOR_S8 |
Array of signed bytes. |
VECTOR_S16 |
Array of signed shorts. |
VECTOR_S32 |
Array of signed longs. |
VECTOR_S64 |
Array of signed long longs. |
Name |
Description |
ELEM_LOCATIVEP(c) |
Nonzero if value is a locative. |
ELEM_FROMLOCATIVE(c) |
Get a locative for the pointer c. |
ELEM_TOLOCATIVE(c) |
Get the pointer associated with the locative c. |
ELEM_SETLOCATIVE(a, b) |
Set the pointer associated with the locative a to
b. |
Name |
Description |
ELEM_FIXNUMP(c) |
Non-zero if value is a fixnum. |
ELEM_STRONGCONSP(c) |
Non-zero if value is a strong cons reference. |
ELEM_WEAKCONSP(c) |
Non-zero if value is a weak cons reference. |
ELEM_CONSP(c) |
Non-zero if value is a cons reference. |
ELEM_STRONGOBJECTP(c) |
Non-zero if value is a strong object reference. |
ELEM_WEAKOBJECTP(c) |
Non-zero if value is a weak object reference. |
ELEM_OBJECTP(c) |
Non-zero if value is an object reference (all types
which do not fit within an elem and are not conses). |
ELEM_LONGREFP(c) |
Non-zero if value is a "long reference" (used within
store to flag special references). |
ELEM_VECTORP(c) |
Non-zero if value is a vector (basic vector type,
non-disjoint, ie: for closures, objects, ...). |
ELEM_BYTEVECTORP(c) |
Non-zero if value is a bytevector. |
ELEM_NVECTORP(c) |
Non-zero if value is a normal vector (contains references
or numeric values). |
ELEM_FUNCTIONP(c) |
Non-zero if value is a builtin function. |
ELEM_BOXP(c) |
Non-zero if value is a box. |
ELEM_STRINGP(c) |
Non-zero if value is a string. |
ELEM_SYMBOLP(c) |
Non-zero if value is a symbol. |
ELEM_SYMKEYWORDP(c) |
Non-zero if value is a keyword. |
ELEM_SYMHYGENICP(c) |
Non-zero if value is a "hygenic" symbol. |
ELEM_SYMNORMALP(c) |
Non-zero if value is a normal symbol (not keyword
or hygenic). |
ELEM_WIDENUMP(c) |
Non-zero if value is a widenum (includes flonums,
bignums, ...). |
ELEM_TYPEXP(c) |
Non-zero if value is a type-extended object. |
ELEM_CLOSUREP(c) |
Non-zero if value is a closure. |
ELEM_ENVP(c) |
Non-zero if value is an environment. |
ELEM_ENVOBJP(c) |
Non-zero if value is an object (ie: within the object
system). |
ELEM_CONTEXTP(c) |
Non-zero if value is a context/thread. |
ELEM_MINIFRAGP(c) |
Non-zero if value is a minicode fragment. |
ELEM_FLONUMP(c) |
Non-zero if value is a flonum. |
ELEM_BIGNUMP(c) |
Non-zero if value is a bignum. |
ELEM_CHARP(c) |
Non-zero if value is a character. |
ELEM_OPCODEP(c) |
Non-zero if value is an interpreter opcode. |
ELEM_SPECIALP(c) |
Non-zero if value is a special. |
ELEM_EOLP(c) |
Non-zero if value is MISC_EOL (same as c==MISC_EOL). |
ELEM_NULLP(c) |
Non-zero if value is MISC_NULL (same as c==MISC_NULL). |
ELEM_UNDEFP(c) |
Non-zero if value is MISC_UNDEFINED (same as c==MISC_UNDEFINED). |