[BACK]Return to save.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / adventure

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/games/adventure/save.c between version 1.13 and 1.14

version 1.13, 2012/01/08 18:16:00 version 1.14, 2014/03/22 22:04:40
Line 58  struct savefile {
Line 58  struct savefile {
         FILE *f;          FILE *f;
         const char *name;          const char *name;
         bool warned;          bool warned;
         unsigned bintextpos;          size_t bintextpos;
         uint32_t key;          uint32_t key;
         struct crcstate crc;          struct crcstate crc;
         unsigned char pad[8];          unsigned char pad[8];
Line 343  hash(const void *data, size_t datalen, u
Line 343  hash(const void *data, size_t datalen, u
         for (i=0; i<datalen; i++) {          for (i=0; i<datalen; i++) {
                 val = val ^ 0xbadc0ffee;                  val = val ^ 0xbadc0ffee;
                 val = (val << 4) | (val >> 60);                  val = (val << 4) | (val >> 60);
                 val += udata[i] ^ 0xbeef;                  val += udata[i] ^ 0xbeefU;
         }          }
   
         uval = (unsigned char *)&val;          uval = (unsigned char *)&val;
Line 454  savefile_cwrite(struct savefile *sf, con
Line 454  savefile_cwrite(struct savefile *sf, con
   
 struct compat_saveinfo {  struct compat_saveinfo {
         void   *address;          void   *address;
         int     width;          size_t  width;
 };  };
   
 static const struct compat_saveinfo compat_savearray[] =  static const struct compat_saveinfo compat_savearray[] =
Line 530  compat_restore(const char *infile)
Line 530  compat_restore(const char *infile)
         const struct compat_saveinfo *p;          const struct compat_saveinfo *p;
         char   *s;          char   *s;
         long    sum, cksum = 0;          long    sum, cksum = 0;
         int     i;          size_t  i;
         struct crcstate crc;          struct crcstate crc;
   
         if ((in = fopen(infile, "rb")) == NULL) {          if ((in = fopen(infile, "rb")) == NULL) {

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

CVSweb <webmaster@jp.NetBSD.org>