blob: 8f8eafc0c535ca1f98e884f956175b6d0db0102c (
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
26
|
#ifndef COMET_FORMAT_H
#define COMET_FORMAT_H
#include <stdint.h>
#include <stdbool.h>
typedef struct {
char **parts;
uint8_t *marks;
size_t length;
} format_t;
typedef struct {
const char *key;
uint8_t mark;
bool prefix;
bool postfix;
} format_pair_t;
bool format_init(format_t *format, const char *string, char delim);
int format_remark(format_t *format, const char *label, const format_pair_t *pairs);
void format_free(format_t *format);
#endif
|