Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

birq / hexio.h @ master

History | View | Annotate | Download (406 Bytes)

1
#include "bit_array.h"
2

    
3
#ifndef HEX_IO_H
4
#define HEX_IO_H
5
#define HEXCHUNKSZ 32
6
#define HEXCHARSZ 8
7
#define CHUNK_MASK ((1ULL << HEXCHUNKSZ) - 1)
8
#define HOW_MANY(x, y) (((x) + (y) - 1) / (y))
9
#ifndef MAX
10
        #define MAX(x,y) ((x) > (y) ? (x) : (y))
11
#endif
12

    
13
int bitmask_scnprintf(char *buf, size_t buflen, const BIT_ARRAY *bmp);
14
int bitmask_parse_user(const char *buf, size_t buflen, BIT_ARRAY *bmp);
15

    
16
#endif