aboutsummaryrefslogtreecommitdiff
path: root/src/format.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/format.h')
-rw-r--r--src/format.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/format.h b/src/format.h
index 8f8eafc..e5173de 100644
--- a/src/format.h
+++ b/src/format.h
@@ -4,22 +4,27 @@
#include <stdint.h>
#include <stdbool.h>
+typedef int format_mark_t;
+
typedef struct {
- char **parts;
- uint8_t *marks;
+ char *string;
+ format_mark_t mark;
+} format_pair_t;
+
+typedef struct {
+ format_pair_t *parts;
size_t length;
} format_t;
typedef struct {
- const char *key;
- uint8_t mark;
- bool prefix;
- bool postfix;
-} format_pair_t;
+ format_pair_t option;
+ format_pair_t *prefixes;
+ format_pair_t *suffixes;
+} format_option_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);
+int format_remark(format_t *format, const char *label, const format_option_t *options);
void format_free(format_t *format);