ACPI AML decompiler w/ CFG recovery and structured pseudocode
1#ifndef TOBI_STR_H
2#define TOBI_STR_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7typedef struct tobi_sb {
8 char *buf;
9 size_t len;
10 size_t cap;
11} tobi_sb;
12
13void tobi_sb_init(tobi_sb *sb);
14
15void tobi_sb_free(tobi_sb *sb);
16
17void tobi_sb_add(tobi_sb *sb, const char *s);
18
19void tobi_sb_addn(tobi_sb *sb, const char *s, size_t n);
20
21void tobi_sb_ch(tobi_sb *sb, char c);
22
23void tobi_sb_printf(tobi_sb *sb, const char *fmt, ...);
24
25char *tobi_sb_take(tobi_sb *sb);
26
27void tobi_json_string(tobi_sb *sb, const char *s);
28
29void tobi_hex(tobi_sb *sb, const uint8_t *data, size_t len);
30
31#endif