From: Lutz M?l. <lu...@us...> - 2003-10-26 22:31:50
|
Update of /cvsroot/libexif/libexif/libexif/olympus In directory sc8-pr-cvs1:/tmp/cvs-serv21845/libexif/olympus Modified Files: exif-mnote-data-olympus.c exif-mnote-data-olympus.h Log Message: 2003-10-26 Lutz Mueller <lu...@us...> * test/test-mnote.c: New. * libexif: The code now both compiles and doesn't crash, but at least the canon maker note still doesn't get parsed. Index: exif-mnote-data-olympus.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/exif-mnote-data-olympus.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- exif-mnote-data-olympus.c 26 Oct 2003 10:06:17 -0000 1.1 +++ exif-mnote-data-olympus.c 26 Oct 2003 22:30:26 -0000 1.2 @@ -223,20 +223,33 @@ return mnote_olympus_tag_get_title (n->entries[i].tag); } +static void +exif_mnote_data_olympus_set_byte_order (ExifMnoteData *n, ExifByteOrder o) +{ + if (n) ((ExifMnoteDataOlympus *) n)->order = o; +} + +static void +exif_mnote_data_olympus_set_offset (ExifMnoteData *n, unsigned int o) +{ + if (n) ((ExifMnoteDataOlympus *) n)->offset = o; +} + ExifMnoteData * -exif_mnote_data_olympus_new (ExifByteOrder order) +exif_mnote_data_olympus_new (void) { ExifMnoteData *n; n = malloc (sizeof (ExifMnoteDataOlympus)); if (!n) return NULL; memset (n, 0, sizeof (ExifMnoteDataOlympus)); - exif_mnote_data_construct (n); - ((ExifMnoteDataOlympus *) n)->order = order; + exif_mnote_data_construct (n); /* Set up the function pointers */ n->methods.free = exif_mnote_data_olympus_free; + n->methods.set_byte_order = exif_mnote_data_olympus_set_byte_order; + n->methods.set_offset = exif_mnote_data_olympus_set_offset; n->methods.load = exif_mnote_data_olympus_load; n->methods.count = exif_mnote_data_olympus_count; n->methods.get_name = exif_mnote_data_olympus_get_name; Index: exif-mnote-data-olympus.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/exif-mnote-data-olympus.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- exif-mnote-data-olympus.h 26 Oct 2003 10:06:17 -0000 1.1 +++ exif-mnote-data-olympus.h 26 Oct 2003 22:30:26 -0000 1.2 @@ -34,8 +34,9 @@ unsigned int count; ExifByteOrder order; + unsigned int offset; }; -ExifMnoteData *exif_mnote_data_olympus_new (ExifByteOrder); +ExifMnoteData *exif_mnote_data_olympus_new (void); #endif /* __MNOTE_OLYMPUS_CONTENT_H__ */ |