Corrected printf formatting.
Wrong formatting specifiers were causing compiler warnings.
This commit is contained in:
parent
49920d517f
commit
f7864927f2
1 changed files with 3 additions and 3 deletions
6
inhal.c
6
inhal.c
|
@ -75,7 +75,7 @@ int main (int argc, char **argv) {
|
||||||
fseek(infile, 0, SEEK_END);
|
fseek(infile, 0, SEEK_END);
|
||||||
inputsize = ftell(infile);
|
inputsize = ftell(infile);
|
||||||
|
|
||||||
printf("Uncompressed size: %d bytes\n", inputsize);
|
printf("Uncompressed size: %zd bytes\n", inputsize);
|
||||||
|
|
||||||
if (inputsize > DATA_SIZE) {
|
if (inputsize > DATA_SIZE) {
|
||||||
printf("Error: File must be a maximum of 65,536 bytes!\n");
|
printf("Error: File must be a maximum of 65,536 bytes!\n");
|
||||||
|
@ -94,11 +94,11 @@ int main (int argc, char **argv) {
|
||||||
fseek(outfile, fileoffset, SEEK_SET);
|
fseek(outfile, fileoffset, SEEK_SET);
|
||||||
fwrite((const void*)packed, 1, outputsize, outfile);
|
fwrite((const void*)packed, 1, outputsize, outfile);
|
||||||
|
|
||||||
printf("Compressed size: %d bytes\n", outputsize);
|
printf("Compressed size: %zd bytes\n", outputsize);
|
||||||
printf("Compression ratio: %4.2f%%\n", 100 * (double)outputsize / inputsize);
|
printf("Compression ratio: %4.2f%%\n", 100 * (double)outputsize / inputsize);
|
||||||
printf("Compression time: %4.3f seconds\n\n", (double)time / CLOCKS_PER_SEC);
|
printf("Compression time: %4.3f seconds\n\n", (double)time / CLOCKS_PER_SEC);
|
||||||
|
|
||||||
printf("Inserted at 0x%06X - 0x%06X\n", fileoffset, ftell(outfile) - 1);
|
printf("Inserted at 0x%06X - 0x%06lX\n", fileoffset, ftell(outfile) - 1);
|
||||||
|
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
|
|
Loading…
Reference in a new issue