mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
* numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
This commit is contained in:
parent
43240c9caf
commit
93ccaef0c6
55 changed files with 435 additions and 435 deletions
|
@ -563,7 +563,7 @@ SCM_API SCM scm_apply_generic (SCM gf, SCM args);
|
||||||
? scm_apply_generic ((gf), (args)) \
|
? scm_apply_generic ((gf), (args)) \
|
||||||
: (scm_wrong_type_arg ((subr), (pos), \
|
: (scm_wrong_type_arg ((subr), (pos), \
|
||||||
scm_list_ref ((args), \
|
scm_list_ref ((args), \
|
||||||
SCM_MAKINUM ((pos) - 1))), \
|
scm_from_int ((pos) - 1))), \
|
||||||
SCM_UNSPECIFIED))
|
SCM_UNSPECIFIED))
|
||||||
#define SCM_GASSERTn(cond, gf, args, pos, subr) \
|
#define SCM_GASSERTn(cond, gf, args, pos, subr) \
|
||||||
if (!(cond)) SCM_WTA_DISPATCH_n((gf), (args), (pos), (subr))
|
if (!(cond)) SCM_WTA_DISPATCH_n((gf), (args), (pos), (subr))
|
||||||
|
|
|
@ -454,7 +454,7 @@ SCM_DEFINE (scm_display_application, "display-application", 1, 2, 0,
|
||||||
|
|
||||||
/* Create a string port used for adaptation of printing parameters. */
|
/* Create a string port used for adaptation of printing parameters. */
|
||||||
sport = scm_mkstrport (SCM_INUM0,
|
sport = scm_mkstrport (SCM_INUM0,
|
||||||
scm_make_string (SCM_MAKINUM (240),
|
scm_make_string (scm_from_int (240),
|
||||||
SCM_UNDEFINED),
|
SCM_UNDEFINED),
|
||||||
SCM_OPN | SCM_WRTNG,
|
SCM_OPN | SCM_WRTNG,
|
||||||
FUNC_NAME);
|
FUNC_NAME);
|
||||||
|
@ -583,7 +583,7 @@ display_frame (SCM frame, int nfield, int indentation, SCM sport, SCM port, scm_
|
||||||
indent (nfield - (i ? i : 1), port);
|
indent (nfield - (i ? i : 1), port);
|
||||||
|
|
||||||
/* Frame number. */
|
/* Frame number. */
|
||||||
scm_iprin1 (SCM_MAKINUM (n), port, pstate);
|
scm_iprin1 (scm_from_int (n), port, pstate);
|
||||||
|
|
||||||
/* Real frame marker */
|
/* Real frame marker */
|
||||||
scm_putc (SCM_FRAME_REAL_P (frame) ? '*' : ' ', port);
|
scm_putc (SCM_FRAME_REAL_P (frame) ? '*' : ' ', port);
|
||||||
|
@ -677,7 +677,7 @@ display_backtrace_body (struct display_backtrace_args *a)
|
||||||
|
|
||||||
/* Create a string port used for adaptation of printing parameters. */
|
/* Create a string port used for adaptation of printing parameters. */
|
||||||
sport = scm_mkstrport (SCM_INUM0,
|
sport = scm_mkstrport (SCM_INUM0,
|
||||||
scm_make_string (SCM_MAKINUM (240), SCM_UNDEFINED),
|
scm_make_string (scm_from_int (240), SCM_UNDEFINED),
|
||||||
SCM_OPN | SCM_WRTNG,
|
SCM_OPN | SCM_WRTNG,
|
||||||
FUNC_NAME);
|
FUNC_NAME);
|
||||||
|
|
||||||
|
@ -695,7 +695,7 @@ display_backtrace_body (struct display_backtrace_args *a)
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
indent_p = 1;
|
indent_p = 1;
|
||||||
frame = scm_stack_ref (a->stack, SCM_MAKINUM (beg));
|
frame = scm_stack_ref (a->stack, scm_from_int (beg));
|
||||||
for (i = 0, j = 0; i < n; ++i)
|
for (i = 0, j = 0; i < n; ++i)
|
||||||
{
|
{
|
||||||
if (SCM_FRAME_REAL_P (frame))
|
if (SCM_FRAME_REAL_P (frame))
|
||||||
|
@ -712,12 +712,12 @@ display_backtrace_body (struct display_backtrace_args *a)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine size of frame number field. */
|
/* Determine size of frame number field. */
|
||||||
j = SCM_FRAME_NUMBER (scm_stack_ref (a->stack, SCM_MAKINUM (end)));
|
j = SCM_FRAME_NUMBER (scm_stack_ref (a->stack, scm_from_int (end)));
|
||||||
for (i = 0; j > 0; ++i) j /= 10;
|
for (i = 0; j > 0; ++i) j /= 10;
|
||||||
nfield = i ? i : 1;
|
nfield = i ? i : 1;
|
||||||
|
|
||||||
/* Print frames. */
|
/* Print frames. */
|
||||||
frame = scm_stack_ref (a->stack, SCM_MAKINUM (beg));
|
frame = scm_stack_ref (a->stack, scm_from_int (beg));
|
||||||
indentation = 1;
|
indentation = 1;
|
||||||
last_file = SCM_UNDEFINED;
|
last_file = SCM_UNDEFINED;
|
||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
|
|
|
@ -255,7 +255,7 @@ CTYPES2SCM (const CTYPE *data, long n)
|
||||||
#ifdef FLOATTYPE
|
#ifdef FLOATTYPE
|
||||||
SCM_VECTOR_SET (v, i, scm_make_real ((double) data[i]));
|
SCM_VECTOR_SET (v, i, scm_make_real ((double) data[i]));
|
||||||
#else
|
#else
|
||||||
SCM_VECTOR_SET (v, i, SCM_MAKINUM (data[i]));
|
SCM_VECTOR_SET (v, i, scm_from_signed_integer (data[i]));
|
||||||
#endif
|
#endif
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ SCM_DEFINE (scm_malloc_stats, "malloc-stats", 0, 0, 0,
|
||||||
for (i = 0; i < malloc_type_size + N_SEEK; ++i)
|
for (i = 0; i < malloc_type_size + N_SEEK; ++i)
|
||||||
if (malloc_type[i].key)
|
if (malloc_type[i].key)
|
||||||
res = scm_acons (scm_makfrom0str ((char *) malloc_type[i].key),
|
res = scm_acons (scm_makfrom0str ((char *) malloc_type[i].key),
|
||||||
SCM_MAKINUM ((int) malloc_type[i].data),
|
SCM_I_MAKINUM ((int) malloc_type[i].data),
|
||||||
res);
|
res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,7 @@ SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0,
|
||||||
result = (*fptr) (argc, argv);
|
result = (*fptr) (argc, argv);
|
||||||
free (argv);
|
free (argv);
|
||||||
|
|
||||||
return SCM_MAKINUM (0L + result);
|
return SCM_I_MAKINUM (0L + result);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -481,7 +481,7 @@ static int
|
||||||
observer_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
observer_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||||
{
|
{
|
||||||
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
||||||
SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
|
SCM base16 = scm_number_to_string (address, SCM_I_MAKINUM (16));
|
||||||
|
|
||||||
scm_puts ("#<observer ", port);
|
scm_puts ("#<observer ", port);
|
||||||
scm_puts (SCM_STRING_CHARS (base16), port);
|
scm_puts (SCM_STRING_CHARS (base16), port);
|
||||||
|
@ -745,7 +745,7 @@ core_environments_init (struct core_environments_base *body,
|
||||||
{
|
{
|
||||||
body->funcs = funcs;
|
body->funcs = funcs;
|
||||||
body->observers = SCM_EOL;
|
body->observers = SCM_EOL;
|
||||||
body->weak_observers = scm_make_weak_value_alist_vector (SCM_MAKINUM (1));
|
body->weak_observers = scm_make_weak_value_alist_vector (SCM_I_MAKINUM (1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -979,7 +979,7 @@ static int
|
||||||
leaf_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
leaf_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||||
{
|
{
|
||||||
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
||||||
SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
|
SCM base16 = scm_number_to_string (address, SCM_I_MAKINUM (16));
|
||||||
|
|
||||||
scm_puts ("#<leaf environment ", port);
|
scm_puts ("#<leaf environment ", port);
|
||||||
scm_puts (SCM_STRING_CHARS (base16), port);
|
scm_puts (SCM_STRING_CHARS (base16), port);
|
||||||
|
@ -1084,9 +1084,9 @@ struct eval_environment {
|
||||||
#define EVAL_ENVIRONMENT(env) \
|
#define EVAL_ENVIRONMENT(env) \
|
||||||
((struct eval_environment *) SCM_CELL_WORD_1 (env))
|
((struct eval_environment *) SCM_CELL_WORD_1 (env))
|
||||||
|
|
||||||
#define IMMUTABLE SCM_MAKINUM (0)
|
#define IMMUTABLE SCM_I_MAKINUM (0)
|
||||||
#define MUTABLE SCM_MAKINUM (1)
|
#define MUTABLE SCM_I_MAKINUM (1)
|
||||||
#define UNKNOWN SCM_MAKINUM (2)
|
#define UNKNOWN SCM_I_MAKINUM (2)
|
||||||
|
|
||||||
#define CACHED_LOCATION(x) SCM_CAR (x)
|
#define CACHED_LOCATION(x) SCM_CAR (x)
|
||||||
#define CACHED_MUTABILITY(x) SCM_CADR (x)
|
#define CACHED_MUTABILITY(x) SCM_CADR (x)
|
||||||
|
@ -1339,7 +1339,7 @@ static int
|
||||||
eval_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
eval_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||||
{
|
{
|
||||||
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
||||||
SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
|
SCM base16 = scm_number_to_string (address, SCM_I_MAKINUM (16));
|
||||||
|
|
||||||
scm_puts ("#<eval environment ", port);
|
scm_puts ("#<eval environment ", port);
|
||||||
scm_puts (SCM_STRING_CHARS (base16), port);
|
scm_puts (SCM_STRING_CHARS (base16), port);
|
||||||
|
@ -1758,7 +1758,7 @@ import_environment_print (SCM type, SCM port,
|
||||||
scm_print_state *pstate SCM_UNUSED)
|
scm_print_state *pstate SCM_UNUSED)
|
||||||
{
|
{
|
||||||
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
||||||
SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
|
SCM base16 = scm_number_to_string (address, SCM_I_MAKINUM (16));
|
||||||
|
|
||||||
scm_puts ("#<import environment ", port);
|
scm_puts ("#<import environment ", port);
|
||||||
scm_puts (SCM_STRING_CHARS (base16), port);
|
scm_puts (SCM_STRING_CHARS (base16), port);
|
||||||
|
@ -2063,7 +2063,7 @@ export_environment_print (SCM type, SCM port,
|
||||||
scm_print_state *pstate SCM_UNUSED)
|
scm_print_state *pstate SCM_UNUSED)
|
||||||
{
|
{
|
||||||
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
SCM address = scm_ulong2num (SCM_UNPACK (type));
|
||||||
SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
|
SCM base16 = scm_number_to_string (address, SCM_I_MAKINUM (16));
|
||||||
|
|
||||||
scm_puts ("#<export environment ", port);
|
scm_puts ("#<export environment ", port);
|
||||||
scm_puts (SCM_STRING_CHARS (base16), port);
|
scm_puts (SCM_STRING_CHARS (base16), port);
|
||||||
|
|
|
@ -59,8 +59,8 @@ struct scm_environment_funcs {
|
||||||
|
|
||||||
|
|
||||||
#define SCM_ENVIRONMENT_SUCCESS SCM_BOOL_T
|
#define SCM_ENVIRONMENT_SUCCESS SCM_BOOL_T
|
||||||
#define SCM_ENVIRONMENT_BINDING_IMMUTABLE SCM_MAKINUM (0)
|
#define SCM_ENVIRONMENT_BINDING_IMMUTABLE scm_from_int (0)
|
||||||
#define SCM_ENVIRONMENT_LOCATION_IMMUTABLE SCM_MAKINUM (1)
|
#define SCM_ENVIRONMENT_LOCATION_IMMUTABLE scm_from_int (1)
|
||||||
#define SCM_ENVIRONMENT_LOCATION_NO_CELL SCM_BOOL_F
|
#define SCM_ENVIRONMENT_LOCATION_NO_CELL SCM_BOOL_F
|
||||||
|
|
||||||
SCM_API scm_t_bits scm_tc16_environment;
|
SCM_API scm_t_bits scm_tc16_environment;
|
||||||
|
|
|
@ -241,7 +241,7 @@ scm_wrong_type_arg (const char *subr, int pos, SCM bad_value)
|
||||||
(pos == 0) ? "Wrong type argument: ~S"
|
(pos == 0) ? "Wrong type argument: ~S"
|
||||||
: "Wrong type argument in position ~A: ~S",
|
: "Wrong type argument in position ~A: ~S",
|
||||||
(pos == 0) ? scm_list_1 (bad_value)
|
(pos == 0) ? scm_list_1 (bad_value)
|
||||||
: scm_list_2 (SCM_MAKINUM (pos), bad_value),
|
: scm_list_2 (SCM_I_MAKINUM (pos), bad_value),
|
||||||
SCM_BOOL_F);
|
SCM_BOOL_F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ scm_wrong_type_arg_msg (const char *subr, int pos, SCM bad_value, const char *sz
|
||||||
scm_error (scm_arg_type_key,
|
scm_error (scm_arg_type_key,
|
||||||
subr,
|
subr,
|
||||||
"Wrong type argument in position ~A (expecting ~A): ~S",
|
"Wrong type argument in position ~A (expecting ~A): ~S",
|
||||||
scm_list_3 (SCM_MAKINUM (pos), msg, bad_value),
|
scm_list_3 (SCM_I_MAKINUM (pos), msg, bad_value),
|
||||||
SCM_BOOL_F);
|
SCM_BOOL_F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5415,7 +5415,7 @@ check_map_args (SCM argv,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elt_len != len)
|
if (elt_len != len)
|
||||||
scm_out_of_range_pos (who, ve[i], SCM_MAKINUM (i + 2));
|
scm_out_of_range_pos (who, ve[i], SCM_I_MAKINUM (i + 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
scm_remember_upto_here_1 (argv);
|
scm_remember_upto_here_1 (argv);
|
||||||
|
|
|
@ -98,7 +98,7 @@ scm_init_feature()
|
||||||
#endif
|
#endif
|
||||||
scm_add_feature ("threads");
|
scm_add_feature ("threads");
|
||||||
|
|
||||||
scm_c_define ("char-code-limit", SCM_MAKINUM (SCM_CHAR_CODE_LIMIT));
|
scm_c_define ("char-code-limit", SCM_I_MAKINUM (SCM_CHAR_CODE_LIMIT));
|
||||||
|
|
||||||
#include "libguile/feature.x"
|
#include "libguile/feature.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ SCM_DEFINE (scm_umask, "umask", 0, 1, 0,
|
||||||
SCM_VALIDATE_INUM (1, mode);
|
SCM_VALIDATE_INUM (1, mode);
|
||||||
mask = umask (SCM_INUM (mode));
|
mask = umask (SCM_INUM (mode));
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (mask);
|
return SCM_I_MAKINUM (mask);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ SCM_DEFINE (scm_open_fdes, "open-fdes", 2, 1, 0,
|
||||||
SCM_SYSCALL (fd = open (SCM_STRING_CHARS (path), iflags, imode));
|
SCM_SYSCALL (fd = open (SCM_STRING_CHARS (path), iflags, imode));
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (fd);
|
return SCM_I_MAKINUM (fd);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ scm_stat2scm (struct stat *stat_temp)
|
||||||
else
|
else
|
||||||
SCM_VECTOR_SET(ans, 13, scm_sym_unknown);
|
SCM_VECTOR_SET(ans, 13, scm_sym_unknown);
|
||||||
|
|
||||||
SCM_VECTOR_SET(ans, 14, SCM_MAKINUM ((~S_IFMT) & mode));
|
SCM_VECTOR_SET(ans, 14, SCM_I_MAKINUM ((~S_IFMT) & mode));
|
||||||
|
|
||||||
/* the layout of the bits in ve[14] is intended to be portable.
|
/* the layout of the bits in ve[14] is intended to be portable.
|
||||||
If there are systems that don't follow the usual convention,
|
If there are systems that don't follow the usual convention,
|
||||||
|
@ -510,7 +510,7 @@ scm_stat2scm (struct stat *stat_temp)
|
||||||
tmp <<= 1;
|
tmp <<= 1;
|
||||||
if (S_IXOTH & mode) tmp += 1;
|
if (S_IXOTH & mode) tmp += 1;
|
||||||
|
|
||||||
SCM_VECTOR_SET(ans, 14, SCM_MAKINUM (tmp));
|
SCM_VECTOR_SET(ans, 14, SCM_I_MAKINUM (tmp));
|
||||||
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -1306,7 +1306,7 @@ SCM_DEFINE (scm_fcntl, "fcntl", 2, 1, 0,
|
||||||
SCM_SYSCALL (rv = fcntl (fdes, SCM_INUM (cmd), ivalue));
|
SCM_SYSCALL (rv = fcntl (fdes, SCM_INUM (cmd), ivalue));
|
||||||
if (rv == -1)
|
if (rv == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (rv);
|
return SCM_I_MAKINUM (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_FCNTL */
|
#endif /* HAVE_FCNTL */
|
||||||
|
@ -1494,12 +1494,12 @@ SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0,
|
||||||
#else
|
#else
|
||||||
if (len > 0 && s[0] == '/')
|
if (len > 0 && s[0] == '/')
|
||||||
#endif /* ndef __MINGW32__ */
|
#endif /* ndef __MINGW32__ */
|
||||||
return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (1));
|
return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (1));
|
||||||
else
|
else
|
||||||
return scm_dot_string;
|
return scm_dot_string;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (i + 1));
|
return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (i + 1));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1548,12 +1548,12 @@ SCM_DEFINE (scm_basename, "basename", 1, 1, 0,
|
||||||
#else
|
#else
|
||||||
if (len > 0 && f[0] == '/')
|
if (len > 0 && f[0] == '/')
|
||||||
#endif /* ndef __MINGW32__ */
|
#endif /* ndef __MINGW32__ */
|
||||||
return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (1));
|
return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (1));
|
||||||
else
|
else
|
||||||
return scm_dot_string;
|
return scm_dot_string;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return scm_substring (filename, SCM_MAKINUM (i + 1), SCM_MAKINUM (end + 1));
|
return scm_substring (filename, SCM_I_MAKINUM (i + 1), SCM_I_MAKINUM (end + 1));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ scm_evict_ports (int fd)
|
||||||
fp->fdes = dup (fd);
|
fp->fdes = dup (fd);
|
||||||
if (fp->fdes == -1)
|
if (fp->fdes == -1)
|
||||||
scm_syserror ("scm_evict_ports");
|
scm_syserror ("scm_evict_ports");
|
||||||
scm_set_port_revealed_x (port, SCM_MAKINUM (0));
|
scm_set_port_revealed_x (port, SCM_I_MAKINUM (0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -845,9 +845,9 @@ scm_init_fports ()
|
||||||
{
|
{
|
||||||
scm_tc16_fport = scm_make_fptob ();
|
scm_tc16_fport = scm_make_fptob ();
|
||||||
|
|
||||||
scm_c_define ("_IOFBF", SCM_MAKINUM (_IOFBF));
|
scm_c_define ("_IOFBF", SCM_I_MAKINUM (_IOFBF));
|
||||||
scm_c_define ("_IOLBF", SCM_MAKINUM (_IOLBF));
|
scm_c_define ("_IOLBF", SCM_I_MAKINUM (_IOLBF));
|
||||||
scm_c_define ("_IONBF", SCM_MAKINUM (_IONBF));
|
scm_c_define ("_IONBF", SCM_I_MAKINUM (_IONBF));
|
||||||
|
|
||||||
#include "libguile/fports.x"
|
#include "libguile/fports.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ count (SCM ls)
|
||||||
++n;
|
++n;
|
||||||
ls = SCM_FUTURE_NEXT (ls);
|
ls = SCM_FUTURE_NEXT (ls);
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (n);
|
return SCM_I_MAKINUM (n);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SCM scm_future_cache_status (void);
|
extern SCM scm_future_cache_status (void);
|
||||||
|
@ -76,7 +76,7 @@ SCM_DEFINE (scm_future_cache_status, "future-cache-status", 0, 0, 0,
|
||||||
count (young),
|
count (young),
|
||||||
count (old),
|
count (old),
|
||||||
count (undead),
|
count (undead),
|
||||||
SCM_MAKINUM (nd));
|
SCM_I_MAKINUM (nd));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -720,8 +720,8 @@ scm_gc_protect_object (SCM obj)
|
||||||
/* This critical section barrier will be replaced by a mutex. */
|
/* This critical section barrier will be replaced by a mutex. */
|
||||||
SCM_REDEFER_INTS;
|
SCM_REDEFER_INTS;
|
||||||
|
|
||||||
handle = scm_hashq_create_handle_x (scm_protects, obj, SCM_MAKINUM (0));
|
handle = scm_hashq_create_handle_x (scm_protects, obj, SCM_I_MAKINUM (0));
|
||||||
SCM_SETCDR (handle, scm_sum (SCM_CDR (handle), SCM_MAKINUM (1)));
|
SCM_SETCDR (handle, scm_sum (SCM_CDR (handle), SCM_I_MAKINUM (1)));
|
||||||
|
|
||||||
protected_obj_count ++;
|
protected_obj_count ++;
|
||||||
|
|
||||||
|
@ -752,8 +752,8 @@ scm_gc_unprotect_object (SCM obj)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCM count = scm_difference (SCM_CDR (handle), SCM_MAKINUM (1));
|
SCM count = scm_difference (SCM_CDR (handle), SCM_I_MAKINUM (1));
|
||||||
if (SCM_EQ_P (count, SCM_MAKINUM (0)))
|
if (SCM_EQ_P (count, SCM_I_MAKINUM (0)))
|
||||||
scm_hashq_remove_x (scm_protects, obj);
|
scm_hashq_remove_x (scm_protects, obj);
|
||||||
else
|
else
|
||||||
SCM_SETCDR (handle, count);
|
SCM_SETCDR (handle, count);
|
||||||
|
@ -774,8 +774,8 @@ scm_gc_register_root (SCM *p)
|
||||||
/* This critical section barrier will be replaced by a mutex. */
|
/* This critical section barrier will be replaced by a mutex. */
|
||||||
SCM_REDEFER_INTS;
|
SCM_REDEFER_INTS;
|
||||||
|
|
||||||
handle = scm_hashv_create_handle_x (scm_gc_registered_roots, key, SCM_MAKINUM (0));
|
handle = scm_hashv_create_handle_x (scm_gc_registered_roots, key, SCM_I_MAKINUM (0));
|
||||||
SCM_SETCDR (handle, scm_sum (SCM_CDR (handle), SCM_MAKINUM (1)));
|
SCM_SETCDR (handle, scm_sum (SCM_CDR (handle), SCM_I_MAKINUM (1)));
|
||||||
|
|
||||||
SCM_REALLOW_INTS;
|
SCM_REALLOW_INTS;
|
||||||
}
|
}
|
||||||
|
@ -798,8 +798,8 @@ scm_gc_unregister_root (SCM *p)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCM count = scm_difference (SCM_CDR (handle), SCM_MAKINUM (1));
|
SCM count = scm_difference (SCM_CDR (handle), SCM_I_MAKINUM (1));
|
||||||
if (SCM_EQ_P (count, SCM_MAKINUM (0)))
|
if (SCM_EQ_P (count, SCM_I_MAKINUM (0)))
|
||||||
scm_hashv_remove_x (scm_gc_registered_roots, key);
|
scm_hashv_remove_x (scm_gc_registered_roots, key);
|
||||||
else
|
else
|
||||||
SCM_SETCDR (handle, count);
|
SCM_SETCDR (handle, count);
|
||||||
|
|
|
@ -183,10 +183,10 @@ gdb_read (char *str)
|
||||||
}
|
}
|
||||||
SCM_BEGIN_FOREIGN_BLOCK;
|
SCM_BEGIN_FOREIGN_BLOCK;
|
||||||
unmark_port (gdb_input_port);
|
unmark_port (gdb_input_port);
|
||||||
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
scm_seek (gdb_input_port, SCM_INUM0, SCM_I_MAKINUM (SEEK_SET));
|
||||||
scm_puts (str, gdb_input_port);
|
scm_puts (str, gdb_input_port);
|
||||||
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
|
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
|
||||||
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
scm_seek (gdb_input_port, SCM_INUM0, SCM_I_MAKINUM (SEEK_SET));
|
||||||
/* Read one object */
|
/* Read one object */
|
||||||
tok_buf_mark_p = SCM_GC_MARK_P (tok_buf);
|
tok_buf_mark_p = SCM_GC_MARK_P (tok_buf);
|
||||||
SCM_CLEAR_GC_MARK (tok_buf);
|
SCM_CLEAR_GC_MARK (tok_buf);
|
||||||
|
@ -242,7 +242,7 @@ gdb_print (SCM obj)
|
||||||
RESET_STRING;
|
RESET_STRING;
|
||||||
SCM_BEGIN_FOREIGN_BLOCK;
|
SCM_BEGIN_FOREIGN_BLOCK;
|
||||||
/* Reset stream */
|
/* Reset stream */
|
||||||
scm_seek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
scm_seek (gdb_output_port, SCM_INUM0, SCM_I_MAKINUM (SEEK_SET));
|
||||||
scm_write (obj, gdb_output_port);
|
scm_write (obj, gdb_output_port);
|
||||||
scm_truncate_file (gdb_output_port, SCM_UNDEFINED);
|
scm_truncate_file (gdb_output_port, SCM_UNDEFINED);
|
||||||
{
|
{
|
||||||
|
@ -285,13 +285,13 @@ scm_init_gdbint ()
|
||||||
scm_print_carefully_p = 0;
|
scm_print_carefully_p = 0;
|
||||||
|
|
||||||
port = scm_mkstrport (SCM_INUM0,
|
port = scm_mkstrport (SCM_INUM0,
|
||||||
scm_make_string (SCM_MAKINUM (0), SCM_UNDEFINED),
|
scm_make_string (SCM_I_MAKINUM (0), SCM_UNDEFINED),
|
||||||
SCM_OPN | SCM_WRTNG,
|
SCM_OPN | SCM_WRTNG,
|
||||||
s);
|
s);
|
||||||
gdb_output_port = scm_permanent_object (port);
|
gdb_output_port = scm_permanent_object (port);
|
||||||
|
|
||||||
port = scm_mkstrport (SCM_INUM0,
|
port = scm_mkstrport (SCM_INUM0,
|
||||||
scm_make_string (SCM_MAKINUM (0), SCM_UNDEFINED),
|
scm_make_string (SCM_I_MAKINUM (0), SCM_UNDEFINED),
|
||||||
SCM_OPN | SCM_RDNG | SCM_WRTNG,
|
SCM_OPN | SCM_RDNG | SCM_WRTNG,
|
||||||
s);
|
s);
|
||||||
gdb_input_port = scm_permanent_object (port);
|
gdb_input_port = scm_permanent_object (port);
|
||||||
|
|
|
@ -103,7 +103,7 @@ gh_ints2scm (const int *d, long n)
|
||||||
long i;
|
long i;
|
||||||
SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);
|
SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);
|
||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
SCM_VECTOR_SET (v, i, (SCM_FIXABLE (d[i]) ? SCM_MAKINUM (d[i]) : scm_i_long2big (d[i])));
|
SCM_VECTOR_SET (v, i, (SCM_FIXABLE (d[i]) ? SCM_I_MAKINUM (d[i]) : scm_i_long2big (d[i])));
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,7 +310,7 @@ compute_getters_n_setters (SCM slots)
|
||||||
}
|
}
|
||||||
*cdrloc = scm_cons (scm_cons (SCM_CAAR (slots),
|
*cdrloc = scm_cons (scm_cons (SCM_CAAR (slots),
|
||||||
scm_cons (init,
|
scm_cons (init,
|
||||||
SCM_MAKINUM (i++))),
|
SCM_I_MAKINUM (i++))),
|
||||||
SCM_EOL);
|
SCM_EOL);
|
||||||
cdrloc = SCM_CDRLOC (*cdrloc);
|
cdrloc = SCM_CDRLOC (*cdrloc);
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ scm_basic_basic_make_class (SCM class, SCM name, SCM dsupers, SCM dslots)
|
||||||
SCM_SET_SLOT (z, scm_si_direct_supers, dsupers);
|
SCM_SET_SLOT (z, scm_si_direct_supers, dsupers);
|
||||||
cpl = compute_cpl (z);
|
cpl = compute_cpl (z);
|
||||||
slots = build_slots_list (maplist (dslots), cpl);
|
slots = build_slots_list (maplist (dslots), cpl);
|
||||||
nfields = SCM_MAKINUM (scm_ilength (slots));
|
nfields = SCM_I_MAKINUM (scm_ilength (slots));
|
||||||
g_n_s = compute_getters_n_setters (slots);
|
g_n_s = compute_getters_n_setters (slots);
|
||||||
|
|
||||||
SCM_SET_SLOT (z, scm_si_name, name);
|
SCM_SET_SLOT (z, scm_si_name, name);
|
||||||
|
@ -779,7 +779,7 @@ create_basic_classes (void)
|
||||||
SCM_SET_SLOT (scm_class_class, scm_si_direct_methods, SCM_EOL);
|
SCM_SET_SLOT (scm_class_class, scm_si_direct_methods, SCM_EOL);
|
||||||
SCM_SET_SLOT (scm_class_class, scm_si_cpl, SCM_EOL); /* will be changed */
|
SCM_SET_SLOT (scm_class_class, scm_si_cpl, SCM_EOL); /* will be changed */
|
||||||
/* SCM_SET_SLOT (scm_class_class, scm_si_slots, slots_of_class); */
|
/* SCM_SET_SLOT (scm_class_class, scm_si_slots, slots_of_class); */
|
||||||
SCM_SET_SLOT (scm_class_class, scm_si_nfields, SCM_MAKINUM (SCM_N_CLASS_SLOTS));
|
SCM_SET_SLOT (scm_class_class, scm_si_nfields, SCM_I_MAKINUM (SCM_N_CLASS_SLOTS));
|
||||||
/* SCM_SET_SLOT (scm_class_class, scm_si_getters_n_setters,
|
/* SCM_SET_SLOT (scm_class_class, scm_si_getters_n_setters,
|
||||||
compute_getters_n_setters (slots_of_class)); */
|
compute_getters_n_setters (slots_of_class)); */
|
||||||
SCM_SET_SLOT (scm_class_class, scm_si_redefined, SCM_BOOL_F);
|
SCM_SET_SLOT (scm_class_class, scm_si_redefined, SCM_BOOL_F);
|
||||||
|
@ -1629,7 +1629,7 @@ scm_make_method_cache (SCM gf)
|
||||||
{
|
{
|
||||||
return scm_list_5 (SCM_IM_DISPATCH,
|
return scm_list_5 (SCM_IM_DISPATCH,
|
||||||
scm_sym_args,
|
scm_sym_args,
|
||||||
SCM_MAKINUM (1),
|
SCM_I_MAKINUM (1),
|
||||||
scm_c_make_vector (SCM_INITIAL_MCACHE_SIZE,
|
scm_c_make_vector (SCM_INITIAL_MCACHE_SIZE,
|
||||||
list_of_no_method),
|
list_of_no_method),
|
||||||
gf);
|
gf);
|
||||||
|
@ -2719,11 +2719,11 @@ scm_add_slot (SCM class, char *slot_name, SCM slot_class,
|
||||||
scm_list_1 (slot))));
|
scm_list_1 (slot))));
|
||||||
{
|
{
|
||||||
SCM n = SCM_SLOT (class, scm_si_nfields);
|
SCM n = SCM_SLOT (class, scm_si_nfields);
|
||||||
SCM gns = scm_list_n (name, SCM_BOOL_F, get, set, n, SCM_MAKINUM (1));
|
SCM gns = scm_list_n (name, SCM_BOOL_F, get, set, n, SCM_I_MAKINUM (1));
|
||||||
SCM_SET_SLOT (class, scm_si_getters_n_setters,
|
SCM_SET_SLOT (class, scm_si_getters_n_setters,
|
||||||
scm_append_x (scm_list_2 (SCM_SLOT (class, scm_si_getters_n_setters),
|
scm_append_x (scm_list_2 (SCM_SLOT (class, scm_si_getters_n_setters),
|
||||||
scm_list_1 (gns))));
|
scm_list_1 (gns))));
|
||||||
SCM_SET_SLOT (class, scm_si_nfields, SCM_MAKINUM (SCM_INUM (n) + 1));
|
SCM_SET_SLOT (class, scm_si_nfields, SCM_I_MAKINUM (SCM_INUM (n) + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2823,7 +2823,7 @@ scm_init_goops_builtins (void)
|
||||||
scm_permanent_object (scm_goops_lookup_closure);
|
scm_permanent_object (scm_goops_lookup_closure);
|
||||||
|
|
||||||
scm_components = scm_permanent_object (scm_make_weak_key_hash_table
|
scm_components = scm_permanent_object (scm_make_weak_key_hash_table
|
||||||
(SCM_MAKINUM (37)));
|
(SCM_I_MAKINUM (37)));
|
||||||
|
|
||||||
goops_rstate = scm_c_make_rstate ("GOOPS", 5);
|
goops_rstate = scm_c_make_rstate ("GOOPS", 5);
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ create_gsubr (int define, const char *name,
|
||||||
}
|
}
|
||||||
SCM_SET_GSUBR_PROC (cclo, subr);
|
SCM_SET_GSUBR_PROC (cclo, subr);
|
||||||
SCM_SET_GSUBR_TYPE (cclo,
|
SCM_SET_GSUBR_TYPE (cclo,
|
||||||
SCM_MAKINUM (SCM_GSUBR_MAKTYPE (req, opt, rst)));
|
SCM_I_MAKINUM (SCM_GSUBR_MAKTYPE (req, opt, rst)));
|
||||||
if (SCM_REC_PROCNAMES_P)
|
if (SCM_REC_PROCNAMES_P)
|
||||||
scm_set_procedure_property_x (cclo, scm_sym_name, sym);
|
scm_set_procedure_property_x (cclo, scm_sym_name, sym);
|
||||||
if (define)
|
if (define)
|
||||||
|
@ -193,7 +193,7 @@ scm_gsubr_apply (SCM args)
|
||||||
if (n > SCM_GSUBR_MAX)
|
if (n > SCM_GSUBR_MAX)
|
||||||
scm_misc_error (FUNC_NAME,
|
scm_misc_error (FUNC_NAME,
|
||||||
"Function ~S has illegal arity ~S.",
|
"Function ~S has illegal arity ~S.",
|
||||||
scm_list_2 (self, SCM_MAKINUM (n)));
|
scm_list_2 (self, SCM_I_MAKINUM (n)));
|
||||||
#endif
|
#endif
|
||||||
args = SCM_CDR (args);
|
args = SCM_CDR (args);
|
||||||
for (i = 0; i < SCM_GSUBR_REQ (typ); i++) {
|
for (i = 0; i < SCM_GSUBR_REQ (typ); i++) {
|
||||||
|
|
|
@ -604,7 +604,7 @@ scm_init_guardians ()
|
||||||
whine_about_self_centered_zombies, 0, 0);
|
whine_about_self_centered_zombies, 0, 0);
|
||||||
|
|
||||||
greedily_guarded_whash =
|
greedily_guarded_whash =
|
||||||
scm_permanent_object (scm_make_doubly_weak_hash_table (SCM_MAKINUM (31)));
|
scm_permanent_object (scm_make_doubly_weak_hash_table (SCM_I_MAKINUM (31)));
|
||||||
|
|
||||||
#include "libguile/guardians.x"
|
#include "libguile/guardians.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,20 +91,20 @@ scm_hasher(SCM obj, unsigned long n, size_t d)
|
||||||
case scm_tc7_number:
|
case scm_tc7_number:
|
||||||
switch SCM_TYP16 (obj) {
|
switch SCM_TYP16 (obj) {
|
||||||
case scm_tc16_big:
|
case scm_tc16_big:
|
||||||
return SCM_INUM (scm_modulo (obj, SCM_MAKINUM (n)));
|
return SCM_INUM (scm_modulo (obj, SCM_I_MAKINUM (n)));
|
||||||
case scm_tc16_real:
|
case scm_tc16_real:
|
||||||
{
|
{
|
||||||
double r = SCM_REAL_VALUE (obj);
|
double r = SCM_REAL_VALUE (obj);
|
||||||
if (floor (r) == r) {
|
if (floor (r) == r) {
|
||||||
obj = scm_inexact_to_exact (obj);
|
obj = scm_inexact_to_exact (obj);
|
||||||
if SCM_IMP (obj) return SCM_INUM (obj) % n;
|
if SCM_IMP (obj) return SCM_INUM (obj) % n;
|
||||||
return SCM_INUM (scm_modulo (obj, SCM_MAKINUM (n)));
|
return SCM_INUM (scm_modulo (obj, SCM_I_MAKINUM (n)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case scm_tc16_complex:
|
case scm_tc16_complex:
|
||||||
case scm_tc16_fraction:
|
case scm_tc16_fraction:
|
||||||
obj = scm_number_to_string (obj, SCM_MAKINUM (10));
|
obj = scm_number_to_string (obj, SCM_I_MAKINUM (10));
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
|
@ -172,7 +172,7 @@ SCM_DEFINE (scm_hashq, "hashq", 2, 0, 0,
|
||||||
#define FUNC_NAME s_scm_hashq
|
#define FUNC_NAME s_scm_hashq
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
||||||
return SCM_MAKINUM (scm_ihashq (key, SCM_INUM (size)));
|
return SCM_I_MAKINUM (scm_ihashq (key, SCM_INUM (size)));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ SCM_DEFINE (scm_hashv, "hashv", 2, 0, 0,
|
||||||
#define FUNC_NAME s_scm_hashv
|
#define FUNC_NAME s_scm_hashv
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
||||||
return SCM_MAKINUM (scm_ihashv (key, SCM_INUM (size)));
|
return SCM_I_MAKINUM (scm_ihashv (key, SCM_INUM (size)));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ SCM_DEFINE (scm_hash, "hash", 2, 0, 0,
|
||||||
#define FUNC_NAME s_scm_hash
|
#define FUNC_NAME s_scm_hash
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
SCM_VALIDATE_INUM_MIN (2, size, 0);
|
||||||
return SCM_MAKINUM (scm_ihash (key, SCM_INUM (size)));
|
return SCM_I_MAKINUM (scm_ihash (key, SCM_INUM (size)));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ make_hash_table (int flags, unsigned long k, const char *func_name) {
|
||||||
perform the final scan for broken references. Instead we do
|
perform the final scan for broken references. Instead we do
|
||||||
that ourselves in scan_weak_hashtables. */
|
that ourselves in scan_weak_hashtables. */
|
||||||
vector = scm_i_allocate_weak_vector (flags | SCM_WVECTF_NOSCAN,
|
vector = scm_i_allocate_weak_vector (flags | SCM_WVECTF_NOSCAN,
|
||||||
SCM_MAKINUM (n),
|
SCM_I_MAKINUM (n),
|
||||||
SCM_EOL,
|
SCM_EOL,
|
||||||
func_name);
|
func_name);
|
||||||
else
|
else
|
||||||
|
@ -155,7 +155,7 @@ scm_i_rehash (SCM table,
|
||||||
if (SCM_HASHTABLE_WEAK_P (table))
|
if (SCM_HASHTABLE_WEAK_P (table))
|
||||||
new_buckets = scm_i_allocate_weak_vector (SCM_HASHTABLE_FLAGS (table)
|
new_buckets = scm_i_allocate_weak_vector (SCM_HASHTABLE_FLAGS (table)
|
||||||
| SCM_WVECTF_NOSCAN,
|
| SCM_WVECTF_NOSCAN,
|
||||||
SCM_MAKINUM (new_size),
|
SCM_I_MAKINUM (new_size),
|
||||||
SCM_EOL,
|
SCM_EOL,
|
||||||
func_name);
|
func_name);
|
||||||
else
|
else
|
||||||
|
|
|
@ -260,7 +260,7 @@ SCM_DEFINE (scm_run_hook, "run-hook", 1, 0, 1,
|
||||||
SCM_VALIDATE_HOOK (1, hook);
|
SCM_VALIDATE_HOOK (1, hook);
|
||||||
if (scm_ilength (args) != SCM_HOOK_ARITY (hook))
|
if (scm_ilength (args) != SCM_HOOK_ARITY (hook))
|
||||||
SCM_MISC_ERROR ("Hook ~S requires ~A arguments",
|
SCM_MISC_ERROR ("Hook ~S requires ~A arguments",
|
||||||
scm_list_2 (hook, SCM_MAKINUM (SCM_HOOK_ARITY (hook))));
|
scm_list_2 (hook, SCM_I_MAKINUM (SCM_HOOK_ARITY (hook))));
|
||||||
scm_c_run_hook (hook, args);
|
scm_c_run_hook (hook, args);
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ SCM_DEFINE (scm_ftell, "ftell", 1, 0, 0,
|
||||||
"@end lisp")
|
"@end lisp")
|
||||||
#define FUNC_NAME s_scm_ftell
|
#define FUNC_NAME s_scm_ftell
|
||||||
{
|
{
|
||||||
return scm_seek (fd_port, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
return scm_seek (fd_port, SCM_INUM0, SCM_I_MAKINUM (SEEK_CUR));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ SCM_DEFINE (scm_dup_to_fdes, "dup->fdes", 1, 1, 0,
|
||||||
newfd = dup (oldfd);
|
newfd = dup (oldfd);
|
||||||
if (newfd == -1)
|
if (newfd == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
fd = SCM_MAKINUM (newfd);
|
fd = SCM_I_MAKINUM (newfd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ SCM_DEFINE (scm_fileno, "fileno", 1, 0, 0,
|
||||||
{
|
{
|
||||||
port = SCM_COERCE_OUTPORT (port);
|
port = SCM_COERCE_OUTPORT (port);
|
||||||
SCM_VALIDATE_OPFPORT (1, port);
|
SCM_VALIDATE_OPFPORT (1, port);
|
||||||
return SCM_MAKINUM (SCM_FPORT_FDES (port));
|
return SCM_I_MAKINUM (SCM_FPORT_FDES (port));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ SCM_DEFINE (scm_length, "length", 1, 0, 0,
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
SCM_VALIDATE_LIST_COPYLEN (1, lst, i);
|
SCM_VALIDATE_LIST_COPYLEN (1, lst, i);
|
||||||
return SCM_MAKINUM (i);
|
return SCM_I_MAKINUM (i);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -171,8 +171,8 @@ SCM_DEFINE (scm_gethost, "gethost", 0, 1, 0,
|
||||||
|
|
||||||
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->h_name, strlen (entry->h_name)));
|
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->h_name, strlen (entry->h_name)));
|
||||||
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->h_aliases));
|
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->h_aliases));
|
||||||
SCM_VECTOR_SET(result, 2, SCM_MAKINUM (entry->h_addrtype + 0L));
|
SCM_VECTOR_SET(result, 2, SCM_I_MAKINUM (entry->h_addrtype + 0L));
|
||||||
SCM_VECTOR_SET(result, 3, SCM_MAKINUM (entry->h_length + 0L));
|
SCM_VECTOR_SET(result, 3, SCM_I_MAKINUM (entry->h_length + 0L));
|
||||||
if (sizeof (struct in_addr) != entry->h_length)
|
if (sizeof (struct in_addr) != entry->h_length)
|
||||||
{
|
{
|
||||||
SCM_VECTOR_SET(result, 4, SCM_BOOL_F);
|
SCM_VECTOR_SET(result, 4, SCM_BOOL_F);
|
||||||
|
@ -239,7 +239,7 @@ SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0,
|
||||||
SCM_SYSERROR_MSG ("no such network ~A", scm_list_1 (net), errno);
|
SCM_SYSERROR_MSG ("no such network ~A", scm_list_1 (net), errno);
|
||||||
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->n_name, strlen (entry->n_name)));
|
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->n_name, strlen (entry->n_name)));
|
||||||
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->n_aliases));
|
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->n_aliases));
|
||||||
SCM_VECTOR_SET(result, 2, SCM_MAKINUM (entry->n_addrtype + 0L));
|
SCM_VECTOR_SET(result, 2, SCM_I_MAKINUM (entry->n_addrtype + 0L));
|
||||||
SCM_VECTOR_SET(result, 3, scm_ulong2num (entry->n_net + 0L));
|
SCM_VECTOR_SET(result, 3, scm_ulong2num (entry->n_net + 0L));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0,
|
||||||
SCM_SYSERROR_MSG ("no such protocol ~A", scm_list_1 (protocol), errno);
|
SCM_SYSERROR_MSG ("no such protocol ~A", scm_list_1 (protocol), errno);
|
||||||
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->p_name, strlen (entry->p_name)));
|
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->p_name, strlen (entry->p_name)));
|
||||||
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->p_aliases));
|
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->p_aliases));
|
||||||
SCM_VECTOR_SET(result, 2, SCM_MAKINUM (entry->p_proto + 0L));
|
SCM_VECTOR_SET(result, 2, SCM_I_MAKINUM (entry->p_proto + 0L));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -299,7 +299,7 @@ scm_return_entry (struct servent *entry)
|
||||||
|
|
||||||
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->s_name, strlen (entry->s_name)));
|
SCM_VECTOR_SET(result, 0, scm_mem2string (entry->s_name, strlen (entry->s_name)));
|
||||||
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->s_aliases));
|
SCM_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->s_aliases));
|
||||||
SCM_VECTOR_SET(result, 2, SCM_MAKINUM (ntohs (entry->s_port) + 0L));
|
SCM_VECTOR_SET(result, 2, SCM_I_MAKINUM (ntohs (entry->s_port) + 0L));
|
||||||
SCM_VECTOR_SET(result, 3, scm_mem2string (entry->s_proto, strlen (entry->s_proto)));
|
SCM_VECTOR_SET(result, 3, scm_mem2string (entry->s_proto, strlen (entry->s_proto)));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,17 +182,17 @@ INTEGRAL2NUM (ITYPE n)
|
||||||
/* have to use #if here rather than if because of gcc warnings about
|
/* have to use #if here rather than if because of gcc warnings about
|
||||||
limited range */
|
limited range */
|
||||||
#if SIZEOF_ITYPE < SIZEOF_SCM_T_BITS
|
#if SIZEOF_ITYPE < SIZEOF_SCM_T_BITS
|
||||||
return SCM_MAKINUM ((scm_t_signed_bits) n);
|
return SCM_I_MAKINUM ((scm_t_signed_bits) n);
|
||||||
#else /* not SIZEOF_ITYPE < SIZEOF_SCM_T_BITS */
|
#else /* not SIZEOF_ITYPE < SIZEOF_SCM_T_BITS */
|
||||||
if (UNSIGNED)
|
if (UNSIGNED)
|
||||||
{
|
{
|
||||||
if (SCM_POSFIXABLE (n))
|
if (SCM_POSFIXABLE (n))
|
||||||
return SCM_MAKINUM ((scm_t_signed_bits) n);
|
return SCM_I_MAKINUM ((scm_t_signed_bits) n);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (SCM_FIXABLE (n))
|
if (SCM_FIXABLE (n))
|
||||||
return SCM_MAKINUM ((scm_t_signed_bits) n);
|
return SCM_I_MAKINUM ((scm_t_signed_bits) n);
|
||||||
}
|
}
|
||||||
return INTEGRAL2BIG (n);
|
return INTEGRAL2BIG (n);
|
||||||
#endif /* not SIZEOF_ITYPE < SIZEOF_SCM_T_BITS */
|
#endif /* not SIZEOF_ITYPE < SIZEOF_SCM_T_BITS */
|
||||||
|
|
|
@ -109,7 +109,7 @@ get_option_setting (const scm_t_option options[], unsigned int n)
|
||||||
ls = scm_cons (SCM_PACK (options[i].name), ls);
|
ls = scm_cons (SCM_PACK (options[i].name), ls);
|
||||||
break;
|
break;
|
||||||
case SCM_OPTION_INTEGER:
|
case SCM_OPTION_INTEGER:
|
||||||
ls = scm_cons (SCM_MAKINUM (options[i].val), ls);
|
ls = scm_cons (SCM_I_MAKINUM (options[i].val), ls);
|
||||||
ls = scm_cons (SCM_PACK (options[i].name), ls);
|
ls = scm_cons (SCM_PACK (options[i].name), ls);
|
||||||
break;
|
break;
|
||||||
case SCM_OPTION_SCM:
|
case SCM_OPTION_SCM:
|
||||||
|
@ -138,7 +138,7 @@ get_documented_option_setting (const scm_t_option options[], unsigned int n)
|
||||||
ls = scm_cons (options[i].val ? scm_yes_sym : scm_no_sym, ls);
|
ls = scm_cons (options[i].val ? scm_yes_sym : scm_no_sym, ls);
|
||||||
break;
|
break;
|
||||||
case SCM_OPTION_INTEGER:
|
case SCM_OPTION_INTEGER:
|
||||||
ls = scm_cons (SCM_MAKINUM (options[i].val), ls);
|
ls = scm_cons (SCM_I_MAKINUM (options[i].val), ls);
|
||||||
break;
|
break;
|
||||||
case SCM_OPTION_SCM:
|
case SCM_OPTION_SCM:
|
||||||
ls = scm_cons (SCM_PACK (options[i].val), ls);
|
ls = scm_cons (SCM_PACK (options[i].val), ls);
|
||||||
|
|
|
@ -587,7 +587,7 @@ SCM_DEFINE (scm_pt_size, "pt-size", 0, 0, 0,
|
||||||
"is only included in @code{--enable-guile-debug} builds.")
|
"is only included in @code{--enable-guile-debug} builds.")
|
||||||
#define FUNC_NAME s_scm_pt_size
|
#define FUNC_NAME s_scm_pt_size
|
||||||
{
|
{
|
||||||
return SCM_MAKINUM (scm_i_port_table_size);
|
return SCM_I_MAKINUM (scm_i_port_table_size);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ SCM_DEFINE (scm_port_revealed, "port-revealed", 1, 0, 0,
|
||||||
{
|
{
|
||||||
port = SCM_COERCE_OUTPORT (port);
|
port = SCM_COERCE_OUTPORT (port);
|
||||||
SCM_VALIDATE_OPENPORT (1, port);
|
SCM_VALIDATE_OPENPORT (1, port);
|
||||||
return SCM_MAKINUM (scm_revealed_count (port));
|
return SCM_I_MAKINUM (scm_revealed_count (port));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1411,7 +1411,7 @@ SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0,
|
||||||
if (SCM_STRINGP (object))
|
if (SCM_STRINGP (object))
|
||||||
SCM_MISC_ERROR("must supply length if OBJECT is a filename", SCM_EOL);
|
SCM_MISC_ERROR("must supply length if OBJECT is a filename", SCM_EOL);
|
||||||
|
|
||||||
length = scm_seek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
length = scm_seek (object, SCM_INUM0, SCM_I_MAKINUM (SEEK_CUR));
|
||||||
}
|
}
|
||||||
c_length = SCM_NUM2LONG (2, length);
|
c_length = SCM_NUM2LONG (2, length);
|
||||||
if (c_length < 0)
|
if (c_length < 0)
|
||||||
|
@ -1460,7 +1460,7 @@ SCM_DEFINE (scm_port_line, "port-line", 1, 0, 0,
|
||||||
{
|
{
|
||||||
port = SCM_COERCE_OUTPORT (port);
|
port = SCM_COERCE_OUTPORT (port);
|
||||||
SCM_VALIDATE_OPENPORT (1, port);
|
SCM_VALIDATE_OPENPORT (1, port);
|
||||||
return SCM_MAKINUM (SCM_LINUM (port));
|
return SCM_I_MAKINUM (SCM_LINUM (port));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1492,7 +1492,7 @@ SCM_DEFINE (scm_port_column, "port-column", 1, 0, 0,
|
||||||
{
|
{
|
||||||
port = SCM_COERCE_OUTPORT (port);
|
port = SCM_COERCE_OUTPORT (port);
|
||||||
SCM_VALIDATE_OPENPORT (1, port);
|
SCM_VALIDATE_OPENPORT (1, port);
|
||||||
return SCM_MAKINUM (SCM_COL (port));
|
return SCM_I_MAKINUM (SCM_COL (port));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1636,9 +1636,9 @@ void
|
||||||
scm_init_ports ()
|
scm_init_ports ()
|
||||||
{
|
{
|
||||||
/* lseek() symbols. */
|
/* lseek() symbols. */
|
||||||
scm_c_define ("SEEK_SET", SCM_MAKINUM (SEEK_SET));
|
scm_c_define ("SEEK_SET", SCM_I_MAKINUM (SEEK_SET));
|
||||||
scm_c_define ("SEEK_CUR", SCM_MAKINUM (SEEK_CUR));
|
scm_c_define ("SEEK_CUR", SCM_I_MAKINUM (SEEK_CUR));
|
||||||
scm_c_define ("SEEK_END", SCM_MAKINUM (SEEK_END));
|
scm_c_define ("SEEK_END", SCM_I_MAKINUM (SEEK_END));
|
||||||
|
|
||||||
scm_tc16_void_port = scm_make_port_type ("void", fill_input_void_port,
|
scm_tc16_void_port = scm_make_port_type ("void", fill_input_void_port,
|
||||||
write_void_port);
|
write_void_port);
|
||||||
|
|
|
@ -283,7 +283,7 @@ SCM_DEFINE (scm_setgroups, "setgroups", 1, 0, 0,
|
||||||
|
|
||||||
size = ngroups * sizeof (GETGROUPS_T);
|
size = ngroups * sizeof (GETGROUPS_T);
|
||||||
if (size / sizeof (GETGROUPS_T) != ngroups)
|
if (size / sizeof (GETGROUPS_T) != ngroups)
|
||||||
SCM_OUT_OF_RANGE (SCM_ARG1, SCM_MAKINUM (ngroups));
|
SCM_OUT_OF_RANGE (SCM_ARG1, SCM_I_MAKINUM (ngroups));
|
||||||
groups = scm_malloc (size);
|
groups = scm_malloc (size);
|
||||||
for(i = 0; i < ngroups; i++)
|
for(i = 0; i < ngroups; i++)
|
||||||
groups [i] = SCM_NUM2ULONG (1, SCM_VECTOR_REF (group_vec, i));
|
groups [i] = SCM_NUM2ULONG (1, SCM_VECTOR_REF (group_vec, i));
|
||||||
|
@ -518,7 +518,7 @@ SCM_DEFINE (scm_waitpid, "waitpid", 1, 1, 0,
|
||||||
SCM_SYSCALL (i = waitpid (SCM_INUM (pid), &status, ioptions));
|
SCM_SYSCALL (i = waitpid (SCM_INUM (pid), &status, ioptions));
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return scm_cons (SCM_MAKINUM (0L + i), SCM_MAKINUM (0L + status));
|
return scm_cons (SCM_I_MAKINUM (0L + i), SCM_I_MAKINUM (0L + status));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_WAITPID */
|
#endif /* HAVE_WAITPID */
|
||||||
|
@ -539,7 +539,7 @@ SCM_DEFINE (scm_status_exit_val, "status:exit-val", 1, 0, 0,
|
||||||
go figure. SCM_INUM does not yield an lvalue. */
|
go figure. SCM_INUM does not yield an lvalue. */
|
||||||
lstatus = SCM_INUM (status);
|
lstatus = SCM_INUM (status);
|
||||||
if (WIFEXITED (lstatus))
|
if (WIFEXITED (lstatus))
|
||||||
return (SCM_MAKINUM (WEXITSTATUS (lstatus)));
|
return (SCM_I_MAKINUM (WEXITSTATUS (lstatus)));
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ SCM_DEFINE (scm_status_term_sig, "status:term-sig", 1, 0, 0,
|
||||||
|
|
||||||
lstatus = SCM_INUM (status);
|
lstatus = SCM_INUM (status);
|
||||||
if (WIFSIGNALED (lstatus))
|
if (WIFSIGNALED (lstatus))
|
||||||
return SCM_MAKINUM (WTERMSIG (lstatus));
|
return SCM_I_MAKINUM (WTERMSIG (lstatus));
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ SCM_DEFINE (scm_status_stop_sig, "status:stop-sig", 1, 0, 0,
|
||||||
|
|
||||||
lstatus = SCM_INUM (status);
|
lstatus = SCM_INUM (status);
|
||||||
if (WIFSTOPPED (lstatus))
|
if (WIFSTOPPED (lstatus))
|
||||||
return SCM_MAKINUM (WSTOPSIG (lstatus));
|
return SCM_I_MAKINUM (WSTOPSIG (lstatus));
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -589,7 +589,7 @@ SCM_DEFINE (scm_getppid, "getppid", 0, 0, 0,
|
||||||
"process.")
|
"process.")
|
||||||
#define FUNC_NAME s_scm_getppid
|
#define FUNC_NAME s_scm_getppid
|
||||||
{
|
{
|
||||||
return SCM_MAKINUM (0L + getppid ());
|
return SCM_I_MAKINUM (0L + getppid ());
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_GETPPID */
|
#endif /* HAVE_GETPPID */
|
||||||
|
@ -601,7 +601,7 @@ SCM_DEFINE (scm_getuid, "getuid", 0, 0, 0,
|
||||||
"Return an integer representing the current real user ID.")
|
"Return an integer representing the current real user ID.")
|
||||||
#define FUNC_NAME s_scm_getuid
|
#define FUNC_NAME s_scm_getuid
|
||||||
{
|
{
|
||||||
return SCM_MAKINUM (0L + getuid ());
|
return SCM_I_MAKINUM (0L + getuid ());
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ SCM_DEFINE (scm_getgid, "getgid", 0, 0, 0,
|
||||||
"Return an integer representing the current real group ID.")
|
"Return an integer representing the current real group ID.")
|
||||||
#define FUNC_NAME s_scm_getgid
|
#define FUNC_NAME s_scm_getgid
|
||||||
{
|
{
|
||||||
return SCM_MAKINUM (0L + getgid ());
|
return SCM_I_MAKINUM (0L + getgid ());
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -627,9 +627,9 @@ SCM_DEFINE (scm_geteuid, "geteuid", 0, 0, 0,
|
||||||
#define FUNC_NAME s_scm_geteuid
|
#define FUNC_NAME s_scm_geteuid
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETEUID
|
#ifdef HAVE_GETEUID
|
||||||
return SCM_MAKINUM (0L + geteuid ());
|
return SCM_I_MAKINUM (0L + geteuid ());
|
||||||
#else
|
#else
|
||||||
return SCM_MAKINUM (0L + getuid ());
|
return SCM_I_MAKINUM (0L + getuid ());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -644,9 +644,9 @@ SCM_DEFINE (scm_getegid, "getegid", 0, 0, 0,
|
||||||
#define FUNC_NAME s_scm_getegid
|
#define FUNC_NAME s_scm_getegid
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETEUID
|
#ifdef HAVE_GETEUID
|
||||||
return SCM_MAKINUM (0L + getegid ());
|
return SCM_I_MAKINUM (0L + getegid ());
|
||||||
#else
|
#else
|
||||||
return SCM_MAKINUM (0L + getgid ());
|
return SCM_I_MAKINUM (0L + getgid ());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -741,7 +741,7 @@ SCM_DEFINE (scm_getpgrp, "getpgrp", 0, 0, 0,
|
||||||
{
|
{
|
||||||
int (*fn)();
|
int (*fn)();
|
||||||
fn = (int (*) ()) getpgrp;
|
fn = (int (*) ()) getpgrp;
|
||||||
return SCM_MAKINUM (fn (0));
|
return SCM_I_MAKINUM (fn (0));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_GETPGRP */
|
#endif /* HAVE_GETPGRP */
|
||||||
|
@ -847,7 +847,7 @@ SCM_DEFINE (scm_tcgetpgrp, "tcgetpgrp", 1, 0, 0,
|
||||||
fd = SCM_FPORT_FDES (port);
|
fd = SCM_FPORT_FDES (port);
|
||||||
if ((pgid = tcgetpgrp (fd)) == -1)
|
if ((pgid = tcgetpgrp (fd)) == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (pgid);
|
return SCM_I_MAKINUM (pgid);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_TCGETPGRP */
|
#endif /* HAVE_TCGETPGRP */
|
||||||
|
@ -1033,7 +1033,7 @@ SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0,
|
||||||
pid = fork ();
|
pid = fork ();
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (0L+pid);
|
return SCM_I_MAKINUM (0L+pid);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_FORK */
|
#endif /* HAVE_FORK */
|
||||||
|
@ -1229,7 +1229,7 @@ SCM_DEFINE (scm_getpid, "getpid", 0, 0, 0,
|
||||||
"Return an integer representing the current process ID.")
|
"Return an integer representing the current process ID.")
|
||||||
#define FUNC_NAME s_scm_getpid
|
#define FUNC_NAME s_scm_getpid
|
||||||
{
|
{
|
||||||
return SCM_MAKINUM ((unsigned long) getpid ());
|
return SCM_I_MAKINUM ((unsigned long) getpid ());
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1293,8 +1293,8 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
|
||||||
if (ptr[SCM_STRING_LENGTH (str) - 1] == '=')
|
if (ptr[SCM_STRING_LENGTH (str) - 1] == '=')
|
||||||
{
|
{
|
||||||
char *alt;
|
char *alt;
|
||||||
SCM name = scm_substring (str, SCM_MAKINUM (0),
|
SCM name = scm_substring (str, SCM_I_MAKINUM (0),
|
||||||
SCM_MAKINUM (SCM_STRING_LENGTH (str) - 1));
|
SCM_I_MAKINUM (SCM_STRING_LENGTH (str) - 1));
|
||||||
if (getenv (SCM_STRING_CHARS (name)) == NULL)
|
if (getenv (SCM_STRING_CHARS (name)) == NULL)
|
||||||
{
|
{
|
||||||
alt = scm_malloc (SCM_STRING_LENGTH (str) + 2);
|
alt = scm_malloc (SCM_STRING_LENGTH (str) + 2);
|
||||||
|
@ -1562,7 +1562,7 @@ SCM_DEFINE (scm_getpriority, "getpriority", 2, 0, 0,
|
||||||
ret = getpriority (cwhich, cwho);
|
ret = getpriority (cwhich, cwho);
|
||||||
if (errno != 0)
|
if (errno != 0)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (ret);
|
return SCM_I_MAKINUM (ret);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_GETPRIORITY */
|
#endif /* HAVE_GETPRIORITY */
|
||||||
|
@ -1841,70 +1841,70 @@ scm_init_posix ()
|
||||||
scm_add_feature ("EIDs");
|
scm_add_feature ("EIDs");
|
||||||
#endif
|
#endif
|
||||||
#ifdef WAIT_ANY
|
#ifdef WAIT_ANY
|
||||||
scm_c_define ("WAIT_ANY", SCM_MAKINUM (WAIT_ANY));
|
scm_c_define ("WAIT_ANY", SCM_I_MAKINUM (WAIT_ANY));
|
||||||
#endif
|
#endif
|
||||||
#ifdef WAIT_MYPGRP
|
#ifdef WAIT_MYPGRP
|
||||||
scm_c_define ("WAIT_MYPGRP", SCM_MAKINUM (WAIT_MYPGRP));
|
scm_c_define ("WAIT_MYPGRP", SCM_I_MAKINUM (WAIT_MYPGRP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef WNOHANG
|
#ifdef WNOHANG
|
||||||
scm_c_define ("WNOHANG", SCM_MAKINUM (WNOHANG));
|
scm_c_define ("WNOHANG", SCM_I_MAKINUM (WNOHANG));
|
||||||
#endif
|
#endif
|
||||||
#ifdef WUNTRACED
|
#ifdef WUNTRACED
|
||||||
scm_c_define ("WUNTRACED", SCM_MAKINUM (WUNTRACED));
|
scm_c_define ("WUNTRACED", SCM_I_MAKINUM (WUNTRACED));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* access() symbols. */
|
/* access() symbols. */
|
||||||
scm_c_define ("R_OK", SCM_MAKINUM (R_OK));
|
scm_c_define ("R_OK", SCM_I_MAKINUM (R_OK));
|
||||||
scm_c_define ("W_OK", SCM_MAKINUM (W_OK));
|
scm_c_define ("W_OK", SCM_I_MAKINUM (W_OK));
|
||||||
scm_c_define ("X_OK", SCM_MAKINUM (X_OK));
|
scm_c_define ("X_OK", SCM_I_MAKINUM (X_OK));
|
||||||
scm_c_define ("F_OK", SCM_MAKINUM (F_OK));
|
scm_c_define ("F_OK", SCM_I_MAKINUM (F_OK));
|
||||||
|
|
||||||
#ifdef LC_COLLATE
|
#ifdef LC_COLLATE
|
||||||
scm_c_define ("LC_COLLATE", SCM_MAKINUM (LC_COLLATE));
|
scm_c_define ("LC_COLLATE", SCM_I_MAKINUM (LC_COLLATE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_CTYPE
|
#ifdef LC_CTYPE
|
||||||
scm_c_define ("LC_CTYPE", SCM_MAKINUM (LC_CTYPE));
|
scm_c_define ("LC_CTYPE", SCM_I_MAKINUM (LC_CTYPE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_MONETARY
|
#ifdef LC_MONETARY
|
||||||
scm_c_define ("LC_MONETARY", SCM_MAKINUM (LC_MONETARY));
|
scm_c_define ("LC_MONETARY", SCM_I_MAKINUM (LC_MONETARY));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_NUMERIC
|
#ifdef LC_NUMERIC
|
||||||
scm_c_define ("LC_NUMERIC", SCM_MAKINUM (LC_NUMERIC));
|
scm_c_define ("LC_NUMERIC", SCM_I_MAKINUM (LC_NUMERIC));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_TIME
|
#ifdef LC_TIME
|
||||||
scm_c_define ("LC_TIME", SCM_MAKINUM (LC_TIME));
|
scm_c_define ("LC_TIME", SCM_I_MAKINUM (LC_TIME));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_MESSAGES
|
#ifdef LC_MESSAGES
|
||||||
scm_c_define ("LC_MESSAGES", SCM_MAKINUM (LC_MESSAGES));
|
scm_c_define ("LC_MESSAGES", SCM_I_MAKINUM (LC_MESSAGES));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LC_ALL
|
#ifdef LC_ALL
|
||||||
scm_c_define ("LC_ALL", SCM_MAKINUM (LC_ALL));
|
scm_c_define ("LC_ALL", SCM_I_MAKINUM (LC_ALL));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PIPE_BUF
|
#ifdef PIPE_BUF
|
||||||
scm_c_define ("PIPE_BUF", scm_long2num (PIPE_BUF));
|
scm_c_define ("PIPE_BUF", scm_long2num (PIPE_BUF));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PRIO_PROCESS
|
#ifdef PRIO_PROCESS
|
||||||
scm_c_define ("PRIO_PROCESS", SCM_MAKINUM (PRIO_PROCESS));
|
scm_c_define ("PRIO_PROCESS", SCM_I_MAKINUM (PRIO_PROCESS));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PRIO_PGRP
|
#ifdef PRIO_PGRP
|
||||||
scm_c_define ("PRIO_PGRP", SCM_MAKINUM (PRIO_PGRP));
|
scm_c_define ("PRIO_PGRP", SCM_I_MAKINUM (PRIO_PGRP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PRIO_USER
|
#ifdef PRIO_USER
|
||||||
scm_c_define ("PRIO_USER", SCM_MAKINUM (PRIO_USER));
|
scm_c_define ("PRIO_USER", SCM_I_MAKINUM (PRIO_USER));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOCK_SH
|
#ifdef LOCK_SH
|
||||||
scm_c_define ("LOCK_SH", SCM_MAKINUM (LOCK_SH));
|
scm_c_define ("LOCK_SH", SCM_I_MAKINUM (LOCK_SH));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOCK_EX
|
#ifdef LOCK_EX
|
||||||
scm_c_define ("LOCK_EX", SCM_MAKINUM (LOCK_EX));
|
scm_c_define ("LOCK_EX", SCM_I_MAKINUM (LOCK_EX));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOCK_UN
|
#ifdef LOCK_UN
|
||||||
scm_c_define ("LOCK_UN", SCM_MAKINUM (LOCK_UN));
|
scm_c_define ("LOCK_UN", SCM_I_MAKINUM (LOCK_UN));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOCK_NB
|
#ifdef LOCK_NB
|
||||||
scm_c_define ("LOCK_NB", SCM_MAKINUM (LOCK_NB));
|
scm_c_define ("LOCK_NB", SCM_I_MAKINUM (LOCK_NB));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "libguile/cpp_sig_symbols.c"
|
#include "libguile/cpp_sig_symbols.c"
|
||||||
|
|
|
@ -130,7 +130,7 @@ scm_i_procedure_arity (SCM proc)
|
||||||
default:
|
default:
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
return scm_list_3 (SCM_MAKINUM (a), SCM_MAKINUM (o), scm_from_bool(r));
|
return scm_list_3 (SCM_I_MAKINUM (a), SCM_I_MAKINUM (o), scm_from_bool(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
static SCM
|
static SCM
|
||||||
|
|
|
@ -399,7 +399,7 @@ scm_ramapc (int (*cproc)(), SCM data, SCM ra0, SCM lra, const char *what)
|
||||||
*plvra = scm_cons (vra1, SCM_EOL);
|
*plvra = scm_cons (vra1, SCM_EOL);
|
||||||
plvra = SCM_CDRLOC (*plvra);
|
plvra = SCM_CDRLOC (*plvra);
|
||||||
}
|
}
|
||||||
inds = scm_make_uve (SCM_ARRAY_NDIM (ra0), SCM_MAKINUM (-1L));
|
inds = scm_make_uve (SCM_ARRAY_NDIM (ra0), SCM_I_MAKINUM (-1L));
|
||||||
vinds = (long *) SCM_VELTS (inds);
|
vinds = (long *) SCM_VELTS (inds);
|
||||||
for (k = 0; k <= kmax; k++)
|
for (k = 0; k <= kmax; k++)
|
||||||
vinds[k] = SCM_ARRAY_DIMS (ra0)[k].lbnd;
|
vinds[k] = SCM_ARRAY_DIMS (ra0)[k].lbnd;
|
||||||
|
@ -459,7 +459,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore SCM_UNUSED)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
for (i = base; n--; i += inc)
|
for (i = base; n--; i += inc)
|
||||||
scm_array_set_x (ra, fill, SCM_MAKINUM (i));
|
scm_array_set_x (ra, fill, SCM_I_MAKINUM (i));
|
||||||
break;
|
break;
|
||||||
case scm_tc7_vector:
|
case scm_tc7_vector:
|
||||||
case scm_tc7_wvect:
|
case scm_tc7_wvect:
|
||||||
|
@ -473,7 +473,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore SCM_UNUSED)
|
||||||
break;
|
break;
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
if (SCM_CHARP (fill))
|
if (SCM_CHARP (fill))
|
||||||
fill = SCM_MAKINUM ((char) SCM_CHAR (fill));
|
fill = SCM_I_MAKINUM ((char) SCM_CHAR (fill));
|
||||||
SCM_ASRTGO (SCM_INUMP (fill)
|
SCM_ASRTGO (SCM_INUMP (fill)
|
||||||
&& -128 <= SCM_INUM (fill) && SCM_INUM (fill) < 128,
|
&& -128 <= SCM_INUM (fill) && SCM_INUM (fill) < 128,
|
||||||
badarg2);
|
badarg2);
|
||||||
|
@ -625,7 +625,7 @@ racp (SCM src, SCM dst)
|
||||||
for (; n-- > 0; i_s += inc_s, i_d += inc_d)
|
for (; n-- > 0; i_s += inc_s, i_d += inc_d)
|
||||||
scm_array_set_x (dst,
|
scm_array_set_x (dst,
|
||||||
scm_cvref (src, i_s, SCM_UNDEFINED),
|
scm_cvref (src, i_s, SCM_UNDEFINED),
|
||||||
SCM_MAKINUM (i_d));
|
SCM_I_MAKINUM (i_d));
|
||||||
break;
|
break;
|
||||||
case scm_tc7_string:
|
case scm_tc7_string:
|
||||||
if (SCM_TYP7 (src) != scm_tc7_string)
|
if (SCM_TYP7 (src) != scm_tc7_string)
|
||||||
|
@ -992,7 +992,7 @@ scm_ra_sum (SCM ra0, SCM ras)
|
||||||
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, scm_sum (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
scm_array_set_x (ra0, scm_sum (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
|
@ -1028,7 +1028,7 @@ scm_ra_difference (SCM ra0, SCM ras)
|
||||||
for (; n-- > 0; i0 += inc0)
|
for (; n-- > 0; i0 += inc0)
|
||||||
scm_array_set_x (ra0,
|
scm_array_set_x (ra0,
|
||||||
scm_difference (RVREF (ra0, i0, e0), SCM_UNDEFINED),
|
scm_difference (RVREF (ra0, i0, e0), SCM_UNDEFINED),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_fvect:
|
case scm_tc7_fvect:
|
||||||
|
@ -1051,7 +1051,7 @@ scm_ra_difference (SCM ra0, SCM ras)
|
||||||
{
|
{
|
||||||
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, scm_difference (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, scm_difference (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_fvect:
|
case scm_tc7_fvect:
|
||||||
|
@ -1087,7 +1087,7 @@ scm_ra_product (SCM ra0, SCM ras)
|
||||||
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, scm_product (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
scm_array_set_x (ra0, scm_product (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
|
@ -1133,7 +1133,7 @@ scm_ra_divide (SCM ra0, SCM ras)
|
||||||
{
|
{
|
||||||
SCM e0 = SCM_UNDEFINED;
|
SCM e0 = SCM_UNDEFINED;
|
||||||
for (; n-- > 0; i0 += inc0)
|
for (; n-- > 0; i0 += inc0)
|
||||||
scm_array_set_x (ra0, scm_divide (RVREF (ra0, i0, e0), SCM_UNDEFINED), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, scm_divide (RVREF (ra0, i0, e0), SCM_UNDEFINED), SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_fvect:
|
case scm_tc7_fvect:
|
||||||
|
@ -1166,7 +1166,7 @@ scm_ra_divide (SCM ra0, SCM ras)
|
||||||
{
|
{
|
||||||
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED;
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, scm_divide (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, scm_divide (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case scm_tc7_fvect:
|
case scm_tc7_fvect:
|
||||||
|
@ -1213,7 +1213,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
|
||||||
ra0 = SCM_ARRAY_V (ra0);
|
ra0 = SCM_ARRAY_V (ra0);
|
||||||
if (SCM_NULLP (ras))
|
if (SCM_NULLP (ras))
|
||||||
for (; i <= n; i++)
|
for (; i <= n; i++)
|
||||||
scm_array_set_x (ra0, scm_call_0 (proc), SCM_MAKINUM (i * inc + base));
|
scm_array_set_x (ra0, scm_call_0 (proc), SCM_I_MAKINUM (i * inc + base));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCM ra1 = SCM_CAR (ras);
|
SCM ra1 = SCM_CAR (ras);
|
||||||
|
@ -1235,9 +1235,9 @@ ramap (SCM ra0, SCM proc, SCM ras)
|
||||||
{
|
{
|
||||||
args = SCM_EOL;
|
args = SCM_EOL;
|
||||||
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
|
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
|
||||||
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_MAKINUM (i)), args);
|
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_I_MAKINUM (i)), args);
|
||||||
args = scm_cons (scm_cvref (ra1, i1, SCM_UNDEFINED), args);
|
args = scm_cons (scm_cvref (ra1, i1, SCM_UNDEFINED), args);
|
||||||
scm_array_set_x (ra0, scm_apply_0 (proc, args), SCM_MAKINUM (i * inc + base));
|
scm_array_set_x (ra0, scm_apply_0 (proc, args), SCM_I_MAKINUM (i * inc + base));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1259,7 +1259,7 @@ ramap_dsubr (SCM ra0, SCM proc, SCM ras)
|
||||||
default:
|
default:
|
||||||
gencase:
|
gencase:
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, scm_call_1 (proc, RVREF (ra1, i1, e1)), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, scm_call_1 (proc, RVREF (ra1, i1, e1)), SCM_I_MAKINUM (i0));
|
||||||
break;
|
break;
|
||||||
case scm_tc7_fvect:
|
case scm_tc7_fvect:
|
||||||
{
|
{
|
||||||
|
@ -1335,8 +1335,8 @@ ramap_rp (SCM ra0, SCM proc, SCM ras)
|
||||||
of a cell as raw data. Further: How can we be sure that
|
of a cell as raw data. Further: How can we be sure that
|
||||||
the values fit into an inum?
|
the values fit into an inum?
|
||||||
*/
|
*/
|
||||||
SCM n1 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra1)))[i1]);
|
SCM n1 = SCM_I_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra1)))[i1]);
|
||||||
SCM n2 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra2)))[i2]);
|
SCM n2 = SCM_I_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra2)))[i2]);
|
||||||
if (scm_is_false (SCM_SUBRF (proc) (n1, n2)))
|
if (scm_is_false (SCM_SUBRF (proc) (n1, n2)))
|
||||||
SCM_BITVEC_CLR (ra0, i0);
|
SCM_BITVEC_CLR (ra0, i0);
|
||||||
}
|
}
|
||||||
|
@ -1402,10 +1402,10 @@ ramap_1 (SCM ra0, SCM proc, SCM ras)
|
||||||
ra1 = SCM_ARRAY_V (ra1);
|
ra1 = SCM_ARRAY_V (ra1);
|
||||||
if (scm_tc7_vector == SCM_TYP7 (ra0) || scm_tc7_wvect == SCM_TYP7 (ra0))
|
if (scm_tc7_vector == SCM_TYP7 (ra0) || scm_tc7_wvect == SCM_TYP7 (ra0))
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED)), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED)), SCM_I_MAKINUM (i0));
|
||||||
else
|
else
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1)), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1)), SCM_I_MAKINUM (i0));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1429,11 +1429,11 @@ ramap_2o (SCM ra0, SCM proc, SCM ras)
|
||||||
|
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), SCM_UNDEFINED),
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), SCM_UNDEFINED),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
else
|
else
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1), SCM_UNDEFINED),
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1), SCM_UNDEFINED),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1446,12 +1446,12 @@ ramap_2o (SCM ra0, SCM proc, SCM ras)
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
||||||
scm_array_set_x (ra0,
|
scm_array_set_x (ra0,
|
||||||
SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), scm_cvref (ra2, i2, SCM_UNDEFINED)),
|
SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), scm_cvref (ra2, i2, SCM_UNDEFINED)),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
else
|
else
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
||||||
scm_array_set_x (ra0,
|
scm_array_set_x (ra0,
|
||||||
SCM_SUBRF (proc) (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2)),
|
SCM_SUBRF (proc) (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2)),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1468,7 +1468,7 @@ ramap_a (SCM ra0, SCM proc, SCM ras)
|
||||||
ra0 = SCM_ARRAY_V (ra0);
|
ra0 = SCM_ARRAY_V (ra0);
|
||||||
if (SCM_NULLP (ras))
|
if (SCM_NULLP (ras))
|
||||||
for (; n-- > 0; i0 += inc0)
|
for (; n-- > 0; i0 += inc0)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra0, i0, e0), SCM_UNDEFINED), SCM_MAKINUM (i0));
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra0, i0, e0), SCM_UNDEFINED), SCM_I_MAKINUM (i0));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCM ra1 = SCM_CAR (ras);
|
SCM ra1 = SCM_CAR (ras);
|
||||||
|
@ -1477,7 +1477,7 @@ ramap_a (SCM ra0, SCM proc, SCM ras)
|
||||||
ra1 = SCM_ARRAY_V (ra1);
|
ra1 = SCM_ARRAY_V (ra1);
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
for (; n-- > 0; i0 += inc0, i1 += inc1)
|
||||||
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)),
|
||||||
SCM_MAKINUM (i0));
|
SCM_I_MAKINUM (i0));
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1628,7 +1628,7 @@ rafe (SCM ra0, SCM proc, SCM ras)
|
||||||
{
|
{
|
||||||
args = SCM_EOL;
|
args = SCM_EOL;
|
||||||
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
|
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
|
||||||
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_MAKINUM (i)), args);
|
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_I_MAKINUM (i)), args);
|
||||||
args = scm_cons2 (scm_cvref (ra0, i0, SCM_UNDEFINED), scm_cvref (ra1, i1, SCM_UNDEFINED), args);
|
args = scm_cons2 (scm_cvref (ra0, i0, SCM_UNDEFINED), scm_cvref (ra1, i1, SCM_UNDEFINED), args);
|
||||||
scm_apply_0 (proc, args);
|
scm_apply_0 (proc, args);
|
||||||
}
|
}
|
||||||
|
@ -1682,7 +1682,7 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0,
|
||||||
case scm_tc7_wvect:
|
case scm_tc7_wvect:
|
||||||
{
|
{
|
||||||
for (i = 0; i < SCM_VECTOR_LENGTH (ra); i++)
|
for (i = 0; i < SCM_VECTOR_LENGTH (ra); i++)
|
||||||
SCM_VECTOR_SET(ra, i, scm_call_1 (proc, SCM_MAKINUM (i)));
|
SCM_VECTOR_SET(ra, i, scm_call_1 (proc, SCM_I_MAKINUM (i)));
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
case scm_tc7_string:
|
case scm_tc7_string:
|
||||||
|
@ -1700,15 +1700,15 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0,
|
||||||
{
|
{
|
||||||
unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
|
unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
scm_array_set_x (ra, scm_call_1 (proc, SCM_MAKINUM (i)),
|
scm_array_set_x (ra, scm_call_1 (proc, SCM_I_MAKINUM (i)),
|
||||||
SCM_MAKINUM (i));
|
SCM_I_MAKINUM (i));
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
case scm_tc7_smob:
|
case scm_tc7_smob:
|
||||||
SCM_ASRTGO (SCM_ARRAYP (ra), badarg);
|
SCM_ASRTGO (SCM_ARRAYP (ra), badarg);
|
||||||
{
|
{
|
||||||
SCM args = SCM_EOL;
|
SCM args = SCM_EOL;
|
||||||
SCM inds = scm_make_uve (SCM_ARRAY_NDIM (ra), SCM_MAKINUM (-1L));
|
SCM inds = scm_make_uve (SCM_ARRAY_NDIM (ra), SCM_I_MAKINUM (-1L));
|
||||||
long *vinds = (long *) SCM_VELTS (inds);
|
long *vinds = (long *) SCM_VELTS (inds);
|
||||||
int j, k, kmax = SCM_ARRAY_NDIM (ra) - 1;
|
int j, k, kmax = SCM_ARRAY_NDIM (ra) - 1;
|
||||||
if (kmax < 0)
|
if (kmax < 0)
|
||||||
|
@ -1725,10 +1725,10 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0,
|
||||||
for (; vinds[k] <= SCM_ARRAY_DIMS (ra)[k].ubnd; vinds[k]++)
|
for (; vinds[k] <= SCM_ARRAY_DIMS (ra)[k].ubnd; vinds[k]++)
|
||||||
{
|
{
|
||||||
for (j = kmax + 1, args = SCM_EOL; j--;)
|
for (j = kmax + 1, args = SCM_EOL; j--;)
|
||||||
args = scm_cons (SCM_MAKINUM (vinds[j]), args);
|
args = scm_cons (SCM_I_MAKINUM (vinds[j]), args);
|
||||||
scm_array_set_x (SCM_ARRAY_V (ra),
|
scm_array_set_x (SCM_ARRAY_V (ra),
|
||||||
scm_apply_0 (proc, args),
|
scm_apply_0 (proc, args),
|
||||||
SCM_MAKINUM (i));
|
SCM_I_MAKINUM (i));
|
||||||
i += SCM_ARRAY_DIMS (ra)[k].inc;
|
i += SCM_ARRAY_DIMS (ra)[k].inc;
|
||||||
}
|
}
|
||||||
k--;
|
k--;
|
||||||
|
|
|
@ -353,7 +353,7 @@ SCM_DEFINE (scm_random, "random", 1, 1, 0,
|
||||||
{
|
{
|
||||||
unsigned long m = SCM_INUM (n);
|
unsigned long m = SCM_INUM (n);
|
||||||
SCM_ASSERT_RANGE (1, n, m > 0);
|
SCM_ASSERT_RANGE (1, n, m > 0);
|
||||||
return SCM_MAKINUM (scm_c_random (SCM_RSTATE (state), m));
|
return SCM_I_MAKINUM (scm_c_random (SCM_RSTATE (state), m));
|
||||||
}
|
}
|
||||||
SCM_VALIDATE_NIM (1, n);
|
SCM_VALIDATE_NIM (1, n);
|
||||||
if (SCM_REALP (n))
|
if (SCM_REALP (n))
|
||||||
|
|
|
@ -98,12 +98,12 @@ scm_regexp_error_msg (int regerrno, regex_t *rx)
|
||||||
never returns, we would never have the opportunity to free it. Creating
|
never returns, we would never have the opportunity to free it. Creating
|
||||||
it as a SCM object means that the system will GC it at some point. */
|
it as a SCM object means that the system will GC it at some point. */
|
||||||
|
|
||||||
errmsg = scm_make_string (SCM_MAKINUM (80), SCM_UNDEFINED);
|
errmsg = scm_make_string (SCM_I_MAKINUM (80), SCM_UNDEFINED);
|
||||||
SCM_DEFER_INTS;
|
SCM_DEFER_INTS;
|
||||||
l = regerror (regerrno, rx, SCM_STRING_CHARS (errmsg), 80);
|
l = regerror (regerrno, rx, SCM_STRING_CHARS (errmsg), 80);
|
||||||
if (l > 80)
|
if (l > 80)
|
||||||
{
|
{
|
||||||
errmsg = scm_make_string (SCM_MAKINUM (l), SCM_UNDEFINED);
|
errmsg = scm_make_string (SCM_I_MAKINUM (l), SCM_UNDEFINED);
|
||||||
regerror (regerrno, rx, SCM_STRING_CHARS (errmsg), l);
|
regerror (regerrno, rx, SCM_STRING_CHARS (errmsg), l);
|
||||||
}
|
}
|
||||||
SCM_ALLOW_INTS;
|
SCM_ALLOW_INTS;
|
||||||
|
@ -252,7 +252,7 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0,
|
||||||
SCM_VECTOR_SET(mvec,0, str);
|
SCM_VECTOR_SET(mvec,0, str);
|
||||||
for (i = 0; i < nmatches; ++i)
|
for (i = 0; i < nmatches; ++i)
|
||||||
if (matches[i].rm_so == -1)
|
if (matches[i].rm_so == -1)
|
||||||
SCM_VECTOR_SET(mvec,i+1, scm_cons (SCM_MAKINUM (-1), SCM_MAKINUM (-1)));
|
SCM_VECTOR_SET(mvec,i+1, scm_cons (SCM_I_MAKINUM (-1), SCM_I_MAKINUM (-1)));
|
||||||
else
|
else
|
||||||
SCM_VECTOR_SET(mvec,i+1,scm_cons (scm_long2num (matches[i].rm_so + offset),
|
SCM_VECTOR_SET(mvec,i+1,scm_cons (scm_long2num (matches[i].rm_so + offset),
|
||||||
scm_long2num (matches[i].rm_eo + offset)));
|
scm_long2num (matches[i].rm_eo + offset)));
|
||||||
|
|
|
@ -430,7 +430,7 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
|
||||||
if (old_action.sa_handler == SIG_DFL || old_action.sa_handler == SIG_IGN)
|
if (old_action.sa_handler == SIG_DFL || old_action.sa_handler == SIG_IGN)
|
||||||
old_handler = scm_long2num ((long) old_action.sa_handler);
|
old_handler = scm_long2num ((long) old_action.sa_handler);
|
||||||
SCM_ALLOW_INTS;
|
SCM_ALLOW_INTS;
|
||||||
return scm_cons (old_handler, SCM_MAKINUM (old_action.sa_flags));
|
return scm_cons (old_handler, SCM_I_MAKINUM (old_action.sa_flags));
|
||||||
#else
|
#else
|
||||||
if (query_only)
|
if (query_only)
|
||||||
{
|
{
|
||||||
|
@ -449,7 +449,7 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
|
||||||
if (old_chandler == SIG_DFL || old_chandler == SIG_IGN)
|
if (old_chandler == SIG_DFL || old_chandler == SIG_IGN)
|
||||||
old_handler = scm_long2num ((long) old_chandler);
|
old_handler = scm_long2num ((long) old_chandler);
|
||||||
SCM_ALLOW_INTS;
|
SCM_ALLOW_INTS;
|
||||||
return scm_cons (old_handler, SCM_MAKINUM (0));
|
return scm_cons (old_handler, SCM_I_MAKINUM (0));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -500,7 +500,7 @@ SCM_DEFINE (scm_alarm, "alarm", 1, 0, 0,
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
SCM_VALIDATE_INUM (1, i);
|
SCM_VALIDATE_INUM (1, i);
|
||||||
j = alarm (SCM_INUM (i));
|
j = alarm (SCM_INUM (i));
|
||||||
return SCM_MAKINUM (j);
|
return SCM_I_MAKINUM (j);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -705,9 +705,9 @@ scm_init_scmsigs ()
|
||||||
|
|
||||||
#if defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER)
|
#if defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER)
|
||||||
/* Stuff needed by setitimer and getitimer. */
|
/* Stuff needed by setitimer and getitimer. */
|
||||||
scm_c_define ("ITIMER_REAL", SCM_MAKINUM (ITIMER_REAL));
|
scm_c_define ("ITIMER_REAL", SCM_I_MAKINUM (ITIMER_REAL));
|
||||||
scm_c_define ("ITIMER_VIRTUAL", SCM_MAKINUM (ITIMER_VIRTUAL));
|
scm_c_define ("ITIMER_VIRTUAL", SCM_I_MAKINUM (ITIMER_VIRTUAL));
|
||||||
scm_c_define ("ITIMER_PROF", SCM_MAKINUM (ITIMER_PROF));
|
scm_c_define ("ITIMER_PROF", SCM_I_MAKINUM (ITIMER_PROF));
|
||||||
#endif /* defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER) */
|
#endif /* defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER) */
|
||||||
|
|
||||||
#include "libguile/scmsigs.x"
|
#include "libguile/scmsigs.x"
|
||||||
|
|
|
@ -75,7 +75,7 @@ SCM_DEFINE (scm_system, "system", 0, 1, 0,
|
||||||
rv = system (SCM_STRING_CHARS (cmd));
|
rv = system (SCM_STRING_CHARS (cmd));
|
||||||
if (rv == -1 || (rv == 127 && errno != 0))
|
if (rv == -1 || (rv == 127 && errno != 0))
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (rv);
|
return SCM_I_MAKINUM (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_SYSTEM */
|
#endif /* HAVE_SYSTEM */
|
||||||
|
@ -183,7 +183,7 @@ SCM_DEFINE (scm_system_star, "system*", 0, 0, 1,
|
||||||
scm_sigaction (sigint, SCM_CAR (oldint), SCM_CDR (oldint));
|
scm_sigaction (sigint, SCM_CAR (oldint), SCM_CDR (oldint));
|
||||||
scm_sigaction (sigquit, SCM_CAR (oldquit), SCM_CDR (oldquit));
|
scm_sigaction (sigquit, SCM_CAR (oldquit), SCM_CDR (oldquit));
|
||||||
scm_remember_upto_here_2 (oldint, oldquit);
|
scm_remember_upto_here_2 (oldint, oldquit);
|
||||||
return SCM_MAKINUM (0L + status);
|
return SCM_I_MAKINUM (0L + status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -85,7 +85,7 @@ SCM_DEFINE (scm_htons, "htons", 1, 0, 0,
|
||||||
if (c_in != SCM_INUM (value))
|
if (c_in != SCM_INUM (value))
|
||||||
SCM_OUT_OF_RANGE (1, value);
|
SCM_OUT_OF_RANGE (1, value);
|
||||||
|
|
||||||
return SCM_MAKINUM (htons (c_in));
|
return SCM_I_MAKINUM (htons (c_in));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ SCM_DEFINE (scm_ntohs, "ntohs", 1, 0, 0,
|
||||||
if (c_in != SCM_INUM (value))
|
if (c_in != SCM_INUM (value))
|
||||||
SCM_OUT_OF_RANGE (1, value);
|
SCM_OUT_OF_RANGE (1, value);
|
||||||
|
|
||||||
return SCM_MAKINUM (ntohs (c_in));
|
return SCM_I_MAKINUM (ntohs (c_in));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ SCM_DEFINE (scm_getsockopt, "getsockopt", 3, 0, 0,
|
||||||
scm_long2num (ling->l_linger));
|
scm_long2num (ling->l_linger));
|
||||||
#else
|
#else
|
||||||
return scm_cons (scm_long2num (*(int *) optval),
|
return scm_cons (scm_long2num (*(int *) optval),
|
||||||
SCM_MAKINUM (0));
|
SCM_I_MAKINUM (0));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -847,7 +847,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int which_arg,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
scm_out_of_range (proc, SCM_MAKINUM (fam));
|
scm_out_of_range (proc, SCM_I_MAKINUM (fam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -1038,7 +1038,7 @@ scm_addr_vector (const struct sockaddr *address, int addr_size,
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
scm_misc_error (proc, "Unrecognised address family: ~A",
|
scm_misc_error (proc, "Unrecognised address family: ~A",
|
||||||
scm_list_1 (SCM_MAKINUM (fam)));
|
scm_list_1 (SCM_I_MAKINUM (fam)));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1175,7 +1175,7 @@ SCM_DEFINE (scm_recv, "recv!", 2, 1, 0,
|
||||||
if (rv == -1)
|
if (rv == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
|
|
||||||
return SCM_MAKINUM (rv);
|
return SCM_I_MAKINUM (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1208,7 +1208,7 @@ SCM_DEFINE (scm_send, "send", 2, 1, 0,
|
||||||
SCM_SYSCALL (rv = send (fd, SCM_STRING_CHARS (message), SCM_STRING_LENGTH (message), flg));
|
SCM_SYSCALL (rv = send (fd, SCM_STRING_CHARS (message), SCM_STRING_LENGTH (message), flg));
|
||||||
if (rv == -1)
|
if (rv == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
return SCM_MAKINUM (rv);
|
return SCM_I_MAKINUM (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1268,7 +1268,7 @@ SCM_DEFINE (scm_recvfrom, "recvfrom!", 2, 3, 0,
|
||||||
else
|
else
|
||||||
address = SCM_BOOL_F;
|
address = SCM_BOOL_F;
|
||||||
|
|
||||||
return scm_cons (SCM_MAKINUM (rv), address);
|
return scm_cons (SCM_I_MAKINUM (rv), address);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1324,7 +1324,7 @@ SCM_DEFINE (scm_sendto, "sendto", 4, 0, 1,
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
}
|
}
|
||||||
free (soka);
|
free (soka);
|
||||||
return SCM_MAKINUM (rv);
|
return SCM_I_MAKINUM (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1335,29 +1335,29 @@ scm_init_socket ()
|
||||||
{
|
{
|
||||||
/* protocol families. */
|
/* protocol families. */
|
||||||
#ifdef AF_UNSPEC
|
#ifdef AF_UNSPEC
|
||||||
scm_c_define ("AF_UNSPEC", SCM_MAKINUM (AF_UNSPEC));
|
scm_c_define ("AF_UNSPEC", SCM_I_MAKINUM (AF_UNSPEC));
|
||||||
#endif
|
#endif
|
||||||
#ifdef AF_UNIX
|
#ifdef AF_UNIX
|
||||||
scm_c_define ("AF_UNIX", SCM_MAKINUM (AF_UNIX));
|
scm_c_define ("AF_UNIX", SCM_I_MAKINUM (AF_UNIX));
|
||||||
#endif
|
#endif
|
||||||
#ifdef AF_INET
|
#ifdef AF_INET
|
||||||
scm_c_define ("AF_INET", SCM_MAKINUM (AF_INET));
|
scm_c_define ("AF_INET", SCM_I_MAKINUM (AF_INET));
|
||||||
#endif
|
#endif
|
||||||
#ifdef AF_INET6
|
#ifdef AF_INET6
|
||||||
scm_c_define ("AF_INET6", SCM_MAKINUM (AF_INET6));
|
scm_c_define ("AF_INET6", SCM_I_MAKINUM (AF_INET6));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PF_UNSPEC
|
#ifdef PF_UNSPEC
|
||||||
scm_c_define ("PF_UNSPEC", SCM_MAKINUM (PF_UNSPEC));
|
scm_c_define ("PF_UNSPEC", SCM_I_MAKINUM (PF_UNSPEC));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PF_UNIX
|
#ifdef PF_UNIX
|
||||||
scm_c_define ("PF_UNIX", SCM_MAKINUM (PF_UNIX));
|
scm_c_define ("PF_UNIX", SCM_I_MAKINUM (PF_UNIX));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PF_INET
|
#ifdef PF_INET
|
||||||
scm_c_define ("PF_INET", SCM_MAKINUM (PF_INET));
|
scm_c_define ("PF_INET", SCM_I_MAKINUM (PF_INET));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PF_INET6
|
#ifdef PF_INET6
|
||||||
scm_c_define ("PF_INET6", SCM_MAKINUM (PF_INET6));
|
scm_c_define ("PF_INET6", SCM_I_MAKINUM (PF_INET6));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* standard addresses. */
|
/* standard addresses. */
|
||||||
|
@ -1376,82 +1376,82 @@ scm_init_socket ()
|
||||||
|
|
||||||
/* socket types. */
|
/* socket types. */
|
||||||
#ifdef SOCK_STREAM
|
#ifdef SOCK_STREAM
|
||||||
scm_c_define ("SOCK_STREAM", SCM_MAKINUM (SOCK_STREAM));
|
scm_c_define ("SOCK_STREAM", SCM_I_MAKINUM (SOCK_STREAM));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOCK_DGRAM
|
#ifdef SOCK_DGRAM
|
||||||
scm_c_define ("SOCK_DGRAM", SCM_MAKINUM (SOCK_DGRAM));
|
scm_c_define ("SOCK_DGRAM", SCM_I_MAKINUM (SOCK_DGRAM));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOCK_RAW
|
#ifdef SOCK_RAW
|
||||||
scm_c_define ("SOCK_RAW", SCM_MAKINUM (SOCK_RAW));
|
scm_c_define ("SOCK_RAW", SCM_I_MAKINUM (SOCK_RAW));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* setsockopt level. */
|
/* setsockopt level. */
|
||||||
#ifdef SOL_SOCKET
|
#ifdef SOL_SOCKET
|
||||||
scm_c_define ("SOL_SOCKET", SCM_MAKINUM (SOL_SOCKET));
|
scm_c_define ("SOL_SOCKET", SCM_I_MAKINUM (SOL_SOCKET));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_IP
|
#ifdef SOL_IP
|
||||||
scm_c_define ("SOL_IP", SCM_MAKINUM (SOL_IP));
|
scm_c_define ("SOL_IP", SCM_I_MAKINUM (SOL_IP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_TCP
|
#ifdef SOL_TCP
|
||||||
scm_c_define ("SOL_TCP", SCM_MAKINUM (SOL_TCP));
|
scm_c_define ("SOL_TCP", SCM_I_MAKINUM (SOL_TCP));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOL_UDP
|
#ifdef SOL_UDP
|
||||||
scm_c_define ("SOL_UDP", SCM_MAKINUM (SOL_UDP));
|
scm_c_define ("SOL_UDP", SCM_I_MAKINUM (SOL_UDP));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* setsockopt names. */
|
/* setsockopt names. */
|
||||||
#ifdef SO_DEBUG
|
#ifdef SO_DEBUG
|
||||||
scm_c_define ("SO_DEBUG", SCM_MAKINUM (SO_DEBUG));
|
scm_c_define ("SO_DEBUG", SCM_I_MAKINUM (SO_DEBUG));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_REUSEADDR
|
#ifdef SO_REUSEADDR
|
||||||
scm_c_define ("SO_REUSEADDR", SCM_MAKINUM (SO_REUSEADDR));
|
scm_c_define ("SO_REUSEADDR", SCM_I_MAKINUM (SO_REUSEADDR));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_STYLE
|
#ifdef SO_STYLE
|
||||||
scm_c_define ("SO_STYLE", SCM_MAKINUM (SO_STYLE));
|
scm_c_define ("SO_STYLE", SCM_I_MAKINUM (SO_STYLE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_TYPE
|
#ifdef SO_TYPE
|
||||||
scm_c_define ("SO_TYPE", SCM_MAKINUM (SO_TYPE));
|
scm_c_define ("SO_TYPE", SCM_I_MAKINUM (SO_TYPE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_ERROR
|
#ifdef SO_ERROR
|
||||||
scm_c_define ("SO_ERROR", SCM_MAKINUM (SO_ERROR));
|
scm_c_define ("SO_ERROR", SCM_I_MAKINUM (SO_ERROR));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_DONTROUTE
|
#ifdef SO_DONTROUTE
|
||||||
scm_c_define ("SO_DONTROUTE", SCM_MAKINUM (SO_DONTROUTE));
|
scm_c_define ("SO_DONTROUTE", SCM_I_MAKINUM (SO_DONTROUTE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_BROADCAST
|
#ifdef SO_BROADCAST
|
||||||
scm_c_define ("SO_BROADCAST", SCM_MAKINUM (SO_BROADCAST));
|
scm_c_define ("SO_BROADCAST", SCM_I_MAKINUM (SO_BROADCAST));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_SNDBUF
|
#ifdef SO_SNDBUF
|
||||||
scm_c_define ("SO_SNDBUF", SCM_MAKINUM (SO_SNDBUF));
|
scm_c_define ("SO_SNDBUF", SCM_I_MAKINUM (SO_SNDBUF));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_RCVBUF
|
#ifdef SO_RCVBUF
|
||||||
scm_c_define ("SO_RCVBUF", SCM_MAKINUM (SO_RCVBUF));
|
scm_c_define ("SO_RCVBUF", SCM_I_MAKINUM (SO_RCVBUF));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_KEEPALIVE
|
#ifdef SO_KEEPALIVE
|
||||||
scm_c_define ("SO_KEEPALIVE", SCM_MAKINUM (SO_KEEPALIVE));
|
scm_c_define ("SO_KEEPALIVE", SCM_I_MAKINUM (SO_KEEPALIVE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_OOBINLINE
|
#ifdef SO_OOBINLINE
|
||||||
scm_c_define ("SO_OOBINLINE", SCM_MAKINUM (SO_OOBINLINE));
|
scm_c_define ("SO_OOBINLINE", SCM_I_MAKINUM (SO_OOBINLINE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_NO_CHECK
|
#ifdef SO_NO_CHECK
|
||||||
scm_c_define ("SO_NO_CHECK", SCM_MAKINUM (SO_NO_CHECK));
|
scm_c_define ("SO_NO_CHECK", SCM_I_MAKINUM (SO_NO_CHECK));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_PRIORITY
|
#ifdef SO_PRIORITY
|
||||||
scm_c_define ("SO_PRIORITY", SCM_MAKINUM (SO_PRIORITY));
|
scm_c_define ("SO_PRIORITY", SCM_I_MAKINUM (SO_PRIORITY));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_LINGER
|
#ifdef SO_LINGER
|
||||||
scm_c_define ("SO_LINGER", SCM_MAKINUM (SO_LINGER));
|
scm_c_define ("SO_LINGER", SCM_I_MAKINUM (SO_LINGER));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* recv/send options. */
|
/* recv/send options. */
|
||||||
#ifdef MSG_OOB
|
#ifdef MSG_OOB
|
||||||
scm_c_define ("MSG_OOB", SCM_MAKINUM (MSG_OOB));
|
scm_c_define ("MSG_OOB", SCM_I_MAKINUM (MSG_OOB));
|
||||||
#endif
|
#endif
|
||||||
#ifdef MSG_PEEK
|
#ifdef MSG_PEEK
|
||||||
scm_c_define ("MSG_PEEK", SCM_MAKINUM (MSG_PEEK));
|
scm_c_define ("MSG_PEEK", SCM_I_MAKINUM (MSG_PEEK));
|
||||||
#endif
|
#endif
|
||||||
#ifdef MSG_DONTROUTE
|
#ifdef MSG_DONTROUTE
|
||||||
scm_c_define ("MSG_DONTROUTE", SCM_MAKINUM (MSG_DONTROUTE));
|
scm_c_define ("MSG_DONTROUTE", SCM_I_MAKINUM (MSG_DONTROUTE));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
|
|
|
@ -594,8 +594,8 @@ SCM_DEFINE (scm_sort_x, "sort!", 2, 0, 0,
|
||||||
len = SCM_VECTOR_LENGTH (items);
|
len = SCM_VECTOR_LENGTH (items);
|
||||||
scm_restricted_vector_sort_x (items,
|
scm_restricted_vector_sort_x (items,
|
||||||
less,
|
less,
|
||||||
SCM_MAKINUM (0L),
|
SCM_I_MAKINUM (0L),
|
||||||
SCM_MAKINUM (len));
|
SCM_I_MAKINUM (len));
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -633,8 +633,8 @@ SCM_DEFINE (scm_sort, "sort", 2, 0, 0,
|
||||||
scm_array_copy_x (items, sortvec);
|
scm_array_copy_x (items, sortvec);
|
||||||
scm_restricted_vector_sort_x (sortvec,
|
scm_restricted_vector_sort_x (sortvec,
|
||||||
less,
|
less,
|
||||||
SCM_MAKINUM (0L),
|
SCM_I_MAKINUM (0L),
|
||||||
SCM_MAKINUM (len));
|
SCM_I_MAKINUM (len));
|
||||||
return sortvec;
|
return sortvec;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -141,8 +141,8 @@ scm_srcprops_to_plist (SCM obj)
|
||||||
plist = scm_acons (scm_sym_copy, SRCPROPCOPY (obj), plist);
|
plist = scm_acons (scm_sym_copy, SRCPROPCOPY (obj), plist);
|
||||||
if (!SCM_UNBNDP (SRCPROPFNAME (obj)))
|
if (!SCM_UNBNDP (SRCPROPFNAME (obj)))
|
||||||
plist = scm_acons (scm_sym_filename, SRCPROPFNAME (obj), plist);
|
plist = scm_acons (scm_sym_filename, SRCPROPFNAME (obj), plist);
|
||||||
plist = scm_acons (scm_sym_column, SCM_MAKINUM (SRCPROPCOL (obj)), plist);
|
plist = scm_acons (scm_sym_column, SCM_I_MAKINUM (SRCPROPCOL (obj)), plist);
|
||||||
plist = scm_acons (scm_sym_line, SCM_MAKINUM (SRCPROPLINE (obj)), plist);
|
plist = scm_acons (scm_sym_line, SCM_I_MAKINUM (SRCPROPLINE (obj)), plist);
|
||||||
plist = scm_acons (scm_sym_breakpoint, scm_from_bool (SRCPROPBRK (obj)), plist);
|
plist = scm_acons (scm_sym_breakpoint, scm_from_bool (SRCPROPBRK (obj)), plist);
|
||||||
return plist;
|
return plist;
|
||||||
}
|
}
|
||||||
|
@ -203,8 +203,8 @@ SCM_DEFINE (scm_source_property, "source-property", 2, 0, 0,
|
||||||
if (!SRCPROPSP (p))
|
if (!SRCPROPSP (p))
|
||||||
goto plist;
|
goto plist;
|
||||||
if (SCM_EQ_P (scm_sym_breakpoint, key)) p = scm_from_bool (SRCPROPBRK (p));
|
if (SCM_EQ_P (scm_sym_breakpoint, key)) p = scm_from_bool (SRCPROPBRK (p));
|
||||||
else if (SCM_EQ_P (scm_sym_line, key)) p = SCM_MAKINUM (SRCPROPLINE (p));
|
else if (SCM_EQ_P (scm_sym_line, key)) p = SCM_I_MAKINUM (SRCPROPLINE (p));
|
||||||
else if (SCM_EQ_P (scm_sym_column, key)) p = SCM_MAKINUM (SRCPROPCOL (p));
|
else if (SCM_EQ_P (scm_sym_column, key)) p = SCM_I_MAKINUM (SRCPROPCOL (p));
|
||||||
else if (SCM_EQ_P (scm_sym_filename, key)) p = SRCPROPFNAME (p);
|
else if (SCM_EQ_P (scm_sym_filename, key)) p = SRCPROPFNAME (p);
|
||||||
else if (SCM_EQ_P (scm_sym_copy, key)) p = SRCPROPCOPY (p);
|
else if (SCM_EQ_P (scm_sym_copy, key)) p = SRCPROPCOPY (p);
|
||||||
else
|
else
|
||||||
|
@ -312,7 +312,7 @@ scm_init_srcprop ()
|
||||||
scm_set_smob_free (scm_tc16_srcprops, srcprops_free);
|
scm_set_smob_free (scm_tc16_srcprops, srcprops_free);
|
||||||
scm_set_smob_print (scm_tc16_srcprops, srcprops_print);
|
scm_set_smob_print (scm_tc16_srcprops, srcprops_print);
|
||||||
|
|
||||||
scm_source_whash = scm_make_weak_key_hash_table (SCM_MAKINUM (2047));
|
scm_source_whash = scm_make_weak_key_hash_table (SCM_I_MAKINUM (2047));
|
||||||
scm_c_define ("source-whash", scm_source_whash);
|
scm_c_define ("source-whash", scm_source_whash);
|
||||||
|
|
||||||
#include "libguile/srcprop.x"
|
#include "libguile/srcprop.x"
|
||||||
|
|
|
@ -457,7 +457,7 @@ SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1,
|
||||||
size = n * SCM_FRAME_N_SLOTS;
|
size = n * SCM_FRAME_N_SLOTS;
|
||||||
|
|
||||||
/* Make the stack object. */
|
/* Make the stack object. */
|
||||||
stack = scm_make_struct (scm_stack_type, SCM_MAKINUM (size), SCM_EOL);
|
stack = scm_make_struct (scm_stack_type, SCM_I_MAKINUM (size), SCM_EOL);
|
||||||
SCM_STACK (stack) -> id = id;
|
SCM_STACK (stack) -> id = id;
|
||||||
iframe = &SCM_STACK (stack) -> tail[0];
|
iframe = &SCM_STACK (stack) -> tail[0];
|
||||||
SCM_STACK (stack) -> frames = iframe;
|
SCM_STACK (stack) -> frames = iframe;
|
||||||
|
@ -565,7 +565,7 @@ SCM_DEFINE (scm_stack_length, "stack-length", 1, 0, 0,
|
||||||
#define FUNC_NAME s_scm_stack_length
|
#define FUNC_NAME s_scm_stack_length
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_STACK (1, stack);
|
SCM_VALIDATE_STACK (1, stack);
|
||||||
return SCM_MAKINUM (SCM_STACK_LENGTH (stack));
|
return SCM_I_MAKINUM (SCM_STACK_LENGTH (stack));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ SCM_DEFINE (scm_last_stack_frame, "last-stack-frame", 1, 0, 0,
|
||||||
if (!dframe || SCM_VOIDFRAMEP (*dframe))
|
if (!dframe || SCM_VOIDFRAMEP (*dframe))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
|
||||||
stack = scm_make_struct (scm_stack_type, SCM_MAKINUM (SCM_FRAME_N_SLOTS),
|
stack = scm_make_struct (scm_stack_type, SCM_I_MAKINUM (SCM_FRAME_N_SLOTS),
|
||||||
SCM_EOL);
|
SCM_EOL);
|
||||||
SCM_STACK (stack) -> length = 1;
|
SCM_STACK (stack) -> length = 1;
|
||||||
SCM_STACK (stack) -> frames = &SCM_STACK (stack) -> tail[0];
|
SCM_STACK (stack) -> frames = &SCM_STACK (stack) -> tail[0];
|
||||||
|
@ -631,7 +631,7 @@ SCM_DEFINE (scm_frame_number, "frame-number", 1, 0, 0,
|
||||||
#define FUNC_NAME s_scm_frame_number
|
#define FUNC_NAME s_scm_frame_number
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_FRAME (1, frame);
|
SCM_VALIDATE_FRAME (1, frame);
|
||||||
return SCM_MAKINUM (SCM_FRAME_NUMBER (frame));
|
return SCM_I_MAKINUM (SCM_FRAME_NUMBER (frame));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0,
|
||||||
if (n >= SCM_STACK_LENGTH (SCM_CAR (frame)))
|
if (n >= SCM_STACK_LENGTH (SCM_CAR (frame)))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return scm_cons (SCM_CAR (frame), SCM_MAKINUM (n));
|
return scm_cons (SCM_CAR (frame), SCM_I_MAKINUM (n));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ SCM_DEFINE (scm_frame_next, "frame-next", 1, 0, 0,
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return scm_cons (SCM_CAR (frame), SCM_MAKINUM (n - 1));
|
return scm_cons (SCM_CAR (frame), SCM_I_MAKINUM (n - 1));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -124,10 +124,10 @@ SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
|
||||||
time_buffer.time -= scm_your_base.time;
|
time_buffer.time -= scm_your_base.time;
|
||||||
tmp = scm_long2num (time_buffer.millitm - scm_your_base.millitm);
|
tmp = scm_long2num (time_buffer.millitm - scm_your_base.millitm);
|
||||||
tmp = scm_sum (tmp,
|
tmp = scm_sum (tmp,
|
||||||
scm_product (SCM_MAKINUM (1000),
|
scm_product (SCM_I_MAKINUM (1000),
|
||||||
SCM_MAKINUM (time_buffer.time)));
|
SCM_I_MAKINUM (time_buffer.time)));
|
||||||
return scm_quotient (scm_product (tmp, SCM_MAKINUM (SCM_TIME_UNITS_PER_SECOND)),
|
return scm_quotient (scm_product (tmp, SCM_I_MAKINUM (SCM_TIME_UNITS_PER_SECOND)),
|
||||||
SCM_MAKINUM (1000));
|
SCM_I_MAKINUM (1000));
|
||||||
#else
|
#else
|
||||||
return scm_long2num((time((timet*)0) - scm_your_base) * (int)SCM_TIME_UNITS_PER_SECOND);
|
return scm_long2num((time((timet*)0) - scm_your_base) * (int)SCM_TIME_UNITS_PER_SECOND);
|
||||||
#endif /* HAVE_FTIME */
|
#endif /* HAVE_FTIME */
|
||||||
|
@ -243,7 +243,7 @@ SCM_DEFINE (scm_gettimeofday, "gettimeofday", 0, 0, 0,
|
||||||
|
|
||||||
ftime(&time);
|
ftime(&time);
|
||||||
return scm_cons (scm_long2num ((long) time.time),
|
return scm_cons (scm_long2num ((long) time.time),
|
||||||
SCM_MAKINUM (time.millitm * 1000));
|
SCM_I_MAKINUM (time.millitm * 1000));
|
||||||
# else
|
# else
|
||||||
timet timv;
|
timet timv;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ SCM_DEFINE (scm_gettimeofday, "gettimeofday", 0, 0, 0,
|
||||||
if ((timv = time (0)) == -1)
|
if ((timv = time (0)) == -1)
|
||||||
SCM_SYSERROR;
|
SCM_SYSERROR;
|
||||||
SCM_ALLOW_INTS;
|
SCM_ALLOW_INTS;
|
||||||
return scm_cons (scm_long2num (timv), SCM_MAKINUM (0));
|
return scm_cons (scm_long2num (timv), SCM_I_MAKINUM (0));
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -262,16 +262,16 @@ filltime (struct tm *bd_time, int zoff, const char *zname)
|
||||||
{
|
{
|
||||||
SCM result = scm_c_make_vector (11, SCM_UNDEFINED);
|
SCM result = scm_c_make_vector (11, SCM_UNDEFINED);
|
||||||
|
|
||||||
SCM_VECTOR_SET (result,0, SCM_MAKINUM (bd_time->tm_sec));
|
SCM_VECTOR_SET (result,0, SCM_I_MAKINUM (bd_time->tm_sec));
|
||||||
SCM_VECTOR_SET (result,1, SCM_MAKINUM (bd_time->tm_min));
|
SCM_VECTOR_SET (result,1, SCM_I_MAKINUM (bd_time->tm_min));
|
||||||
SCM_VECTOR_SET (result,2, SCM_MAKINUM (bd_time->tm_hour));
|
SCM_VECTOR_SET (result,2, SCM_I_MAKINUM (bd_time->tm_hour));
|
||||||
SCM_VECTOR_SET (result,3, SCM_MAKINUM (bd_time->tm_mday));
|
SCM_VECTOR_SET (result,3, SCM_I_MAKINUM (bd_time->tm_mday));
|
||||||
SCM_VECTOR_SET (result,4, SCM_MAKINUM (bd_time->tm_mon));
|
SCM_VECTOR_SET (result,4, SCM_I_MAKINUM (bd_time->tm_mon));
|
||||||
SCM_VECTOR_SET (result,5, SCM_MAKINUM (bd_time->tm_year));
|
SCM_VECTOR_SET (result,5, SCM_I_MAKINUM (bd_time->tm_year));
|
||||||
SCM_VECTOR_SET (result,6, SCM_MAKINUM (bd_time->tm_wday));
|
SCM_VECTOR_SET (result,6, SCM_I_MAKINUM (bd_time->tm_wday));
|
||||||
SCM_VECTOR_SET (result,7, SCM_MAKINUM (bd_time->tm_yday));
|
SCM_VECTOR_SET (result,7, SCM_I_MAKINUM (bd_time->tm_yday));
|
||||||
SCM_VECTOR_SET (result,8, SCM_MAKINUM (bd_time->tm_isdst));
|
SCM_VECTOR_SET (result,8, SCM_I_MAKINUM (bd_time->tm_isdst));
|
||||||
SCM_VECTOR_SET (result,9, SCM_MAKINUM (zoff));
|
SCM_VECTOR_SET (result,9, SCM_I_MAKINUM (zoff));
|
||||||
SCM_VECTOR_SET (result,10, zname ? scm_makfrom0str (zname) : SCM_BOOL_F);
|
SCM_VECTOR_SET (result,10, zname ? scm_makfrom0str (zname) : SCM_BOOL_F);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -717,7 +717,7 @@ SCM_DEFINE (scm_strptime, "strptime", 2, 0, 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM_ALLOW_INTS;
|
SCM_ALLOW_INTS;
|
||||||
return scm_cons (filltime (&t, 0, NULL), SCM_MAKINUM (rest - str));
|
return scm_cons (filltime (&t, 0, NULL), SCM_I_MAKINUM (rest - str));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_STRPTIME */
|
#endif /* HAVE_STRPTIME */
|
||||||
|
|
|
@ -217,7 +217,7 @@ SCM_DEFINE (scm_string_length, "string-length", 1, 0, 0,
|
||||||
#define FUNC_NAME s_scm_string_length
|
#define FUNC_NAME s_scm_string_length
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_STRING (1, string);
|
SCM_VALIDATE_STRING (1, string);
|
||||||
return SCM_MAKINUM (SCM_STRING_LENGTH (string));
|
return SCM_I_MAKINUM (SCM_STRING_LENGTH (string));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
|
||||||
SCM_ASSERT (SCM_CHARP (chr), chr, SCM_ARG2, why);
|
SCM_ASSERT (SCM_CHARP (chr), chr, SCM_ARG2, why);
|
||||||
|
|
||||||
if (scm_is_false (sub_start))
|
if (scm_is_false (sub_start))
|
||||||
sub_start = SCM_MAKINUM (0);
|
sub_start = SCM_I_MAKINUM (0);
|
||||||
|
|
||||||
SCM_ASSERT (SCM_INUMP (sub_start), sub_start, SCM_ARG3, why);
|
SCM_ASSERT (SCM_INUMP (sub_start), sub_start, SCM_ARG3, why);
|
||||||
lower = SCM_INUM (sub_start);
|
lower = SCM_INUM (sub_start);
|
||||||
|
@ -69,7 +69,7 @@ scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
|
||||||
scm_out_of_range (why, sub_start);
|
scm_out_of_range (why, sub_start);
|
||||||
|
|
||||||
if (scm_is_false (sub_end))
|
if (scm_is_false (sub_end))
|
||||||
sub_end = SCM_MAKINUM (SCM_STRING_LENGTH (*str));
|
sub_end = SCM_I_MAKINUM (SCM_STRING_LENGTH (*str));
|
||||||
|
|
||||||
SCM_ASSERT (SCM_INUMP (sub_end), sub_end, SCM_ARG4, why);
|
SCM_ASSERT (SCM_INUMP (sub_end), sub_end, SCM_ARG4, why);
|
||||||
upper = SCM_INUM (sub_end);
|
upper = SCM_INUM (sub_end);
|
||||||
|
@ -124,7 +124,7 @@ SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
|
||||||
pos = scm_i_index (&str, chr, 1, frm, to, FUNC_NAME);
|
pos = scm_i_index (&str, chr, 1, frm, to, FUNC_NAME);
|
||||||
return (pos < 0
|
return (pos < 0
|
||||||
? SCM_BOOL_F
|
? SCM_BOOL_F
|
||||||
: SCM_MAKINUM (pos));
|
: SCM_I_MAKINUM (pos));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
|
||||||
pos = scm_i_index (&str, chr, -1, frm, to, FUNC_NAME);
|
pos = scm_i_index (&str, chr, -1, frm, to, FUNC_NAME);
|
||||||
return (pos < 0
|
return (pos < 0
|
||||||
? SCM_BOOL_F
|
? SCM_BOOL_F
|
||||||
: SCM_MAKINUM (pos));
|
: SCM_I_MAKINUM (pos));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0,
|
||||||
{
|
{
|
||||||
if (field_desc[x + 2] != '-')
|
if (field_desc[x + 2] != '-')
|
||||||
SCM_MISC_ERROR ("missing dash field at position ~A",
|
SCM_MISC_ERROR ("missing dash field at position ~A",
|
||||||
scm_list_1 (SCM_MAKINUM (x / 2)));
|
scm_list_1 (SCM_I_MAKINUM (x / 2)));
|
||||||
x += 2;
|
x += 2;
|
||||||
goto recheck_ref;
|
goto recheck_ref;
|
||||||
}
|
}
|
||||||
|
@ -793,14 +793,14 @@ void
|
||||||
scm_init_struct ()
|
scm_init_struct ()
|
||||||
{
|
{
|
||||||
scm_struct_table
|
scm_struct_table
|
||||||
= scm_permanent_object (scm_make_weak_key_hash_table (SCM_MAKINUM (31)));
|
= scm_permanent_object (scm_make_weak_key_hash_table (SCM_I_MAKINUM (31)));
|
||||||
required_vtable_fields = scm_makfrom0str ("prsrpw");
|
required_vtable_fields = scm_makfrom0str ("prsrpw");
|
||||||
scm_permanent_object (required_vtable_fields);
|
scm_permanent_object (required_vtable_fields);
|
||||||
scm_c_define ("vtable-index-layout", SCM_MAKINUM (scm_vtable_index_layout));
|
scm_c_define ("vtable-index-layout", SCM_I_MAKINUM (scm_vtable_index_layout));
|
||||||
scm_c_define ("vtable-index-vtable", SCM_MAKINUM (scm_vtable_index_vtable));
|
scm_c_define ("vtable-index-vtable", SCM_I_MAKINUM (scm_vtable_index_vtable));
|
||||||
scm_c_define ("vtable-index-printer",
|
scm_c_define ("vtable-index-printer",
|
||||||
SCM_MAKINUM (scm_vtable_index_printer));
|
SCM_I_MAKINUM (scm_vtable_index_printer));
|
||||||
scm_c_define ("vtable-offset-user", SCM_MAKINUM (scm_vtable_offset_user));
|
scm_c_define ("vtable-offset-user", SCM_I_MAKINUM (scm_vtable_offset_user));
|
||||||
#include "libguile/struct.x"
|
#include "libguile/struct.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,7 @@ scm_c_symbol2str (SCM obj, char *str, size_t *lenp)
|
||||||
void
|
void
|
||||||
scm_symbols_prehistory ()
|
scm_symbols_prehistory ()
|
||||||
{
|
{
|
||||||
symbols = scm_make_weak_key_hash_table (SCM_MAKINUM (2139));
|
symbols = scm_make_weak_key_hash_table (SCM_I_MAKINUM (2139));
|
||||||
scm_permanent_object (symbols);
|
scm_permanent_object (symbols);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ typedef unsigned long scm_t_bits;
|
||||||
|
|
||||||
/* Checking if a SCM variable holds an immediate integer: See numbers.h for
|
/* Checking if a SCM variable holds an immediate integer: See numbers.h for
|
||||||
* the definition of the following macros: SCM_I_FIXNUM_BIT,
|
* the definition of the following macros: SCM_I_FIXNUM_BIT,
|
||||||
* SCM_MOST_POSITIVE_FIXNUM, SCM_INUMP, SCM_MAKINUM, SCM_INUM. */
|
* SCM_MOST_POSITIVE_FIXNUM, SCM_INUMP, SCM_I_MAKINUM, SCM_INUM. */
|
||||||
|
|
||||||
/* Checking if a SCM variable holds a pair (for historical reasons, in Guile
|
/* Checking if a SCM variable holds a pair (for historical reasons, in Guile
|
||||||
* also known as a cons-cell): This is done by first checking that the SCM
|
* also known as a cons-cell): This is done by first checking that the SCM
|
||||||
|
|
|
@ -218,11 +218,11 @@ SCM_DEFINE (scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0,
|
||||||
badarg1:SCM_WRONG_TYPE_ARG (1, v);
|
badarg1:SCM_WRONG_TYPE_ARG (1, v);
|
||||||
case scm_tc7_vector:
|
case scm_tc7_vector:
|
||||||
case scm_tc7_wvect:
|
case scm_tc7_wvect:
|
||||||
return SCM_MAKINUM (SCM_VECTOR_LENGTH (v));
|
return SCM_I_MAKINUM (SCM_VECTOR_LENGTH (v));
|
||||||
case scm_tc7_string:
|
case scm_tc7_string:
|
||||||
return SCM_MAKINUM (SCM_STRING_LENGTH (v));
|
return SCM_I_MAKINUM (SCM_STRING_LENGTH (v));
|
||||||
case scm_tc7_bvect:
|
case scm_tc7_bvect:
|
||||||
return SCM_MAKINUM (SCM_BITVECTOR_LENGTH (v));
|
return SCM_I_MAKINUM (SCM_BITVECTOR_LENGTH (v));
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
case scm_tc7_ivect:
|
case scm_tc7_ivect:
|
||||||
|
@ -233,7 +233,7 @@ SCM_DEFINE (scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0,
|
||||||
#if SCM_SIZEOF_LONG_LONG != 0
|
#if SCM_SIZEOF_LONG_LONG != 0
|
||||||
case scm_tc7_llvect:
|
case scm_tc7_llvect:
|
||||||
#endif
|
#endif
|
||||||
return SCM_MAKINUM (SCM_UVECTOR_LENGTH (v));
|
return SCM_I_MAKINUM (SCM_UVECTOR_LENGTH (v));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -347,10 +347,10 @@ SCM_DEFINE (scm_array_rank, "array-rank", 1, 0, 0,
|
||||||
case scm_tc7_llvect:
|
case scm_tc7_llvect:
|
||||||
#endif
|
#endif
|
||||||
case scm_tc7_svect:
|
case scm_tc7_svect:
|
||||||
return SCM_MAKINUM (1L);
|
return SCM_I_MAKINUM (1L);
|
||||||
case scm_tc7_smob:
|
case scm_tc7_smob:
|
||||||
if (SCM_ARRAYP (ra))
|
if (SCM_ARRAYP (ra))
|
||||||
return SCM_MAKINUM (SCM_ARRAY_NDIM (ra));
|
return SCM_I_MAKINUM (SCM_ARRAY_NDIM (ra));
|
||||||
return SCM_INUM0;
|
return SCM_INUM0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,10 +397,10 @@ SCM_DEFINE (scm_array_dimensions, "array-dimensions", 1, 0, 0,
|
||||||
s = SCM_ARRAY_DIMS (ra);
|
s = SCM_ARRAY_DIMS (ra);
|
||||||
while (k--)
|
while (k--)
|
||||||
res = scm_cons (s[k].lbnd
|
res = scm_cons (s[k].lbnd
|
||||||
? scm_cons2 (SCM_MAKINUM (s[k].lbnd),
|
? scm_cons2 (SCM_I_MAKINUM (s[k].lbnd),
|
||||||
SCM_MAKINUM (s[k].ubnd),
|
SCM_I_MAKINUM (s[k].ubnd),
|
||||||
SCM_EOL)
|
SCM_EOL)
|
||||||
: SCM_MAKINUM (1 + s[k].ubnd),
|
: SCM_I_MAKINUM (1 + s[k].ubnd),
|
||||||
res);
|
res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ SCM_DEFINE (scm_shared_array_offset, "shared-array-offset", 1, 0, 0,
|
||||||
#define FUNC_NAME s_scm_shared_array_offset
|
#define FUNC_NAME s_scm_shared_array_offset
|
||||||
{
|
{
|
||||||
SCM_ASSERT (SCM_ARRAYP (ra), ra, SCM_ARG1, FUNC_NAME);
|
SCM_ASSERT (SCM_ARRAYP (ra), ra, SCM_ARG1, FUNC_NAME);
|
||||||
return SCM_MAKINUM (SCM_ARRAY_BASE (ra));
|
return SCM_I_MAKINUM (SCM_ARRAY_BASE (ra));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ SCM_DEFINE (scm_shared_array_increments, "shared-array-increments", 1, 0, 0,
|
||||||
k = SCM_ARRAY_NDIM (ra);
|
k = SCM_ARRAY_NDIM (ra);
|
||||||
s = SCM_ARRAY_DIMS (ra);
|
s = SCM_ARRAY_DIMS (ra);
|
||||||
while (k--)
|
while (k--)
|
||||||
res = scm_cons (SCM_MAKINUM (s[k].inc), res);
|
res = scm_cons (SCM_I_MAKINUM (s[k].inc), res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -565,7 +565,7 @@ SCM_DEFINE (scm_dimensions_to_uniform_array, "dimensions->uniform-array", 2, 1,
|
||||||
if (!SCM_UNBNDP (fill))
|
if (!SCM_UNBNDP (fill))
|
||||||
scm_array_fill_x (answer, fill);
|
scm_array_fill_x (answer, fill);
|
||||||
else if (SCM_SYMBOLP (prot))
|
else if (SCM_SYMBOLP (prot))
|
||||||
scm_array_fill_x (answer, SCM_MAKINUM (0));
|
scm_array_fill_x (answer, SCM_I_MAKINUM (0));
|
||||||
else
|
else
|
||||||
scm_array_fill_x (answer, prot);
|
scm_array_fill_x (answer, prot);
|
||||||
return answer;
|
return answer;
|
||||||
|
@ -590,7 +590,7 @@ SCM_DEFINE (scm_dimensions_to_uniform_array, "dimensions->uniform-array", 2, 1,
|
||||||
if (!SCM_UNBNDP (fill))
|
if (!SCM_UNBNDP (fill))
|
||||||
scm_array_fill_x (ra, fill);
|
scm_array_fill_x (ra, fill);
|
||||||
else if (SCM_SYMBOLP (prot))
|
else if (SCM_SYMBOLP (prot))
|
||||||
scm_array_fill_x (ra, SCM_MAKINUM (0));
|
scm_array_fill_x (ra, SCM_I_MAKINUM (0));
|
||||||
else
|
else
|
||||||
scm_array_fill_x (ra, prot);
|
scm_array_fill_x (ra, prot);
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1,
|
||||||
s = SCM_ARRAY_DIMS (ra);
|
s = SCM_ARRAY_DIMS (ra);
|
||||||
for (k = 0; k < SCM_ARRAY_NDIM (ra); k++)
|
for (k = 0; k < SCM_ARRAY_NDIM (ra); k++)
|
||||||
{
|
{
|
||||||
inds = scm_cons (SCM_MAKINUM (s[k].lbnd), inds);
|
inds = scm_cons (SCM_I_MAKINUM (s[k].lbnd), inds);
|
||||||
if (s[k].ubnd < s[k].lbnd)
|
if (s[k].ubnd < s[k].lbnd)
|
||||||
{
|
{
|
||||||
if (1 == SCM_ARRAY_NDIM (ra))
|
if (1 == SCM_ARRAY_NDIM (ra))
|
||||||
|
@ -709,7 +709,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1,
|
||||||
{
|
{
|
||||||
if (s[k].ubnd > s[k].lbnd)
|
if (s[k].ubnd > s[k].lbnd)
|
||||||
{
|
{
|
||||||
SCM_SETCAR (indptr, SCM_MAKINUM (SCM_INUM (SCM_CAR (indptr)) + 1));
|
SCM_SETCAR (indptr, SCM_I_MAKINUM (SCM_INUM (SCM_CAR (indptr)) + 1));
|
||||||
imap = scm_apply_0 (mapfunc, scm_reverse (inds));
|
imap = scm_apply_0 (mapfunc, scm_reverse (inds));
|
||||||
if (SCM_ARRAYP (oldra))
|
if (SCM_ARRAYP (oldra))
|
||||||
|
|
||||||
|
@ -891,7 +891,7 @@ SCM_DEFINE (scm_enclose_array, "enclose-array", 1, 0, 1,
|
||||||
|
|
||||||
SCM_VALIDATE_REST_ARGUMENT (axes);
|
SCM_VALIDATE_REST_ARGUMENT (axes);
|
||||||
if (SCM_NULLP (axes))
|
if (SCM_NULLP (axes))
|
||||||
axes = scm_cons ((SCM_ARRAYP (ra) ? SCM_MAKINUM (SCM_ARRAY_NDIM (ra) - 1) : SCM_INUM0), SCM_EOL);
|
axes = scm_cons ((SCM_ARRAYP (ra) ? SCM_I_MAKINUM (SCM_ARRAY_NDIM (ra) - 1) : SCM_INUM0), SCM_EOL);
|
||||||
ninr = scm_ilength (axes);
|
ninr = scm_ilength (axes);
|
||||||
if (ninr < 0)
|
if (ninr < 0)
|
||||||
SCM_WRONG_NUM_ARGS ();
|
SCM_WRONG_NUM_ARGS ();
|
||||||
|
@ -933,7 +933,7 @@ SCM_DEFINE (scm_enclose_array, "enclose-array", 1, 0, 1,
|
||||||
noutr = ndim - ninr;
|
noutr = ndim - ninr;
|
||||||
if (noutr < 0)
|
if (noutr < 0)
|
||||||
SCM_WRONG_NUM_ARGS ();
|
SCM_WRONG_NUM_ARGS ();
|
||||||
axv = scm_make_string (SCM_MAKINUM (ndim), SCM_MAKE_CHAR (0));
|
axv = scm_make_string (SCM_I_MAKINUM (ndim), SCM_MAKE_CHAR (0));
|
||||||
res = scm_make_ra (noutr);
|
res = scm_make_ra (noutr);
|
||||||
SCM_ARRAY_BASE (res) = SCM_ARRAY_BASE (ra_inr);
|
SCM_ARRAY_BASE (res) = SCM_ARRAY_BASE (ra_inr);
|
||||||
SCM_ARRAY_V (res) = ra_inr;
|
SCM_ARRAY_V (res) = ra_inr;
|
||||||
|
@ -1094,7 +1094,7 @@ SCM_DEFINE (scm_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0,
|
||||||
/* not reached */
|
/* not reached */
|
||||||
|
|
||||||
outrng:
|
outrng:
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (pos));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (pos));
|
||||||
wna:
|
wna:
|
||||||
SCM_WRONG_NUM_ARGS ();
|
SCM_WRONG_NUM_ARGS ();
|
||||||
case scm_tc7_smob:
|
case scm_tc7_smob:
|
||||||
|
@ -1119,14 +1119,14 @@ SCM_DEFINE (scm_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0,
|
||||||
case scm_tc7_string:
|
case scm_tc7_string:
|
||||||
return SCM_MAKE_CHAR (SCM_STRING_UCHARS (v)[pos]);
|
return SCM_MAKE_CHAR (SCM_STRING_UCHARS (v)[pos]);
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
return SCM_MAKINUM (((char *) SCM_UVECTOR_BASE (v))[pos]);
|
return SCM_I_MAKINUM (((char *) SCM_UVECTOR_BASE (v))[pos]);
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
return scm_ulong2num (((unsigned long *) SCM_VELTS (v))[pos]);
|
return scm_ulong2num (((unsigned long *) SCM_VELTS (v))[pos]);
|
||||||
case scm_tc7_ivect:
|
case scm_tc7_ivect:
|
||||||
return scm_long2num (((signed long *) SCM_VELTS (v))[pos]);
|
return scm_long2num (((signed long *) SCM_VELTS (v))[pos]);
|
||||||
|
|
||||||
case scm_tc7_svect:
|
case scm_tc7_svect:
|
||||||
return SCM_MAKINUM (((short *) SCM_CELL_WORD_1 (v))[pos]);
|
return SCM_I_MAKINUM (((short *) SCM_CELL_WORD_1 (v))[pos]);
|
||||||
#if SCM_SIZEOF_LONG_LONG != 0
|
#if SCM_SIZEOF_LONG_LONG != 0
|
||||||
case scm_tc7_llvect:
|
case scm_tc7_llvect:
|
||||||
return scm_long_long2num (((long long *) SCM_CELL_WORD_1 (v))[pos]);
|
return scm_long_long2num (((long long *) SCM_CELL_WORD_1 (v))[pos]);
|
||||||
|
@ -1165,13 +1165,13 @@ scm_cvref (SCM v, unsigned long pos, SCM last)
|
||||||
case scm_tc7_string:
|
case scm_tc7_string:
|
||||||
return SCM_MAKE_CHAR (SCM_STRING_UCHARS (v)[pos]);
|
return SCM_MAKE_CHAR (SCM_STRING_UCHARS (v)[pos]);
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
return SCM_MAKINUM (((char *) SCM_UVECTOR_BASE (v))[pos]);
|
return SCM_I_MAKINUM (((char *) SCM_UVECTOR_BASE (v))[pos]);
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
return scm_ulong2num(((unsigned long *) SCM_VELTS (v))[pos]);
|
return scm_ulong2num(((unsigned long *) SCM_VELTS (v))[pos]);
|
||||||
case scm_tc7_ivect:
|
case scm_tc7_ivect:
|
||||||
return scm_long2num(((signed long *) SCM_VELTS (v))[pos]);
|
return scm_long2num(((signed long *) SCM_VELTS (v))[pos]);
|
||||||
case scm_tc7_svect:
|
case scm_tc7_svect:
|
||||||
return SCM_MAKINUM (((short *) SCM_CELL_WORD_1 (v))[pos]);
|
return SCM_I_MAKINUM (((short *) SCM_CELL_WORD_1 (v))[pos]);
|
||||||
#if SCM_SIZEOF_LONG_LONG != 0
|
#if SCM_SIZEOF_LONG_LONG != 0
|
||||||
case scm_tc7_llvect:
|
case scm_tc7_llvect:
|
||||||
return scm_long_long2num (((long long *) SCM_CELL_WORD_1 (v))[pos]);
|
return scm_long_long2num (((long long *) SCM_CELL_WORD_1 (v))[pos]);
|
||||||
|
@ -1263,7 +1263,7 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1,
|
||||||
SCM_WRONG_TYPE_ARG (1, v);
|
SCM_WRONG_TYPE_ARG (1, v);
|
||||||
/* not reached */
|
/* not reached */
|
||||||
outrng:
|
outrng:
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (pos));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (pos));
|
||||||
wna:
|
wna:
|
||||||
SCM_WRONG_NUM_ARGS ();
|
SCM_WRONG_NUM_ARGS ();
|
||||||
case scm_tc7_smob: /* enclosed */
|
case scm_tc7_smob: /* enclosed */
|
||||||
|
@ -1282,7 +1282,7 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1,
|
||||||
break;
|
break;
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
if (SCM_CHARP (obj))
|
if (SCM_CHARP (obj))
|
||||||
obj = SCM_MAKINUM ((char) SCM_CHAR (obj));
|
obj = SCM_I_MAKINUM ((char) SCM_CHAR (obj));
|
||||||
SCM_ASRTGO (SCM_INUMP (obj), badobj);
|
SCM_ASRTGO (SCM_INUMP (obj), badobj);
|
||||||
((char *) SCM_UVECTOR_BASE (v))[pos] = SCM_INUM (obj);
|
((char *) SCM_UVECTOR_BASE (v))[pos] = SCM_INUM (obj);
|
||||||
break;
|
break;
|
||||||
|
@ -1609,7 +1609,7 @@ loop:
|
||||||
if (!SCM_EQ_P (v, ra) && !SCM_EQ_P (cra, ra))
|
if (!SCM_EQ_P (v, ra) && !SCM_EQ_P (cra, ra))
|
||||||
scm_array_copy_x (cra, ra);
|
scm_array_copy_x (cra, ra);
|
||||||
|
|
||||||
return SCM_MAKINUM (ans);
|
return SCM_I_MAKINUM (ans);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1740,7 +1740,7 @@ loop:
|
||||||
if (SCM_TYP7 (v) == scm_tc7_bvect)
|
if (SCM_TYP7 (v) == scm_tc7_bvect)
|
||||||
ans *= SCM_LONG_BIT;
|
ans *= SCM_LONG_BIT;
|
||||||
|
|
||||||
return SCM_MAKINUM (ans);
|
return SCM_I_MAKINUM (ans);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1772,7 +1772,7 @@ SCM_DEFINE (scm_bit_count, "bit-count", 2, 0, 0,
|
||||||
w >>= 4;
|
w >>= 4;
|
||||||
}
|
}
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
} else {
|
} else {
|
||||||
--i;
|
--i;
|
||||||
w = SCM_UNPACK (SCM_VELTS (bitvector)[i]);
|
w = SCM_UNPACK (SCM_VELTS (bitvector)[i]);
|
||||||
|
@ -1828,17 +1828,17 @@ SCM_DEFINE (scm_bit_position, "bit-position", 3, 0, 0,
|
||||||
switch (w & 0x0f)
|
switch (w & 0x0f)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return SCM_MAKINUM (pos);
|
return SCM_I_MAKINUM (pos);
|
||||||
case 2:
|
case 2:
|
||||||
case 6:
|
case 6:
|
||||||
case 10:
|
case 10:
|
||||||
case 14:
|
case 14:
|
||||||
return SCM_MAKINUM (pos + 1);
|
return SCM_I_MAKINUM (pos + 1);
|
||||||
case 4:
|
case 4:
|
||||||
case 12:
|
case 12:
|
||||||
return SCM_MAKINUM (pos + 2);
|
return SCM_I_MAKINUM (pos + 2);
|
||||||
case 8:
|
case 8:
|
||||||
return SCM_MAKINUM (pos + 3);
|
return SCM_I_MAKINUM (pos + 3);
|
||||||
case 0:
|
case 0:
|
||||||
pos += 4;
|
pos += 4;
|
||||||
w >>= 4;
|
w >>= 4;
|
||||||
|
@ -1899,7 +1899,7 @@ SCM_DEFINE (scm_bit_set_star_x, "bit-set*!", 3, 0, 0,
|
||||||
{
|
{
|
||||||
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
||||||
if (k >= vlen)
|
if (k >= vlen)
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (k));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (k));
|
||||||
SCM_BITVEC_CLR(v, k);
|
SCM_BITVEC_CLR(v, k);
|
||||||
}
|
}
|
||||||
else if (SCM_EQ_P (obj, SCM_BOOL_T))
|
else if (SCM_EQ_P (obj, SCM_BOOL_T))
|
||||||
|
@ -1907,7 +1907,7 @@ SCM_DEFINE (scm_bit_set_star_x, "bit-set*!", 3, 0, 0,
|
||||||
{
|
{
|
||||||
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
||||||
if (k >= vlen)
|
if (k >= vlen)
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (k));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (k));
|
||||||
SCM_BITVEC_SET(v, k);
|
SCM_BITVEC_SET(v, k);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1969,7 +1969,7 @@ SCM_DEFINE (scm_bit_count_star, "bit-count*", 3, 0, 0,
|
||||||
{
|
{
|
||||||
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
||||||
if (k >= vlen)
|
if (k >= vlen)
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (k));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (k));
|
||||||
if (!SCM_BITVEC_REF(v, k))
|
if (!SCM_BITVEC_REF(v, k))
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -1978,7 +1978,7 @@ SCM_DEFINE (scm_bit_count_star, "bit-count*", 3, 0, 0,
|
||||||
{
|
{
|
||||||
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
k = SCM_UNPACK (SCM_VELTS (kv)[--i]);
|
||||||
if (k >= vlen)
|
if (k >= vlen)
|
||||||
scm_out_of_range (FUNC_NAME, SCM_MAKINUM (k));
|
scm_out_of_range (FUNC_NAME, SCM_I_MAKINUM (k));
|
||||||
if (SCM_BITVEC_REF (v, k))
|
if (SCM_BITVEC_REF (v, k))
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -1999,13 +1999,13 @@ SCM_DEFINE (scm_bit_count_star, "bit-count*", 3, 0, 0,
|
||||||
for (; k; k >>= 4)
|
for (; k; k >>= 4)
|
||||||
count += cnt_tab[k & 0x0f];
|
count += cnt_tab[k & 0x0f];
|
||||||
if (0 == i--)
|
if (0 == i--)
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
|
|
||||||
/* urg. repetitive (see above.) */
|
/* urg. repetitive (see above.) */
|
||||||
k = SCM_UNPACK (SCM_VELTS (kv)[i]) & (fObj ? SCM_UNPACK(SCM_VELTS (v)[i]) : ~SCM_UNPACK (SCM_VELTS (v)[i]));
|
k = SCM_UNPACK (SCM_VELTS (kv)[i]) & (fObj ? SCM_UNPACK(SCM_VELTS (v)[i]) : ~SCM_UNPACK (SCM_VELTS (v)[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -2082,7 +2082,7 @@ ra2l (SCM ra, unsigned long base, unsigned long k)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
i -= inc;
|
i -= inc;
|
||||||
res = scm_cons (scm_uniform_vector_ref (SCM_ARRAY_V (ra), SCM_MAKINUM (i)), res);
|
res = scm_cons (scm_uniform_vector_ref (SCM_ARRAY_V (ra), SCM_I_MAKINUM (i)), res);
|
||||||
}
|
}
|
||||||
while (i != base);
|
while (i != base);
|
||||||
return res;
|
return res;
|
||||||
|
@ -2126,7 +2126,7 @@ SCM_DEFINE (scm_array_to_list, "array->list", 1, 0, 0,
|
||||||
signed char *data = (signed char *) SCM_VELTS (v);
|
signed char *data = (signed char *) SCM_VELTS (v);
|
||||||
unsigned long k = SCM_UVECTOR_LENGTH (v);
|
unsigned long k = SCM_UVECTOR_LENGTH (v);
|
||||||
while (k != 0)
|
while (k != 0)
|
||||||
res = scm_cons (SCM_MAKINUM (data[--k]), res);
|
res = scm_cons (SCM_I_MAKINUM (data[--k]), res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
|
@ -2206,7 +2206,7 @@ SCM_DEFINE (scm_list_to_uniform_array, "list->uniform-array", 3, 0, 0,
|
||||||
{
|
{
|
||||||
n = scm_ilength (row);
|
n = scm_ilength (row);
|
||||||
SCM_ASSERT (n >= 0, lst, SCM_ARG3, FUNC_NAME);
|
SCM_ASSERT (n >= 0, lst, SCM_ARG3, FUNC_NAME);
|
||||||
shp = scm_cons (SCM_MAKINUM (n), shp);
|
shp = scm_cons (SCM_I_MAKINUM (n), shp);
|
||||||
if (SCM_NIMP (row))
|
if (SCM_NIMP (row))
|
||||||
row = SCM_CAR (row);
|
row = SCM_CAR (row);
|
||||||
}
|
}
|
||||||
|
@ -2222,7 +2222,7 @@ SCM_DEFINE (scm_list_to_uniform_array, "list->uniform-array", 3, 0, 0,
|
||||||
{
|
{
|
||||||
unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
|
unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
|
||||||
for (k = 0; k < length; k++, lst = SCM_CDR (lst))
|
for (k = 0; k < length; k++, lst = SCM_CDR (lst))
|
||||||
scm_array_set_x (ra, SCM_CAR (lst), SCM_MAKINUM (k));
|
scm_array_set_x (ra, SCM_CAR (lst), SCM_I_MAKINUM (k));
|
||||||
return ra;
|
return ra;
|
||||||
}
|
}
|
||||||
if (l2ra (lst, ra, SCM_ARRAY_BASE (ra), 0))
|
if (l2ra (lst, ra, SCM_ARRAY_BASE (ra), 0))
|
||||||
|
@ -2260,7 +2260,7 @@ l2ra (SCM lst, SCM ra, unsigned long base, unsigned long k)
|
||||||
{
|
{
|
||||||
if (!SCM_CONSP (lst))
|
if (!SCM_CONSP (lst))
|
||||||
return 0;
|
return 0;
|
||||||
scm_array_set_x (SCM_ARRAY_V (ra), SCM_CAR (lst), SCM_MAKINUM (base));
|
scm_array_set_x (SCM_ARRAY_V (ra), SCM_CAR (lst), SCM_I_MAKINUM (base));
|
||||||
base += inc;
|
base += inc;
|
||||||
lst = SCM_CDR (lst);
|
lst = SCM_CDR (lst);
|
||||||
}
|
}
|
||||||
|
@ -2327,7 +2327,7 @@ tail:
|
||||||
default:
|
default:
|
||||||
/* scm_tc7_bvect and scm_tc7_llvect only? */
|
/* scm_tc7_bvect and scm_tc7_llvect only? */
|
||||||
if (n-- > 0)
|
if (n-- > 0)
|
||||||
scm_iprin1 (scm_uniform_vector_ref (ra, SCM_MAKINUM (j)), port, pstate);
|
scm_iprin1 (scm_uniform_vector_ref (ra, SCM_I_MAKINUM (j)), port, pstate);
|
||||||
for (j += inc; n-- > 0; j += inc)
|
for (j += inc; n-- > 0; j += inc)
|
||||||
{
|
{
|
||||||
scm_putc (' ', port);
|
scm_putc (' ', port);
|
||||||
|
@ -2570,9 +2570,9 @@ loop:
|
||||||
case scm_tc7_byvect:
|
case scm_tc7_byvect:
|
||||||
return SCM_MAKE_CHAR ('\0');
|
return SCM_MAKE_CHAR ('\0');
|
||||||
case scm_tc7_uvect:
|
case scm_tc7_uvect:
|
||||||
return SCM_MAKINUM (1L);
|
return SCM_I_MAKINUM (1L);
|
||||||
case scm_tc7_ivect:
|
case scm_tc7_ivect:
|
||||||
return SCM_MAKINUM (-1L);
|
return SCM_I_MAKINUM (-1L);
|
||||||
case scm_tc7_svect:
|
case scm_tc7_svect:
|
||||||
return scm_str2symbol ("s");
|
return scm_str2symbol ("s");
|
||||||
#if SCM_SIZEOF_LONG_LONG != 0
|
#if SCM_SIZEOF_LONG_LONG != 0
|
||||||
|
@ -2615,8 +2615,8 @@ scm_init_unif ()
|
||||||
scm_set_smob_free (scm_tc16_array, array_free);
|
scm_set_smob_free (scm_tc16_array, array_free);
|
||||||
scm_set_smob_print (scm_tc16_array, scm_raprin1);
|
scm_set_smob_print (scm_tc16_array, scm_raprin1);
|
||||||
scm_set_smob_equalp (scm_tc16_array, scm_array_equal_p);
|
scm_set_smob_equalp (scm_tc16_array, scm_array_equal_p);
|
||||||
exactly_one_third = scm_permanent_object (scm_make_ratio (SCM_MAKINUM (1),
|
exactly_one_third = scm_permanent_object (scm_make_ratio (SCM_I_MAKINUM (1),
|
||||||
SCM_MAKINUM (3)));
|
SCM_I_MAKINUM (3)));
|
||||||
scm_add_feature ("array");
|
scm_add_feature ("array");
|
||||||
#include "libguile/unif.x"
|
#include "libguile/unif.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,10 +99,10 @@
|
||||||
(scm_num2double (arg, pos, FUNC_NAME))
|
(scm_num2double (arg, pos, FUNC_NAME))
|
||||||
|
|
||||||
#define SCM_OUT_OF_RANGE(pos, arg) \
|
#define SCM_OUT_OF_RANGE(pos, arg) \
|
||||||
do { scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
|
do { scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0)
|
||||||
|
|
||||||
#define SCM_ASSERT_RANGE(pos, arg, f) \
|
#define SCM_ASSERT_RANGE(pos, arg, f) \
|
||||||
do { if (!(f)) scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
|
do { if (!(f)) scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0)
|
||||||
|
|
||||||
#define SCM_MUST_MALLOC_TYPE(type) \
|
#define SCM_MUST_MALLOC_TYPE(type) \
|
||||||
((type *) scm_must_malloc (sizeof (type), FUNC_NAME))
|
((type *) scm_must_malloc (sizeof (type), FUNC_NAME))
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
#define SCM_VALIDATE_INUM_MIN_DEF_COPY(pos, k, min, default, cvar) \
|
#define SCM_VALIDATE_INUM_MIN_DEF_COPY(pos, k, min, default, cvar) \
|
||||||
do { \
|
do { \
|
||||||
if (SCM_UNBNDP (k)) \
|
if (SCM_UNBNDP (k)) \
|
||||||
k = SCM_MAKINUM (default); \
|
k = SCM_I_MAKINUM (default); \
|
||||||
SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
|
SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
|
||||||
SCM_ASSERT_RANGE (pos, k, (SCM_INUM (k) >= min)); \
|
SCM_ASSERT_RANGE (pos, k, (SCM_INUM (k) >= min)); \
|
||||||
cvar = SCM_INUM (k); \
|
cvar = SCM_INUM (k); \
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
#define SCM_VALIDATE_INUM_DEF(pos, k, default) \
|
#define SCM_VALIDATE_INUM_DEF(pos, k, default) \
|
||||||
do { \
|
do { \
|
||||||
if (SCM_UNBNDP (k)) \
|
if (SCM_UNBNDP (k)) \
|
||||||
k = SCM_MAKINUM (default); \
|
k = SCM_I_MAKINUM (default); \
|
||||||
else SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
|
else SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
do { \
|
do { \
|
||||||
if (SCM_UNBNDP (k)) \
|
if (SCM_UNBNDP (k)) \
|
||||||
{ \
|
{ \
|
||||||
k = SCM_MAKINUM (default); \
|
k = SCM_I_MAKINUM (default); \
|
||||||
cvar = default; \
|
cvar = default; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
|
|
|
@ -46,7 +46,7 @@ scm_vector_length (SCM v)
|
||||||
{
|
{
|
||||||
SCM_GASSERT1 (SCM_VECTORP(v),
|
SCM_GASSERT1 (SCM_VECTORP(v),
|
||||||
g_vector_length, v, SCM_ARG1, s_vector_length);
|
g_vector_length, v, SCM_ARG1, s_vector_length);
|
||||||
return SCM_MAKINUM (SCM_VECTOR_LENGTH (v));
|
return SCM_I_MAKINUM (SCM_VECTOR_LENGTH (v));
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM_REGISTER_PROC (s_list_to_vector, "list->vector", 1, 0, 0, scm_vector);
|
SCM_REGISTER_PROC (s_list_to_vector, "list->vector", 1, 0, 0, scm_vector);
|
||||||
|
|
|
@ -35,8 +35,8 @@ SCM_DEFINE (scm_major_version, "major-version", 0, 0, 0,
|
||||||
"E.g., the 1 in \"1.6.5\".")
|
"E.g., the 1 in \"1.6.5\".")
|
||||||
#define FUNC_NAME s_scm_major_version
|
#define FUNC_NAME s_scm_major_version
|
||||||
{
|
{
|
||||||
return scm_number_to_string (SCM_MAKINUM(SCM_MAJOR_VERSION),
|
return scm_number_to_string (SCM_I_MAKINUM(SCM_MAJOR_VERSION),
|
||||||
SCM_MAKINUM(10));
|
SCM_I_MAKINUM(10));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ SCM_DEFINE (scm_minor_version, "minor-version", 0, 0, 0,
|
||||||
"E.g., the 6 in \"1.6.5\".")
|
"E.g., the 6 in \"1.6.5\".")
|
||||||
#define FUNC_NAME s_scm_minor_version
|
#define FUNC_NAME s_scm_minor_version
|
||||||
{
|
{
|
||||||
return scm_number_to_string (SCM_MAKINUM(SCM_MINOR_VERSION),
|
return scm_number_to_string (SCM_I_MAKINUM(SCM_MINOR_VERSION),
|
||||||
SCM_MAKINUM(10));
|
SCM_I_MAKINUM(10));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ SCM_DEFINE (scm_micro_version, "micro-version", 0, 0, 0,
|
||||||
"E.g., the 5 in \"1.6.5\".")
|
"E.g., the 5 in \"1.6.5\".")
|
||||||
#define FUNC_NAME s_scm_micro_version
|
#define FUNC_NAME s_scm_micro_version
|
||||||
{
|
{
|
||||||
return scm_number_to_string (SCM_MAKINUM(SCM_MICRO_VERSION),
|
return scm_number_to_string (SCM_I_MAKINUM(SCM_MICRO_VERSION),
|
||||||
SCM_MAKINUM(10));
|
SCM_I_MAKINUM(10));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ SCM_DEFINE (scm_weak_vector, "weak-vector", 0, 0, 1,
|
||||||
while the vector is being created. */
|
while the vector is being created. */
|
||||||
i = scm_ilength (l);
|
i = scm_ilength (l);
|
||||||
SCM_ASSERT (i >= 0, l, SCM_ARG1, FUNC_NAME);
|
SCM_ASSERT (i >= 0, l, SCM_ARG1, FUNC_NAME);
|
||||||
res = scm_make_weak_vector (SCM_MAKINUM (i), SCM_UNSPECIFIED);
|
res = scm_make_weak_vector (SCM_I_MAKINUM (i), SCM_UNSPECIFIED);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
no alloc, so this loop is safe.
|
no alloc, so this loop is safe.
|
||||||
|
@ -192,7 +192,7 @@ SCM_DEFINE (scm_make_weak_key_alist_vector, "make-weak-key-alist-vector", 0, 1,
|
||||||
#define FUNC_NAME s_scm_make_weak_key_alist_vector
|
#define FUNC_NAME s_scm_make_weak_key_alist_vector
|
||||||
{
|
{
|
||||||
return scm_i_allocate_weak_vector
|
return scm_i_allocate_weak_vector
|
||||||
(1, SCM_UNBNDP (size) ? SCM_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
(1, SCM_UNBNDP (size) ? SCM_I_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ SCM_DEFINE (scm_make_weak_value_alist_vector, "make-weak-value-alist-vector", 0,
|
||||||
#define FUNC_NAME s_scm_make_weak_value_alist_vector
|
#define FUNC_NAME s_scm_make_weak_value_alist_vector
|
||||||
{
|
{
|
||||||
return scm_i_allocate_weak_vector
|
return scm_i_allocate_weak_vector
|
||||||
(2, SCM_UNBNDP (size) ? SCM_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
(2, SCM_UNBNDP (size) ? SCM_I_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ SCM_DEFINE (scm_make_doubly_weak_alist_vector, "make-doubly-weak-alist-vector",
|
||||||
#define FUNC_NAME s_scm_make_doubly_weak_alist_vector
|
#define FUNC_NAME s_scm_make_doubly_weak_alist_vector
|
||||||
{
|
{
|
||||||
return scm_i_allocate_weak_vector
|
return scm_i_allocate_weak_vector
|
||||||
(3, SCM_UNBNDP (size) ? SCM_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
(3, SCM_UNBNDP (size) ? SCM_I_MAKINUM (31) : size, SCM_EOL, FUNC_NAME);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -614,9 +614,9 @@ scm_socket_symbols_Win32 (socket_error_t * e)
|
||||||
if (e->error)
|
if (e->error)
|
||||||
{
|
{
|
||||||
if (e->correct_str)
|
if (e->correct_str)
|
||||||
scm_c_define (e->correct_str, SCM_MAKINUM (e->error));
|
scm_c_define (e->correct_str, SCM_I_MAKINUM (e->error));
|
||||||
if (e->replace && e->replace_str)
|
if (e->replace && e->replace_str)
|
||||||
scm_c_define (e->replace_str, SCM_MAKINUM (e->replace));
|
scm_c_define (e->replace_str, SCM_I_MAKINUM (e->replace));
|
||||||
}
|
}
|
||||||
e++;
|
e++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
return SCM_MAKINUM (count);
|
return scm_from_long (count);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ SCM_DEFINE (scm_srfi1_length_plus, "length+", 1, 0, 0,
|
||||||
#define FUNC_NAME s_scm_srfi1_length_plus
|
#define FUNC_NAME s_scm_srfi1_length_plus
|
||||||
{
|
{
|
||||||
long len = scm_ilength (lst);
|
long len = scm_ilength (lst);
|
||||||
return (len >= 0 ? SCM_MAKINUM (len) : SCM_BOOL_F);
|
return (len >= 0 ? SCM_I_MAKINUM (len) : SCM_BOOL_F);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
132
srfi/srfi-13.c
132
srfi/srfi-13.c
|
@ -111,7 +111,7 @@ SCM_DEFINE (scm_string_tabulate, "string-tabulate", 2, 0, 0,
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < clen)
|
while (i < clen)
|
||||||
{
|
{
|
||||||
ch = scm_call_1 (proc, SCM_MAKINUM (i));
|
ch = scm_call_1 (proc, SCM_I_MAKINUM (i));
|
||||||
if (!SCM_CHARP (ch))
|
if (!SCM_CHARP (ch))
|
||||||
SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 (proc));
|
SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 (proc));
|
||||||
*p++ = SCM_CHAR (ch);
|
*p++ = SCM_CHAR (ch);
|
||||||
|
@ -368,7 +368,7 @@ SCM_DEFINE (scm_substring_shared, "substring/shared", 2, 1, 0,
|
||||||
SCM_VALIDATE_STRING (1, str);
|
SCM_VALIDATE_STRING (1, str);
|
||||||
SCM_VALIDATE_INUM (2, start);
|
SCM_VALIDATE_INUM (2, start);
|
||||||
if (SCM_UNBNDP (end))
|
if (SCM_UNBNDP (end))
|
||||||
end = SCM_MAKINUM (SCM_STRING_LENGTH (str));
|
end = SCM_I_MAKINUM (SCM_STRING_LENGTH (str));
|
||||||
else
|
else
|
||||||
SCM_VALIDATE_INUM (3, end);
|
SCM_VALIDATE_INUM (3, end);
|
||||||
if (SCM_INUM (start) == 0 &&
|
if (SCM_INUM (start) == 0 &&
|
||||||
|
@ -860,18 +860,18 @@ SCM_DEFINE (scm_string_compare, "string-compare", 5, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return scm_call_1 (proc_lt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_lt, SCM_I_MAKINUM (cstart1));
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return scm_call_1 (proc_gt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_gt, SCM_I_MAKINUM (cstart1));
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return scm_call_1 (proc_gt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_gt, SCM_I_MAKINUM (cstart1));
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return scm_call_1 (proc_lt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_lt, SCM_I_MAKINUM (cstart1));
|
||||||
else
|
else
|
||||||
return scm_call_1 (proc_eq, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_eq, SCM_I_MAKINUM (cstart1));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -903,18 +903,18 @@ SCM_DEFINE (scm_string_compare_ci, "string-compare-ci", 5, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return scm_call_1 (proc_lt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_lt, SCM_I_MAKINUM (cstart1));
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return scm_call_1 (proc_gt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_gt, SCM_I_MAKINUM (cstart1));
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return scm_call_1 (proc_gt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_gt, SCM_I_MAKINUM (cstart1));
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return scm_call_1 (proc_lt, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_lt, SCM_I_MAKINUM (cstart1));
|
||||||
else
|
else
|
||||||
return scm_call_1 (proc_eq, SCM_MAKINUM (cstart1));
|
return scm_call_1 (proc_eq, SCM_I_MAKINUM (cstart1));
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -949,7 +949,7 @@ SCM_DEFINE (scm_string_eq, "string=", 2, 4, 0,
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -973,16 +973,16 @@ SCM_DEFINE (scm_string_neq, "string<>", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +1008,7 @@ SCM_DEFINE (scm_string_lt, "string<", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
|
@ -1017,7 +1017,7 @@ SCM_DEFINE (scm_string_lt, "string<", 2, 4, 0,
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -1045,12 +1045,12 @@ SCM_DEFINE (scm_string_gt, "string>", 2, 4, 0,
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
|
@ -1078,7 +1078,7 @@ SCM_DEFINE (scm_string_le, "string<=", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
|
@ -1087,9 +1087,9 @@ SCM_DEFINE (scm_string_le, "string<=", 2, 4, 0,
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1115,16 +1115,16 @@ SCM_DEFINE (scm_string_ge, "string>=", 2, 4, 0,
|
||||||
if (cstr1[cstart1] < cstr2[cstart2])
|
if (cstr1[cstart1] < cstr2[cstart2])
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstr1[cstart1] > cstr2[cstart2])
|
else if (cstr1[cstart1] > cstr2[cstart2])
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1160,7 +1160,7 @@ SCM_DEFINE (scm_string_ci_eq, "string-ci=", 2, 4, 0,
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1185,16 +1185,16 @@ SCM_DEFINE (scm_string_ci_neq, "string-ci<>", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -1221,7 +1221,7 @@ SCM_DEFINE (scm_string_ci_lt, "string-ci<", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
|
@ -1230,7 +1230,7 @@ SCM_DEFINE (scm_string_ci_lt, "string-ci<", 2, 4, 0,
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
@ -1259,12 +1259,12 @@ SCM_DEFINE (scm_string_ci_gt, "string-ci>", 2, 4, 0,
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
|
@ -1293,7 +1293,7 @@ SCM_DEFINE (scm_string_ci_le, "string-ci<=", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
|
@ -1302,9 +1302,9 @@ SCM_DEFINE (scm_string_ci_le, "string-ci<=", 2, 4, 0,
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1331,16 +1331,16 @@ SCM_DEFINE (scm_string_ci_ge, "string-ci>=", 2, 4, 0,
|
||||||
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) < scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
else if (scm_c_downcase (cstr1[cstart1]) > scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
if (cstart1 < cend1)
|
if (cstart1 < cend1)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
else if (cstart2 < cend2)
|
else if (cstart2 < cend2)
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
else
|
else
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1364,12 +1364,12 @@ SCM_DEFINE (scm_string_prefix_length, "string-prefix-length", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (cstr1[cstart1] != cstr2[cstart2])
|
if (cstr1[cstart1] != cstr2[cstart2])
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
len++;
|
len++;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1393,12 +1393,12 @@ SCM_DEFINE (scm_string_prefix_length_ci, "string-prefix-length-ci", 2, 4, 0,
|
||||||
while (cstart1 < cend1 && cstart2 < cend2)
|
while (cstart1 < cend1 && cstart2 < cend2)
|
||||||
{
|
{
|
||||||
if (scm_c_downcase (cstr1[cstart1]) != scm_c_downcase (cstr2[cstart2]))
|
if (scm_c_downcase (cstr1[cstart1]) != scm_c_downcase (cstr2[cstart2]))
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
len++;
|
len++;
|
||||||
cstart1++;
|
cstart1++;
|
||||||
cstart2++;
|
cstart2++;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1424,10 +1424,10 @@ SCM_DEFINE (scm_string_suffix_length, "string-suffix-length", 2, 4, 0,
|
||||||
cend1--;
|
cend1--;
|
||||||
cend2--;
|
cend2--;
|
||||||
if (cstr1[cend1] != cstr2[cend2])
|
if (cstr1[cend1] != cstr2[cend2])
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1453,10 +1453,10 @@ SCM_DEFINE (scm_string_suffix_length_ci, "string-suffix-length-ci", 2, 4, 0,
|
||||||
cend1--;
|
cend1--;
|
||||||
cend2--;
|
cend2--;
|
||||||
if (scm_c_downcase (cstr1[cend1]) != scm_c_downcase (cstr2[cend2]))
|
if (scm_c_downcase (cstr1[cend1]) != scm_c_downcase (cstr2[cend2]))
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (len);
|
return SCM_I_MAKINUM (len);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1608,7 +1608,7 @@ SCM_DEFINE (scm_string_indexS, "string-index", 2, 2, 0,
|
||||||
while (cstart < cend)
|
while (cstart < cend)
|
||||||
{
|
{
|
||||||
if (cchr == cstr[cstart])
|
if (cchr == cstr[cstart])
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1617,7 +1617,7 @@ SCM_DEFINE (scm_string_indexS, "string-index", 2, 2, 0,
|
||||||
while (cstart < cend)
|
while (cstart < cend)
|
||||||
{
|
{
|
||||||
if (SCM_CHARSET_GET (char_pred, cstr[cstart]))
|
if (SCM_CHARSET_GET (char_pred, cstr[cstart]))
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1629,7 +1629,7 @@ SCM_DEFINE (scm_string_indexS, "string-index", 2, 2, 0,
|
||||||
SCM res;
|
SCM res;
|
||||||
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
|
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
|
||||||
if (scm_is_true (res))
|
if (scm_is_true (res))
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1668,7 +1668,7 @@ SCM_DEFINE (scm_string_index_right, "string-index-right", 2, 2, 0,
|
||||||
{
|
{
|
||||||
cend--;
|
cend--;
|
||||||
if (cchr == cstr[cend])
|
if (cchr == cstr[cend])
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SCM_CHARSETP (char_pred))
|
else if (SCM_CHARSETP (char_pred))
|
||||||
|
@ -1677,7 +1677,7 @@ SCM_DEFINE (scm_string_index_right, "string-index-right", 2, 2, 0,
|
||||||
{
|
{
|
||||||
cend--;
|
cend--;
|
||||||
if (SCM_CHARSET_GET (char_pred, cstr[cend]))
|
if (SCM_CHARSET_GET (char_pred, cstr[cend]))
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1689,7 +1689,7 @@ SCM_DEFINE (scm_string_index_right, "string-index-right", 2, 2, 0,
|
||||||
cend--;
|
cend--;
|
||||||
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
|
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
|
||||||
if (scm_is_true (res))
|
if (scm_is_true (res))
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
@ -1727,7 +1727,7 @@ SCM_DEFINE (scm_string_skip, "string-skip", 2, 2, 0,
|
||||||
while (cstart < cend)
|
while (cstart < cend)
|
||||||
{
|
{
|
||||||
if (cchr != cstr[cstart])
|
if (cchr != cstr[cstart])
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1736,7 +1736,7 @@ SCM_DEFINE (scm_string_skip, "string-skip", 2, 2, 0,
|
||||||
while (cstart < cend)
|
while (cstart < cend)
|
||||||
{
|
{
|
||||||
if (!SCM_CHARSET_GET (char_pred, cstr[cstart]))
|
if (!SCM_CHARSET_GET (char_pred, cstr[cstart]))
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1748,7 +1748,7 @@ SCM_DEFINE (scm_string_skip, "string-skip", 2, 2, 0,
|
||||||
SCM res;
|
SCM res;
|
||||||
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
|
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
|
||||||
if (scm_is_false (res))
|
if (scm_is_false (res))
|
||||||
return SCM_MAKINUM (cstart);
|
return SCM_I_MAKINUM (cstart);
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1788,7 @@ SCM_DEFINE (scm_string_skip_right, "string-skip-right", 2, 2, 0,
|
||||||
{
|
{
|
||||||
cend--;
|
cend--;
|
||||||
if (cchr != cstr[cend])
|
if (cchr != cstr[cend])
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SCM_CHARSETP (char_pred))
|
else if (SCM_CHARSETP (char_pred))
|
||||||
|
@ -1797,7 +1797,7 @@ SCM_DEFINE (scm_string_skip_right, "string-skip-right", 2, 2, 0,
|
||||||
{
|
{
|
||||||
cend--;
|
cend--;
|
||||||
if (!SCM_CHARSET_GET (char_pred, cstr[cend]))
|
if (!SCM_CHARSET_GET (char_pred, cstr[cend]))
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1809,7 +1809,7 @@ SCM_DEFINE (scm_string_skip_right, "string-skip-right", 2, 2, 0,
|
||||||
cend--;
|
cend--;
|
||||||
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
|
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
|
||||||
if (scm_is_false (res))
|
if (scm_is_false (res))
|
||||||
return SCM_MAKINUM (cend);
|
return SCM_I_MAKINUM (cend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
@ -1872,7 +1872,7 @@ SCM_DEFINE (scm_string_count, "string-count", 2, 2, 0,
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -1909,7 +1909,7 @@ SCM_DEFINE (scm_string_contains, "string-contains", 2, 4, 0,
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
if (j == cend2)
|
if (j == cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
}
|
}
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
@ -1951,7 +1951,7 @@ SCM_DEFINE (scm_string_contains_ci, "string-contains-ci", 2, 4, 0,
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
if (j == cend2)
|
if (j == cend2)
|
||||||
return SCM_MAKINUM (cstart1);
|
return SCM_I_MAKINUM (cstart1);
|
||||||
cstart1++;
|
cstart1++;
|
||||||
}
|
}
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
@ -2652,7 +2652,7 @@ SCM_DEFINE (scm_string_for_each_index, "string-for-each-index", 2, 2, 0,
|
||||||
4, end, cend);
|
4, end, cend);
|
||||||
while (cstart < cend)
|
while (cstart < cend)
|
||||||
{
|
{
|
||||||
scm_call_1 (proc, SCM_MAKINUM (cstart));
|
scm_call_1 (proc, SCM_I_MAKINUM (cstart));
|
||||||
cstart++;
|
cstart++;
|
||||||
}
|
}
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
|
|
|
@ -186,7 +186,7 @@ SCM_DEFINE (scm_char_set_hash, "char-set-hash", 1, 1, 0,
|
||||||
if (p[k] != 0)
|
if (p[k] != 0)
|
||||||
val = p[k] + (val << 1);
|
val = p[k] + (val << 1);
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (val % bnd);
|
return SCM_I_MAKINUM (val % bnd);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ SCM_DEFINE (scm_char_set_cursor, "char-set-cursor", 1, 0, 0,
|
||||||
if (SCM_CHARSET_GET (cs, idx))
|
if (SCM_CHARSET_GET (cs, idx))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (idx);
|
return SCM_I_MAKINUM (idx);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ SCM_DEFINE (scm_char_set_cursor_next, "char-set-cursor-next", 2, 0, 0,
|
||||||
if (SCM_CHARSET_GET (cs, ccursor))
|
if (SCM_CHARSET_GET (cs, ccursor))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (ccursor);
|
return SCM_I_MAKINUM (ccursor);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ SCM_DEFINE (scm_char_set_size, "char-set-size", 1, 0, 0,
|
||||||
for (k = 0; k < SCM_CHARSET_SIZE; k++)
|
for (k = 0; k < SCM_CHARSET_SIZE; k++)
|
||||||
if (SCM_CHARSET_GET (cs, k))
|
if (SCM_CHARSET_GET (cs, k))
|
||||||
count++;
|
count++;
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
@ -775,7 +775,7 @@ SCM_DEFINE (scm_char_set_count, "char-set-count", 2, 0, 0,
|
||||||
if (scm_is_true (res))
|
if (scm_is_true (res))
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (count);
|
return SCM_I_MAKINUM (count);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ SCM_DEFINE (scm_make_u8vector, "make-u8vector", 1, 1, 0,
|
||||||
unsigned int s = scm_num2uint (fill, 2, FUNC_NAME);
|
unsigned int s = scm_num2uint (fill, 2, FUNC_NAME);
|
||||||
f = s;
|
f = s;
|
||||||
if ((unsigned int) f != s)
|
if ((unsigned int) f != s)
|
||||||
scm_out_of_range_pos (FUNC_NAME, fill, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, fill, SCM_I_MAKINUM (2));
|
||||||
}
|
}
|
||||||
p = (int_u8 *) SCM_UVEC_BASE (uvec);
|
p = (int_u8 *) SCM_UVEC_BASE (uvec);
|
||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
|
@ -358,7 +358,7 @@ SCM_DEFINE (scm_u8vector_ref, "u8vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_short2num (((int_u8 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_short2num (((int_u8 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -382,12 +382,12 @@ SCM_DEFINE (scm_u8vector_set_x, "u8vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
s = scm_num2uint (value, 3, FUNC_NAME);
|
s = scm_num2uint (value, 3, FUNC_NAME);
|
||||||
f = s;
|
f = s;
|
||||||
if ((unsigned int) f != s)
|
if ((unsigned int) f != s)
|
||||||
scm_out_of_range_pos (FUNC_NAME, value, SCM_MAKINUM (3));
|
scm_out_of_range_pos (FUNC_NAME, value, SCM_I_MAKINUM (3));
|
||||||
|
|
||||||
((int_u8 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
((int_u8 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
|
@ -413,7 +413,7 @@ SCM_DEFINE (scm_u8vector_to_list, "u8vector->list", 1, 0, 0,
|
||||||
while (idx-- > 0)
|
while (idx-- > 0)
|
||||||
{
|
{
|
||||||
p--;
|
p--;
|
||||||
res = scm_cons (SCM_MAKINUM (*p), res);
|
res = scm_cons (SCM_I_MAKINUM (*p), res);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -494,7 +494,7 @@ SCM_DEFINE (scm_make_s8vector, "make-s8vector", 1, 1, 0,
|
||||||
signed int s = scm_num2int (fill, 2, FUNC_NAME);
|
signed int s = scm_num2int (fill, 2, FUNC_NAME);
|
||||||
f = s;
|
f = s;
|
||||||
if ((signed int) f != s)
|
if ((signed int) f != s)
|
||||||
scm_out_of_range_pos (FUNC_NAME, fill, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, fill, SCM_I_MAKINUM (2));
|
||||||
}
|
}
|
||||||
p = (int_s8 *) SCM_UVEC_BASE (uvec);
|
p = (int_s8 *) SCM_UVEC_BASE (uvec);
|
||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
|
@ -544,7 +544,7 @@ SCM_DEFINE (scm_s8vector_ref, "s8vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_short2num (((int_s8 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_short2num (((int_s8 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -568,12 +568,12 @@ SCM_DEFINE (scm_s8vector_set_x, "s8vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
s = scm_num2int (value, 3, FUNC_NAME);
|
s = scm_num2int (value, 3, FUNC_NAME);
|
||||||
f = s;
|
f = s;
|
||||||
if ((signed int) f != s)
|
if ((signed int) f != s)
|
||||||
scm_out_of_range_pos (FUNC_NAME, value, SCM_MAKINUM (3));
|
scm_out_of_range_pos (FUNC_NAME, value, SCM_I_MAKINUM (3));
|
||||||
|
|
||||||
((int_s8 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
((int_s8 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
|
@ -599,7 +599,7 @@ SCM_DEFINE (scm_s8vector_to_list, "s8vector->list", 1, 0, 0,
|
||||||
while (idx-- > 0)
|
while (idx-- > 0)
|
||||||
{
|
{
|
||||||
p--;
|
p--;
|
||||||
res = scm_cons (SCM_MAKINUM (*p), res);
|
res = scm_cons (SCM_I_MAKINUM (*p), res);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -727,7 +727,7 @@ SCM_DEFINE (scm_u16vector_ref, "u16vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_ushort2num (((int_u16 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_ushort2num (((int_u16 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ SCM_DEFINE (scm_u16vector_set_x, "u16vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2ushort (value, 3, FUNC_NAME);
|
f = scm_num2ushort (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ SCM_DEFINE (scm_u16vector_to_list, "u16vector->list", 1, 0, 0,
|
||||||
while (idx-- > 0)
|
while (idx-- > 0)
|
||||||
{
|
{
|
||||||
p--;
|
p--;
|
||||||
res = scm_cons (SCM_MAKINUM (*p), res);
|
res = scm_cons (SCM_I_MAKINUM (*p), res);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -897,7 +897,7 @@ SCM_DEFINE (scm_s16vector_ref, "s16vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_short2num (((int_s16 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_short2num (((int_s16 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -920,7 +920,7 @@ SCM_DEFINE (scm_s16vector_set_x, "s16vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2short (value, 3, FUNC_NAME);
|
f = scm_num2short (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -948,7 +948,7 @@ SCM_DEFINE (scm_s16vector_to_list, "s16vector->list", 1, 0, 0,
|
||||||
while (idx-- > 0)
|
while (idx-- > 0)
|
||||||
{
|
{
|
||||||
p--;
|
p--;
|
||||||
res = scm_cons (SCM_MAKINUM (*p), res);
|
res = scm_cons (SCM_I_MAKINUM (*p), res);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1070,7 +1070,7 @@ SCM_DEFINE (scm_u32vector_ref, "u32vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_uint2num (((int_u32 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_uint2num (((int_u32 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1093,7 +1093,7 @@ SCM_DEFINE (scm_u32vector_set_x, "u32vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2uint (value, 3, FUNC_NAME);
|
f = scm_num2uint (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -1241,7 +1241,7 @@ SCM_DEFINE (scm_s32vector_ref, "s32vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_int2num (((int_s32 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_int2num (((int_s32 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1264,7 +1264,7 @@ SCM_DEFINE (scm_s32vector_set_x, "s32vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2int (value, 3, FUNC_NAME);
|
f = scm_num2int (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ SCM_DEFINE (scm_u64vector_ref, "u64vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_ulong_long2num (((int_u64 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_ulong_long2num (((int_u64 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1437,7 +1437,7 @@ SCM_DEFINE (scm_u64vector_set_x, "u64vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2ulong_long (value, 3, FUNC_NAME);
|
f = scm_num2ulong_long (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -1585,7 +1585,7 @@ SCM_DEFINE (scm_s64vector_ref, "s64vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_long_long2num (((int_s64 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_long_long2num (((int_s64 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1608,7 +1608,7 @@ SCM_DEFINE (scm_s64vector_set_x, "s64vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2long_long (value, 3, FUNC_NAME);
|
f = scm_num2long_long (value, 3, FUNC_NAME);
|
||||||
|
|
||||||
|
@ -1716,7 +1716,7 @@ SCM_DEFINE (scm_make_f32vector, "make-f32vector", 1, 1, 0,
|
||||||
/* This test somehow fails for even the simplest inexact
|
/* This test somehow fails for even the simplest inexact
|
||||||
numbers, like 3.1. Must find out how to check properly. */
|
numbers, like 3.1. Must find out how to check properly. */
|
||||||
if (f != d)
|
if (f != d)
|
||||||
scm_out_of_range_pos (FUNC_NAME, fill, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, fill, SCM_I_MAKINUM (2));
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
}
|
}
|
||||||
p = (float_f32 *) SCM_UVEC_BASE (uvec);
|
p = (float_f32 *) SCM_UVEC_BASE (uvec);
|
||||||
|
@ -1767,7 +1767,7 @@ SCM_DEFINE (scm_f32vector_ref, "f32vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_make_real (((float_f32 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_make_real (((float_f32 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1791,7 +1791,7 @@ SCM_DEFINE (scm_f32vector_set_x, "f32vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
d = scm_num2dbl (value, FUNC_NAME);
|
d = scm_num2dbl (value, FUNC_NAME);
|
||||||
f = d;
|
f = d;
|
||||||
|
@ -1799,7 +1799,7 @@ SCM_DEFINE (scm_f32vector_set_x, "f32vector-set!", 3, 0, 0,
|
||||||
/* This test somehow fails for even the simplest inexact
|
/* This test somehow fails for even the simplest inexact
|
||||||
numbers, like 3.1. Must find out how to check properly. */
|
numbers, like 3.1. Must find out how to check properly. */
|
||||||
if (f != d)
|
if (f != d)
|
||||||
scm_out_of_range_pos (FUNC_NAME, value, SCM_MAKINUM (3));
|
scm_out_of_range_pos (FUNC_NAME, value, SCM_I_MAKINUM (3));
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
((float_f32 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
((float_f32 *) SCM_UVEC_BASE (uvec))[idx] = f;
|
||||||
|
@ -1858,7 +1858,7 @@ SCM_DEFINE (scm_list_to_f32vector, "list->f32vector", 1, 0, 0,
|
||||||
/* This test somehow fails for even the simplest inexact
|
/* This test somehow fails for even the simplest inexact
|
||||||
numbers, like 3.1. Must find out how to check properly. */
|
numbers, like 3.1. Must find out how to check properly. */
|
||||||
if (d != f)
|
if (d != f)
|
||||||
scm_out_of_range_pos (FUNC_NAME, l, SCM_MAKINUM (1));
|
scm_out_of_range_pos (FUNC_NAME, l, SCM_I_MAKINUM (1));
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
*p++ = f;
|
*p++ = f;
|
||||||
l = SCM_CDR (l);
|
l = SCM_CDR (l);
|
||||||
|
@ -1954,7 +1954,7 @@ SCM_DEFINE (scm_f64vector_ref, "f64vector-ref", 2, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
return scm_make_real (((float_f64 *) SCM_UVEC_BASE (uvec))[idx]);
|
return scm_make_real (((float_f64 *) SCM_UVEC_BASE (uvec))[idx]);
|
||||||
}
|
}
|
||||||
|
@ -1977,7 +1977,7 @@ SCM_DEFINE (scm_f64vector_set_x, "f64vector-set!", 3, 0, 0,
|
||||||
|
|
||||||
idx = scm_num2int (index, 2, FUNC_NAME);
|
idx = scm_num2int (index, 2, FUNC_NAME);
|
||||||
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
if (idx < 0 || idx >= SCM_UVEC_LENGTH (uvec))
|
||||||
scm_out_of_range_pos (FUNC_NAME, index, SCM_MAKINUM (2));
|
scm_out_of_range_pos (FUNC_NAME, index, SCM_I_MAKINUM (2));
|
||||||
|
|
||||||
f = scm_num2dbl (value, FUNC_NAME);
|
f = scm_num2dbl (value, FUNC_NAME);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue