-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_endian16.c
40 lines (33 loc) · 1.18 KB
/
ft_endian16.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_endian16.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgillot- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/03/15 09:11:55 by lgillot- #+# #+# */
/* Updated: 2016/03/15 09:11:59 by lgillot- ### ########.fr */
/* */
/* ************************************************************************** */
#include <ft_endian.h>
#include "ft_endian_priv.h"
static uint16_t invert16(uint16_t x)
{
return (x << 8 | x >> 8);
}
uint16_t ft_htobe16(uint16_t x)
{
HTOBE(16);
}
uint16_t ft_htole16(uint16_t x)
{
HTOLE(16);
}
uint16_t ft_be16toh(uint16_t x)
{
HTOBE(16);
}
uint16_t ft_le16toh(uint16_t x)
{
HTOLE(16);
}