  
    
main.htmlMain Page     
classes.htmlData Structures     
files.htmlFiles     
dirs.htmlDirectories   
  
    
files.htmlFile List     
globals.htmlGlobals   
dir_3c4fde49625df9344590fff295c7c38d.htmllibexif  &raquo dir_265b6d436dcd479b211f2ef756056fdc.htmlcanon exif-mnote-data-canon.c
exif-mnote-data-canon_8c.htmlGo to the documentation of this file. 00001 /* exif-mnote-data-canon.c 00002  * 00003  * Copyright © 2002, 2003 Lutz Müller <lutz@users.sourceforge.net> 00004  * Copyright © 2003 Matthieu Castet <mat-c@users.sourceforge.net> 00005  * 00006  * This library is free software; you can redistribute it and/or 00007  * modify it under the terms of the GNU Lesser General Public 00008  * License as published by the Free Software Foundation; either 00009  * version 2 of the License, or (at your option) any later version. 00010  * 00011  * This library is distributed in the hope that it will be useful, 00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 00014  * Lesser General Public License for more details. 00015  * 00016  * You should have received a copy of the GNU Lesser General Public 00017  * License along with this library; if not, write to the 00018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019  * Boston, MA 02111-1307, USA. 00020  */ 00021 
00022 #include <config.h> 00023 #include " exif-mnote-data-canon_8h.htmlexif-mnote-data-canon.h " 00024 
00025 #include <stdlib.h> 00026 #include <stdio.h> 00027 #include <string.h> 00028 
00029 #include < exif-byte-order_8h.htmllibexif/exif-byte-order.h > 00030 #include < exif-utils_8h.htmllibexif/exif-utils.h > 00031 #include < exif-data_8h.htmllibexif/exif-data.h > 00032 
exif-mnote-data-canon_8c.html#d72dbcf6d0153db1b8d8a58001feed8300033  #define DEBUG 00034 00035 static void exif-mnote-data-canon_8c.html#9d89c4c6d3b77e8b33e0711b346d061300036  exif-mnote-data-canon_8c.html#9d89c4c6d3b77e8b33e0711b346d0613exif_mnote_data_canon_clear  ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *n)
00037 {
00038         struct__ExifMnoteData.htmlExifMnoteData  *d = ( struct__ExifMnoteData.htmlExifMnoteData  *) n;
00039         unsigned int i;
00040 
00041         if (!n) return;
00042 
00043         if (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries ) {
00044                 for (i = 0; i < n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ; i++)
00045                         if (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata ) {
00046                                 exif-mem_8c.html#43190b81b4b4bdb4ffb89bfb612051b1exif_mem_free  (d-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata );
00047                                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata  = NULL;
00048                         }
00049                 exif-mem_8c.html#43190b81b4b4bdb4ffb89bfb612051b1exif_mem_free  (d-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries );
00050                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries  = NULL;
00051                 n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount  = 0;
00052         }
00053 }
00054 
00055 static void exif-mnote-data-canon_8c.html#a0f05ff950c197d7c32586ab3f11ff4800056  exif-mnote-data-canon_8c.html#a0f05ff950c197d7c32586ab3f11ff48exif_mnote_data_canon_free  ( struct__ExifMnoteData.htmlExifMnoteData  *n)
00057 {
00058         if (!n) return;
00059 
00060         exif-mnote-data-canon_8c.html#9d89c4c6d3b77e8b33e0711b346d0613exif_mnote_data_canon_clear  (( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) n);
00061 }
00062 
00063 static void exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34b00064  exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc, unsigned int n,
00065                 unsigned int *m, unsigned int *s)
00066 {
00067         unsigned int from = 0, to;
00068 
00069         if (!dc || !m) return;
00070         for (*m = 0; *m < dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ; (*m)++) {
00071                 to = from + mnote-canon-entry_8c.html#9d343f3faec828b2467bacbab0919f47mnote_canon_entry_count_values  (&dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [*m]);
00072                 if (to > n) {
00073                         if (s) *s = n - from;
00074                         break;
00075                 }
00076                 from = to;
00077         }
00078 }
00079 
00080 static char *
exif-mnote-data-canon_8c.html#345732acb661f31cdef3d7646099a21a00081  exif-mnote-data-canon_8c.html#345732acb661f31cdef3d7646099a21aexif_mnote_data_canon_get_value  ( struct__ExifMnoteData.htmlExifMnoteData  *note, unsigned int n, char *val, unsigned int maxlen)
00082 {
00083         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) note;
00084         unsigned int m, s;
00085 
00086         if (!dc) return NULL;
00087         exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  (dc, n, &m, &s);
00088         if (m >= dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ) return NULL;
00089         return mnote-canon-entry_8c.html#89b5ffb4fb194043e60f4c521cec7cc9mnote_canon_entry_get_value  (&dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [m], s, val, maxlen);
00090 }
00091 
00092 static void exif-mnote-data-canon_8c.html#f5b06f74fd2f7fb6ae2d0f463c76b9db00093  exif-mnote-data-canon_8c.html#f5b06f74fd2f7fb6ae2d0f463c76b9dbexif_mnote_data_canon_set_byte_order  ( struct__ExifMnoteData.htmlExifMnoteData  *d, exif-byte-order_8h.html#f966227d69ff74eea7ecd69ca645155bExifByteOrder  o)
00094 {
00095         exif-byte-order_8h.html#f966227d69ff74eea7ecd69ca645155bExifByteOrder  o_orig;
00096         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *n = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) d;
00097         unsigned int i;
00098 
00099         if (!n) return;
00100 
00101         o_orig = n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order ;
00102         n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order  = o;
00103         for (i = 0; i < n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ; i++) {
00104                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#4e049e9f596df10810044aae0ec3569dorder  = o;
00105                 exif-utils_8c.html#54ef3b86ffeb643e9c4434b85ccf2992exif_array_set_byte_order  (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#dc746fe67b6a9936b438524a39cfe7e9format , n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata ,
00106                                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#9f2b0cf8664468473f6c61da8b328404components , o_orig, o);
00107         }
00108 }
00109 
00110 static void exif-mnote-data-canon_8c.html#1598023951963ea4e898b56d36828ac100111  exif-mnote-data-canon_8c.html#1598023951963ea4e898b56d36828ac1exif_mnote_data_canon_set_offset  ( struct__ExifMnoteData.htmlExifMnoteData  *n, unsigned int o)
00112 {
00113         if (n) (( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) n)->offset = o;
00114 }
00115 
00116 static void exif-mnote-data-canon_8c.html#5c4f44d8fa7b1d168f554c4ae9925e9900117  exif-mnote-data-canon_8c.html#5c4f44d8fa7b1d168f554c4ae9925e99exif_mnote_data_canon_save  ( struct__ExifMnoteData.htmlExifMnoteData  *ne, 
00118         unsigned char **buf, unsigned int *buf_size)
00119 {
00120         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *n = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) ne;
00121         unsigned int i, o, s, doff;
00122 
00123         if (!n || !buf || !buf_size) return;
00124 
00125         /* 00126          * Allocate enough memory for all entries and the number 00127          * of entries. 00128          */ 00129         *buf_size = 2 + n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount  * 12 + 4;
00130         *buf = exif-mem_8c.html#e8c09cfbcb95e435c4c4b7ec3bbd79e4exif_mem_alloc  (ne-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , sizeof (char) * *buf_size);
00131         if (!*buf) return;
00132 
00133         /* Save the number of entries */ 00134         exif-utils_8c.html#d905d16e26b4052a1db34dbebdc37341exif_set_short  (*buf, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order , ( exif-utils_8h.html#398536727127a9bc2206ffbdacaafaadExifShort ) n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount );
00135         
00136         /* Save each entry */ 00137         for (i = 0; i < n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ; i++) {
00138                 o = 2 + i * 12;
00139                 exif-utils_8c.html#d905d16e26b4052a1db34dbebdc37341exif_set_short  (*buf + o + 0, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order , ( exif-utils_8h.html#398536727127a9bc2206ffbdacaafaadExifShort ) n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag );
00140                 exif-utils_8c.html#d905d16e26b4052a1db34dbebdc37341exif_set_short  (*buf + o + 2, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order , ( exif-utils_8h.html#398536727127a9bc2206ffbdacaafaadExifShort ) n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#dc746fe67b6a9936b438524a39cfe7e9format );
00141                 exif-utils_8c.html#c90147d0cc97bec7a577bf9576191bf8exif_set_long   (*buf + o + 4, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order ,
00142                                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#9f2b0cf8664468473f6c61da8b328404components );
00143                 o += 8;
00144                 s = exif-format_8c.html#924038efe0cd8ebade8f44619dd794f3exif_format_get_size  (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#dc746fe67b6a9936b438524a39cfe7e9format ) *
00145                                                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#9f2b0cf8664468473f6c61da8b328404components ;
00146                 if (s > 4) {
00147                         *buf_size += s;
00148 
00149                         /* Ensure even offsets. Set padding bytes to 0. */ 00150                         if (s & 1) *buf_size += 1;
00151                         *buf = exif-mem_8c.html#3dcfe6794d82e79e92da5e2c62484b17exif_mem_realloc  (ne-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , *buf,
00152                                                  sizeof (char) * *buf_size);
00153                         if (!*buf) return;
00154                         doff = *buf_size - s;
00155                         if (s & 1) { doff--; *(*buf + *buf_size - 1) = '\0'; }
00156                         exif-utils_8c.html#c90147d0cc97bec7a577bf9576191bf8exif_set_long  (*buf + o, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order , n-> struct__ExifMnoteDataCanon.html#301d376f902f835d0319e8cb6afb0717offset  + doff);
00157                 } else 00158                         doff = o;
00159 
00160                 /* 00161                  * Write the data. Fill unneeded bytes with 0. Do not 00162                  * crash if data is NULL. 00163                  */ 00164                 if (!n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata ) memset (*buf + doff, 0, s);
00165                 else memcpy (*buf + doff, n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata , s);
00166                 if (s < 4) memset (*buf + doff + s, 0, (4 - s));
00167         }
00168 }
00169 
00170 /* XXX 00171  * FIXME: exif_mnote_data_canon_load() may fail and there is no 00172  *        semantics to express that. 00173  *        See bug #1054323 for details, especially the comment by liblit 00174  *        after it has supposedly been fixed: 00175  * 00176  *        https://sourceforge.net/tracker/?func=detail&aid=1054323&group_id=12272&atid=112272 00177  *        Unfortunately, the "return" statements aren't commented at 00178  *        all, so it isn't trivial to find out what is a normal 00179  *        return, and what is a reaction to an error condition. 00180  */ 00181 
00182 static void exif-mnote-data-canon_8c.html#e1e15865a1d6834eeb2eb920b52ded2600183  exif-mnote-data-canon_8c.html#e1e15865a1d6834eeb2eb920b52ded26exif_mnote_data_canon_load  ( struct__ExifMnoteData.htmlExifMnoteData  *ne,
00184         const unsigned char *buf, unsigned int buf_size)
00185 {
00186         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *n = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) ne;
00187         exif-utils_8h.html#398536727127a9bc2206ffbdacaafaadExifShort  c;
00188         unsigned int i, o, s;
00189 
00190         if (!n || !buf || !buf_size || (buf_size < 6 + n->offset + 2)) return;
00191 
00192         /* Read the number of entries and remove old ones. */ 00193         c = exif-utils_8c.html#4b4acf537a8c6b9405e7b53be868e4d7exif_get_short  (buf + 6 + n-> struct__ExifMnoteDataCanon.html#301d376f902f835d0319e8cb6afb0717offset , n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order );
00194         exif-mnote-data-canon_8c.html#9d89c4c6d3b77e8b33e0711b346d0613exif_mnote_data_canon_clear  (n);
00195 
00196         /* Parse the entries */ 00197         for (i = 0; i < c; i++) {
00198                 o = 6 + 2 + n-> struct__ExifMnoteDataCanon.html#301d376f902f835d0319e8cb6afb0717offset  + 12 * i;
00199           if (o + 8 > buf_size) return;
00200 
00201                 n-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount  = i + 1;
00202                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries  = exif-mem_8c.html#3dcfe6794d82e79e92da5e2c62484b17exif_mem_realloc  (ne-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries ,
00203                                 sizeof ( struct__MnoteCanonEntry.htmlMnoteCanonEntry ) * (i+1));
00204                 memset (&n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i], 0, sizeof ( struct__MnoteCanonEntry.htmlMnoteCanonEntry ));
00205           n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag         = exif-utils_8c.html#4b4acf537a8c6b9405e7b53be868e4d7exif_get_short  (buf + o, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order );
00206           n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#dc746fe67b6a9936b438524a39cfe7e9format      = exif-utils_8c.html#4b4acf537a8c6b9405e7b53be868e4d7exif_get_short  (buf + o + 2, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order );
00207           n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#9f2b0cf8664468473f6c61da8b328404components  = exif-utils_8c.html#4ad94614630897766dd0a5c9bc2a59bfexif_get_long  (buf + o + 4, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order );
00208           n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#4e049e9f596df10810044aae0ec3569dorder       = n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order ;
00209 
00210           /* 00211            * Size? If bigger than 4 bytes, the actual data is not 00212            * in the entry but somewhere else (offset). 00213            */ 00214           s = exif-format_8c.html#924038efe0cd8ebade8f44619dd794f3exif_format_get_size  (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#dc746fe67b6a9936b438524a39cfe7e9format ) * n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#9f2b0cf8664468473f6c61da8b328404components ;
00215                 if (!s) return;
00216                 o += 8;
00217                 if (s > 4) o = exif-utils_8c.html#4ad94614630897766dd0a5c9bc2a59bfexif_get_long  (buf + o, n-> struct__ExifMnoteDataCanon.html#1da3e2aa42a74e449d186d0fcedfd9b6order ) + 6;
00218                 if (o + s > buf_size) return;
00219 
00220                 /* Sanity check */ 00221                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata  = exif-mem_8c.html#e8c09cfbcb95e435c4c4b7ec3bbd79e4exif_mem_alloc  (ne-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem , sizeof (char) * s);
00222                 if (!n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata ) return;
00223                 n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#e94be3aa11a5f858e248b5c3c819c327size  = s;
00224                 memcpy (n-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]. struct__MnoteCanonEntry.html#b3f5b422bbc0a5d9b9905060e2951bdfdata , buf + o, s);
00225         }
00226 }
00227 
00228 static unsigned int exif-mnote-data-canon_8c.html#c6ad4c54c7978f4cc9859edca9ce119400229  exif-mnote-data-canon_8c.html#c6ad4c54c7978f4cc9859edca9ce1194exif_mnote_data_canon_count  ( struct__ExifMnoteData.htmlExifMnoteData  *n)
00230 {
00231         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) n;
00232         unsigned int i, c;
00233 
00234         for (i = c = 0; dc && (i < dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ); i++)
00235                 c += mnote-canon-entry_8c.html#9d343f3faec828b2467bacbab0919f47mnote_canon_entry_count_values  (&dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [i]);
00236         return c;
00237 }
00238 
00239 static unsigned int exif-mnote-data-canon_8c.html#539cc0a4bc8437145593a787eecb05a600240  exif-mnote-data-canon_8c.html#539cc0a4bc8437145593a787eecb05a6exif_mnote_data_canon_get_id  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int i)
00241 {
00242         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) d;
00243         unsigned int m;
00244 
00245         if (!dc) return 0;
00246         exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  (dc, i, &m, NULL);
00247         if (m >= dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ) return 0;
00248         return dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [m]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag ;
00249 }
00250 
00251 static const char *
exif-mnote-data-canon_8c.html#46665b6cec6257b0cc6f3372e7e3692900252  exif-mnote-data-canon_8c.html#46665b6cec6257b0cc6f3372e7e36929exif_mnote_data_canon_get_name  ( struct__ExifMnoteData.htmlExifMnoteData  *note, unsigned int i)
00253 {
00254         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) note;
00255         unsigned int m, s;
00256 
00257         if (!dc) return NULL;
00258         exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  (dc, i, &m, &s);
00259         if (m >= dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ) return NULL;
00260         return mnote-canon-tag_8c.html#833ebae453473e518e4f575a50402432mnote_canon_tag_get_name_sub  (dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [m]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag , s);
00261 }
00262 
00263 static const char *
exif-mnote-data-canon_8c.html#16ac252f4a5d2fe369b0fde8291fe2dc00264  exif-mnote-data-canon_8c.html#16ac252f4a5d2fe369b0fde8291fe2dcexif_mnote_data_canon_get_title  ( struct__ExifMnoteData.htmlExifMnoteData  *note, unsigned int i)
00265 {
00266         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) note;
00267         unsigned int m, s;
00268 
00269         if (!dc) return NULL;
00270         exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  (dc, i, &m, &s);
00271         if (m >= dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ) return NULL;
00272         return mnote-canon-tag_8c.html#996a4d00a4928303dd1b560c29fff0bcmnote_canon_tag_get_title_sub  (dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [m]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag , s);
00273 }
00274 
00275 static const char *
exif-mnote-data-canon_8c.html#77abbe1c5d4b4098f187c0247d4347fb00276  exif-mnote-data-canon_8c.html#77abbe1c5d4b4098f187c0247d4347fbexif_mnote_data_canon_get_description  ( struct__ExifMnoteData.htmlExifMnoteData  *note, unsigned int i)
00277 {
00278         struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *dc = ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon  *) note;
00279         unsigned int m;
00280 
00281         if (!dc) return NULL;
00282         exif-mnote-data-canon_8c.html#e9824e7901a9cd61dc6d81713af3d34bexif_mnote_data_canon_get_tags  (dc, i, &m, NULL);
00283         if (m >= dc-> struct__ExifMnoteDataCanon.html#94a2bcc657b38bab1b0bd2217de2055ecount ) return NULL;
00284         return mnote-canon-tag_8c.html#74e4d64803187610d0174fe315492d45mnote_canon_tag_get_description  (dc-> struct__ExifMnoteDataCanon.html#0562099e39a51b4c51bde7643b684d67entries [m]. struct__MnoteCanonEntry.html#5149803b1d26b39e2adfea73c4bf23bbtag );
00285 }
00286 
00287 struct__ExifMnoteData.htmlExifMnoteData  *
exif-mnote-data-canon_8h.html#d958d3beb1e204937a24c2b63addfb4500288  exif-mnote-data-canon_8c.html#d958d3beb1e204937a24c2b63addfb45exif_mnote_data_canon_new  ( struct__ExifMem.htmlExifMem  *mem)
00289 {
00290         struct__ExifMnoteData.htmlExifMnoteData  *d;
00291 
00292         if (!mem) return NULL;
00293 
00294         d = exif-mem_8c.html#e8c09cfbcb95e435c4c4b7ec3bbd79e4exif_mem_alloc  (mem, sizeof ( struct__ExifMnoteDataCanon.htmlExifMnoteDataCanon ));
00295         if (!d) return NULL;
00296 
00297         exif-mnote-data-priv_8h.html#06db5604f65a97b1c5ea3fcc4bfec7dcexif_mnote_data_construct  (d, mem);
00298 
00299         /* Set up function pointers */ 00300         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#a63698879f7a67e6b17c112b1bd5bad8free             = exif-mnote-data-canon_8c.html#a0f05ff950c197d7c32586ab3f11ff48exif_mnote_data_canon_free ;
00301         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#2e6037a3070fa6b0f2a66b16c5ce70aeset_byte_order   = exif-mnote-data-canon_8c.html#f5b06f74fd2f7fb6ae2d0f463c76b9dbexif_mnote_data_canon_set_byte_order ;
00302         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#bb617ca9aecebc6a4bdea49aec2bc8b0set_offset       = exif-mnote-data-canon_8c.html#1598023951963ea4e898b56d36828ac1exif_mnote_data_canon_set_offset ;
00303         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#351860e435018eb6f20a1a80cc848058load             = exif-mnote-data-canon_8c.html#e1e15865a1d6834eeb2eb920b52ded26exif_mnote_data_canon_load ;
00304         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#885058f650d7e6dfbac29f391f1c3be1save             = exif-mnote-data-canon_8c.html#5c4f44d8fa7b1d168f554c4ae9925e99exif_mnote_data_canon_save ;
00305         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#aad86617351c2ee737b392f94040cccbcount            = exif-mnote-data-canon_8c.html#c6ad4c54c7978f4cc9859edca9ce1194exif_mnote_data_canon_count ;
00306         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#453d479929b42b3db130e4853ca1f0c5get_id           = exif-mnote-data-canon_8c.html#539cc0a4bc8437145593a787eecb05a6exif_mnote_data_canon_get_id ;
00307         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#478e4e150437d70bdfdb6ceb274603ebget_name         = exif-mnote-data-canon_8c.html#46665b6cec6257b0cc6f3372e7e36929exif_mnote_data_canon_get_name ;
00308         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#c14c8b9a7a9a282b94fc2c7476110d25get_title        = exif-mnote-data-canon_8c.html#16ac252f4a5d2fe369b0fde8291fe2dcexif_mnote_data_canon_get_title ;
00309         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#4ca7e0ab9aed5703a2038699e9bcc486get_description  = exif-mnote-data-canon_8c.html#77abbe1c5d4b4098f187c0247d4347fbexif_mnote_data_canon_get_description ;
00310         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#35e308b7ffbdc5dcd6681eab820ba444get_value        = exif-mnote-data-canon_8c.html#345732acb661f31cdef3d7646099a21aexif_mnote_data_canon_get_value ;
00311 
00312         return d;
00313 }
Generated on Sun Apr 23 02:19:18 2006 for EXIF library (libexif) Internals by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 