]> git.gir.st - base65536.git/blob - base65536.h
fix -Werror=misleading-indentation
[base65536.git] / base65536.h
1 /* base65536 semi-library header.
2 (C) 2016 Tobias Girstmair, http://isticktoit.net/
3 Released under the GNU GPL v3. See LICENSE for details. */
4
5 #ifndef __BASE65536_H__
6 #define __BASE65536_H__
7 #define B65536_TREE_SIZE 257
8
9 int base65536_encode_char (const int* in_buf);
10 int base65536_decode_char (const int in_cp, int* out_buf);
11
12 int codepoint_to_utf8 (int unicode, char* buf);
13 int utf8_to_codepoint (char* buf);
14
15 struct block* get_block_by_index (struct block* tree, int index, int len, int pos);
16 struct block* get_block_by_start (struct block* tree, int start, int len, int pos);
17
18 #define NOT_FOUND -2 /*for when tree_find_*() does not return a valid result*/
19 #define B65K_EOF -1
20
21 int tree_find_index (int block);
22 int tree_find_block(int index);
23
24 struct block {
25 int num;
26 int start;
27 };
28 #endif
Imprint / Impressum