Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 130645 | Differences between
and this patch

Collapse All | Expand All

(-)cnijfilter-2.60/printui/src/keytext.c (-9 / +9 lines)
Lines 37-43 Link Here
37
#ifdef	USE_LIB_GLADE
37
#ifdef	USE_LIB_GLADE
38
#	include <glade/glade.h>
38
#	include <glade/glade.h>
39
#endif
39
#endif
40
#include <gnome-xml/parser.h>
40
#include <libxml/parser.h>
41
#include <string.h>
41
#include <string.h>
42
42
43
#ifndef	USE_LIB_GLADE
43
#ifndef	USE_LIB_GLADE
Lines 71-83 Link Here
71
71
72
static void AddKeyAndTextToTree(xmlNodePtr xmlnode, GTree* tree)
72
static void AddKeyAndTextToTree(xmlNodePtr xmlnode, GTree* tree)
73
{
73
{
74
	char *key, *text;
74
	xmlChar *key, *text;
75
75
76
	if( !xmlnode->name || g_strcasecmp(xmlnode->name,"Item") != 0 )
76
	if( !xmlnode->name || xmlStrcasecmp(xmlnode->name, xmlCharStrdup("Item")) != 0 )
77
		return;
77
		return;
78
78
79
	key  = g_strdup(xmlGetProp(xmlnode,"key"));
79
	key  = xmlStrdup(xmlGetProp(xmlnode,xmlCharStrdup("key")));
80
	text = g_strdup(xmlNodeGetContent(xmlnode));
80
	text = xmlStrdup(xmlNodeGetContent(xmlnode));
81
81
82
	if( key != NULL && text != NULL )
82
	if( key != NULL && text != NULL )
83
	{
83
	{
Lines 89-95 Link Here
89
{
89
{
90
	xmlNodePtr node;
90
	xmlNodePtr node;
91
91
92
	for( node = doc->root->childs ; node != NULL ; node = node->next )
92
	for( node = xmlDocGetRootElement(doc)->children ; node != NULL ; node = node->next )
93
	{
93
	{
94
		AddKeyAndTextToTree(node, tree);
94
		AddKeyAndTextToTree(node, tree);
95
	}
95
	}
Lines 102-110 Link Here
102
	if( (doc = xmlParseFile(fname)) == NULL )
102
	if( (doc = xmlParseFile(fname)) == NULL )
103
		return FALSE;
103
		return FALSE;
104
104
105
	if( doc->root == NULL
105
	if( xmlDocGetRootElement(doc) == NULL
106
	 || doc->root->name == NULL
106
	 || xmlDocGetRootElement(doc)->name == NULL
107
	 || g_strcasecmp(doc->root->name, "KeyTextList") != 0)
107
	 || xmlStrcasecmp(xmlDocGetRootElement(doc)->name, xmlCharStrdup("KeyTextList")) != 0)
108
	{
108
	{
109
		xmlFreeDoc(doc);
109
		xmlFreeDoc(doc);
110
		return FALSE;
110
		return FALSE;

Return to bug 130645