summaryrefslogtreecommitdiff
path: root/H64E-2/main.c
diff options
context:
space:
mode:
authorsystemcoder <systemcoder@protonmail.com>2020-03-21 16:58:00 +0000
committersystemcoder <systemcoder@protonmail.com>2020-03-21 16:58:00 +0000
commitbb47949b70525a266ebc9badae1e87496001389d (patch)
tree3bb5af5fc62b146c73f50e017415553a7ab5d7d2 /H64E-2/main.c
parent574f32b4573637e87584ccc5baa2c110d04853c6 (diff)
downloadH64D-2-bb47949b70525a266ebc9badae1e87496001389d.tar.gz
H64D-2-bb47949b70525a266ebc9badae1e87496001389d.zip
Fixed non mod size output
Diffstat (limited to 'H64E-2/main.c')
-rw-r--r--H64E-2/main.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/H64E-2/main.c b/H64E-2/main.c
index 673aa43..02a5551 100644
--- a/H64E-2/main.c
+++ b/H64E-2/main.c
@@ -357,11 +357,33 @@ int main(int argc, const char * argv[]) {
//check and empty all buffers
while (h64e_si_len(&sin)>0)
{
+ int cnv_num = -1;
if (h64e_si_len(&sin)>int8_fmt.column_size) {
-
+ //printf("Full column buffer\n");
+ cnv_bytes = h64e_si_data_out(&sin, &buf_cnv_in[0], int8_fmt.column_size);
+ cnv_num = h64e_fmt_byte_align16(&int8_fmt, &buf_cnv_in[0], cnv_bytes, buf_cnv_out, 2048);
+
+ cnv_bytes = h64e_so_data_in(&sout, &buf_cnv_out[0], cnv_num);
+ cnv_total += cnv_num;
} else {
+ //printf("some buffer!!!\n");
+ //less then column size
+ cnv_bytes = h64e_si_data_out(&sin, &buf_cnv_in[0], int8_fmt.column_size);
+ //printf("cnv_bytes %d\n", cnv_bytes);
+ cnv_num = h64e_fmt_byte_align16(&int8_fmt, &buf_cnv_in[0], cnv_bytes, buf_cnv_out, 2048);
+ //printf("cnv_num %d\n", cnv_num);
+ cnv_bytes = h64e_so_data_in(&sout, &buf_cnv_out[0], cnv_num);
+ cnv_total += cnv_num;
}
+
+ if ((out_bytes = h64e_so_len(&sout)) > 0)
+ {
+ out_bytes = h64e_so_data_out(&sout, &buf_out[0],512);
+ buf_out[out_bytes] = 0x00;
+ printf("%s",buf_out);
+ }
+
break;
}