aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-François Rameau <jframeau@cvs.gnome.org>2005-07-04 05:38:55 +0800
committerJean-François Rameau <jframeau@src.gnome.org>2005-07-04 05:38:55 +0800
commit0e935c597fe2e3e00f672b98f77eaebf48660857 (patch)
tree158d7f1f7afde6398bb207805c77dc864018d6ae /lib
parentb0488b2a6c81ef558613c34fb398a111643b72e3 (diff)
downloadgsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar.gz
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar.bz2
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar.lz
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar.xz
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.tar.zst
gsoc2013-epiphany-0e935c597fe2e3e00f672b98f77eaebf48660857.zip
EphyCookie's expires field is now of time_t type (fixes gcc 4.0 warning).
2005-07-03 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/ephy-cookie-manager.h: EphyCookie's expires field is now of time_t type (fixes gcc 4.0 warning). * embed/ephy-favicon-cache.c: * lib/ephy-file-helpers.c: * lib/ephy-langs.c: * lib/ephy-node-db.c: * lib/ephy-node.c: * lib/ephy-state.c: * lib/egg/eggtraymanager.c: * src/ephy-extensions-manager.c: * src/ephy-main.c: * src/ephy-notebook.c: * src/ephy-session.c: * src/ephy-window.c: Fixes more signed/unsigned problems with gcc 4.0.
Diffstat (limited to 'lib')
-rw-r--r--lib/egg/eggtraymanager.c4
-rw-r--r--lib/ephy-file-helpers.c8
-rw-r--r--lib/ephy-langs.c4
-rw-r--r--lib/ephy-node-db.c16
-rw-r--r--lib/ephy-node.c57
-rw-r--r--lib/ephy-state.c7
6 files changed, 49 insertions, 47 deletions
diff --git a/lib/egg/eggtraymanager.c b/lib/egg/eggtraymanager.c
index f076a64d3..2167ea607 100644
--- a/lib/egg/eggtraymanager.c
+++ b/lib/egg/eggtraymanager.c
@@ -686,13 +686,13 @@ egg_tray_manager_get_child_title (EggTrayManager *manager,
return NULL;
}
- if (!g_utf8_validate (val, nitems, NULL))
+ if (!g_utf8_validate ((const gchar *)val, nitems, NULL))
{
XFree (val);
return NULL;
}
- retval = g_strndup (val, nitems);
+ retval = g_strndup ((const gchar *)val, nitems);
XFree (val);
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 8f06eba69..d84b568c9 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -416,19 +416,19 @@ load_mime_from_xml (void)
tag = xmlTextReaderConstName (reader);
type = xmlTextReaderNodeType (reader);
- if (xmlStrEqual (tag, "safe") && type == XML_READER_TYPE_ELEMENT)
+ if (xmlStrEqual (tag, (const xmlChar *)"safe") && type == XML_READER_TYPE_ELEMENT)
{
permission = EPHY_MIME_PERMISSION_SAFE;
}
- else if (xmlStrEqual (tag, "unsafe") && type == XML_READER_TYPE_ELEMENT)
+ else if (xmlStrEqual (tag, (const xmlChar *)"unsafe") && type == XML_READER_TYPE_ELEMENT)
{
permission = EPHY_MIME_PERMISSION_UNSAFE;
}
- else if (xmlStrEqual (tag, "mime-type"))
+ else if (xmlStrEqual (tag, (const xmlChar *)"mime-type"))
{
xmlChar *type;
- type = xmlTextReaderGetAttribute (reader, "type");
+ type = xmlTextReaderGetAttribute (reader, (const xmlChar *)"type");
g_hash_table_insert (mime_table, type,
GINT_TO_POINTER (permission));
}
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index ff0ecb981..f1977d829 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -351,8 +351,8 @@ load_iso_entries (int iso,
reader = xmlNewTextReaderFilename (filename);
if (reader == NULL) goto out;
- xmlStrPrintf (iso_entries, sizeof (iso_entries), "iso_%d_entries", iso);
- xmlStrPrintf (iso_entry, sizeof (iso_entry), "iso_%d_entry", iso);
+ xmlStrPrintf (iso_entries, sizeof (iso_entries), (const xmlChar *)"iso_%d_entries", iso);
+ xmlStrPrintf (iso_entry, sizeof (iso_entry), (const xmlChar *)"iso_%d_entry", iso);
ret = xmlTextReaderRead (reader);
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 613251ef5..af2899664 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -303,7 +303,7 @@ ephy_node_db_load_from_file (EphyNodeDb *db,
name = xmlTextReaderConstName (reader);
type = xmlTextReaderNodeType (reader);
- if (xmlStrEqual (name, "node")
+ if (xmlStrEqual (name, (const xmlChar *)"node")
&& type == XML_READER_TYPE_ELEMENT)
{
xmlNodePtr subtree;
@@ -324,7 +324,7 @@ ephy_node_db_load_from_file (EphyNodeDb *db,
xmlChar *version;
/* check version info */
- version = xmlTextReaderGetAttribute (reader, "version");
+ version = xmlTextReaderGetAttribute (reader, (const xmlChar *)"version");
if (xmlStrEqual (version, xml_version) == FALSE)
{
success = FALSE;
@@ -368,7 +368,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
START_PROFILER ("Saving node db")
/* FIXME: do we want to turn compression on ? */
- writer = xmlNewTextWriterFilename (filename, 0);
+ writer = xmlNewTextWriterFilename ((const char *)filename, 0);
if (writer == NULL)
{
return -1;
@@ -377,7 +377,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
ret = xmlTextWriterSetIndent (writer, 1);
if (ret < 0) goto out;
- ret = xmlTextWriterSetIndentString (writer, " ");
+ ret = xmlTextWriterSetIndentString (writer, (const xmlChar *)" ");
if (ret < 0) goto out;
ret = xmlTextWriterStartDocument (writer, "1.0", NULL, NULL);
@@ -386,7 +386,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
ret = xmlTextWriterStartElement (writer, root);
if (ret < 0) goto out;
- ret = xmlTextWriterWriteAttribute (writer, "version", version);
+ ret = xmlTextWriterWriteAttribute (writer, (const xmlChar *)"version", version);
if (ret < 0) goto out;
if (comment != NULL)
@@ -484,12 +484,12 @@ ephy_node_db_write_to_xml_safe (EphyNodeDb *db,
int ret = 0;
char *tmp_file;
- tmp_file = g_strconcat (filename, ".tmp", NULL);
+ tmp_file = g_strconcat ((const gchar *)filename, ".tmp", NULL);
va_start (argptr, node);
ret = ephy_node_db_write_to_xml_valist
- (db, tmp_file, root, version, comment, node, argptr);
+ (db, (const xmlChar *)tmp_file, root, version, comment, node, argptr);
va_end (argptr);
@@ -499,7 +499,7 @@ ephy_node_db_write_to_xml_safe (EphyNodeDb *db,
goto failed;
}
- if (ephy_file_switch_temp_file (filename, tmp_file) == FALSE)
+ if (ephy_file_switch_temp_file ((const char *)filename, tmp_file) == FALSE)
{
ret = -1;
}
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 41dbe57de..9e98ccd8c 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -681,11 +681,11 @@ write_parent (guint id,
*/
if (data->ret < 0) return;
- data->ret = xmlTextWriterStartElement (writer, "parent");
+ data->ret = xmlTextWriterStartElement (writer, (const xmlChar *)"parent");
if (data->ret < 0) return;
data->ret = xmlTextWriterWriteFormatAttribute
- (writer, "id", "%ld", node_info->node->id);
+ (writer, (const xmlChar *)"id", "%ld", node_info->node->id);
if (data->ret < 0) return;
data->ret = xmlTextWriterEndElement (writer); /* parent */
@@ -705,11 +705,11 @@ ephy_node_write_to_xml(EphyNode *node,
g_return_val_if_fail (writer != NULL, -1);
/* start writing the node */
- ret = xmlTextWriterStartElement (writer, "node");
+ ret = xmlTextWriterStartElement (writer, (const xmlChar *)"node");
if (ret < 0) goto out;
/* write node id */
- ret = xmlTextWriterWriteFormatAttribute (writer, "id", "%ld", node->id);
+ ret = xmlTextWriterWriteFormatAttribute (writer, (const xmlChar *)"id", "%ld", node->id);
if (ret < 0) goto out;
/* write node properties */
@@ -721,21 +721,22 @@ ephy_node_write_to_xml(EphyNode *node,
if (value == NULL) continue;
- ret = xmlTextWriterStartElement (writer, "property");
+ ret = xmlTextWriterStartElement (writer, (const xmlChar *)"property");
if (ret < 0) break;
- ret = xmlTextWriterWriteFormatAttribute (writer, "id", "%d", i);
+ ret = xmlTextWriterWriteFormatAttribute (writer, (const xmlChar *)"id", "%d", i);
if (ret < 0) break;
ret = xmlTextWriterWriteAttribute
- (writer, "value_type", g_type_name (G_VALUE_TYPE (value)));
+ (writer, (const xmlChar *)"value_type",
+ (const xmlChar *)g_type_name (G_VALUE_TYPE (value)));
if (ret < 0) break;
switch (G_VALUE_TYPE (value))
{
case G_TYPE_STRING:
ret = xmlTextWriterWriteString
- (writer, g_value_get_string (value));
+ (writer, (const xmlChar *)g_value_get_string (value));
break;
case G_TYPE_BOOLEAN:
ret = xmlTextWriterWriteFormatString
@@ -750,12 +751,12 @@ ephy_node_write_to_xml(EphyNode *node,
(writer, "%ld", g_value_get_long (value));
break;
case G_TYPE_FLOAT:
- g_ascii_dtostr (xml_buf, sizeof (xml_buf),
+ g_ascii_dtostr ((gchar *)xml_buf, sizeof (xml_buf),
g_value_get_float (value));
ret = xmlTextWriterWriteString (writer, xml_buf);
break;
case G_TYPE_DOUBLE:
- g_ascii_dtostr (xml_buf, sizeof (xml_buf),
+ g_ascii_dtostr ((gchar *)xml_buf, sizeof (xml_buf),
g_value_get_double (value));
ret = xmlTextWriterWriteString (writer, xml_buf);
break;
@@ -814,7 +815,7 @@ ephy_node_new_from_xml (EphyNodeDb *db, xmlNodePtr xml_node)
{
EphyNode *node;
xmlNodePtr xml_child;
- char *xml;
+ xmlChar *xml;
long id;
g_return_val_if_fail (EPHY_IS_NODE_DB (db), NULL);
@@ -822,22 +823,22 @@ ephy_node_new_from_xml (EphyNodeDb *db, xmlNodePtr xml_node)
if (ephy_node_db_is_immutable (db)) return NULL;
- xml = xmlGetProp (xml_node, "id");
+ xml = xmlGetProp (xml_node, (const xmlChar *)"id");
if (xml == NULL)
return NULL;
- id = atol (xml);
+ id = atol ((const char *)xml);
xmlFree (xml);
node = ephy_node_new_with_id (db, id);
for (xml_child = xml_node->children; xml_child != NULL; xml_child = xml_child->next) {
- if (strcmp (xml_child->name, "parent") == 0) {
+ if (strcmp ((const char *)xml_child->name, "parent") == 0) {
EphyNode *parent;
long parent_id;
- xml = xmlGetProp (xml_child, "id");
+ xml = xmlGetProp (xml_child, (const xmlChar *)"id");
g_assert (xml != NULL);
- parent_id = atol (xml);
+ parent_id = atol ((const char *)xml);
xmlFree (xml);
parent = ephy_node_db_get_node_from_id (db, parent_id);
@@ -848,17 +849,17 @@ ephy_node_new_from_xml (EphyNodeDb *db, xmlNodePtr xml_node)
ephy_node_emit_signal (parent, EPHY_NODE_CHILD_ADDED, node);
}
- } else if (strcmp (xml_child->name, "property") == 0) {
+ } else if (strcmp ((const char *)xml_child->name, "property") == 0) {
GType value_type;
GValue *value;
int property_id;
- xml = xmlGetProp (xml_child, "id");
- property_id = atoi (xml);
+ xml = xmlGetProp (xml_child, (const xmlChar *)"id");
+ property_id = atoi ((const char *)xml);
xmlFree (xml);
- xml = xmlGetProp (xml_child, "value_type");
- value_type = g_type_from_name (xml);
+ xml = xmlGetProp (xml_child, (const xmlChar *)"value_type");
+ value_type = g_type_from_name ((const gchar *)xml);
xmlFree (xml);
xml = xmlNodeGetContent (xml_child);
@@ -868,28 +869,28 @@ ephy_node_new_from_xml (EphyNodeDb *db, xmlNodePtr xml_node)
switch (value_type)
{
case G_TYPE_STRING:
- g_value_set_string (value, xml);
+ g_value_set_string (value, (const gchar *)xml);
break;
case G_TYPE_INT:
- g_value_set_int (value, atoi (xml));
+ g_value_set_int (value, atoi ((const char *)xml));
break;
case G_TYPE_BOOLEAN:
- g_value_set_boolean (value, atoi (xml));
+ g_value_set_boolean (value, atoi ((const char *)xml));
break;
case G_TYPE_LONG:
- g_value_set_long (value, atol (xml));
+ g_value_set_long (value, atol ((const char *)xml));
break;
case G_TYPE_FLOAT:
- g_value_set_float (value, g_ascii_strtod (xml, NULL));
+ g_value_set_float (value, g_ascii_strtod ((const gchar *)xml, NULL));
break;
case G_TYPE_DOUBLE:
- g_value_set_double (value, g_ascii_strtod (xml, NULL));
+ g_value_set_double (value, g_ascii_strtod ((const gchar *)xml, NULL));
break;
case G_TYPE_POINTER:
{
EphyNode *property_node;
- property_node = ephy_node_db_get_node_from_id (db, atol (xml));
+ property_node = ephy_node_db_get_node_from_id (db, atol ((const char *)xml));
g_value_set_pointer (value, property_node);
break;
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index f12ada4bc..fe578b0fd 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -34,8 +34,8 @@
#include <gtk/gtkexpander.h>
#define EPHY_STATES_XML_FILE "states.xml"
-#define EPHY_STATES_XML_ROOT "ephy_states"
-#define EPHY_STATES_XML_VERSION "1.0"
+#define EPHY_STATES_XML_ROOT (const xmlChar *)"ephy_states"
+#define EPHY_STATES_XML_VERSION (const xmlChar *)"1.0"
enum
{
@@ -63,7 +63,8 @@ ephy_states_save (void)
NULL);
ephy_node_db_write_to_xml_safe
- (states_db, xml_file,
+ (states_db,
+ (const xmlChar *)xml_file,
EPHY_STATES_XML_ROOT,
EPHY_STATES_XML_VERSION,
NULL, /* comment */