152 |
|
|
153 |
if (type_of(x) == t_cons) |
if (type_of(x) == t_cons) |
154 |
return(FALSE); |
return(FALSE); |
155 |
else if (x == Cnil) |
else/* if (x == Cnil)*/ |
156 |
return(TRUE); |
return(TRUE); |
157 |
vs_push(x); |
vs_push(x); |
158 |
FEwrong_type_argument(sLlist, x); |
FEwrong_type_argument(sLlist, x); |
786 |
|
|
787 |
void |
void |
788 |
Llast() |
Llast() |
789 |
{ object endp_temp; |
{ object endp_temp,t; |
790 |
check_arg(1); |
int n; |
791 |
|
|
792 |
|
n=vs_top-vs_base; |
793 |
|
if (n!=1 && n!=2) |
794 |
|
FEerror("Expected one or two arguments, received ~D.",1,make_fixnum(n)); |
795 |
if (endp(vs_base[0])) |
if (endp(vs_base[0])) |
796 |
return; |
return; |
797 |
while (type_of(vs_base[0]->c.c_cdr) == t_cons) |
if (n==2) { |
798 |
|
if (type_of(vs_base[1])!=t_fixnum || (n=fix(vs_base[1]))<1) |
799 |
|
FEerror("Expected fixed integer type greater than or equal to one in second argument: ~S", |
800 |
|
1,vs_base[1]); |
801 |
|
vs_popp; |
802 |
|
} |
803 |
|
|
804 |
|
t=vs_base[0]; |
805 |
|
while (type_of(vs_base[0]->c.c_cdr) == t_cons && --n) |
806 |
|
vs_base[0] = vs_base[0]->c.c_cdr; |
807 |
|
while (type_of(vs_base[0]->c.c_cdr) == t_cons) { |
808 |
|
t=t->c.c_cdr; |
809 |
vs_base[0] = vs_base[0]->c.c_cdr; |
vs_base[0] = vs_base[0]->c.c_cdr; |
810 |
|
} |
811 |
|
vs_base[0]=t; |
812 |
|
|
813 |
} |
} |
814 |
|
|
815 |
void |
void |
1204 |
vs_popp; |
vs_popp; |
1205 |
return; |
return; |
1206 |
} |
} |
1207 |
vs_base[0] = Cnil; |
vs_base[0] = x == vs_base[0] ? Ct : Cnil; |
1208 |
vs_popp; |
vs_popp; |
1209 |
return; |
return; |
1210 |
} |
} |