diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-07-08 15:58:11 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-07-08 15:58:11 +0000 |
commit | 93ccaef0c60868bb1a6e0747387ce34c0172b53e (patch) | |
tree | 867f5f7dbb2cdf28ed68ce2bac89f0c8878be657 /libguile/ramap.c | |
parent | 43240c9caf66f802ba50df685e3e8b44e38906a5 (diff) | |
download | guile-93ccaef0c60868bb1a6e0747387ce34c0172b53e.tar.gz |
* numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
Diffstat (limited to 'libguile/ramap.c')
-rw-r--r-- | libguile/ramap.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/libguile/ramap.c b/libguile/ramap.c index 8f057fc0c..f570d4807 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -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_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); for (k = 0; k <= kmax; k++) 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: 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; case scm_tc7_vector: case scm_tc7_wvect: @@ -473,7 +473,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore SCM_UNUSED) break; case scm_tc7_byvect: if (SCM_CHARP (fill)) - fill = SCM_MAKINUM ((char) SCM_CHAR (fill)); + fill = SCM_I_MAKINUM ((char) SCM_CHAR (fill)); SCM_ASRTGO (SCM_INUMP (fill) && -128 <= SCM_INUM (fill) && SCM_INUM (fill) < 128, badarg2); @@ -625,7 +625,7 @@ racp (SCM src, SCM dst) for (; n-- > 0; i_s += inc_s, i_d += inc_d) scm_array_set_x (dst, scm_cvref (src, i_s, SCM_UNDEFINED), - SCM_MAKINUM (i_d)); + SCM_I_MAKINUM (i_d)); break; case 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; for (; n-- > 0; i0 += inc0, i1 += inc1) scm_array_set_x (ra0, scm_sum (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); break; } case scm_tc7_uvect: @@ -1028,7 +1028,7 @@ scm_ra_difference (SCM ra0, SCM ras) for (; n-- > 0; i0 += inc0) scm_array_set_x (ra0, scm_difference (RVREF (ra0, i0, e0), SCM_UNDEFINED), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); break; } case scm_tc7_fvect: @@ -1051,7 +1051,7 @@ scm_ra_difference (SCM ra0, SCM ras) { SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED; 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; } case scm_tc7_fvect: @@ -1087,7 +1087,7 @@ scm_ra_product (SCM ra0, SCM ras) SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED; for (; n-- > 0; i0 += inc0, i1 += inc1) scm_array_set_x (ra0, scm_product (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); break; } case scm_tc7_uvect: @@ -1133,7 +1133,7 @@ scm_ra_divide (SCM ra0, SCM ras) { SCM e0 = SCM_UNDEFINED; 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; } case scm_tc7_fvect: @@ -1166,7 +1166,7 @@ scm_ra_divide (SCM ra0, SCM ras) { SCM e0 = SCM_UNDEFINED, e1 = SCM_UNDEFINED; 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; } case scm_tc7_fvect: @@ -1213,7 +1213,7 @@ ramap (SCM ra0, SCM proc, SCM ras) ra0 = SCM_ARRAY_V (ra0); if (SCM_NULLP (ras)) 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 { SCM ra1 = SCM_CAR (ras); @@ -1235,9 +1235,9 @@ ramap (SCM ra0, SCM proc, SCM ras) { args = SCM_EOL; 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); - 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; @@ -1259,7 +1259,7 @@ ramap_dsubr (SCM ra0, SCM proc, SCM ras) default: gencase: 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; 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 the values fit into an inum? */ - SCM n1 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra1)))[i1]); - SCM n2 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra2)))[i2]); + SCM n1 = SCM_I_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra1)))[i1]); + SCM n2 = SCM_I_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra2)))[i2]); if (scm_is_false (SCM_SUBRF (proc) (n1, n2))) SCM_BITVEC_CLR (ra0, i0); } @@ -1402,10 +1402,10 @@ ramap_1 (SCM ra0, SCM proc, SCM ras) ra1 = SCM_ARRAY_V (ra1); if (scm_tc7_vector == SCM_TYP7 (ra0) || scm_tc7_wvect == SCM_TYP7 (ra0)) 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 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; } @@ -1429,11 +1429,11 @@ ramap_2o (SCM ra0, SCM proc, SCM ras) for (; n-- > 0; i0 += inc0, i1 += inc1) scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), SCM_UNDEFINED), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); else for (; n-- > 0; i0 += inc0, i1 += inc1) scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1), SCM_UNDEFINED), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); } else { @@ -1446,12 +1446,12 @@ ramap_2o (SCM ra0, SCM proc, SCM ras) for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2) scm_array_set_x (ra0, SCM_SUBRF (proc) (scm_cvref (ra1, i1, SCM_UNDEFINED), scm_cvref (ra2, i2, SCM_UNDEFINED)), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); else for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2) scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2)), - SCM_MAKINUM (i0)); + SCM_I_MAKINUM (i0)); } return 1; } @@ -1468,7 +1468,7 @@ ramap_a (SCM ra0, SCM proc, SCM ras) ra0 = SCM_ARRAY_V (ra0); if (SCM_NULLP (ras)) 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 { SCM ra1 = SCM_CAR (ras); @@ -1477,7 +1477,7 @@ ramap_a (SCM ra0, SCM proc, SCM ras) ra1 = SCM_ARRAY_V (ra1); for (; n-- > 0; i0 += inc0, i1 += inc1) 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; } @@ -1628,7 +1628,7 @@ rafe (SCM ra0, SCM proc, SCM ras) { args = SCM_EOL; 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); 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: { 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; } 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)); for (i = 0; i < length; i++) - scm_array_set_x (ra, scm_call_1 (proc, SCM_MAKINUM (i)), - SCM_MAKINUM (i)); + scm_array_set_x (ra, scm_call_1 (proc, SCM_I_MAKINUM (i)), + SCM_I_MAKINUM (i)); return SCM_UNSPECIFIED; } case scm_tc7_smob: SCM_ASRTGO (SCM_ARRAYP (ra), badarg); { 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); int j, k, kmax = SCM_ARRAY_NDIM (ra) - 1; 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 (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_apply_0 (proc, args), - SCM_MAKINUM (i)); + SCM_I_MAKINUM (i)); i += SCM_ARRAY_DIMS (ra)[k].inc; } k--; |