blob: 9b715685ffbbf8da8fe684dfb1b3f53d479b42b7 (
plain)
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
|
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
#include <stdio.h>
struct xbm {
unsigned int width;
unsigned int height;
size_t bits_size;
size_t bits_len;
char *bits;
};
typedef struct xbm xbm_t;
void init_xbm (xbm_t *xbm);
void free_xbm (xbm_t *xbm);
bool alloc_xbm (xbm_t *xbm, const size_t size);
bool load_xbm (
FILE *f,
xbm_t *xbm,
unsigned int *width,
unsigned int *height);
|