suitcase

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

tai_pack.c (290B)


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