summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-03 17:13:16 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-03 17:13:16 +0000
commit7a72bb4181435e1cdf749dad168d18e0e02c9248 (patch)
treed3705957ca40baab0ac4d58aec144497a06f7b93 /libguile
parent8507ec804fbd7914b23fc535712c1d1ca1093913 (diff)
downloadguile-7a72bb4181435e1cdf749dad168d18e0e02c9248.tar.gz
(scm_make_complex): Discouraged by moving to discouraged.h and
discouraged.c. Replaced all uses with scm_c_make_rectangular.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/ramap.c4
-rw-r--r--libguile/unif.c16
2 files changed, 11 insertions, 9 deletions
diff --git a/libguile/ramap.c b/libguile/ramap.c
index 88ccb1603..a5f78d469 100644
--- a/libguile/ramap.c
+++ b/libguile/ramap.c
@@ -1369,8 +1369,8 @@ ramap_rp (SCM ra0, SCM proc, SCM ras)
}
case scm_tc7_cvect:
{
- SCM a1 = scm_make_complex (1.0, 1.0);
- SCM a2 = scm_make_complex (1.0, 1.0);
+ SCM a1 = scm_c_make_rectangular (1.0, 1.0);
+ SCM a2 = scm_c_make_rectangular (1.0, 1.0);
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
if (SCM_BITVEC_REF (ra0, i0))
{
diff --git a/libguile/unif.c b/libguile/unif.c
index a5bce8c42..6fb9db71c 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -1129,8 +1129,8 @@ SCM_DEFINE (scm_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0,
case scm_tc7_dvect:
return scm_from_double (((double *) SCM_CELL_WORD_1 (v))[pos]);
case scm_tc7_cvect:
- return scm_make_complex (((double *) SCM_CELL_WORD_1 (v))[2 * pos],
- ((double *) SCM_CELL_WORD_1 (v))[2 * pos + 1]);
+ return scm_c_make_rectangular (((double *) SCM_CELL_WORD_1(v))[2*pos],
+ ((double *) SCM_CELL_WORD_1(v))[2*pos+1]);
case scm_tc7_vector:
case scm_tc7_wvect:
return SCM_VELTS (v)[pos];
@@ -1189,8 +1189,8 @@ scm_cvref (SCM v, unsigned long pos, SCM last)
SCM_COMPLEX_IMAG (last) = ((double *) SCM_CELL_WORD_1 (v))[2 * pos + 1];
return last;
}
- return scm_make_complex (((double *) SCM_CELL_WORD_1 (v))[2 * pos],
- ((double *) SCM_CELL_WORD_1 (v))[2 * pos + 1]);
+ return scm_c_make_rectangular (((double *) SCM_CELL_WORD_1(v))[2*pos],
+ ((double *) SCM_CELL_WORD_1(v))[2*pos+1]);
case scm_tc7_vector:
case scm_tc7_wvect:
return SCM_VELTS (v)[pos];
@@ -2161,7 +2161,8 @@ SCM_DEFINE (scm_array_to_list, "array->list", 1, 0, 0,
{
double (*data)[2] = (double (*)[2]) SCM_VELTS (v);
for (k = SCM_UVECTOR_LENGTH (v) - 1; k >= 0; k--)
- res = scm_cons (scm_make_complex (data[k][0], data[k][1]), res);
+ res = scm_cons (scm_c_make_rectangular (data[k][0], data[k][1]),
+ res);
return res;
}
}
@@ -2409,7 +2410,8 @@ tail:
case scm_tc7_cvect:
if (n-- > 0)
{
- SCM cz = scm_make_complex (0.0, 1.0), z = scm_from_double (1.0/3.0);
+ SCM cz = scm_c_make_rectangular (0.0, 1.0);
+ SCM z = scm_from_double (1.0/3.0);
SCM_REAL_VALUE (z) =
SCM_COMPLEX_REAL (cz) = ((double *) SCM_VELTS (ra))[2 * j];
SCM_COMPLEX_IMAG (cz) = ((double *) SCM_VELTS (ra))[2 * j + 1];
@@ -2568,7 +2570,7 @@ loop:
case scm_tc7_dvect:
return exactly_one_third;
case scm_tc7_cvect:
- return scm_make_complex (0.0, 1.0);
+ return scm_c_make_rectangular (0.0, 1.0);
}
}
#undef FUNC_NAME