blob: 2f22555f14d599edffe94b850f7858d95f160a31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
/* ISC license. */
#include <skalibs/uint16.h>
#include <skalibs/bytestr.h>
void uint16_unpack_big (char const *s, uint16 *u)
{
uint16 r = T8((unsigned char)s[0]) ; r <<= 8 ;
r += T8((unsigned char)s[1]) ;
*u = r ;
}
|