These type conversion functions are very useful for connecting SCM and C
code. Most are defined in `rope.c'.
SCM corresponding to the long or
unsigned long argument n. If n cannot be converted,
BOOL_F is returned. Which numbers can be converted depends on
whether SCM was compiled with the BIGDIG or FLOATS flags.
To convert integer numbers of smaller types (short or
char), use the macro MAKINUM(n).
SCM arguments to
the named C type. The first argument num is checked to see it it
is within the range of the destination type. If so, the converted
number is returned. If not, the ASSERT macro calls wta
with num and strings pos and s_caller. For a listing
of useful predefined pos macros, See C Macros.
Note: Inexact numbers are accepted only by num2long and
num2ulong (for when SCM is compiled without bignums). To
convert inexact numbers to exact numbers, See inexact->exact.
unsigned long) to the storage
corresponding to the location accessed by
aref(CAR(args),CDR(args)). The string s_name is used in
any messages from error calls by scm_addr.
scm_addr is useful for performing C operations on strings or
other uniform arrays (see Uniform Array).
Note: While you use a pointer returned from scm_addr you
must keep a pointer to the associated SCM object in a stack
allocated variable or GC-protected location in order to assure that SCM
does not reuse that storage before you are done with it.
SCM object copy of the
null-terminated string src or the string src of length
len, respectively.
SCM list of strings corresponding to
the argc length array of null-terminated strings argv. If
argv is less than 0, argv is assumed to be
NULL terminated. makfromstrs is used by run_scm to
convert the arguments SCM was called with to a SCM list which is
the value of SCM procedure calls to program-arguments
(see program-arguments).
NULL terminated list of null-terminated strings copied
from the SCM list of strings args. The string s_name
is used in messages from error calls by makargvfrmstrs.
makargvfrmstrs is useful for constructing argument lists suitable
for passing to main functions.
makargvfrmstrs.