*/
static char s_vector_set_length_x[] = "vector-set-length!";
-#ifdef __STDC__
-SCM
-scm_vector_set_length_x (SCM vect, SCM len)
-#else
+
SCM
scm_vector_set_length_x (vect, len)
SCM vect;
SCM len;
-#endif
{
long l;
scm_sizet siz;
#ifdef SCM_FLOATS
#ifdef SCM_SINGLES
-#ifdef __STDC__
-SCM
-scm_makflo (float x)
-#else
+
SCM
scm_makflo (x)
float x;
-#endif
{
SCM z;
if (x == 0.0)
#endif
#endif
-#ifdef __STDC__
-SCM
-scm_make_uve (long k, SCM prot)
-#else
+
SCM
scm_make_uve (k, prot)
long k;
SCM prot;
-#endif
{
SCM v;
long i, type;
}
SCM_PROC(s_uniform_vector_length, "uniform-vector-length", 1, 0, 0, scm_uniform_vector_length);
-#ifdef __STDC__
-SCM
-scm_uniform_vector_length (SCM v)
-#else
+
SCM
scm_uniform_vector_length (v)
SCM v;
-#endif
{
SCM_ASRTGO (SCM_NIMP (v), badarg1);
switch SCM_TYP7
}
SCM_PROC(s_array_p, "array?", 1, 1, 0, scm_array_p);
-#ifdef __STDC__
-SCM
-scm_array_p (SCM v, SCM prot)
-#else
+
SCM
scm_array_p (v, prot)
SCM v;
SCM prot;
-#endif
{
int nprot;
int enclosed;
SCM_PROC(s_array_rank, "array-rank", 1, 0, 0, scm_array_rank);
-#ifdef __STDC__
-SCM
-scm_array_rank (SCM ra)
-#else
+
SCM
scm_array_rank (ra)
SCM ra;
-#endif
{
if (SCM_IMP (ra))
return SCM_INUM0;
SCM_PROC(s_array_dimensions, "array-dimensions", 1, 0, 0, scm_array_dimensions);
-#ifdef __STDC__
-SCM
-scm_array_dimensions (SCM ra)
-#else
+
SCM
scm_array_dimensions (ra)
SCM ra;
-#endif
{
SCM res = SCM_EOL;
scm_sizet k;
static char s_bad_ind[] = "Bad scm_array index";
-#ifdef __STDC__
-long
-scm_aind (SCM ra, SCM args, char *what)
-#else
+
long
scm_aind (ra, args, what)
- SCM ra,
+ SCM ra;
SCM args;
char *what;
-#endif
{
SCM ind;
register long j;
}
-#ifdef __STDC__
-SCM
-scm_make_ra (int ndim)
-#else
+
SCM
scm_make_ra (ndim)
int ndim;
-#endif
{
SCM ra;
SCM_NEWCELL (ra);
static char s_bad_spec[] = "Bad scm_array dimension";
/* Increments will still need to be set. */
-#ifdef __STDC__
-SCM
-scm_shap2ra (SCM args, char *what)
-#else
+
SCM
scm_shap2ra (args, what)
SCM args;
char *what;
-#endif
{
scm_array_dim *s;
SCM ra, spec, sp;
}
SCM_PROC(s_dimensions_to_uniform_array, "dimensions->uniform-array", 2, 0, 1, scm_dimensions_to_uniform_array);
-#ifdef __STDC__
-SCM
-scm_dimensions_to_uniform_array (SCM dims, SCM prot, SCM fill)
-#else
+
SCM
scm_dimensions_to_uniform_array (dims, prot, fill)
SCM dims;
SCM prot;
SCM fill;
-#endif
{
scm_sizet k, vlen = 1;
long rlen = 1;
return ra;
}
-#ifdef __STDC__
-void
-scm_ra_set_contp (SCM ra)
-#else
+
void
scm_ra_set_contp (ra)
SCM ra;
-#endif
{
scm_sizet k = SCM_ARRAY_NDIM (ra);
if (k)
SCM_PROC(s_make_shared_array, "make-shared-array", 2, 0, 1, scm_make_shared_array);
-#ifdef __STDC__
-SCM
-scm_make_shared_array (SCM oldra, SCM mapfunc, SCM dims)
-#else
+
SCM
scm_make_shared_array (oldra, mapfunc, dims)
SCM oldra;
SCM mapfunc;
SCM dims;
-#endif
{
SCM ra;
SCM inds, indptr;
/* args are RA . DIMS */
SCM_PROC(s_transpose_array, "transpose-array", 0, 0, 1, scm_transpose_array);
-#ifdef __STDC__
-SCM
-scm_transpose_array (SCM args)
-#else
+
SCM
scm_transpose_array (args)
SCM args;
-#endif
{
SCM ra, res, vargs, *ve = &vargs;
scm_array_dim *s, *r;
/* args are RA . AXES */
SCM_PROC(s_enclose_array, "enclose-array", 0, 0, 1, scm_enclose_array);
-#ifdef __STDC__
-SCM
-scm_enclose_array (SCM axes)
-#else
+
SCM
scm_enclose_array (axes)
SCM axes;
-#endif
{
SCM axv, ra, res, ra_inr;
scm_array_dim vdim, *s = &vdim;
SCM_PROC(s_array_in_bounds_p, "array-in-bounds?", 0, 0, 1, scm_array_in_bounds_p);
-#ifdef __STDC__
-SCM
-scm_array_in_bounds_p (SCM args)
-#else
+
SCM
scm_array_in_bounds_p (args)
SCM args;
-#endif
{
SCM v, ind = SCM_EOL;
long pos = 0;
SCM_PROC(s_array_ref, "array-ref", 1, 0, 1, scm_uniform_vector_ref);
SCM_PROC(s_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0, scm_uniform_vector_ref);
-#ifdef __STDC__
-SCM
-scm_uniform_vector_ref (SCM v, SCM args)
-#else
+
SCM
scm_uniform_vector_ref (v, args)
SCM v;
SCM args;
-#endif
{
long pos;
if (SCM_IMP (v))
/* Internal version of scm_uniform_vector_ref for uves that does no error checking and
tries to recycle conses. (Make *sure* you want them recycled.) */
-#ifdef __STDC__
-SCM
-scm_cvref (SCM v, scm_sizet pos, SCM last)
-#else
+
SCM
scm_cvref (v, pos, last)
SCM v;
scm_sizet pos;
SCM last;
-#endif
{
switch SCM_TYP7
(v)
SCM_PROC(s_uniform_array_set1_x, "uniform-array-set1!", 3, 0, 0, scm_array_set_x);
SCM_PROC(s_array_set_x, "array-set!", 2, 0, 1, scm_array_set_x);
-#ifdef __STDC__
-SCM
-scm_array_set_x (SCM v, SCM obj, SCM args)
-#else
+
SCM
scm_array_set_x (v, obj, args)
SCM v;
SCM obj;
SCM args;
-#endif
{
long pos;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
}
SCM_PROC(s_array_contents, "array-contents", 1, 1, 0, scm_array_contents);
-#ifdef __STDC__
-SCM
-scm_array_contents (SCM ra, SCM strict)
-#else
+
SCM
scm_array_contents (ra, strict)
SCM ra;
SCM strict;
-#endif
{
SCM sra;
if (SCM_IMP (ra))
}
}
-#ifdef __STDC__
-SCM
-scm_ra2contig (SCM ra, int copy)
-#else
+
SCM
scm_ra2contig (ra, copy)
SCM ra;
int copy;
-#endif
{
SCM ret;
long inc = 1;
SCM_PROC(s_uniform_array_read_x, "uniform-array-read!", 1, 1, 0, scm_uniform_array_read_x);
-#ifdef __STDC__
-SCM
-scm_uniform_array_read_x (SCM ra, SCM port)
-#else
+
SCM
scm_uniform_array_read_x (ra, port)
SCM ra;
SCM port;
-#endif
{
SCM cra, v = ra;
long sz, len, ans;
}
SCM_PROC(s_uniform_array_write, "uniform-array-write", 1, 1, 0, scm_uniform_array_write);
-#ifdef __STDC__
-SCM
-scm_uniform_array_write (SCM v, SCM port)
-#else
+
SCM
scm_uniform_array_write (v, port)
SCM v;
SCM port;
-#endif
{
long sz, len, ans;
long start = 0;
{0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
SCM_PROC(s_bit_count, "bit-count", 2, 0, 0, scm_bit_count);
-#ifdef __STDC__
-SCM
-scm_bit_count (SCM item, SCM seq)
-#else
+
SCM
scm_bit_count (item, seq)
SCM item;
SCM seq;
-#endif
{
long i;
register unsigned long cnt = 0, w;
SCM_PROC(s_bit_position, "bit-position", 3, 0, 0, scm_bit_position);
-#ifdef __STDC__
-SCM
-scm_bit_position (SCM item, SCM v, SCM k)
-#else
+
SCM
scm_bit_position (item, v, k)
SCM item;
SCM v;
SCM k;
-#endif
{
long i, lenw, xbits, pos = SCM_INUM (k);
register unsigned long w;
SCM_PROC(s_bit_set_star_x, "bit-set*!", 3, 0, 0, scm_bit_set_star_x);
-#ifdef __STDC__
-SCM
-scm_bit_set_star_x (SCM v, SCM kv, SCM obj)
-#else
+
SCM
scm_bit_set_star_x (v, kv, obj)
SCM v;
SCM kv;
SCM obj;
-#endif
{
register long i, k, vlen;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
SCM_PROC(s_bit_count_star, "bit-count*", 3, 0, 0, scm_bit_count_star);
-#ifdef __STDC__
-SCM
-scm_bit_count_star (SCM v, SCM kv, SCM obj)
-#else
+
SCM
scm_bit_count_star (v, kv, obj)
SCM v;
SCM kv;
SCM obj;
-#endif
{
register long i, vlen, count = 0;
register unsigned long k;
SCM_PROC(s_bit_invert_x, "bit-invert!", 1, 0, 0, scm_bit_invert_x);
-#ifdef __STDC__
-SCM
-scm_bit_invert_x (SCM v)
-#else
+
SCM
scm_bit_invert_x (v)
SCM v;
-#endif
{
register long k;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
SCM_PROC(s_string_upcase_x, "string-upcase!", 1, 0, 0, scm_string_upcase_x);
-#ifdef __STDC__
-SCM
-scm_string_upcase_x (SCM v)
-#else
+
SCM
scm_string_upcase_x (v)
SCM v;
-#endif
{
register long k;
register unsigned char *cs;
}
SCM_PROC(s_string_downcase_x, "string-downcase!", 1, 0, 0, scm_string_downcase_x);
-#ifdef __STDC__
-SCM
-scm_string_downcase_x (SCM v)
-#else
+
SCM
scm_string_downcase_x (v)
SCM v;
-#endif
{
register long k;
register unsigned char *cs;
}
-#ifdef __STDC__
-SCM
-scm_istr2bve (char *str, long len)
-#else
+
SCM
scm_istr2bve (str, len)
char *str;
long len;
-#endif
{
SCM v = scm_make_uve (len, SCM_BOOL_T);
long *data = (long *) SCM_VELTS (v);
}
-#ifdef __STDC__
-static SCM
-ra2l (SCM ra, scm_sizet base, scm_sizet k)
-#else
+
+static SCM ra2l SCM_P ((SCM ra, scm_sizet base, scm_sizet k));
+
static SCM
ra2l (ra, base, k)
SCM ra;
scm_sizet base;
scm_sizet k;
-#endif
{
register SCM res = SCM_EOL;
register long inc = SCM_ARRAY_DIMS (ra)[k].inc;
SCM_PROC(s_array_to_list, "array->list", 1, 0, 0, scm_array_to_list);
-#ifdef __STDC__
-SCM
-scm_array_to_list (SCM v)
-#else
+
SCM
scm_array_to_list (v)
SCM v;
-#endif
{
SCM res = SCM_EOL;
register long k;
static char s_bad_ralst[] = "Bad scm_array contents scm_list";
-#ifdef __STDC__
-static int l2ra (SCM lst, SCM ra, scm_sizet base, scm_sizet k);
-#else
-static int l2ra ();
-#endif
+
+static int l2ra SCM_P ((SCM lst, SCM ra, scm_sizet base, scm_sizet k));
SCM_PROC(s_list_to_uniform_array, "list->uniform-array", 3, 0, 0, scm_list_to_uniform_array);
-#ifdef __STDC__
-SCM
-scm_list_to_uniform_array (SCM ndim, SCM prot, SCM lst)
-#else
+
SCM
scm_list_to_uniform_array (ndim, prot, lst)
SCM ndim;
SCM prot;
SCM lst;
-#endif
{
SCM shp = SCM_EOL;
SCM row = lst;
return SCM_BOOL_F;
}
-
-#ifdef __STDC__
-static int
-l2ra (SCM lst, SCM ra, scm_sizet base, scm_sizet k)
-#else
static int
l2ra (lst, ra, base, k)
SCM lst;
SCM ra;
scm_sizet base;
scm_sizet k;
-#endif
{
register long inc = SCM_ARRAY_DIMS (ra)[k].inc;
register long n = (1 + SCM_ARRAY_DIMS (ra)[k].ubnd - SCM_ARRAY_DIMS (ra)[k].lbnd);
return ok;
}
-#ifdef __STDC__
-static void
-rapr1 (SCM ra, scm_sizet j, scm_sizet k, SCM port, scm_print_state *pstate)
-#else
+
+static void rapr1 SCM_P ((SCM ra, scm_sizet j, scm_sizet k, SCM port, scm_print_state *pstate));
+
static void
rapr1 (ra, j, k, port, pstate)
SCM ra;
scm_sizet k;
SCM port;
scm_print_state *pstate;
-#endif
{
long inc = 1;
long n = SCM_LENGTH (ra);
}
-#ifdef __STDC__
-int
-scm_raprin1 (SCM exp, SCM port, scm_print_state *pstate)
-#else
+
int
scm_raprin1 (exp, port, pstate)
SCM exp;
SCM port;
scm_print_state *pstate;
-#endif
{
SCM v = exp;
scm_sizet base = 0;
}
SCM_PROC(s_array_prototype, "array-prototype", 1, 0, 0, scm_array_prototype);
-#ifdef __STDC__
-SCM
-scm_array_prototype (SCM ra)
-#else
+
SCM
scm_array_prototype (ra)
SCM ra;
-#endif
{
int enclosed = 0;
SCM_ASRTGO (SCM_NIMP (ra), badarg);
}
}
-#ifdef __STDC__
-static SCM
-markra (SCM ptr)
-#else
+
+static SCM markra SCM_P ((SCM ptr));
+
static SCM
markra (ptr)
SCM ptr;
-#endif
{
if SCM_GC8MARKP
(ptr) return SCM_BOOL_F;
return SCM_ARRAY_V (ptr);
}
-#ifdef __STDC__
-static scm_sizet
-freera (SCM ptr)
-#else
+
+static scm_sizet freera SCM_P ((SCM ptr));
+
static scm_sizet
freera (ptr)
SCM ptr;
-#endif
{
scm_must_free (SCM_CHARS (ptr));
return sizeof (scm_array) + SCM_ARRAY_NDIM (ptr) * sizeof (scm_array_dim);
/* This must be done after scm_init_scl() */
-#ifdef __STDC__
-void
-scm_init_unif (void)
-#else
+
void
scm_init_unif ()
-#endif
{
#include "unif.x"
scm_tc16_array = scm_newsmob (&rasmob);
#else /* ARRAYS */
-#ifdef __STDC__
-int
-scm_raprin1 (SCM exp, SCM port, scm_print_state *pstate)
-#else
+
int
scm_raprin1 (exp, port, pstate)
SCM exp;
SCM port;
scm_print_state *pstate;
-#endif
{
return 0;
}
-#ifdef __STDC__
-SCM
-scm_istr2bve (char *str, long len)
-#else
+
SCM
scm_istr2bve (str, len)
char *str;
long len;
-#endif
{
return SCM_BOOL_F;
}
}
#endif /* ARRAYS */
-
-
-
-