suitcase

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

taia_pack.c (337B)


      1 #include <tai/taia.h>
      2 
      3 void taia_pack(char *s, struct taia *t)
      4 {
      5   unsigned long x;
      6 
      7   tai_pack(s,&t->sec);
      8   s += 8;
      9 
     10   x = t->atto;
     11   s[7] = x & 255; x >>= 8;
     12   s[6] = x & 255; x >>= 8;
     13   s[5] = x & 255; x >>= 8;
     14   s[4] = x;
     15   x = t->nano;
     16   s[3] = x & 255; x >>= 8;
     17   s[2] = x & 255; x >>= 8;
     18   s[1] = x & 255; x >>= 8;
     19   s[0] = x;
     20 }