]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/fpga_compress.c
chg: too many \ slashes
[proxmark3-svn] / client / fpga_compress.c
index 6af1846ef88aa4b5cb078c4f36769f9f6cba26a2..aac589afe935ec16c6d5a079fa1dc5d80a98eab0 100644 (file)
@@ -14,6 +14,7 @@
 #include <string.h>
 #include <stdint.h>
 #include <stdbool.h>
+#include <inttypes.h>
 #include "zlib.h"
 
 #define MAX(a,b) ((a)>(b)?(a):(b))
@@ -66,8 +67,7 @@ static bool all_feof(FILE *infile[], uint8_t num_infiles)
                if (!feof(infile[i])) {
                        return false;
                }
-       }
-       
+       }       
        return true;
 }
 
@@ -87,7 +87,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
        do {
 
                if (i >= num_infiles * FPGA_CONFIG_SIZE) {
-                       fprintf(stderr, "Input files too big (total > %d bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONFIG_SIZE);
+                       fprintf(stderr, "Input files too big (total > %d bytes). These are probably not PM3 FPGA config files.\n", num_infiles * FPGA_CONFIG_SIZE);
                        for(uint16_t j = 0; j < num_infiles; j++) {
                                fclose(infile[j]);
                        }
@@ -113,6 +113,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
        compressed_fpga_stream.avail_in = i;
        compressed_fpga_stream.zalloc = fpga_deflate_malloc;
        compressed_fpga_stream.zfree = fpga_deflate_free;
+       compressed_fpga_stream.opaque = Z_NULL;
        
        ret = deflateInit2(&compressed_fpga_stream, 
                                                COMPRESS_LEVEL,
@@ -188,6 +189,7 @@ int zlib_decompress(FILE *infile, FILE *outfile)
        compressed_fpga_stream.avail_out = DECOMPRESS_BUF_SIZE;
        compressed_fpga_stream.zalloc = fpga_deflate_malloc;
        compressed_fpga_stream.zfree = fpga_deflate_free;
+       compressed_fpga_stream.opaque = Z_NULL;
        
        ret = inflateInit2(&compressed_fpga_stream, 0);
        
Impressum, Datenschutz