Ignore:
Timestamp:
Dec 5, 2003, 12:02:27 AM (22 years ago)
Author:
ansari
Message:

Debug/correction des ppersist suite a la separation des PInOutPersist en PPFInOutStream - Reza 5 Dec 2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r2475 r2476  
    180180}
    181181
     182static inline void bswap8_hash(void* p)
     183{
     184  uint_8 tmp = *(uint_8*)p;
     185  *(uint_8*)p = ((tmp >> (7*8)) & 0x000000FF) |
     186                ((tmp >> (5*8)) & 0x0000FF00) |
     187                ((tmp >> (3*8)) & 0x00FF0000) |
     188                ((tmp >> (1*8)) & 0xFF000000) |
     189                ((tmp & 0xFF000000) << (1*8))  |
     190                ((tmp & 0x00FF0000) << (3*8))  |
     191                ((tmp & 0x0000FF00) << (5*8))  |
     192                ((tmp & 0x000000FF) << (7*8));
     193}
    182194
    183195
     
    190202        uint_8 hash2 =   *((uint_8*) (ctx.buf+8));
    191203#if IS_BIG_ENDIAN
    192         bswap8(&hash1);
    193         bswap8(&hash2);
     204        bswap8_hash(&hash1);
     205        bswap8_hash(&hash2);
    194206#endif
    195207       
     
    628640    objreftag rt;
    629641    rt.ppsoid = id;
     642    //    cout << " DBG-rt.ppspos = s->tellp(); " << endl;
    630643    rt.ppspos = s->tellp();
     644    // cout << " DBG-rt.ppspos = s->tellp(); = " << rt.ppspos << endl;
    631645    objList[mid] = rt;
    632646  }
Note: See TracChangeset for help on using the changeset viewer.