Fixed convert_s8_f and convert_f_s8.

This commit is contained in:
ha7ilm 2016-02-14 11:11:41 +01:00
parent 03a3a9ab50
commit aa0309f512

10
csdr.c
View file

@ -350,23 +350,25 @@ int main(int argc, char *argv[])
} }
if(!strcmp(argv[1],"convert_s8_f")) if(!strcmp(argv[1],"convert_s8_f"))
{ {
if(!sendbufsize(initialize_buffers())) return -2;
for(;;) for(;;)
{ {
FEOF_CHECK; FEOF_CHECK;
fread(buffer_s8, sizeof(signed char), BUFSIZE, stdin); fread((signed char*)buffer_u8, sizeof(signed char), the_bufsize, stdin);
convert_s8_f(buffer_s8, output_buffer, BUFSIZE); convert_s8_f((signed char*)buffer_u8, output_buffer, the_bufsize);
FWRITE_R; FWRITE_R;
TRY_YIELD; TRY_YIELD;
} }
} }
if(!strcmp(argv[1],"convert_f_s8")) //not tested if(!strcmp(argv[1],"convert_f_s8")) //not tested
{ {
if(!sendbufsize(initialize_buffers())) return -2;
for(;;) for(;;)
{ {
FEOF_CHECK; FEOF_CHECK;
FREAD_R; FREAD_R;
convert_f_s8(input_buffer, buffer_s8, BUFSIZE); convert_f_s8(input_buffer, (signed char*)buffer_u8, the_bufsize);
fwrite(buffer_s8, sizeof(signed char), BUFSIZE, stdout); fwrite((signed char*)buffer_u8, sizeof(signed char), the_bufsize, stdout);
TRY_YIELD; TRY_YIELD;
} }
} }