summaryrefslogtreecommitdiff
path: root/H64E-2/h64e-model.h
diff options
context:
space:
mode:
authorsystemcoder <systemcoder@protonmail.com>2020-03-15 08:34:44 +0000
committersystemcoder <systemcoder@protonmail.com>2020-03-15 08:34:44 +0000
commit784076d51c3d95443b53416e593c38c612c14bbe (patch)
treefdbe7e3870f7c5a17c3a9ce6b5f9fb4706b84804 /H64E-2/h64e-model.h
parent0184655779b6e72449db0b711ee591b6cd991652 (diff)
downloadH64D-2-784076d51c3d95443b53416e593c38c612c14bbe.tar.gz
H64D-2-784076d51c3d95443b53416e593c38c612c14bbe.zip
Output as hex works, first version that produces results.
Diffstat (limited to 'H64E-2/h64e-model.h')
-rw-r--r--H64E-2/h64e-model.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/H64E-2/h64e-model.h b/H64E-2/h64e-model.h
index 516f8dc..761d327 100644
--- a/H64E-2/h64e-model.h
+++ b/H64E-2/h64e-model.h
@@ -10,30 +10,37 @@
#define h64e_model_h
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
typedef int (*trnf_clb)(char*);
typedef struct H64E_stream_in {
- int cur_size;
- int size;
+ int32_t cur_size;
+ int32_t size;
uint8_t *buf;
} H64E_stream_in;
//used to get collected data
-int h64e_si_init(H64E_stream_in *in, ssize_t size);
-int h64e_si_data_in(H64E_stream_in *in, uint8_t *data, size_t size);
-int h64e_si_data_out(H64E_stream_in *in, uint8_t *data, size_t size);
+int h64e_si_init(H64E_stream_in *in, int32_t size);
+int h64e_si_data_in(H64E_stream_in *in, uint8_t *data, int32_t size);
+int h64e_si_data_out(H64E_stream_in *in, uint8_t *data, int32_t size);
+int h64e_si_len(H64E_stream_in *in);
typedef struct H64E_stream_out {
- int cur_size;
- int size;
+ int32_t cur_size;
+ int32_t size;
uint8_t *buf;
} H64E_stream_out;
//using to collect output formated data
-int h64e_so_init(H64E_stream_out *out, ssize_t size);
-int h64e_so_data_in(H64E_stream_in *out, uint8_t *data, size_t size);
-int h64e_so_data_out(H64E_stream_in *out, uint8_t *data, size_t size);
+int h64e_so_init(H64E_stream_out *out, int32_t size);
+int h64e_so_data_in(H64E_stream_out *out, uint8_t *data, int32_t size);
+int h64e_so_data_out(H64E_stream_out *out, uint8_t *data, int32_t size);
+/*
+ * Trigger that buffer is full, or trigger new line in buffer
+ */
+int h64e_so_ready(H64E_stream_out *out);
+int h64e_so_len(H64E_stream_out *out);
#endif /* h64e_model_h */