~ubuntu-branches/ubuntu/maverick/conglomerate/maverick

« back to all changes in this revision

Viewing changes to src/plugin-templates.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 05:07:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108050706-bcg60nwqf1z3w0d6
Tags: 0.9.1-1ubuntu1
* Resynchronise with Debian (Closes: #4397).
  - Thanks, Jordan Mantha.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
{
47
47
        xmlXPathContextPtr xpathCtx; 
48
48
        xpathCtx = xmlXPathNewContext(doc);
49
 
        xmlXPathRegisterNs(xpathCtx, "cong", NAMESPACE);
 
49
        xmlXPathRegisterNs(xpathCtx, (const xmlChar*)"cong", (const xmlChar*)NAMESPACE);
50
50
        return xpathCtx;
51
51
}
52
52
 
60
60
 
61
61
        g_assert(xpathCtx);
62
62
 
63
 
        xpathObj = xmlXPathEvalExpression("/*/cong:template", xpathCtx);
 
63
        xpathObj = xmlXPathEvalExpression((const xmlChar*)"/*/cong:template", xpathCtx);
64
64
 
65
65
        g_assert(xpathObj);
66
66
 
128
128
        return template_paths;
129
129
}
130
130
 
131
 
static xmlChar* value_from_template(xmlDocPtr doc, xmlChar* path)
 
131
static xmlChar* value_from_template(xmlDocPtr doc, const xmlChar* path)
132
132
{
133
133
        xmlXPathContextPtr xpathCtx; 
134
134
        xmlXPathObjectPtr xpathObj; 
142
142
 
143
143
        g_assert(xpathObj);
144
144
 
145
 
        value = g_strdup(xpathObj->stringval);
 
145
        value = xmlStrdup (xpathObj->stringval);
146
146
 
147
147
        xmlXPathFreeObject(xpathObj);
148
148
        xmlXPathFreeContext(xpathCtx); 
153
153
static xmlChar* cong_get_template_name(xmlDocPtr doc)
154
154
{
155
155
        return value_from_template(doc,
156
 
                "string(/*/cong:template/cong:name)");
 
156
                                   (const xmlChar*)"string(/*/cong:template/cong:name)");
157
157
}
158
158
 
159
159
static xmlChar* cong_get_template_description(xmlDocPtr doc)
160
160
{
161
161
        return value_from_template(doc,
162
 
                "string(/*/cong:template/cong:description)");
 
162
                                   (const xmlChar*)"string(/*/cong:template/cong:description)");
163
163
}
164
164
 
165
165
static gboolean
194
194
        {
195
195
                g_message("plugin: %s, %s, %s", name, description, file_name);
196
196
                cong_plugin_register_document_factory(template->plugin, 
197
 
                        _(name), 
198
 
                        _(description),
199
 
                        name, 
 
197
                                                      _((const char*)name), 
 
198
                                                      _((const char*)description),
 
199
                        (const char*)name, 
200
200
                        factory_page_creation_callback_templates,
201
201
                        factory_action_callback_templates,
202
202
                        rel_path,