aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-import.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-07-31 19:58:56 +0800
committerChristian Persch <chpe@src.gnome.org>2004-07-31 19:58:56 +0800
commita1708ca0d9f45fd662e13012d8265c9f15413f3d (patch)
tree4a85a43f2ee1525e759042e731ab5dd4bb24fcbf /src/bookmarks/ephy-bookmarks-import.c
parent0b3f4745f07cf3206ee2060e37062f5b281c6d0e (diff)
downloadgsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar.gz
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar.bz2
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar.lz
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar.xz
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.tar.zst
gsoc2013-epiphany-a1708ca0d9f45fd662e13012d8265c9f15413f3d.zip
Fix signedness difference warnings with gcc 3.5. Patch by Jon Oberheide.
2004-07-31 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmark-action.c: (drag_data_get_cb): * src/bookmarks/ephy-bookmarks-export.c: (write_topics_list), (ephy_bookmarks_export_rdf): * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_bookmark), (xbel_parse_folder), (xbel_parse_xbel), (parse_rdf_subjects), (parse_rdf_item), (ephy_bookmarks_import_rdf): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_save), (ephy_bookmarks_init): * src/bookmarks/ephy-bookmarksbar-model.c: (ephy_bookmarksbar_model_get_node): * src/bookmarks/ephy-topic-action.c: (drag_data_get_cb): * src/ephy-session.c: (write_tab), (write_window_geometry), (write_tool_window), (write_ephy_window), (ephy_session_save), (parse_embed), (ephy_session_load): Fix signedness difference warnings with gcc 3.5. Patch by Jon Oberheide.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-import.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 85e010575..eed3774cf 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -145,7 +145,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
type = xmlTextReaderNodeType (reader);
- if (xmlStrEqual (tag, "#text"))
+ if (xmlStrEqual (tag, (xmlChar *) "#text"))
{
if (state == STATE_TITLE && title == NULL)
{
@@ -161,11 +161,11 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
/* eat it */
}
}
- else if (xmlStrEqual (tag, "bookmark"))
+ else if (xmlStrEqual (tag, (xmlChar *) "bookmark"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_BOOKMARK && address == NULL)
{
- address = xmlTextReaderGetAttribute (reader, "href");
+ address = xmlTextReaderGetAttribute (reader, (xmlChar *) "href");
}
else if (type == XML_READER_TYPE_END_ELEMENT && state == STATE_BOOKMARK)
{
@@ -174,7 +174,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
break;
}
}
- else if (xmlStrEqual (tag, "title"))
+ else if (xmlStrEqual (tag, (xmlChar *) "title"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_BOOKMARK && title == NULL)
{
@@ -185,7 +185,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
state = STATE_BOOKMARK;
}
}
- else if (xmlStrEqual (tag, "desc"))
+ else if (xmlStrEqual (tag, (xmlChar *) "desc"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_BOOKMARK)
{
@@ -196,7 +196,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
state = STATE_BOOKMARK;
}
}
- else if (xmlStrEqual (tag, "info"))
+ else if (xmlStrEqual (tag, (xmlChar *) "info"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_BOOKMARK)
{
@@ -207,7 +207,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
state = STATE_BOOKMARK;
}
}
- else if (xmlStrEqual (tag, "metadata"))
+ else if (xmlStrEqual (tag, (xmlChar *) "metadata"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_INFO)
{
@@ -218,7 +218,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
state = STATE_INFO;
}
}
- else if (xmlStrEqual (tag, "smarturl"))
+ else if (xmlStrEqual (tag, (xmlChar *) "smarturl"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_METADATA)
{
@@ -241,14 +241,14 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
if (title == NULL)
{
- title = xmlStrdup (_("Untitled"));
+ title = xmlStrdup ((xmlChar *) _("Untitled"));
}
- node = bookmark_add (eb, title, address);
+ node = bookmark_add (eb, (const char *) title, (const char *) address);
if (node == NULL)
{
/* probably a duplicate */
- node = ephy_bookmarks_find_bookmark (eb, address);
+ node = ephy_bookmarks_find_bookmark (eb, (const char *) address);
}
xmlFree (title);
@@ -280,13 +280,13 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
{
/* shouldn't happen but does anyway :) */
}
- else if (xmlStrEqual (tag, "#text"))
+ else if (xmlStrEqual (tag, (xmlChar *) "#text"))
{
if (state == STATE_TITLE && folder == NULL)
{
char *title;
- title = xmlTextReaderValue (reader);
+ title = (char *) xmlTextReaderValue (reader);
if (!parent_folder)
{
@@ -305,7 +305,7 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
/* eat it */
}
}
- else if (xmlStrEqual (tag, "bookmark") && type == 1 && state == STATE_FOLDER)
+ else if (xmlStrEqual (tag, (xmlChar *) "bookmark") && type == 1 && state == STATE_FOLDER)
{
EphyNode *node = NULL, *keyword;
@@ -325,7 +325,7 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
if (ret != 1) break;
}
- else if ((xmlStrEqual (tag, "folder"))
+ else if ((xmlStrEqual (tag, (xmlChar *) "folder"))
&& state == STATE_FOLDER)
{
if (type == XML_READER_TYPE_ELEMENT)
@@ -341,7 +341,7 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
break;
}
}
- else if (xmlStrEqual (tag, "title"))
+ else if (xmlStrEqual (tag, (xmlChar *) "title"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_FOLDER)
{
@@ -352,7 +352,7 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
state = STATE_FOLDER;
}
}
- else if (xmlStrEqual (tag, "info"))
+ else if (xmlStrEqual (tag, (xmlChar *) "info"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_FOLDER)
{
@@ -363,7 +363,7 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader, char *parent_fold
state = STATE_FOLDER;
}
}
- else if (xmlStrEqual (tag, "desc"))
+ else if (xmlStrEqual (tag, (xmlChar *) "desc"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_FOLDER)
{
@@ -408,7 +408,7 @@ xbel_parse_xbel (EphyBookmarks *eb, xmlTextReaderPtr reader)
{
/* shouldn't happen but does anyway :( */
}
- else if (xmlStrEqual (tag, "bookmark") && type == XML_READER_TYPE_ELEMENT
+ else if (xmlStrEqual (tag, (xmlChar *) "bookmark") && type == XML_READER_TYPE_ELEMENT
&& state == STATE_FOLDER)
{
EphyNode *node = NULL;
@@ -418,7 +418,7 @@ xbel_parse_xbel (EphyBookmarks *eb, xmlTextReaderPtr reader)
if (ret != 1) break;
}
- else if (xmlStrEqual (tag, "folder") && type == XML_READER_TYPE_ELEMENT
+ else if (xmlStrEqual (tag, (xmlChar *) "folder") && type == XML_READER_TYPE_ELEMENT
&& state == STATE_XBEL)
{
/* this will eat the </folder> too */
@@ -426,17 +426,17 @@ xbel_parse_xbel (EphyBookmarks *eb, xmlTextReaderPtr reader)
if (ret != 1) break;
}
- else if ((xmlStrEqual (tag, "xbel")) && type == XML_READER_TYPE_ELEMENT
+ else if ((xmlStrEqual (tag, (xmlChar *) "xbel")) && type == XML_READER_TYPE_ELEMENT
&& state == STATE_START)
{
state = STATE_XBEL;
}
- else if ((xmlStrEqual (tag, "xbel")) && type == XML_READER_TYPE_END_ELEMENT
+ else if ((xmlStrEqual (tag, (xmlChar *) "xbel")) && type == XML_READER_TYPE_END_ELEMENT
&& state == STATE_XBEL)
{
state = STATE_STOP;
}
- else if (xmlStrEqual (tag, "title"))
+ else if (xmlStrEqual (tag, (xmlChar *) "title"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_XBEL)
{
@@ -447,7 +447,7 @@ xbel_parse_xbel (EphyBookmarks *eb, xmlTextReaderPtr reader)
state = STATE_XBEL;
}
}
- else if (xmlStrEqual (tag, "info"))
+ else if (xmlStrEqual (tag, (xmlChar *) "info"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_XBEL)
{
@@ -458,7 +458,7 @@ xbel_parse_xbel (EphyBookmarks *eb, xmlTextReaderPtr reader)
state = STATE_XBEL;
}
}
- else if (xmlStrEqual (tag, "desc"))
+ else if (xmlStrEqual (tag, (xmlChar *) "desc"))
{
if (type == XML_READER_TYPE_ELEMENT && state == STATE_XBEL)
{
@@ -799,13 +799,13 @@ parse_rdf_subjects (xmlNodePtr node,
while (child != NULL)
{
- if (xmlStrEqual (child->name, "Bag"))
+ if (xmlStrEqual (child->name, (xmlChar *) "Bag"))
{
child = child->children;
while (child != NULL)
{
- if (xmlStrEqual (child->name, "li"))
+ if (xmlStrEqual (child->name, (xmlChar *) "li"))
{
subject = xmlNodeGetContent (child);
*subjects = g_list_append (*subjects, subject);
@@ -842,26 +842,26 @@ parse_rdf_item (EphyBookmarks *bookmarks,
child = node->children;
#ifdef OLD_RDF_TEMPORARY_HACK
- link = xmlGetProp (node, "about");
+ link = xmlGetProp (node, (xmlChar *) "about");
#endif
while (child != NULL)
{
- if (xmlStrEqual (child->name, "title"))
+ if (xmlStrEqual (child->name, (xmlChar *) "title"))
{
title = xmlNodeGetContent (child);
}
#ifndef OLD_RDF_TEMPORARY_HACK
- else if (xmlStrEqual (child->name, "link"))
+ else if (xmlStrEqual (child->name, (xmlChar *) "link"))
{
link = xmlNodeGetContent (child);
}
#endif
- else if (xmlStrEqual (child->name, "subject"))
+ else if (xmlStrEqual (child->name, (xmlChar *) "subject"))
{
parse_rdf_subjects (child, &subjects);
}
- else if (xmlStrEqual (child->name, "smartlink"))
+ else if (xmlStrEqual (child->name, (xmlChar *) "smartlink"))
{
if (link) xmlFree (link);
link = xmlNodeGetContent (child);
@@ -870,7 +870,7 @@ parse_rdf_item (EphyBookmarks *bookmarks,
child = child->next;
}
- bmk = bookmark_add (bookmarks, title, link);
+ bmk = bookmark_add (bookmarks, (char *) title, (char *) link);
if (bmk)
{
l = subjects;
@@ -930,7 +930,7 @@ ephy_bookmarks_import_rdf (EphyBookmarks *bookmarks,
while (child != NULL)
{
- if (xmlStrEqual (child->name, "item"))
+ if (xmlStrEqual (child->name, (xmlChar *) "item"))
{
parse_rdf_item (bookmarks, child);
}