From 8c7b411193bcafb617406cec1f43341a851eac06 Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Thu, 23 Mar 2006 15:06:32 +0000 Subject: Alpha version of reversed-endian Artwork writing. Status: iTunesDB can be written and is accepted on mobile phones, ArtworkDB can be read and be written as well, but newly added artwork will not yet display. * itdb.h: adjusted a couple of field lengths (4 byte -> 2 byte or even 1 byte) to address endian issues. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1225 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/db-artwork-debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/db-artwork-debug.c') diff --git a/src/db-artwork-debug.c b/src/db-artwork-debug.c index 3903038..5d8d3b8 100644 --- a/src/db-artwork-debug.c +++ b/src/db-artwork-debug.c @@ -24,6 +24,8 @@ #include "db-artwork-debug.h" +/* FIXME: endianness (whole file) */ + #ifdef DEBUG_ARTWORKDB G_GNUC_INTERNAL void dump_mhif (MhifHeader *mhif) @@ -169,8 +171,8 @@ dump_mhsd (MhsdHeader *mhsd) g_print ("MHSD (%d):\n", sizeof (MhsdHeader)); g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhsd->header_len)); g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhsd->total_len)); - g_print ("\tIndex: %d ", GINT_FROM_LE (mhsd->index)); - switch (GINT_FROM_LE (mhsd->index)) { + g_print ("\tIndex: %d ", GINT16_FROM_LE (mhsd->index)); + switch (GINT16_FROM_LE (mhsd->index)) { case MHSD_IMAGE_LIST: g_print ("(Image list)\n"); break; -- cgit