summaryrefslogtreecommitdiff
path: root/H64E-2/h64e.c
diff options
context:
space:
mode:
authorsystemcoder <systemcoder@protonmail.com>2020-03-21 16:06:46 +0000
committersystemcoder <systemcoder@protonmail.com>2020-03-21 16:06:46 +0000
commit574f32b4573637e87584ccc5baa2c110d04853c6 (patch)
treef40236cba0b2cc515bc93167145186c705c79489 /H64E-2/h64e.c
parentb2911a60e257d493b9d5839f40e923f95df3b525 (diff)
downloadH64D-2-574f32b4573637e87584ccc5baa2c110d04853c6.tar.gz
H64D-2-574f32b4573637e87584ccc5baa2c110d04853c6.zip
byte output is working
Diffstat (limited to 'H64E-2/h64e.c')
-rw-r--r--H64E-2/h64e.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/H64E-2/h64e.c b/H64E-2/h64e.c
index 80b085d..0a68734 100644
--- a/H64E-2/h64e.c
+++ b/H64E-2/h64e.c
@@ -203,9 +203,6 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
{
if (i<in_size)
{
-
-
-
//group byte output
if (fs->f_hex)
{
@@ -224,7 +221,6 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
}
}
-
if (fs->f_space)
{
//printf("Space enabled\n");
@@ -246,7 +242,7 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
}
}
- /*
+
if (fs->f_output_types)
{
if (fs->output_fmt == H64E_O_INT8)
@@ -258,7 +254,7 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
buf3_sz = snprintf((char *)&buf3[0], BUF_SZ, "%4u ", uu);
}
}
- */
+
} else {
printf("Empty spaces\n");
@@ -314,15 +310,18 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
}
}
- /*
- if (fs->f_output_types)
+ if ((fs->f_output_types==1))
{
- if (buf2_sz+1<BUF_SZ)
+ if (fs->f_output_types)
{
- buf2[buf2_sz] = '\n';
- buf2_sz += 1;
+ if (buf3_sz+1<BUF_SZ)
+ {
+ buf3[buf3_sz] = '\n';
+ buf3_sz += 1;
+ }
}
- } else {
+ }
+ /* else {
if (buf1_sz+1<BUF_SZ)
{
buf1[buf1_sz] = '\n';
@@ -400,16 +399,16 @@ int h64e_fmt_byte_align16(H64E_format *fs, uint8_t *in_data, int32_t in_size, ui
}
}
- /*
- for (i=0;i<out_part3_sz;i++)
+
+ for (i=0,j=trail_size;i<out_part3_sz;i++)
{
- if (i<out_size)
+ if (j+i<out_size)
{
out_data[j+i] = out_part3[i];
trail_size += 1;
}
}
- */
+
ret = trail_size;
//printf("ret %d\n",ret);