suitcase

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

tai_unpack.c (385B)


      1 #include <tai/tai.h>
      2 
      3 void tai_unpack(char *s, struct tai *t)
      4 {
      5   uint64 x;
      6 
      7   x = (unsigned char) s[0];
      8   x <<= 8; x += (unsigned char) s[1];
      9   x <<= 8; x += (unsigned char) s[2];
     10   x <<= 8; x += (unsigned char) s[3];
     11   x <<= 8; x += (unsigned char) s[4];
     12   x <<= 8; x += (unsigned char) s[5];
     13   x <<= 8; x += (unsigned char) s[6];
     14   x <<= 8; x += (unsigned char) s[7];
     15   t->x = x;
     16 }