mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 00:40:20 +02:00
* list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over SCM_NNULLP. Now, guile itself does not include any calls to SCM_NNULLP any more.
This commit is contained in:
parent
05b1536228
commit
9ff1720f85
4 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
|
||||||
|
scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
|
||||||
|
SCM_NNULLP. Now, guile itself does not include any calls to
|
||||||
|
SCM_NNULLP any more.
|
||||||
|
|
||||||
2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
|
* eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
|
||||||
|
|
|
@ -123,7 +123,7 @@ SCM_DEFINE (scm_cons_star, "cons*", 1, 0, 1,
|
||||||
if (!SCM_NULLP (rest))
|
if (!SCM_NULLP (rest))
|
||||||
{
|
{
|
||||||
SCM prev = arg = scm_cons (arg, rest);
|
SCM prev = arg = scm_cons (arg, rest);
|
||||||
while (SCM_NNULLP (SCM_CDR (rest)))
|
while (!SCM_NULLP (SCM_CDR (rest)))
|
||||||
{
|
{
|
||||||
prev = rest;
|
prev = rest;
|
||||||
rest = SCM_CDR (rest);
|
rest = SCM_CDR (rest);
|
||||||
|
|
|
@ -981,7 +981,7 @@ scm_ra_sum (SCM ra0, SCM ras)
|
||||||
unsigned long i0 = SCM_ARRAY_BASE (ra0);
|
unsigned long i0 = SCM_ARRAY_BASE (ra0);
|
||||||
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
|
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
|
||||||
ra0 = SCM_ARRAY_V (ra0);
|
ra0 = SCM_ARRAY_V (ra0);
|
||||||
if (SCM_NNULLP(ras))
|
if (!SCM_NULLP(ras))
|
||||||
{
|
{
|
||||||
SCM ra1 = SCM_CAR (ras);
|
SCM ra1 = SCM_CAR (ras);
|
||||||
unsigned long i1 = SCM_ARRAY_BASE (ra1);
|
unsigned long i1 = SCM_ARRAY_BASE (ra1);
|
||||||
|
@ -1076,7 +1076,7 @@ scm_ra_product (SCM ra0, SCM ras)
|
||||||
unsigned long i0 = SCM_ARRAY_BASE (ra0);
|
unsigned long i0 = SCM_ARRAY_BASE (ra0);
|
||||||
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
|
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
|
||||||
ra0 = SCM_ARRAY_V (ra0);
|
ra0 = SCM_ARRAY_V (ra0);
|
||||||
if (SCM_NNULLP (ras))
|
if (!SCM_NULLP (ras))
|
||||||
{
|
{
|
||||||
SCM ra1 = SCM_CAR (ras);
|
SCM ra1 = SCM_CAR (ras);
|
||||||
unsigned long i1 = SCM_ARRAY_BASE (ra1);
|
unsigned long i1 = SCM_ARRAY_BASE (ra1);
|
||||||
|
@ -1528,14 +1528,14 @@ SCM_DEFINE (scm_array_map_x, "array-map!", 2, 0, 1,
|
||||||
for (p = ra_rpsubrs; p->name; p++)
|
for (p = ra_rpsubrs; p->name; p++)
|
||||||
if (SCM_EQ_P (proc, p->sproc))
|
if (SCM_EQ_P (proc, p->sproc))
|
||||||
{
|
{
|
||||||
while (SCM_NNULLP (lra) && SCM_NNULLP (SCM_CDR (lra)))
|
while (!SCM_NULLP (lra) && !SCM_NULLP (SCM_CDR (lra)))
|
||||||
{
|
{
|
||||||
scm_ramapc (p->vproc, SCM_UNDEFINED, ra0, lra, FUNC_NAME);
|
scm_ramapc (p->vproc, SCM_UNDEFINED, ra0, lra, FUNC_NAME);
|
||||||
lra = SCM_CDR (lra);
|
lra = SCM_CDR (lra);
|
||||||
}
|
}
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
while (SCM_NNULLP (lra) && SCM_NNULLP (SCM_CDR (lra)))
|
while (!SCM_NULLP (lra) && !SCM_NULLP (SCM_CDR (lra)))
|
||||||
{
|
{
|
||||||
scm_ramapc (ramap_rp, proc, ra0, lra, FUNC_NAME);
|
scm_ramapc (ramap_rp, proc, ra0, lra, FUNC_NAME);
|
||||||
lra = SCM_CDR (lra);
|
lra = SCM_CDR (lra);
|
||||||
|
@ -1568,7 +1568,7 @@ SCM_DEFINE (scm_array_map_x, "array-map!", 2, 0, 1,
|
||||||
if (!SCM_EQ_P (ra0, ra1)
|
if (!SCM_EQ_P (ra0, ra1)
|
||||||
|| (SCM_ARRAYP(ra0) && !SCM_ARRAY_CONTP(ra0)))
|
|| (SCM_ARRAYP(ra0) && !SCM_ARRAY_CONTP(ra0)))
|
||||||
goto gencase;
|
goto gencase;
|
||||||
for (tail = SCM_CDR (lra); SCM_NNULLP (tail); tail = SCM_CDR (tail))
|
for (tail = SCM_CDR (lra); !SCM_NULLP (tail); tail = SCM_CDR (tail))
|
||||||
{
|
{
|
||||||
ra1 = SCM_CAR (tail);
|
ra1 = SCM_CAR (tail);
|
||||||
if (SCM_EQ_P (v0, ra1)
|
if (SCM_EQ_P (v0, ra1)
|
||||||
|
|
|
@ -2221,7 +2221,7 @@ l2ra (SCM lst, SCM ra, unsigned long base, unsigned long k)
|
||||||
base += inc;
|
base += inc;
|
||||||
lst = SCM_CDR (lst);
|
lst = SCM_CDR (lst);
|
||||||
}
|
}
|
||||||
if (SCM_NNULLP (lst))
|
if (!SCM_NULLP (lst))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2234,7 +2234,7 @@ l2ra (SCM lst, SCM ra, unsigned long base, unsigned long k)
|
||||||
base += inc;
|
base += inc;
|
||||||
lst = SCM_CDR (lst);
|
lst = SCM_CDR (lst);
|
||||||
}
|
}
|
||||||
if (SCM_NNULLP (lst))
|
if (!SCM_NULLP (lst))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue