-static void
-PrintByte(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
- char* sep = "";
-
- if (hdr.tiff_magic == TIFF_BIGENDIAN) {
- switch ((int)dp->tdir_count) {
- case 4: fprintf(fd, fmt, sep, dp->tdir_offset&0xff);
- sep = " ";
- case 3: fprintf(fd, fmt, sep, (dp->tdir_offset>>8)&0xff);
- sep = " ";
- case 2: fprintf(fd, fmt, sep, (dp->tdir_offset>>16)&0xff);
- sep = " ";
- case 1: fprintf(fd, fmt, sep, dp->tdir_offset>>24);
- }
- } else {
- switch ((int)dp->tdir_count) {
- case 4: fprintf(fd, fmt, sep, dp->tdir_offset>>24);
- sep = " ";
- case 3: fprintf(fd, fmt, sep, (dp->tdir_offset>>16)&0xff);
- sep = " ";
- case 2: fprintf(fd, fmt, sep, (dp->tdir_offset>>8)&0xff);
- sep = " ";
- case 1: fprintf(fd, fmt, sep, dp->tdir_offset&0xff);
- }
- }
-}
-
-static void
-PrintShort(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
- char *sep = "";
-
- if (hdr.tiff_magic == TIFF_BIGENDIAN) {
- switch (dp->tdir_count) {
- case 2: fprintf(fd, fmt, sep, dp->tdir_offset&0xffff);
- sep = " ";
- case 1: fprintf(fd, fmt, sep, dp->tdir_offset>>16);
- }
- } else {
- switch (dp->tdir_count) {
- case 2: fprintf(fd, fmt, sep, dp->tdir_offset>>16);
- sep = " ";
- case 1: fprintf(fd, fmt, sep, dp->tdir_offset&0xffff);
- }
- }
-}
-
-static void
-PrintLong(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
- fprintf(fd, fmt, "", (long) dp->tdir_offset);
-}
-