aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-29 06:25:02 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-29 06:25:02 +0800
commit8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c (patch)
tree2669f7f999cfef2ab9e0b734fb088cd5566c04ab /lib
parentc26b22ca2c21d169b135115abc9e26d0176640d0 (diff)
downloadgsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar.gz
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar.bz2
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar.lz
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar.xz
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.tar.zst
gsoc2013-epiphany-8ed0c8f6318e7800ad3968f6e3cd19a53dcd5c8c.zip
Add ; to all LOG statements, and adapt ephy-debug.h for non-GNUC-varargs
2005-01-28 Christian Persch <chpe@cvs.gnome.org> * doc/reference/tmpl/ephy-embed.sgml: * embed/ephy-embed-persist.c: (ephy_embed_persist_init), (ephy_embed_persist_finalize): * embed/ephy-embed-shell.c: (ephy_embed_shell_finalize): * embed/ephy-encodings.c: (ephy_encodings_finalize), (ephy_encodings_init): * embed/ephy-favicon-cache.c: (ephy_favicon_cache_finalize), (favicon_download_completed_cb), (favicon_download_cancelled_cb), (ephy_favicon_cache_download), (ephy_favicon_cache_get): * embed/ephy-history.c: (ephy_history_set_enabled), (ephy_history_save), (ephy_history_finalize), (ephy_history_host_visited), (ephy_history_set_page_title), (ephy_history_set_icon), (ephy_history_clear): * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyContentPolicy.cpp: * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/EphyHistoryListener.cpp: * embed/mozilla/EphySidebar.cpp: * embed/mozilla/EphySingle.cpp: * embed/mozilla/FilePicker.cpp: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/MozDownload.cpp: * embed/mozilla/PrintingPromptService.cpp: * embed/mozilla/mozilla-download.cpp: * embed/mozilla/mozilla-embed-event.cpp: * lib/ephy-dbus.c: (session_filter_func), (system_filter_func), (ephy_dbus_connect_to_system_bus), (ephy_dbus_connect_to_session_bus), (path_message_func), (ephy_dbus_startup), (ephy_dbus_shutdown), (ephy_dbus_init), (ephy_dbus_finalize): * lib/ephy-debug.h: * lib/ephy-file-chooser.c: (ephy_file_chooser_finalize): * lib/ephy-file-helpers.c: (ephy_file_helpers_shutdown): * lib/ephy-langs.c: (load_iso_entries): * lib/ephy-module.c: (ephy_module_load), (ephy_module_unload), (ephy_module_new_object), (ephy_module_init), (ephy_module_finalize): * lib/ephy-node-db.c: (ephy_node_db_load_from_file), (ephy_node_db_write_to_xml_valist): * lib/ephy-shlib-loader.c: (ephy_shlib_loader_init), (ephy_shlib_loader_finalize): * lib/widgets/ephy-location-entry.c: (entry_style_set_cb), (entry_realize_cb), (ephy_location_entry_construct_contents), (ephy_location_entry_init): * lib/widgets/ephy-spinner.c: (ephy_spinner_cache_load), (ephy_spinner_cache_get_images), (ephy_spinner_cache_init), (ephy_spinner_cache_finalize): * lib/widgets/ephy-tree-model-node.c: (ephy_tree_model_node_update_node): * lib/widgets/ephy-tree-model-sort.c: (each_property_get_data_binder): * src/bookmarks/ephy-bookmark-action.c: (create_tool_item), (connect_proxy), (ephy_bookmark_action_finalize): * src/bookmarks/ephy-bookmark-properties.c: (ephy_bookmark_properties_set_bookmark), (set_window_icon): * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_update_menu), (provide_favicon): * src/bookmarks/ephy-bookmarks-export.c: (ephy_bookmarks_export_rdf), (ephy_bookmarks_export_mozilla): * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import): * src/bookmarks/ephy-bookmarks-menu.c: (ephy_bookmarks_menu_rebuild), (do_update_cb), (bookmarks_tree_changed_cb), (topics_added_cb), (topics_removed_cb), (topic_child_changed_cb), (bookmark_added_cb), (bookmark_removed_cb), (activate_cb), (ephy_bookmarks_menu_finalize): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_get_toolbars_model), (ephy_bookmarks_save), (ephy_bookmarks_finalize), (ephy_bookmarks_find_keyword), (ephy_bookmarks_set_keyword), (ephy_bookmarks_unset_keyword): * src/bookmarks/ephy-bookmarksbar-model.c: (save_changes_idle), (load_toolbars), (ephy_bookmarksbar_model_init), (ephy_bookmarksbar_model_dispose), (ephy_bookmarksbar_model_finalize): * src/bookmarks/ephy-bookmarksbar.c: (ephy_bookmarksbar_action_request), (ephy_bookmarksbar_finalize): * src/bookmarks/ephy-favorites-menu.c: (ephy_favorites_menu_rebuild): * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_set_title): * src/bookmarks/ephy-topic-action.c: (connect_proxy): * src/bookmarks/ephy-topics-selector.c: (ephy_topics_selector_set_bookmark): * src/ephy-encoding-menu.c: (add_action): * src/ephy-extensions-manager.c: (ephy_extensions_manager_load), (ephy_extensions_manager_unload), (ephy_extensions_manager_load_string), (get_loader_for_type), (load_extension), (unload_extension), (sync_loaded_extensions), (ephy_extensions_manager_load_dir), (ephy_extensions_manager_init), (ephy_extensions_manager_startup), (ephy_extensions_manager_finalize), (impl_attach_window), (impl_detach_window), (impl_attach_tab), (impl_detach_tab): * src/ephy-history-window.c: (setup_filters), (provide_favicon): * src/ephy-link.c: (ephy_link_open): * src/ephy-location-action.c: (user_changed_cb), (sync_address), (ephy_location_action_set_address): * src/ephy-navigation-action.c: (menu_activated_cb), (connect_proxy): * src/ephy-notebook.c: (ephy_notebook_finalize): * src/ephy-session.c: (window_focus_in_event_cb), (impl_attach_window), (impl_detach_window), (ephy_session_init), (ephy_session_dispose), (ephy_session_finalize), (ephy_session_autoresume), (ephy_session_close), (ephy_session_save), (ephy_session_load), (ephy_session_add_window), (ephy_session_remove_window): * src/ephy-shell.c: (save_yourself_cb), (die_cb), (ephy_shell_finalize), (ephy_shell_new_tab), (ephy_shell_get_toolbars_model), (toolwindow_show_cb), (toolwindow_hide_cb): * src/ephy-tab.c: (popups_manager_add), (popups_manager_add_window), (ephy_tab_get_popups_allowed), (popups_manager_show_all), (popups_manager_hide_all), (ephy_tab_finalize), (ephy_tab_address_cb), (ephy_tab_zoom_changed_cb), (ephy_tab_new_window_cb), (ephy_tab_visibility_cb), (ephy_tab_destroy_brsr_cb), (ephy_tab_size_to_cb), (ephy_tab_dom_mouse_click_cb), (ephy_tab_init): * src/ephy-tabs-menu.c: (ephy_tabs_menu_update): * src/ephy-toolbar.c: (sync_user_input_cb): * src/ephy-toolbars-model.c: (save_changes_idle), (ephy_toolbars_model_load): * src/ephy-window.c: (ephy_window_destroy), (show_embed_popup), (ephy_window_init), (ephy_window_finalize): * src/pdm-dialog.c: (pdm_dialog_cookies_construct), (cookie_added_cb), (cookie_changed_cb), (cookie_deleted_cb), (cookies_cleared_cb), (pdm_dialog_passwords_construct), (passwords_changed_cb): * src/prefs-dialog.c: (fonts_language_changed_cb): Add ; to all LOG statements, and adapt ephy-debug.h for non-GNUC-varargs case.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dbus.c20
-rw-r--r--lib/ephy-debug.h22
-rw-r--r--lib/ephy-file-chooser.c2
-rw-r--r--lib/ephy-file-helpers.c2
-rw-r--r--lib/ephy-langs.c2
-rw-r--r--lib/ephy-module.c10
-rw-r--r--lib/ephy-node-db.c6
-rw-r--r--lib/ephy-shlib-loader.c4
-rw-r--r--lib/widgets/ephy-location-entry.c8
-rw-r--r--lib/widgets/ephy-spinner.c8
-rw-r--r--lib/widgets/ephy-tree-model-node.c2
-rw-r--r--lib/widgets/ephy-tree-model-sort.c2
12 files changed, 50 insertions, 38 deletions
diff --git a/lib/ephy-dbus.c b/lib/ephy-dbus.c
index 3b76b0614..835bf1e36 100644
--- a/lib/ephy-dbus.c
+++ b/lib/ephy-dbus.c
@@ -116,7 +116,7 @@ session_filter_func (DBusConnection *connection,
DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
"Disconnected"))
{
- LOG ("EphyDbus disconnected from session bus")
+ LOG ("EphyDbus disconnected from session bus");
dbus_connection_unref (dbus->priv->session_bus);
dbus->priv->session_bus = NULL;
@@ -140,13 +140,13 @@ system_filter_func (DBusConnection *connection,
{
EphyDbus *dbus = EPHY_DBUS (user_data);
- LOG ("EphyDbus filtering message from system bus")
+ LOG ("EphyDbus filtering message from system bus");
if (dbus_message_is_signal (message,
DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
"Disconnected"))
{
- LOG ("EphyDbus disconnected from system bus")
+ LOG ("EphyDbus disconnected from system bus");
dbus_connection_unref (dbus->priv->system_bus);
dbus->priv->system_bus = NULL;
@@ -167,7 +167,7 @@ ephy_dbus_connect_to_system_bus (EphyDbus *dbus)
DBusConnection *bus;
DBusError error;
- LOG ("EphyDbus connecting to system DBUS")
+ LOG ("EphyDbus connecting to system DBUS");
dbus_error_init (&error);
bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -200,7 +200,7 @@ ephy_dbus_connect_to_session_bus (EphyDbus *dbus)
DBusError error;
DBusConnection *bus;
- LOG ("EphyDbus connecting to session DBUS")
+ LOG ("EphyDbus connecting to session DBUS");
dbus_error_init (&error);
bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
@@ -250,7 +250,7 @@ path_message_func (DBusConnection *connection,
{
DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- LOG ("EphyDbus filtering path messagefrom session bus")
+ LOG ("EphyDbus filtering path messagefrom session bus");
if (dbus_message_is_method_call (message, epiphany_dbus_service, "load"))
{
@@ -268,7 +268,7 @@ ephy_dbus_startup (EphyDbus *dbus)
{
g_return_if_fail (EPHY_IS_DBUS (dbus));
- LOG ("EphyDbus startup")
+ LOG ("EphyDbus startup");
ephy_dbus_connect_to_session_bus (dbus);
ephy_dbus_connect_to_system_bus (dbus);
@@ -279,7 +279,7 @@ ephy_dbus_shutdown (EphyDbus *dbus)
{
g_return_if_fail (EPHY_IS_DBUS (dbus));
- LOG ("EphyDbus shutdown")
+ LOG ("EphyDbus shutdown");
if (dbus->priv->reconnect_timeout_id != 0)
{
@@ -320,7 +320,7 @@ ephy_dbus_init (EphyDbus *dbus)
{
dbus->priv = EPHY_DBUS_GET_PRIVATE (dbus);
- LOG ("EphyDbus initialising")
+ LOG ("EphyDbus initialising");
}
static void
@@ -330,7 +330,7 @@ ephy_dbus_finalize (GObject *object)
ephy_dbus_shutdown (dbus);
- LOG ("EphyDbus finalised")
+ LOG ("EphyDbus finalised");
parent_class->finalize (object);
}
diff --git a/lib/ephy-debug.h b/lib/ephy-debug.h
index f2311e49b..2c49158a7 100644
--- a/lib/ephy-debug.h
+++ b/lib/ephy-debug.h
@@ -32,13 +32,25 @@ G_BEGIN_DECLS
#define DISABLE_PROFILING
#endif
+#if defined(G_HAVE_GNUC_VARARGS)
+
#ifdef DISABLE_LOGGING
-#define LOG(msg, args...)
+#define LOG(msg, args...) G_STMT_START { } G_STMT_END
#else
-#define LOG(msg, args...) \
-g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
- "[ %s ] " msg, \
- __FILE__ , ## args);
+#define LOG(msg, args...) \
+g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
+ "[ %s ] " msg, \
+ __FILE__ , ## args)
+#endif
+
+#elif defined(G_HAVE_ISO_VARARGS)
+
+#define LOG(...) G_STMT_START { } G_STMT_END
+
+#else /* no varargs macros */
+
+static void LOG(const char *format, ...) {}
+
#endif
#ifdef DISABLE_PROFILING
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index ad6f2a624..4ce3b38d4 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -128,7 +128,7 @@ ephy_file_chooser_finalize (GObject *object)
g_free (dialog->priv->persist_key);
- LOG ("EphyFileChooser finalised")
+ LOG ("EphyFileChooser finalised");
G_OBJECT_CLASS (parent_class)->finalize (object);
}
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 5be893dc6..f1f62bae5 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -229,7 +229,7 @@ ephy_file_helpers_shutdown (void)
if (mime_table != NULL)
{
- LOG ("Destroying mime type hashtable")
+ LOG ("Destroying mime type hashtable");
g_hash_table_destroy (mime_table);
mime_table = NULL;
}
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index 927c37ebe..5e2de46f1 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -316,7 +316,7 @@ load_iso_entries (int iso,
char *filename;
int ret = -1;
- LOG ("Loading ISO-%d codes", iso)
+ LOG ("Loading ISO-%d codes", iso);
START_PROFILER ("Loading ISO codes")
diff --git a/lib/ephy-module.c b/lib/ephy-module.c
index fe31e39c6..4c6731461 100644
--- a/lib/ephy-module.c
+++ b/lib/ephy-module.c
@@ -85,7 +85,7 @@ ephy_module_load (GTypeModule *gmodule)
EphyModule *module = EPHY_MODULE (gmodule);
EphyModuleRegisterFunc register_func;
- LOG ("Loading %s", module->path)
+ LOG ("Loading %s", module->path);
module->library = g_module_open (module->path, 0);
@@ -123,7 +123,7 @@ ephy_module_unload (GTypeModule *gmodule)
{
EphyModule *module = EPHY_MODULE (gmodule);
- LOG ("Unloading %s", module->path)
+ LOG ("Unloading %s", module->path);
g_module_close (module->library);
@@ -142,7 +142,7 @@ ephy_module_get_path (EphyModule *module)
GObject *
ephy_module_new_object (EphyModule *module)
{
- LOG ("Creating object of type %s", g_type_name (module->type))
+ LOG ("Creating object of type %s", g_type_name (module->type));
if (module->type == 0)
{
@@ -155,7 +155,7 @@ ephy_module_new_object (EphyModule *module)
static void
ephy_module_init (EphyModule *module)
{
- LOG ("EphyModule %p initialising", module)
+ LOG ("EphyModule %p initialising", module);
}
static void
@@ -163,7 +163,7 @@ ephy_module_finalize (GObject *object)
{
EphyModule *module = EPHY_MODULE (object);
- LOG ("EphyModule %p finalising", module)
+ LOG ("EphyModule %p finalising", module);
g_free (module->path);
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 591b7ec82..8f553491a 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -251,7 +251,7 @@ node_from_id_real (EphyNodeDb *db, guint id)
EphyNode *ret = NULL;
if (id < db->priv->id_to_node->len)
- ret = g_ptr_array_index (db->priv->id_to_node, id);;
+ ret = g_ptr_array_index (db->priv->id_to_node, id);
return ret;
}
@@ -380,7 +380,7 @@ ephy_node_db_load_from_file (EphyNodeDb *db,
gboolean was_immutable;
int ret;
- LOG ("ephy_node_db_load_from_file %s", xml_file)
+ LOG ("ephy_node_db_load_from_file %s", xml_file);
START_PROFILER ("loading node db")
@@ -468,7 +468,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
EphyNode *node;
int ret;
- LOG ("Saving node db to %s", filename)
+ LOG ("Saving node db to %s", filename);
START_PROFILER ("Saving node db")
diff --git a/lib/ephy-shlib-loader.c b/lib/ephy-shlib-loader.c
index f5b759b64..3cf731dcb 100644
--- a/lib/ephy-shlib-loader.c
+++ b/lib/ephy-shlib-loader.c
@@ -110,7 +110,7 @@ ephy_shlib_loader_init (EphyShlibLoader *loader)
{
loader->priv = EPHY_SHLIB_LOADER_GET_PRIVATE (loader);
- LOG ("EphyShlibLoader initialising")
+ LOG ("EphyShlibLoader initialising");
}
static void
@@ -118,7 +118,7 @@ ephy_shlib_loader_finalize (GObject *object)
{
EphyShlibLoader *loader = EPHY_SHLIB_LOADER (object);
- LOG ("EphyShlibLoader finalising")
+ LOG ("EphyShlibLoader finalising");
g_slist_foreach (loader->priv->data, (GFunc) free_loader_data, NULL);
g_slist_free (loader->priv->data);
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 39d614a45..3a922d5c3 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -488,7 +488,7 @@ entry_style_set_cb (GtkWidget *widget,
GtkStyle *previous_style,
EphyLocationEntry *entry)
{
- LOG ("entry_style_set_cb")
+ LOG ("entry_style_set_cb");
modify_background (entry);
}
@@ -497,7 +497,7 @@ static void
entry_realize_cb (GtkWidget *widget,
EphyLocationEntry *entry)
{
- LOG ("entry_realize_cb")
+ LOG ("entry_realize_cb");
modify_background (entry);
}
@@ -508,7 +508,7 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
EphyLocationEntryPrivate *priv = entry->priv;
GtkWidget *alignment, *frame, *hbox;
- LOG ("EphyLocationEntry constructing contents %p", entry)
+ LOG ("EphyLocationEntry constructing contents %p", entry);
alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 1, 1);
@@ -582,7 +582,7 @@ ephy_location_entry_init (EphyLocationEntry *le)
{
EphyLocationEntryPrivate *p;
- LOG ("EphyLocationEntry initialising %p", le)
+ LOG ("EphyLocationEntry initialising %p", le);
p = EPHY_LOCATION_ENTRY_GET_PRIVATE (le);
le->priv = p;
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index 7172e62ab..1ad7f442b 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -184,7 +184,7 @@ ephy_spinner_cache_load (EphySpinnerCache *cache)
int grid_width, grid_height, x, y, size, h, w;
const char *icon;
- LOG ("EphySpinnerCache loading")
+ LOG ("EphySpinnerCache loading");
ephy_spinner_cache_unload (cache);
@@ -334,7 +334,7 @@ ephy_spinner_cache_get_images (EphySpinnerCache *cache,
GList *element, *l;
int h, w;
- LOG ("Getting animation images at size %d", size)
+ LOG ("Getting animation images at size %d", size);
if (cache->priv->images == NULL || cache->priv->originals == NULL)
{
@@ -388,7 +388,7 @@ ephy_spinner_cache_init (EphySpinnerCache *cache)
{
cache->priv = EPHY_SPINNER_CACHE_GET_PRIVATE (cache);
- LOG ("EphySpinnerCache initialising")
+ LOG ("EphySpinnerCache initialising");
/* FIXME: icon theme is per-screen, not global */
cache->priv->icon_theme = gtk_icon_theme_get_default ();
@@ -403,7 +403,7 @@ ephy_spinner_cache_finalize (GObject *object)
{
EphySpinnerCache *cache = EPHY_SPINNER_CACHE (object);
- LOG ("EphySpinnerCache finalising")
+ LOG ("EphySpinnerCache finalising");
g_signal_handlers_disconnect_by_func
(cache->priv->icon_theme, G_CALLBACK(ephy_spinner_cache_load), cache);
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index 13ed2dbc8..e00ff1324 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -162,7 +162,7 @@ ephy_tree_model_node_update_node (EphyTreeModelNode *model,
path = get_path_real (model, node);
}
- LOG ("Updating row")
+ LOG ("Updating row");
gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter);
gtk_tree_path_free (path);
diff --git a/lib/widgets/ephy-tree-model-sort.c b/lib/widgets/ephy-tree-model-sort.c
index 1c9ae1e4f..dc6af7982 100644
--- a/lib/widgets/ephy-tree-model-sort.c
+++ b/lib/widgets/ephy-tree-model-sort.c
@@ -206,7 +206,7 @@ each_property_get_data_binder (EphyDragEachSelectedItemDataGet iteratee,
g_return_if_fail (base_data != NULL);
- LOG ("Data get %s (%s)", base_data, extra_data)
+ LOG ("Data get %s (%s)", base_data, extra_data);
iteratee (base_data, extra_data, data);