Changeset 490 for abuse/trunk


Ignore:
Timestamp:
Apr 17, 2011, 10:28:44 AM (12 years ago)
Author:
Sam Hocevar
Message:

lisp: implement LispList::GetLength?.

Location:
abuse/trunk/src
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/collide.cpp

    r481 r490  
    112112      if (x1<p->x1)
    113113      {
    114         add_collide(first,x1,max(y1,p->y1),p->x1-1,min(y2,p->y2),who);
     114        add_collide(first,x1,Max(y1,p->y1),p->x1-1,Min(y2,p->y2),who);
    115115    ax1=p->x1;
    116116      } else
     
    119119      if (x2>p->x2)
    120120      {
    121         add_collide(first,p->x2+1,max(y1,p->y1),x2,min(y2,p->y2),who);
     121        add_collide(first,p->x2+1,Max(y1,p->y1),x2,Min(y2,p->y2),who);
    122122    ax2=p->x2;
    123123      }
  • abuse/trunk/src/game.cpp

    r484 r490  
    18971897                                    {
    18981898                                        if(ev.message.id == RAISE_SFX && sfx_volume != 127)
    1899                                             sfx_volume = min(127, sfx_volume + 16);
     1899                                            sfx_volume = Min(127, sfx_volume + 16);
    19001900                                        if(ev.message.id == LOWER_SFX && sfx_volume != 0)
    1901                                             sfx_volume = max(sfx_volume - 16, 0);
     1901                                            sfx_volume = Max(sfx_volume - 16, 0);
    19021902                                        if(ev.message.id == RAISE_MUSIC && music_volume != 126)
    19031903                                        {
    1904                                             music_volume = min(music_volume + 16, 127);
     1904                                            music_volume = Min(music_volume + 16, 127);
    19051905                                            if(current_song && (sound_avail & MUSIC_INITIALIZED))
    19061906                                                current_song->set_volume(music_volume);
     
    19091909                                        if(ev.message.id == LOWER_MUSIC && music_volume != 0)
    19101910                                        {
    1911                                             music_volume = max(music_volume - 16, 0);
     1911                                            music_volume = Max(music_volume - 16, 0);
    19121912                                            if(current_song && (sound_avail & MUSIC_INITIALIZED))
    19131913                                                current_song->set_volume(music_volume);
  • abuse/trunk/src/imlib/image.cpp

    r481 r490  
    537537    while (i<=x2)
    538538    {
    539       xl=min(w-xx, x2-i+1);
     539      xl=Min(w-xx, x2-i+1);
    540540
    541541      memcpy(&pg1[i], &pg2[xx], xl);
     
    10231023        {
    10241024          if (x1<p->dx1)
    1025             add_dirty(x1, max(y1, p->dy1), p->dx1-1, min(y2, p->dy2));
     1025            add_dirty(x1, Max(y1, p->dy1), p->dx1-1, Min(y2, p->dy2));
    10261026          if (x2>p->dx2)
    1027             add_dirty(p->dx2+1, max(y1, p->dy1), x2, min(y2, p->dy2));
     1027            add_dirty(p->dx2+1, Max(y1, p->dy1), x2, Min(y2, p->dy2));
    10281028          if (y1<p->dy1)
    10291029            add_dirty(x1, y1, x2, p->dy1-1);
     
    11991199  {
    12001200    special->get_clip(cx1, cy1, cx2, cy2);
    1201     x1=max(x1, cx1); y1=max(cy1, y1); x2=min(x2, cx2); y2=min(y2, cy2);
     1201    x1=Max(x1, cx1); y1=Max(cy1, y1); x2=Min(x2, cx2); y2=Min(y2, cy2);
    12021202  }
    12031203  int16_t xsrc, ysrc, xdst, ydst, xtot=x2-x1-abs(xd)+1, ytot, xt;
  • abuse/trunk/src/imlib/macs.h

    r481 r490  
    2525#endif
    2626
    27 
    28 #ifndef min
    29 #define min(x,y) (x<y ? x:y)
    30 #endif
    31 #ifndef max
    32 #define max(x,y) (x>y ? x:y)
    33 #endif
    34 
    35 //#define uchar  unsigned char
    36 //#define schar  signed char
    37 //#define ushort unsigned short
    38 //typedef unsigned short int ushort;
    39 //#define sshort signed short
    40 //#define ulong  unsigned long
    41 //typedef unsigned long int ulong;
     27static inline int Min(int a, int b) { return a < b ? a : b; }
     28static inline int Max(int a, int b) { return a > b ? a : b; }
     29static inline float Min(float a, float b) { return a < b ? a : b; }
     30static inline float Max(float a, float b) { return a > b ? a : b; }
    4231
    4332#endif
  • abuse/trunk/src/imlib/timage.cpp

    r481 r490  
    256256    ysteps-=(y+ysteps-y2-1);
    257257
    258   screen->add_dirty(max(x,x1),y,min(x+width()-1,x2),y+h-1);
     258  screen->add_dirty(Max(x,x1),y,Min(x+width()-1,x2),y+h-1);
    259259  return datap;
    260260}
  • abuse/trunk/src/items.cpp

    r481 r490  
    6262    }
    6363
    64     maxx=max(x1,x2);
    65     maxy=max(y1,y2);
    66     minx=min(x1,x2);
    67     miny=min(y1,y2);
     64    maxx=Max(x1,x2);
     65    maxy=Max(y1,y2);
     66    minx=Min(x1,x2);
     67    miny=Min(y1,y2);
    6868
    6969    if (skip_next)
     
    147147
    148148
    149     maxx=max(x1,x2);
    150     maxy=max(y1,y2);
    151     minx=min(x1,x2);
    152     miny=min(y1,y2);
     149    maxx=Max(x1,x2);
     150    maxy=Max(y1,y2);
     151    minx=Min(x1,x2);
     152    miny=Min(y1,y2);
    153153
    154154    if (skip_next)
  • abuse/trunk/src/lcache.cpp

    r488 r490  
    131131      x--;
    132132    }
    133     if (t<0)   
    134       last->cdr=load_block(fp);
    135     else last->cdr=NULL;
    136    
     133    last->cdr = (t < 0) ? (LispObject *)load_block(fp) : NULL;
     134
    137135    for (last=first,x=0;x<abs(t);x++,last=(LispList *)last->cdr)
    138       last->car=load_block(fp);   
     136      last->car = (LispObject *)load_block(fp);
    139137    return first;
    140138      }
  • abuse/trunk/src/level.cpp

    r488 r490  
    26332633  if (blockx2>=foreground_width()) { x2=tl*foreground_width()-1; }
    26342634  if (blocky2>=foreground_height()) { y2=th*foreground_height()-1; }
    2635   blockx1=max(blockx1,0);
    2636   blocky1=max(blocky1,0);
     2635  blockx1=Max(blockx1,0);
     2636  blocky1=Max(blocky1,0);
    26372637
    26382638  if ((blockx1>blockx2) || (blocky1>blocky2)) return ;
  • abuse/trunk/src/light.cpp

    r481 r490  
    489489      if (x1<p->x1)
    490490      {
    491         add_light(first,x1,max(y1,p->y1),p->x1-1,min(y2,p->y2),who);
     491        add_light(first,x1,Max(y1,p->y1),p->x1-1,Min(y2,p->y2),who);
    492492    ax1=p->x1;
    493493      } else
     
    496496      if (x2>p->x2)
    497497      {
    498         add_light(first,p->x2+1,max(y1,p->y1),x2,min(y2,p->y2),who);
     498        add_light(first,p->x2+1,Max(y1,p->y1),x2,Min(y2,p->y2),who);
    499499    ax2=p->x2;
    500500      }
  • abuse/trunk/src/lisp/lisp.cpp

    r489 r490  
    895895}
    896896
    897 long list_length(void *i)
    898 {
    899   long x;
     897size_t LispList::GetLength()
     898{
     899    size_t ret = 0;
    900900
    901901#ifdef TYPE_CHECKING
    902   if (i && item_type(i)!=(ltype)L_CONS_CELL)
    903   {
    904     lprint(i);
    905     lbreak(" is not a sequence\n");
    906     exit(0);
    907   }
    908 #endif
    909 
    910   for(x = 0; i; i = CDR(i))
    911     x++;
    912   return x;
    913 }
    914 
    915    
     902    if (this && item_type(this) != (ltype)L_CONS_CELL)
     903    {
     904        lprint(this);
     905        lbreak(" is not a sequence\n");
     906        exit(0);
     907    }
     908#endif
     909
     910    for (LispObject *p = this; p; p = CDR(p))
     911        ret++;
     912    return ret;
     913}
    916914
    917915void *pairlis(void *list1, void *list2, void *list3)
    918 {   
     916{
    919917  if (item_type(list1)!=(ltype)L_CONS_CELL || item_type(list1)!=item_type(list2))
    920918    return NULL;
    921919
    922920  void *ret=NULL;
    923   long l1=list_length(list1), l2=list_length(list2);
     921  size_t l1 = ((LispList *)list1)->GetLength();
     922  size_t l2 = ((LispList *)list2)->GetLength();
     923
    924924  if (l1!=l2)
    925   {   
     925  {
    926926    lprint(list1);
    927927    lprint(list2);
     
    938938      if (!first) first=cur;
    939939      if (last)
    940         ((LispList *)last)->cdr=cur;
     940        ((LispList *)last)->cdr=(LispObject *)cur;
    941941      last=cur;
    942    
    943       LispList *cell=new_cons_cell();   
     942
     943      LispList *cell=new_cons_cell();
    944944      tmp=lcar(list1);
    945       ((LispList *)cell)->car=tmp;
     945      ((LispList *)cell)->car = (LispObject *)tmp;
    946946      tmp=lcar(list2);
    947       ((LispList *)cell)->cdr=tmp;
    948       ((LispList *)cur)->car=cell;
     947      ((LispList *)cell)->cdr = (LispObject *)tmp;
     948      ((LispList *)cur)->car = (LispObject *)cell;
    949949
    950950      list1=((LispList *)list1)->cdr;
    951951      list2=((LispList *)list2)->cdr;
    952952    }
    953     ((LispList *)cur)->cdr=list3;
     953    ((LispList *)cur)->cdr = (LispObject *)list3;
    954954    ret=first;
    955955  } else ret=NULL;
     
    11071107  p_ref r1(object), r2(list);
    11081108  LispList *c=new_cons_cell();
    1109   c->car=object;
    1110   c->cdr=list;
     1109  c->car = (LispObject *)object;
     1110  c->cdr = (LispObject *)list;
    11111111  list=c;
    11121112}
     
    11311131    c2=new_cons_cell();
    11321132    tmp=compile(s);
    1133     ((LispList *)c2)->car=tmp;
     1133    ((LispList *)c2)->car = (LispObject *)tmp;
    11341134    ((LispList *)c2)->cdr=NULL;
    1135     ((LispList *)cs)->cdr=c2;
     1135    ((LispList *)cs)->cdr = (LispObject *)c2;
    11361136    ret=cs;
    11371137  }
     
    11441144    c2=new_cons_cell();
    11451145    tmp=compile(s);
    1146     ((LispList *)c2)->car=tmp;
     1146    ((LispList *)c2)->car = (LispObject *)tmp;
    11471147    ((LispList *)c2)->cdr=NULL;
    1148     ((LispList *)cs)->cdr=c2;
     1148    ((LispList *)cs)->cdr = (LispObject *)c2;
    11491149    ret=cs;
    11501150  }  else if (n[0]==',')              // short hand for comma function
     
    11561156    c2=new_cons_cell();
    11571157    tmp=compile(s);
    1158     ((LispList *)c2)->car=tmp;
     1158    ((LispList *)c2)->car = (LispObject *)tmp;
    11591159    ((LispList *)c2)->cdr=NULL;
    1160     ((LispList *)cs)->cdr=c2;
     1160    ((LispList *)cs)->cdr = (LispObject *)c2;
    11611161    ret=cs;
    11621162  }
     
    11871187                    read_ltoken(s, n);              // skip the '.'
    11881188                    tmp=compile(s);
    1189                     ((LispList *)last)->cdr=tmp;          // link the last cdr to
     1189                    ((LispList *)last)->cdr = (LispObject *)tmp;          // link the last cdr to
    11901190                    last=NULL;
    11911191                  }
     
    11991199                  if (!first) first=cur;
    12001200                  tmp=compile(s);   
    1201                   ((LispList *)cur)->car=tmp;
     1201                  ((LispList *)cur)->car = (LispObject *)tmp;
    12021202                  if (last)
    1203                     ((LispList *)last)->cdr=cur;
     1203                    ((LispList *)last)->cdr = (LispObject *)cur;
    12041204                  last=cur;
    12051205                }
     
    12501250      p_ref r4(cs), r5(c2);
    12511251      tmp = LispSymbol::FindOrCreate("function");
    1252       ((LispList *)cs)->car=tmp;
     1252      ((LispList *)cs)->car = (LispObject *)tmp;
    12531253      c2=new_cons_cell();
    12541254      tmp=compile(s);
    1255       ((LispList *)c2)->car=tmp;
    1256       ((LispList *)cs)->cdr=c2;
     1255      ((LispList *)c2)->car = (LispObject *)tmp;
     1256      ((LispList *)cs)->cdr = (LispObject *)c2;
    12571257      ret=cs;
    12581258    }
     
    15151515        if (first) {
    15161516          tmp=new_cons_cell();
    1517           ((LispList *)cur)->cdr=tmp;
     1517          ((LispList *)cur)->cdr = (LispObject *)tmp;
    15181518          cur=tmp;
    15191519        } else
     
    15211521   
    15221522        void *val=eval(CAR(arg_list));
    1523         ((LispList *)cur)->car=val;
     1523        ((LispList *)cur)->car = (LispObject *)val;
    15241524        arg_list=lcdr(arg_list);
    15251525      }
     
    15821582    }
    15831583  }
    1584   int num_args=list_length(CDR(arg_list)), i, stop=0;
     1584  int i, stop = 0, num_args = ((LispList *)CDR(arg_list))->GetLength();
    15851585  if (!num_args) return 0;
    15861586
     
    16171617      else
    16181618      {
    1619         na_list->cdr=new_cons_cell();
     1619        na_list->cdr = (LispObject *)new_cons_cell();
    16201620                na_list=(LispList *)CDR(na_list);
    16211621      }
     
    16241624      if (arg_on[i])
    16251625      {
    1626                 na_list->car=CAR(arg_on[i]);
     1626                na_list->car = (LispObject *)CAR(arg_on[i]);
    16271627                arg_on[i]=(LispList *)CDR(arg_on[i]);
    16281628      }
     
    16321632    {
    16331633      LispList *c=new_cons_cell();
    1634       c->car=eval_function((LispSymbol *)sym, first);
     1634      c->car = (LispObject *)eval_function((LispSymbol *)sym, first);
    16351635      if (return_list)
    16361636        last_return->cdr=c;
     
    16571657  if (rtype==string_symbol)
    16581658  {
    1659     int elements=list_length(el_list);      // see how many things we need to concat
     1659    int elements = ((LispList *)el_list)->GetLength(); // see how many things we need to concat
    16601660    if (!elements) ret = LispString::Create("");
    16611661    else
     
    17581758    {
    17591759      tmp=eval(CAR(CDR(args)));
    1760       ((LispList *)last)->cdr=tmp;
     1760      ((LispList *)last)->cdr = (LispObject *)tmp;
    17611761      args=NULL;
    17621762    }
     
    17651765      cur=new_cons_cell();
    17661766      if (first)
    1767         ((LispList *)last)->cdr=cur;
     1767        ((LispList *)last)->cdr = (LispObject *)cur;
    17681768      else
    17691769            first=cur;
    17701770      last=cur;
    17711771          tmp=backquote_eval(CAR(args));
    1772           ((LispList *)cur)->car=tmp;
     1772          ((LispList *)cur)->car = (LispObject *)tmp;
    17731773       args=CDR(args);
    17741774    }
     
    17761776      {
    17771777    tmp=backquote_eval(args);
    1778     ((LispList *)last)->cdr=tmp;
     1778    ((LispList *)last)->cdr = (LispObject *)tmp;
    17791779    args=NULL;
    17801780      }
     
    18131813      {
    18141814        case L_STRING : ret = LispNumber::Create(strlen(lstring_value(v))); break;
    1815         case L_CONS_CELL : ret = LispNumber::Create(list_length(v)); break;
     1815        case L_CONS_CELL : ret = LispNumber::Create(((LispList *)v)->GetLength()); break;
    18161816        default :
    18171817        { lprint(v);
     
    18281828    cur=new_cons_cell();
    18291829    void *val=eval(CAR(arg_list));
    1830     ((LispList *) cur)->car=val;
     1830    ((LispList *) cur)->car = (LispObject *)val;
    18311831    if (last)
    1832       ((LispList *)last)->cdr=cur;
     1832      ((LispList *)last)->cdr = (LispObject *)cur;
    18331833    else first=cur;
    18341834    last=cur;
     
    18411841      p_ref r1(c);
    18421842      void *val=eval(CAR(arg_list));
    1843       ((LispList *)c)->car=val;
     1843      ((LispList *)c)->car = (LispObject *)val;
    18441844      val=eval(CAR(CDR(arg_list)));
    1845       ((LispList *)c)->cdr=val;
     1845      ((LispList *)c)->cdr = (LispObject *)val;
    18461846      ret=c;
    18471847    } break;
     
    19841984            if (!car || item_type(car)!=L_CONS_CELL)
    19851985            { lprint(car); lbreak("setq car : evaled object is not a cons cell\n"); exit(0); }
    1986             ((LispList *)car)->car=set_to;
     1986            ((LispList *)car)->car = (LispObject *)set_to;
    19871987          } else if (car==cdr_symbol)
    19881988          {
     
    19901990            if (!car || item_type(car)!=L_CONS_CELL)
    19911991            { lprint(car); lbreak("setq cdr : evaled object is not a cons cell\n"); exit(0); }
    1992             ((LispList *)car)->cdr=set_to;
     1992            ((LispList *)car)->cdr = (LispObject *)set_to;
    19931993          } else if (car==aref_symbol)
    19941994          {
     
    20512051      p_ref r1(i1);
    20522052      LispList *cs=new_cons_cell();
    2053       cs->car=i1;
    2054       cs->cdr=i2;
     2053      cs->car = (LispObject *)i1;
     2054      cs->cdr = (LispObject *)i2;
    20552055      ret=cs;
    20562056    } break;
     
    27862786                next=l1;
    27872787                while (next) { l1=next; next=lcdr(next); }
    2788                 ((LispList *)l1)->cdr=eval(CAR(arg_list));   
     2788                ((LispList *)l1)->cdr = (LispObject *)eval(CAR(arg_list));
    27892789                arg_list=CDR(arg_list);
    27902790      } while (arg_list);
     
    28372837        if (!rstart) rstart=q;
    28382838        while (r && CDR(r)) r=CDR(r);
    2839         CDR(r)=q;   
     2839        CDR(r) = (LispObject *)q;
    28402840        arg_list=CDR(arg_list);
    28412841      }
  • abuse/trunk/src/lisp/lisp.h

    r489 r490  
    1111#define __LISP_HPP_
    1212
     13#include <cstdlib>
    1314#include <stdint.h>
    1415
     
    5657struct LispList : LispObject
    5758{
    58     void *cdr, *car;
     59    size_t GetLength();
     60
     61    LispObject *cdr, *car;
    5962};
    6063
     
    150153};
    151154
    152 static inline void *&CAR(void *x) { return ((LispList *)x)->car; }
    153 static inline void *&CDR(void *x) { return ((LispList *)x)->cdr; }
     155static inline LispObject *&CAR(void *x) { return ((LispList *)x)->car; }
     156static inline LispObject *&CDR(void *x) { return ((LispList *)x)->cdr; }
    154157static inline ltype item_type(void *x) { if (x) return *(ltype *)x; return L_CONS_CELL; }
    155158
     
    166169void *lisp_eq(void *n1, void *n2);
    167170void *lisp_equal(void *n1, void *n2);
    168 long list_length(void *i);
    169171void lprint(void *i);
    170172void *eval(void *prog);
  • abuse/trunk/src/lisp/lisp_gc.cpp

    r489 r490  
    110110    ((LispRedirect *)old_x)->new_reference = p;
    111111
    112     p->car = collect_object(old_car);
    113     p->cdr = collect_object(old_cdr);
    114    
     112    p->car = (LispObject *)collect_object(old_car);
     113    p->cdr = (LispObject *)collect_object(old_cdr);
     114
    115115    if (last) last->cdr = p;
    116116    else first = p;
     
    118118  }
    119119  if (x)
    120     last->cdr = collect_object(x);
     120    last->cdr = (LispObject *)collect_object(x);
    121121  return first;                    // we already set the collection pointers
    122122}
     
    209209    {
    210210      for (; x && item_type(x) == L_CONS_CELL; x = CDR(x))
    211         ((LispList *)x)->car = collect_object(((LispList *)x)->car);
     211        ((LispList *)x)->car = (LispObject *)collect_object(((LispList *)x)->car);
    212212      if (x)
    213         ((LispList *)x)->cdr = collect_object(((LispList *)x)->cdr);
     213        ((LispList *)x)->cdr = (LispObject *)collect_object(((LispList *)x)->cdr);
    214214    }
    215215  }
  • abuse/trunk/src/lisp/lisp_opt.cpp

    r489 r490  
    2020
    2121LispObject *l_undefined;
    22 LispSymbol *true_symbol = NULL;
     22LispSymbol *true_symbol = NULL, *list_symbol, *string_symbol, *quote_symbol,
     23     *backquote_symbol, *comma_symbol, *do_symbol, *in_symbol, *aref_symbol,
     24     *if_symbol, *progn_symbol, *car_symbol, *cdr_symbol;
    2325
    24 void *list_symbol,*string_symbol,     // in lisp_init()
    25      *quote_symbol,*backquote_symbol,*comma_symbol,*do_symbol,*in_symbol,*aref_symbol,
    26      *colon_initial_contents,*colon_initial_element,*if_symbol,
    27      *progn_symbol,*eq_symbol,*zero_symbol,*eq0_symbol,*car_symbol,*cdr_symbol,
    28      *load_warning;
    29 
     26void *colon_initial_contents, *colon_initial_element,
     27     *eq_symbol, *zero_symbol, *eq0_symbol, *load_warning;
    3028
    3129void *if_1progn,*if_2progn,*if_12progn,*not_symbol;
  • abuse/trunk/src/lisp/lisp_opt.h

    r489 r490  
    1414
    1515extern LispObject *l_undefined;
    16 extern LispSymbol *true_symbol;
     16extern LispSymbol *true_symbol, *list_symbol, *string_symbol, *quote_symbol,
     17     *backquote_symbol, *comma_symbol, *do_symbol, *in_symbol, *aref_symbol,
     18     *if_symbol, *progn_symbol, *car_symbol, *cdr_symbol;
    1719
    18 extern void *list_symbol,*string_symbol,     // in lisp_init()
    19            *quote_symbol,*backquote_symbol,*comma_symbol,*do_symbol,*in_symbol,*aref_symbol,
    20        *colon_initial_contents,*colon_initial_element,*if_symbol,
    21        *progn_symbol,*car_symbol,*cdr_symbol,*load_warning;
     20extern void *colon_initial_contents, *colon_initial_element, *load_warning;
    2221
    2322#endif
  • abuse/trunk/src/menu.cpp

    r489 r490  
    134134  args=CAR(CDR(args));
    135135
    136   int options=list_length(args);
     136  int options = ((LispList *)args)->GetLength();
    137137  int mh=(font->height()+1)*options+10,maxw=0;
    138138
  • abuse/trunk/src/netcfg.cpp

    r481 r490  
    1111
    1212#include "game.h"
    13 
    1413
    1514#include "netcfg.h"
  • abuse/trunk/src/objects.cpp

    r486 r490  
    391391    the_game->game_to_mouse(x1,draw_to,v,i,sy1);     // calculate sy1
    392392
    393     sy1=max(v->cy1,sy1);
    394     sy2=min(v->cy2,sy2);
     393    sy1 = Max(v->cy1, sy1);
     394    sy2 = Min(v->cy2, sy2);
    395395    trans_image *p=picture();
    396396
     
    517517
    518518
    519     ((LispList *)am)->cdr=frm;
    520     ((LispList *)frm)->cdr=hx;
    521     ((LispList *)hx)->cdr=hy;
    522     ((LispList *)hy)->cdr=px;
    523     ((LispList *)px)->cdr=py;
     519    ((LispList *)am)->cdr = (LispObject *)frm;
     520    ((LispList *)frm)->cdr = (LispObject *)hx;
     521    ((LispList *)hx)->cdr = (LispObject *)hy;
     522    ((LispList *)hy)->cdr = (LispObject *)px;
     523    ((LispList *)px)->cdr = (LispObject *)py;
    524524
    525525    time_marker *prof1=NULL;
     
    12341234
    12351235
    1236     ((LispList *)lcx)->cdr=lcy;
    1237     ((LispList *)lcy)->cdr=lb;
     1236    ((LispList *)lcx)->cdr = (LispObject *)lcy;
     1237    ((LispList *)lcy)->cdr = (LispObject *)lb;
    12381238
    12391239    void *m=mark_heap(TMP_SPACE);
  • abuse/trunk/src/seq.cpp

    r481 r490  
    4040    total=1;
    4141  else
    42     total=list_length(pict_list);
     42    total = ((LispList *)pict_list)->GetLength();
    4343
    4444  seq=(int *) malloc(sizeof(int)*total);
Note: See TracChangeset for help on using the changeset viewer.