comparison libgaim/xmlnode.c @ 14228:c18bdf510325

[gaim-migrate @ 16910] Fix autogen.sh to run glib-gettextize Fix CFLAGS when gstreamer is not installed Make things work with gtk < 2.6, in part by borrowing some code from gdk Don't link gntgaim with gstreamer, xss or sm committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 20 Aug 2006 17:49:58 +0000
parents 60b1bc8dbf37
children 950f3ed6baa0
comparison
equal deleted inserted replaced
14227:f306918687a4 14228:c18bdf510325
401 node = xmlnode_new(element_name); 401 node = xmlnode_new(element_name);
402 402
403 xmlnode_set_namespace(node, namespace); 403 xmlnode_set_namespace(node, namespace);
404 404
405 for(i=0; i < nb_attributes * 5; i+=5) { 405 for(i=0; i < nb_attributes * 5; i+=5) {
406 #ifdef HAVE_LIBXML
407 char *txt;
408 #endif
406 int attrib_len = attributes[i+4] - attributes[i+3]; 409 int attrib_len = attributes[i+4] - attributes[i+3];
407 char *attrib = g_malloc(attrib_len + 1); 410 char *attrib = g_malloc(attrib_len + 1);
408 memcpy(attrib, attributes[i+3], attrib_len); 411 memcpy(attrib, attributes[i+3], attrib_len);
409 attrib[attrib_len] = '\0'; 412 attrib[attrib_len] = '\0';
410 #ifdef HAVE_LIBXML 413 #ifdef HAVE_LIBXML
411 char *txt = attrib; 414 txt = attrib;
412 attrib = gaim_unescape_html(txt); 415 attrib = gaim_unescape_html(txt);
413 g_free(txt); 416 g_free(txt);
414 #endif 417 #endif
415 xmlnode_set_attrib(node, attributes[i], attrib); 418 xmlnode_set_attrib(node, attributes[i], attrib);
416 g_free(attrib); 419 g_free(attrib);