X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2ed09d15e46fbea080336ab95a548a0170f65a66..03cdcca03fa921df1d1cc1d9e45ee04201b4d785:/client/fpga_compress.c diff --git a/client/fpga_compress.c b/client/fpga_compress.c index 2ef883db..fc298a8b 100644 --- a/client/fpga_compress.c +++ b/client/fpga_compress.c @@ -43,12 +43,12 @@ static void usage(void) { - fprintf(stderr, "Usage: fpga_compress ... \n"); - fprintf(stderr, " Combine n FPGA bitstream files and compress them into one.\n\n"); - fprintf(stderr, " fpga_compress -d "); - fprintf(stderr, " Decompress . Write result to "); - fprintf(stderr, " fpga_compress -t "); - fprintf(stderr, " Compress hardnested table . Write result to "); + fprintf(stdout, "Usage: fpga_compress ... \n"); + fprintf(stdout, " Combine n FPGA bitstream files and compress them into one.\n\n"); + fprintf(stdout, " fpga_compress -d "); + fprintf(stdout, " Decompress . Write result to "); + fprintf(stdout, " fpga_compress -t "); + fprintf(stdout, " Compress hardnested table . Write result to "); } @@ -150,7 +150,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile, bool hardn ret = deflate(&compressed_fpga_stream, Z_FINISH); } - fprintf(stderr, "compressed %u input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out); + fprintf(stdout, "compressed %u input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out); if (ret != Z_STREAM_END) { fprintf(stderr, "Error in deflate(): %i %s\n", ret, compressed_fpga_stream.msg); @@ -297,9 +297,9 @@ int main(int argc, char **argv) } infiles = calloc(num_input_files, sizeof(FILE*)); for (uint16_t i = 0; i < num_input_files; i++) { - infiles[i] = fopen(argv[i+hardnested_mode?2:1], "rb"); + infiles[i] = fopen(argv[i+(hardnested_mode?2:1)], "rb"); if (infiles[i] == NULL) { - fprintf(stderr, "Error. Cannot open input file %s", argv[i+hardnested_mode?2:1]); + fprintf(stderr, "Error. Cannot open input file %s", argv[i+(hardnested_mode?2:1)]); return(EXIT_FAILURE); } }