diff --git a/src/tools/translation/bmpinfo/bmpinfo.cpp b/src/tools/translation/bmpinfo/bmpinfo.cpp index 4bc53eaec3..b5eb0d7038 100644 --- a/src/tools/translation/bmpinfo/bmpinfo.cpp +++ b/src/tools/translation/bmpinfo/bmpinfo.cpp @@ -97,10 +97,10 @@ print_bmp_info(BFile &file) 12, B_SWAP_LENDIAN_TO_HOST); printf("\nFile Header:\n"); - printf(" magic: 0x%.4lx (should be: 0x424d)\n", fh.magic); - printf(" file size: 0x%.8lx (%u)\n", fh.fileSize, fh.fileSize); - printf(" reserved: 0x%.8lx (should be: 0x%.8lx)\n", fh.reserved, 0); - printf("data offset: 0x%.8lx (%u) (should be: >= 54 for MS format " + printf(" magic: 0x%.4x (should be: 0x424d)\n", fh.magic); + printf(" file size: 0x%.8lx (%lu)\n", fh.fileSize, fh.fileSize); + printf(" reserved: 0x%.8lx (should be: 0x%.8x)\n", fh.reserved, 0); + printf("data offset: 0x%.8lx (%lu) (should be: >= 54 for MS format " "and >= 26 for OS/2 format)\n", fh.dataOffset, fh.dataOffset); uint32 headersize = 0; @@ -124,21 +124,21 @@ print_bmp_info(BFile &file) B_SWAP_LENDIAN_TO_HOST); printf("\nMS Info Header:\n"); - printf(" header size: 0x%.8lx (%u) (should be: 40)\n", msh.size, msh.size); - printf(" width: %u\n", msh.width); - printf(" height: %u\n", msh.height); + printf(" header size: 0x%.8lx (%lu) (should be: 40)\n", msh.size, msh.size); + printf(" width: %lu\n", msh.width); + printf(" height: %lu\n", msh.height); printf(" planes: %u (should be: 1)\n", msh.planes); printf(" bits per pixel: %u (should be: 1,4,8,16,24 or 32)\n", msh.bitsperpixel); - printf(" compression: %s (%u)\n", + printf(" compression: %s (%lu)\n", ((msh.compression == BMP_NO_COMPRESS) ? ("none") : ((msh.compression == BMP_RLE8_COMPRESS) ? ("RLE 8") : ((msh.compression == BMP_RLE4_COMPRESS) ? ("RLE 4") : ("unknown")))), msh.compression); - printf(" image size: 0x%.8lx (%u)\n", msh.imagesize, msh.imagesize); - printf(" x pixels/meter: %u\n", msh.xpixperm); - printf(" y pixels/meter: %u\n", msh.ypixperm); - printf(" colors used: %u\n", msh.colorsused); - printf("colors important: %u\n", msh.colorsimportant); + printf(" image size: 0x%.8lx (%lu)\n", msh.imagesize, msh.imagesize); + printf(" x pixels/meter: %lu\n", msh.xpixperm); + printf(" y pixels/meter: %lu\n", msh.ypixperm); + printf(" colors used: %lu\n", msh.colorsused); + printf("colors important: %lu\n", msh.colorsimportant); } else if (headersize == sizeof(OS2InfoHeader)) { // OS/2 format @@ -155,7 +155,7 @@ print_bmp_info(BFile &file) B_SWAP_LENDIAN_TO_HOST); printf("\nOS/2 Info Header:\n"); - printf(" header size: 0x%.8lx (%u) (should be: 12)\n", os2.size, os2.size); + printf(" header size: 0x%.8lx (%lu) (should be: 12)\n", os2.size, os2.size); printf(" width: %u\n", os2.width); printf(" height: %u\n", os2.height); printf(" planes: %u (should be: 1)\n", os2.planes); @@ -163,7 +163,7 @@ print_bmp_info(BFile &file) os2.bitsperpixel); } else - printf("Error: info header size (%u) does not match MS or OS/2 " + printf("Error: info header size (%lu) does not match MS or OS/2 " "info header size\n", headersize); } diff --git a/src/tools/translation/pnginfo/pnginfo.cpp b/src/tools/translation/pnginfo/pnginfo.cpp index 207e70c6c1..ca68921967 100644 --- a/src/tools/translation/pnginfo/pnginfo.cpp +++ b/src/tools/translation/pnginfo/pnginfo.cpp @@ -138,9 +138,9 @@ PrintPNGInfo(const char *path) png_get_IHDR(ppng, pinfo, &width, &height, &bit_depth, &color_type, &interlace_type, &compression_type, &filter_type); - printf(" width: %u\n", width); - printf(" height: %u\n", height); - printf(" row bytes: %u\n", pinfo->rowbytes); + printf(" width: %lu\n", width); + printf(" height: %lu\n", height); + printf(" row bytes: %lu\n", pinfo->rowbytes); printf("bit depth (bits/channel): %d\n", bit_depth); printf(" channels: %d\n", pinfo->channels); printf("pixel depth (bits/pixel): %d\n", pinfo->pixel_depth); diff --git a/src/tools/translation/tgainfo/tgainfo.cpp b/src/tools/translation/tgainfo/tgainfo.cpp index 315a09d1be..e3036f5fc2 100644 --- a/src/tools/translation/tgainfo/tgainfo.cpp +++ b/src/tools/translation/tgainfo/tgainfo.cpp @@ -185,7 +185,7 @@ print_tga_info(BFile &file) printf(" width: %d\n", imagespec.width); printf(" height: %d\n", imagespec.height); printf(" depth: %d\n", imagespec.depth); - printf("descriptor: 0x%.2lx\n", imagespec.descriptor); + printf("descriptor: 0x%.2x\n", imagespec.descriptor); printf("\talpha (attr): %d\n", imagespec.descriptor & TGA_DESC_ALPHABITS); printf("\t origin: %d (%s %s)\n", @@ -209,8 +209,8 @@ print_tga_info(BFile &file) devoffset = tga_uint32(tgafooter, 4); printf("\nTGA Footer:\n"); - printf("extension offset: 0x%.8lx (%d)\n", extoffset, extoffset); - printf("developer offset: 0x%.8lx (%d)\n", devoffset, devoffset); + printf("extension offset: 0x%.8lx (%ld)\n", extoffset, extoffset); + printf("developer offset: 0x%.8lx (%ld)\n", devoffset, devoffset); printf("signature: %s\n", tgafooter + 8); if (extoffset) { @@ -236,7 +236,7 @@ print_tga_info(BFile &file) for (int32 i = 0; i < 4; i++) { memset(strbuffer, 0, LINE_LEN); strcpy(strbuffer, extbuf + 43 + (i * 81)); - printf("\tline %d: \"%s\"\n", i + 1, strbuffer); + printf("\tline %ld: \"%s\"\n", i + 1, strbuffer); } printf("date/time (yyyy-mm-dd hh:mm:ss): %.4d-%.2d-%.2d %.2d:%.2d:%.2d\n", @@ -273,11 +273,11 @@ print_tga_info(BFile &file) printf("gamma value: %d / %d\n", tga_uint16(extbuf, 478), tga_uint16(extbuf, 480)); - printf("color correction offset: 0x%.8lx (%d)\n", + printf("color correction offset: 0x%.8lx (%ld)\n", tga_uint32(extbuf, 482), tga_uint32(extbuf, 482)); - printf("postage stamp offset: 0x%.8lx (%d)\n", + printf("postage stamp offset: 0x%.8lx (%ld)\n", tga_uint32(extbuf, 486), tga_uint32(extbuf, 486)); - printf("scan line offset: 0x%.8lx (%d)\n", + printf("scan line offset: 0x%.8lx (%ld)\n", tga_uint32(extbuf, 490), tga_uint32(extbuf, 490)); const char *strattrtype = NULL;