File: tai_unpack.c

package info (click to toggle)
djbdns 1%3A1.05-4%2Blenny1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,584 kB
  • ctags: 1,126
  • sloc: ansic: 9,932; makefile: 1,020; sh: 219
file content (16 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "tai.h"

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

  x = (unsigned char) s[0];
  x <<= 8; x += (unsigned char) s[1];
  x <<= 8; x += (unsigned char) s[2];
  x <<= 8; x += (unsigned char) s[3];
  x <<= 8; x += (unsigned char) s[4];
  x <<= 8; x += (unsigned char) s[5];
  x <<= 8; x += (unsigned char) s[6];
  x <<= 8; x += (unsigned char) s[7];
  t->x = x;
}