Alchemy
Loading...
Searching...
No Matches

text_reader.h

Go to the documentation of this file.
1#ifndef ALCHEMY_TEXT_READER_H
2#define ALCHEMY_TEXT_READER_H
3
4/// @file
5/// TextReader, a cursor through message text.
6
7#include "edition.h"
8#include "types.h"
9#include "static_assert.h"
10
11/// A position in a Huffman-coded message: the previous code, which picks the
12/// next symbol's tree, and the message's remaining bits.
13struct TextReader {
15 const u32 *words;
17};
18
19STATIC_ASSERT(sizeof(struct TextReader) == 0x0c);
20STATIC_ASSERT(offsetof(struct TextReader, words) == 4);
21STATIC_ASSERT(offsetof(struct TextReader, bits) == 8);
22
23#endif
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
A position in a Huffman-coded message: the previous code, which picks the next symbol's tree,...
Definition text_reader.h:13
u32 previousCode
Definition text_reader.h:14
const u32 * words
Definition text_reader.h:15
The integer types, TRUE, UNUSED and the fixed-address macros.
unsigned int u32
Definition types.h:15