/[gcl]/gcl/o/sequence.d
ViewVC logotype

Diff of /gcl/o/sequence.d

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by camm, Sun Sep 18 02:48:59 2005 UTC revision 1.14 by camm, Thu Oct 6 20:30:08 2005 UTC
# Line 27  Foundation, 675 Mass Ave, Cambridge, MA Line 27  Foundation, 675 Mass Ave, Cambridge, MA
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.
# Line 84  elt(seq, index) Line 84  elt(seq, index)
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;
# Line 156  object seq; Line 156  object seq;
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;
# Line 240  E: Line 240  E:
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;
# Line 383  object x; Line 383  object x;
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);
# Line 418  object Line 418  object
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;
# Line 530  object Line 530  object
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;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26