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/include/cache.hpp

    r2 r17  
    2323{
    2424  void *data;
    25   long last_access;   
    26   unsigned char type;
    27   short file_number;
    28   long offset;
     25  int32_t last_access;   
     26  uint8_t type;
     27  int16_t file_number;
     28  int32_t offset;
    2929} ;
    3030
     
    3535  public :
    3636  int crc_calculated;
    37   ulong crc;
     37  uint32_t crc;
    3838  char *filename;
    3939  crced_file(char *name);
     
    4848  crc_manager();
    4949  int get_filenumber(char *filename);
    50   ulong get_crc(long filenumber, int &failed);
    51   void set_crc(long filenumber, ulong crc);
    52   char *get_filename(long filenumber);
     50  uint32_t get_crc(int32_t filenumber, int &failed);
     51  void set_crc(int32_t filenumber, uint32_t crc);
     52  char *get_filename(int32_t filenumber);
    5353  void clean_up();
    5454  int total_filenames() { return total_files; }
     
    6262{
    6363  cache_item *list;
    64   long total,last_registered,last_access,poll_start_access;
    65   short last_file;           // for speed leave the last file accessed open
     64  int32_t total,last_registered,last_access,poll_start_access;
     65  int16_t last_file;           // for speed leave the last file accessed open
    6666
    6767  bFILE *fp,*cache_file,*cache_read_file;
    6868  spec_directory *last_dir;
    69   long last_offset;          // store the last offset so we don't have to seek if
     69  int32_t last_offset;          // store the last offset so we don't have to seek if
    7070                             // we don't need to
    7171 
    7272
    73   short lcache_number;
    74   long alloc_id();
     73  int16_t lcache_number;
     74  int32_t alloc_id();
    7575  void locate(cache_item *i, int local_only=0);    // set up file and offset for this item
    7676  void normalize();
     
    8787  int in_use() { if (used) { used=0; return 1; } else return 0; }
    8888  int full() { if (ful) { ful=0; return 1; } else return 0; }
    89   long reg_object(char *filename, void *object, int type, int rm_dups);      // lisp object
    90   long reg(char *filename, char *name, int type=-1, int rm_dups=0);          // returns id to item
    91   long reg_lisp_block(Cell *block);
     89  int32_t reg_object(char *filename, void *object, int type, int rm_dups);      // lisp object
     90  int32_t reg(char *filename, char *name, int type=-1, int rm_dups=0);          // returns id to item
     91  int32_t reg_lisp_block(Cell *block);
    9292  int loaded(int id);
    9393  void unreg(int id);
     
    114114
    115115  void load_cache_prof_info(char *filename, level *lev);
    116   int search(int *sarray, ushort filenum, long offset);  // sarray is a index table sorted by offset/filenum
     116  int search(int *sarray, uint16_t filenum, int32_t offset);  // sarray is a index table sorted by offset/filenum
    117117
    118118  void show_accessed();
Note: See TracChangeset for help on using the changeset viewer.