summary refs log tree commit diff
path: root/src/tai_pack.c
blob: 641fa5b7e142d4036275b5d4415e96b9c0e675a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Public domain. */

#include "tai.h"

void tai_pack(char *s,const struct tai *t)
{
  uint64 x;

  x = t->x;
  s[7] = x & 255; x >>= 8;
  s[6] = x & 255; x >>= 8;
  s[5] = x & 255; x >>= 8;
  s[4] = x & 255; x >>= 8;
  s[3] = x & 255; x >>= 8;
  s[2] = x & 255; x >>= 8;
  s[1] = x & 255; x >>= 8;
  s[0] = x;
}