diff options
Diffstat (limited to 'H64E-2/main.c')
-rw-r--r-- | H64E-2/main.c | 24 |
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; } |