27 |
|
|
28 |
#include "include.h" |
#include "include.h" |
29 |
|
|
30 |
#undef endp |
/* #undef endp */ |
31 |
|
|
32 |
#define endp(obje) ((enum type)(type_of(endp_temp = (obje))) == t_cons ? \ |
/* #define endp(obje) ((enum type)(type_of(endp_temp = (obje))) == t_cons ? \ */ |
33 |
FALSE : endp_temp == Cnil ? TRUE : \ |
/* FALSE : endp_temp == Cnil ? TRUE : \ */ |
34 |
(FEwrong_type_argument(sLlist, endp_temp),FALSE)) |
/* (FEwrong_type_argument(sLlist, endp_temp),FALSE)) */ |
35 |
|
|
36 |
object endp_temp; |
/* object endp_temp; */ |
37 |
|
|
38 |
/* |
/* |
39 |
I know the following name is not good. |
I know the following name is not good. |
84 |
object seq; |
object seq; |
85 |
int index; |
int index; |
86 |
{ |
{ |
87 |
object endp_temp; |
/* object endp_temp; */ |
88 |
|
|
89 |
int i,max; |
int i,max; |
90 |
object l; |
object l; |
156 |
int index; |
int index; |
157 |
object val; |
object val; |
158 |
{ |
{ |
159 |
object endp_temp; |
/* object endp_temp; */ |
160 |
|
|
161 |
int i,max; |
int i,max; |
162 |
object l; |
object l; |
240 |
if ((e -= s) < 0) |
if ((e -= s) < 0) |
241 |
goto ILLEGAL_START_END; |
goto ILLEGAL_START_END; |
242 |
while (s-- > 0) { |
while (s-- > 0) { |
243 |
if (type_of(sequence) != t_cons) |
if (!consp(sequence)) |
244 |
goto ILLEGAL_START_END; |
goto ILLEGAL_START_END; |
245 |
sequence = sequence->c.c_cdr; |
sequence = sequence->c.c_cdr; |
246 |
} |
} |
247 |
if (e < 0) |
if (e < 0) |
248 |
@(return `copy_list(sequence)`) |
@(return `copy_list(sequence)`) |
249 |
for (i = 0; i < e; i++) { |
for (i = 0; i < e; i++) { |
250 |
if (type_of(sequence) != t_cons) |
if (!consp(sequence)) |
251 |
goto ILLEGAL_START_END; |
goto ILLEGAL_START_END; |
252 |
vs_check_push(sequence->c.c_car); |
vs_check_push(sequence->c.c_car); |
253 |
sequence = sequence->c.c_cdr; |
sequence = sequence->c.c_cdr; |
383 |
return(0); |
return(0); |
384 |
case t_cons: |
case t_cons: |
385 |
|
|
386 |
#define cendp(obj) ((type_of(obj)!=t_cons)) |
#define cendp(obj) ((!consp(obj))) |
387 |
for (i = 0; !cendp(x); i++, x = x->c.c_cdr) |
for (i = 0; !cendp(x); i++, x = x->c.c_cdr) |
388 |
; |
; |
389 |
if (x==Cnil) return(i); |
if (x==Cnil) return(i); |
418 |
reverse(seq) |
reverse(seq) |
419 |
object seq; |
object seq; |
420 |
{ |
{ |
421 |
object endp_temp; |
/* object endp_temp; */ |
422 |
|
|
423 |
object x, y, *v; |
object x, y, *v; |
424 |
int i, j, k; |
int i, j, k; |
530 |
nreverse(seq) |
nreverse(seq) |
531 |
object seq; |
object seq; |
532 |
{ |
{ |
533 |
object endp_temp; |
/* object endp_temp; */ |
534 |
|
|
535 |
object x, y, z; |
object x, y, z; |
536 |
int i, j, k; |
int i, j, k; |