Go to the documentation of this file.
7 static char *
rcsid=
"@(#)$Id$";
23 if (iscons(
a))
return(ccar(
a));
33 if (iscons(
a))
return(ccdr(
a));
43 if (iscons(p)) p=ccdr(p);
44 else if (p==
NIL)
return(
NIL);
46 if (iscons(p))
return(ccar(p));
47 else if (p==
NIL)
return(
NIL);
56 if (iscons(p)) p=ccdr(p);
57 else if (p==
NIL)
return(
NIL);
59 if (iscons(p))
return(ccdr(p));
60 else if (p==
NIL)
return(
NIL);
69 if (iscons(p)) p=ccar(p);
70 else if (p==
NIL)
return(
NIL);
72 if (iscons(p))
return(ccdr(p));
73 else if (p==
NIL)
return(
NIL);
82 if (iscons(p)) p=ccar(p);
83 else if (p==
NIL)
return(
NIL);
85 if (iscons(p))
return(ccar(p));
86 else if (p==
NIL)
return(
NIL);
95 if (iscons(p)) p=ccdr(p);
96 else if (p==
NIL)
return(
NIL);
98 if (iscons(p)) p=ccdr(p);
99 else if (p==
NIL)
return(
NIL);
101 if (iscons(p))
return(ccar(p));
102 else if (p==
NIL)
return(
NIL);
114 while (i-->0 && islist(
a))
a=ccdr(
a);
115 if (islist(
a))
return(ccar(
a));
131 while (i-->0 && islist(
a))
a=ccdr(
a);
139 return(
cons(ctx,argv[0],argv[1]));}
147 if (islist(
a)) {pointer_update(ccar(
a),argv[1]);}
157 if (islist(
a)) {pointer_update(ccar(
a),argv[1]);}
167 if (islist(
a)) {pointer_update(ccdr(
a),argv[1]);}
177 if (islist(
a)) {pointer_update(ccdr(
a),argv[1]);}
186 while (
n>0) result=
cons(ctx,argv[--
n],result);
193 {
register pointer result=argv[--
n];
194 while (
n>0) result=
cons(ctx,argv[--
n],result);
203 if (
n==0)
return(
NIL);
209 while (islist(
a)) { ckpush(ccar(
a));
a=ccdr(
a); i++;}
210 while (i-->0) r=
cons(ctx,vpop(),r);}
218 while (--
n>=0)
if (islist(argv[
n]))
goto nconc1;
225 while (islist(ccdr(c))) { breakck; c=ccdr(c);}
226 pointer_update(ccdr(c),
a);
235 if (
equal(y,z)==
T)
return(x);
236 if (!islist(z))
return(z);
237 temp=
subst(ctx,x,y,ccar(z));
239 temp =
subst(ctx,x,y,ccdr(z));
240 return (
cons(ctx,vpop(),temp));}
249 return(
subst(ctx,argv[0],argv[1],argv[2]));}
254 if (y==zz) pointer_update(*z,x);
264 nsubst(argv[0],argv[1],&argv[2]);
269 {
while (iscons(list))
270 if (ccar(list)==item)
return(list);
271 else list=ccdr(list);
279 return(
memq(argv[0],argv[1]));}
285 {
pointer item=argv[0],list=argv[1],result;
287 while (islist(list)) {
288 result=
equal(ccar(list),item);
289 if (result==
T)
return(list);
291 else list=ccdr(list);}
298 {
register pointer item=argv[0],list=argv[1];
299 pointer key=argv[2],test=argv[3],testnot=argv[4];
303 while (islist(list)) {
306 if (testnot!=
NIL) result=(
call2(ctx,testnot,item,target)==
NIL);
308 target=
equal(item,target);
310 else result=(target!=
NIL);}
311 else if (test!=
NIL) result=(
call2(ctx,test,item,target)!=
NIL);
312 else result=(item==target);
313 if (result)
return(list);
314 else list=ccdr(list);}
320 while (iscons(alist)) {
323 if (ccar(temp)==item)
return(temp);
324 else alist=ccdr(alist);}
333 return(
assq(argv[0],argv[1])); }
339 {
register pointer item=argv[0],alist=argv[1],temp,compare;
341 while (islist(alist)) {
344 compare=
equal(item,ccar(temp));
345 if (compare==
T)
return(temp);
347 else alist=ccdr(alist);}
355 {
register pointer item=argv[0],alist=argv[1];
356 pointer key=argv[2],test=argv[3],testnot=argv[4];
360 while (islist(alist)) {
362 if (islist(target)) {
363 if (
key==
NIL) temp=ccar(target);
365 if (testnot!=
NIL) compare=(
call2(ctx,testnot,item,temp)==
NIL);
366 else if (test==
NIL || test==
QEQ) compare=(item==temp);
368 else compare=(
call2(ctx,test,item,temp)!=
NIL);
369 if (compare)
return(target);}
378 register int count=0;
379 if (
n==2)
n=ckintval(argv[1]);
385 while (iscons(
a)) { ckpush(ccar(
a));
a=ccdr(
a);
count++;}
395 register int count=0;
396 register pointer *vspsave=ctx->vsp;
397 if (
n==2)
n=ckintval(argv[1]);
403 while (iscons(
a)) { ckpush(
a);
a=ccdr(
a);
count++;}
405 b= *(ctx->vsp -
n - 1);
406 pointer_update(ccdr(b),
NIL);
pointer RPLACD(context *ctx, int n, argv)
pointer CADDR(context *ctx, int n, argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
pointer nsubst(pointer x, pointer y, pointer *z)
pointer NTHCDR(context *ctx, int n, pointer *argv)
pointer memq(pointer item, pointer list)
pointer BUTLAST(context *ctx, int n, argv)
pointer call2(context *, pointer, pointer, pointer)
pointer CDAR(context *ctx, int n, argv)
pointer CDR(context *ctx, int n, pointer *argv)
static void key(unsigned char c, int x, int y)
pointer RPLACD2(context *ctx, int n, argv)
pointer RPLACA(context *ctx, int n, argv)
pointer SUPERASSOC(context *ctx, int n, argv)
pointer call1(context *, pointer, pointer)
pointer RPLACA2(context *ctx, int n, argv)
pointer MEMBER(context *ctx, int n, argv)
pointer LIST(context *ctx, int n, argv)
pointer SUBST(context *ctx, int n, argv)
pointer CONS(context *ctx, int n, pointer *argv)
pointer NTH(context *ctx, int n, pointer *argv)
pointer SUPERMEMBER(context *ctx, int n, argv)
pointer ASSQ(context *ctx, int n, argv)
pointer cons(context *, pointer, pointer)
pointer NCONC(context *ctx, int n, argv)
pointer assq(pointer item, pointer alist)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer APPEND(context *ctx, int n, argv)
pointer CAAR(context *ctx, int n, argv)
pointer CADR(context *ctx, int n, argv)
pointer LIST_STAR(context *ctx, int n, argv)
pointer NSUBST(context *ctx, int n, argv)
pointer CAR(context *ctx, int n, pointer *argv)
pointer stacknlist(context *, int)
pointer CDDR(context *ctx, int n, argv)
pointer NBUTLAST(context *ctx, int n, argv)
void lists(context *ctx, pointer mod)
pointer MEMQ(context *ctx, int n, argv)
pointer ASSOC(context *ctx, int n, argv)
pointer subst(context *ctx, pointer x, pointer y, pointer z)
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43