aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
blob: 0547e3f81c95b2191f2b28a3965eeec3b2f42c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Copyright (C) 2020 Tomasz Kramkowski <tk@the-tk.com>
 * SPDX-License-Identifier: MIT
 */
#ifndef PACK_INTERNAL_H
#define PACK_INTERNAL_H

#include <limits.h>
#include <stddef.h>

#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n))

enum endian { BIG, LITTLE };

size_t getsize(char c);

#endif // !PACK_INTERNAL_H