aboutsummaryrefslogtreecommitdiff
path: root/src_c/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src_c/common.h')
-rw-r--r--src_c/common.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src_c/common.h b/src_c/common.h
index 16aeb9b..42fed63 100644
--- a/src_c/common.h
+++ b/src_c/common.h
@@ -8,6 +8,21 @@
#define OPCUT_ERROR 1
#define OPCUT_UNSOLVABLE 2
+#define OPCUT_STR_EMPTY ((opcut_str_t){.data = NULL, .len = 0})
+#define OPCUT_PARAMS_EMPTY \
+ ((opcut_params_t){.cut_width = 0, \
+ .min_initial_usage = false, \
+ .panels = NULL, \
+ .panels_len = 0, \
+ .items = NULL, \
+ .items_len = 0})
+#define OPCUT_RESULT_EMPTY \
+ ((opcut_result_t){.params = NULL, \
+ .used = NULL, \
+ .used_len = 0, \
+ .unused = NULL, \
+ .unused_len = 0})
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -64,10 +79,14 @@ typedef struct {
} opcut_result_t;
+int opcut_str_resize(opcut_str_t *str, size_t size);
int opcut_params_init(opcut_params_t *params, opcut_str_t *json);
-void opcut_params_destroy(opcut_params_t *params);
int opcut_result_write(opcut_result_t *result, FILE *stream);
+void opcut_str_destroy(opcut_str_t *str);
+void opcut_params_destroy(opcut_params_t *params);
+void opcut_result_destroy(opcut_result_t *result);
+
#ifdef __cplusplus
}
#endif