tai_pack.c (315B)
1 /* Public domain. */ 2 3 #include "tai.h" 4 5 void tai_pack(char *s,const struct tai *t) 6 { 7 uint64_t x; 8 9 x = t->x; 10 s[7] = x & 255; x >>= 8; 11 s[6] = x & 255; x >>= 8; 12 s[5] = x & 255; x >>= 8; 13 s[4] = x & 255; x >>= 8; 14 s[3] = x & 255; x >>= 8; 15 s[2] = x & 255; x >>= 8; 16 s[1] = x & 255; x >>= 8; 17 s[0] = x; 18 }