Ignore:
Timestamp:
Nov 10, 2005, 9:41:13 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • absolute shitloads of 64 bit fixes.
File:
1 edited

Legend:

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

    r4 r17  
    4848{
    4949  int type=item_type(level);
    50   fp->write_byte(type);
     50  fp->write_uint8(type);
    5151
    5252
     
    5454  {
    5555    case L_NUMBER :
    56     { fp->write_long(lnumber_value(level)); } break;
     56    { fp->write_uint32(lnumber_value(level)); } break;
    5757    case L_CHARACTER :
    58     { fp->write_short(lcharacter_value(level)); } break;
     58    { fp->write_uint16(lcharacter_value(level)); } break;
    5959    case L_STRING :
    6060    { long l=strlen(lstring_value(level))+1;
    61       fp->write_long(l);
     61      fp->write_uint32(l);
    6262      fp->write(lstring_value(level),l);
    6363    } break;
    6464    case L_SYMBOL :
    65     { fp->write_long((long)level); } break;
     65    { fp->write_uint32((long)level); } break;
    6666    case L_CONS_CELL :
    6767    {
    68       if (!level) fp->write_long(0);
     68      if (!level) fp->write_uint32(0);
    6969      else
    7070      {
     
    7474        if (b)
    7575        {
    76           fp->write_long(-t);      // negative number means dotted list
     76          fp->write_uint32(-t);      // negative number means dotted list
    7777          write_level(fp,b);       // save end of dotted list     
    7878        }
    79         else fp->write_long(t);
     79        else fp->write_uint32(t);
    8080
    8181        for (b=level;b && item_type(b)==L_CONS_CELL;b=CDR(b))   
     
    8888Cell *load_block(bFILE *fp)
    8989{
    90   int type=fp->read_byte();
     90  int type=fp->read_uint8();
    9191  switch (type)
    9292  {   
    9393    case L_NUMBER :
    94     { return new_lisp_number(fp->read_long()); } break;
     94    { return new_lisp_number(fp->read_uint32()); } break;
    9595    case L_CHARACTER :
    96     { return new_lisp_character(fp->read_short()); } break;
     96    { return new_lisp_character(fp->read_uint16()); } break;
    9797    case L_STRING :
    98     { long l=fp->read_long();
     98    { long l=fp->read_uint32();
    9999      lisp_string *s=new_lisp_string(l);
    100100      fp->read(lstring_value(s),l);
     
    102102    } break;
    103103    case L_SYMBOL :
    104     { return (void *)fp->read_long(); } break;
     104    { return (void *)fp->read_uint32(); } break;
    105105    case L_CONS_CELL :
    106106    {
    107       long t=fp->read_long();
     107      long t=fp->read_uint32();
    108108      if (!t) return NULL;
    109109      else
Note: See TracChangeset for help on using the changeset viewer.