Changeset 2171
- Timestamp:
- 2006-03-13 02:19:04 (3 years ago)
- Files:
-
- libannodex/trunk/ChangeLog (modified) (1 diff)
- libannodex/trunk/configure.ac (modified) (2 diffs)
- libannodex/trunk/include/annodex/anx_types.h (modified) (2 diffs)
- libannodex/trunk/src/importers/anx_import_cmml.c (modified) (2 diffs)
- libannodex/trunk/src/libannodex/anx_element.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libannodex/trunk/ChangeLog
r2141 r2171 1 2006-03-13 Silvia Pfeiffer <silvia at silvia dot silvia-pfeiffer dot de> 2 * added the new files from Alex Krumm-Heller for windows port to Makefile.am 3 * fixed up libannodex for cmml 2.1 4 * changed previous struct member name from "class" to make it c++ compatible 5 1 6 2006-03-05 Thomas Vander Stichele <thomas at apestaart dot org> 2 7 libannodex/trunk/configure.ac
r2141 r2171 216 216 HAVE_LIBCMML=no 217 217 218 PKG_CHECK_MODULES(CMML, cmml >= 0.9. 0,218 PKG_CHECK_MODULES(CMML, cmml >= 0.9.2, 219 219 HAVE_LIBCMML="yes", HAVE_LIBCMML="no") 220 220 … … 229 229 AC_MSG_ERROR([ 230 230 *** 231 *** libcmml-0.9. 0or greater seems to exist on your system, however231 *** libcmml-0.9.2 or greater seems to exist on your system, however 232 232 *** the pkg-config tool cannot find its build information. 233 233 *** libannodex/trunk/include/annodex/anx_types.h
r1278 r2171 72 72 73 73 struct _AnxLinkElement { 74 char *id; /**< id attribute of link */75 char * class;/**< class attribute of link */76 char *title; /**< title attribute of link */77 char *lang; /**< language code of link */78 char *dir; /**< directionality of lang (ltr/rtl) */79 char *href; /**< href attribute of link */80 char *type; /**< type attribute of link */81 char *rel; /**< rel attribute of link */82 char *rev; /**< rev attribute of link */83 char *media; /**< media attribute of link */74 char *id; /**< id attribute of link */ 75 char *link_class; /**< class attribute of link */ 76 char *title; /**< title attribute of link */ 77 char *lang; /**< language code of link */ 78 char *dir; /**< directionality of lang (ltr/rtl) */ 79 char *href; /**< href attribute of link */ 80 char *type; /**< type attribute of link */ 81 char *rel; /**< rel attribute of link */ 82 char *rev; /**< rev attribute of link */ 83 char *media; /**< media attribute of link */ 84 84 }; 85 85 … … 102 102 struct _AnxClip { 103 103 const char *clip_id; /**< id attribute of clip */ 104 const char *cl ass;/**< class attribute of clip */104 const char *clip_class; /**< class attribute of clip */ 105 105 const char *title; /**< title attribute of clip */ 106 106 const char *lang; /**< language attribute of desc element */ libannodex/trunk/src/importers/anx_import_cmml.c
r1427 r2171 100 100 new_link = (AnxLinkElement* ) anx_malloc (sizeof (AnxLinkElement)); 101 101 new_link->id = anxcmml_strdup (link->id); 102 new_link-> class = anxcmml_strdup (link->class);102 new_link->link_class = anxcmml_strdup (link->link_class); 103 103 new_link->title = anxcmml_strdup (link->title); 104 104 new_link->lang = anxcmml_strdup (link->lang); … … 259 259 /* copy clip data across */ 260 260 a->clip_id = anxcmml_strdup (clip->clip_id); 261 a->cl ass = anxcmml_strdup (clip->class);261 a->clip_class = anxcmml_strdup (clip->clip_class); 262 262 a->title = anxcmml_strdup (clip->title); 263 263 a->lang = anxcmml_strdup (clip->lang); libannodex/trunk/src/libannodex/anx_element.c
r1278 r2171 94 94 */ 95 95 new_link->id = anx_strdup (link->id); 96 new_link-> class = anx_strdup (link->class);96 new_link->link_class = anx_strdup (link->link_class); 97 97 new_link->title = anx_strdup (link->title); 98 98 new_link->lang = anx_strdup (link->lang); … … 111 111 if (link == NULL) return NULL; 112 112 anx_free (link->id); 113 anx_free (link-> class);113 anx_free (link->link_class); 114 114 anx_free (link->title); 115 115 anx_free (link->lang); … … 144 144 new_head->meta = 145 145 anx_list_clone_with (head->meta, (AnxCloneFunc)anx_meta_element_clone); 146 new_head->link = 147 anx_list_clone_with (head->link, (AnxCloneFunc)anx_link_element_clone); 146 148 147 149 return new_head; … … 165 167 166 168 anx_list_free_with (head->meta, (AnxFreeFunc)anx_meta_element_free); 169 anx_list_free_with (head->link, (AnxFreeFunc)anx_link_element_free); 167 170 168 171 anx_free (head); … … 176 179 AnxHead * head; 177 180 AnxMetaElement * meta; 181 AnxLinkElement * link; 178 182 XTag * child; 179 183 … … 212 216 } 213 217 218 head->link = anx_list_new (); 219 220 for (child = xtag_first_child (tag, "link"); child; 221 child = xtag_next_child (tag, "link")) { 222 link = anx_malloc (sizeof (AnxLinkElement)); 223 link->id = anx_strdup_attribute (child, "id"); 224 link->link_class = anx_strdup_attribute (child, "class"); 225 link->title = anx_strdup_attribute (child, "title"); 226 link->lang = anx_strdup_attribute (child, "lang"); 227 link->dir = anx_strdup_attribute (child, "dir"); 228 link->href = anx_strdup_attribute (child, "href"); 229 link->type = anx_strdup_attribute (child, "type"); 230 link->rel = anx_strdup_attribute (child, "rel"); 231 link->rev = anx_strdup_attribute (child, "rev"); 232 link->media = anx_strdup_attribute (child, "media"); 233 234 head->link = anx_list_append (head->link, link); 235 } 236 214 237 return head; 215 238 } … … 223 246 224 247 new_clip->clip_id = anx_strdup (clip->clip_id); 248 new_clip->clip_class = anx_strdup (clip->clip_class); 249 new_clip->title = anx_strdup (clip->title); 225 250 new_clip->lang = anx_strdup (clip->lang); 226 251 new_clip->dir = anx_strdup (clip->dir); … … 228 253 229 254 new_clip->anchor_id = anx_strdup (clip->anchor_id); 255 new_clip->anchor_class = anx_strdup (clip->anchor_class); 256 new_clip->anchor_title = anx_strdup (clip->anchor_title); 230 257 new_clip->anchor_lang = anx_strdup (clip->anchor_lang); 231 258 new_clip->anchor_dir = anx_strdup (clip->anchor_dir); 232 new_clip->anchor_class = anx_strdup (clip->anchor_class);233 259 new_clip->anchor_href = anx_strdup (clip->anchor_href); 234 260 new_clip->anchor_text = anx_strdup (clip->anchor_text); 235 261 236 262 new_clip->img_id = anx_strdup (clip->img_id); 263 new_clip->img_class = anx_strdup (clip->img_class); 264 new_clip->img_title = anx_strdup (clip->img_title); 237 265 new_clip->img_lang = anx_strdup (clip->img_lang); 238 266 new_clip->img_dir = anx_strdup (clip->img_dir); … … 241 269 242 270 new_clip->desc_id = anx_strdup (clip->desc_id); 271 new_clip->desc_class = anx_strdup (clip->desc_class); 272 new_clip->desc_title = anx_strdup (clip->desc_title); 243 273 new_clip->desc_lang = anx_strdup (clip->desc_lang); 244 274 new_clip->desc_dir = anx_strdup (clip->desc_dir); … … 257 287 258 288 anx_free (clip->clip_id); 289 anx_free (clip->clip_class); 290 anx_free (clip->title); 259 291 anx_free (clip->lang); 260 292 anx_free (clip->dir); 261 293 anx_free (clip->track); 262 294 anx_free (clip->anchor_id); 295 anx_free (clip->anchor_class); 296 anx_free (clip->anchor_title); 263 297 anx_free (clip->anchor_lang); 264 298 anx_free (clip->anchor_dir); 265 anx_free (clip->anchor_class);266 299 anx_free (clip->anchor_href); 267 300 anx_free (clip->anchor_text); 268 301 anx_free (clip->img_id); 302 anx_free (clip->img_class); 303 anx_free (clip->img_title); 269 304 anx_free (clip->img_lang); 270 305 anx_free (clip->img_dir); … … 272 307 anx_free (clip->img_alt); 273 308 anx_free (clip->desc_id); 309 anx_free (clip->desc_class); 310 anx_free (clip->desc_title); 274 311 anx_free (clip->desc_lang); 275 312 anx_free (clip->desc_dir); … … 293 330 294 331 clip->clip_id = anx_strdup_attribute (tag, "id"); 332 clip->clip_class = anx_strdup_attribute (tag, "class"); 333 clip->title = anx_strdup_attribute (tag, "title"); 295 334 clip->lang = anx_strdup_attribute (tag, "lang"); 296 335 clip->dir = anx_strdup_attribute (tag, "dir"); … … 299 338 child = xtag_first_child (tag, "a"); 300 339 clip->anchor_id = anx_strdup_attribute (child, "id"); 340 clip->anchor_class = anx_strdup_attribute (child, "class"); 341 clip->anchor_title = anx_strdup_attribute (child, "title"); 301 342 clip->anchor_lang = anx_strdup_attribute (child, "lang"); 302 343 clip->anchor_dir = anx_strdup_attribute (child, "dir"); 303 clip->anchor_class = anx_strdup_attribute (child, "class");304 344 clip->anchor_href = anx_strdup_attribute (child, "href"); 305 345 clip->anchor_text = anx_strdup_pcdata (child); … … 307 347 child = xtag_first_child (tag, "img"); 308 348 clip->img_id = anx_strdup_attribute (child, "id"); 349 clip->img_class = anx_strdup_attribute (child, "class"); 350 clip->img_title = anx_strdup_attribute (child, "title"); 309 351 clip->img_lang = anx_strdup_attribute (child, "lang"); 310 352 clip->img_dir = anx_strdup_attribute (child, "dir"); 311 353 clip->img_src = anx_strdup_attribute (child, "src"); 312 354 clip->img_alt = anx_strdup_attribute (child, "alt"); 355 356 child = xtag_first_child (tag, "desc"); 357 clip->desc_id = anx_strdup_attribute (child, "id"); 358 clip->desc_class = anx_strdup_attribute (child, "class"); 359 clip->desc_title = anx_strdup_attribute (child, "title"); 360 clip->desc_lang = anx_strdup_attribute (child, "lang"); 361 clip->desc_dir = anx_strdup_attribute (child, "dir"); 362 clip->desc_text = anx_strdup_pcdata (child); 313 363 314 364 clip->meta = anx_list_new (); … … 326 376 clip->meta = anx_list_append (clip->meta, meta); 327 377 } 328 329 child = xtag_first_child (tag, "desc");330 clip->desc_id = anx_strdup_attribute (child, "id");331 clip->desc_lang = anx_strdup_attribute (child, "lang");332 clip->desc_dir = anx_strdup_attribute (child, "dir");333 clip->desc_text = anx_strdup_pcdata (child);334 378 335 379 return clip;