summaryrefslogtreecommitdiff
path: root/H64E-2/h64e.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.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.h')
-rw-r--r--H64E-2/h64e.h37
1 files changed, 30 insertions, 7 deletions
diff --git a/H64E-2/h64e.h b/H64E-2/h64e.h
index 397a36b..d8a95cd 100644
--- a/H64E-2/h64e.h
+++ b/H64E-2/h64e.h
@@ -13,16 +13,13 @@
#include "h64e-model.h"
/*
Set data structure from arguments and use to handle data
-
- */
-
+*/
#define H64E_G_NONE 0
#define H64E_G_BYTE 1
#define H64E_G_WORD 2
#define H64E_G_DWORD 3
#define H64E_G_QWORD 4
-
#define H64E_O_START 0
#define H64E_O_NONE 0
#define H64E_O_STRING 1
@@ -36,7 +33,7 @@
#define H64E_O_UINT64 9
#define H64E_O_END H64E_O_UINT64
-typedef struct H64E_format
+typedef struct H64E_params
{
int flag_offset; /* output offset */
@@ -46,11 +43,11 @@ typedef struct H64E_format
uint8_t group; /* if there is need transdorm to specific type */
int flag_output; /* output convereted types */
uint8_t output_type; /* output in many different ways */
-} H64E_format;
+} H64E_params;
typedef struct H64E_t
{
- H64E_format fmt;
+ H64E_params fmt;
H64E_stream_in *sin;
H64E_stream_out *sout;
int fd_in;
@@ -65,4 +62,30 @@ int h64e_convert(H64E_t *s);
int h64e_destroy(H64E_t *s);
+#define H64E_FMT_STATE_NONE 0
+#define H64E_FMT_STATE_INIT 1
+#define H64E_FMT_STATE_CNV 2
+#define H64E_FMT_STATE_FINISH 3
+
+typedef struct H64E_format {
+ int group_fmt;
+ int output_fmt;
+ int min_input;
+ int max_output;
+ int column_size;
+ int f_space;
+ int cur_pos; //position where output stoped
+ int end_pos; //end postion before new line
+ int f_new_line; //should be new line set after
+ int start_offset; //start position of offset
+ int slide_offset; //offset since stream start
+ int state;
+ int t_new_line; // if new line or buffer full
+ int f_nw_pos; // if new line then save place where new line is
+} H64E_format;
+
+int h64e_fmt_init( H64E_format *fs);
+int h64e_fmt_byte( H64E_format *fs, uint8_t *in_data, int32_t in_size, uint8_t *out_data, int32_t out_size);
+int h64e_fmt_finish(H64E_format *fs);
+
#endif /* h64e_h */