r22290 - gnucash/trunk/src - Refactor safe_strcmp into the glib standard g_strcmp0

Geert Janssens gjanssens at code.gnucash.org
Tue Aug 7 13:24:56 EDT 2012


Author: gjanssens
Date: 2012-08-07 13:24:55 -0400 (Tue, 07 Aug 2012)
New Revision: 22290
Trac: http://svn.gnucash.org/trac/changeset/22290

Modified:
   gnucash/trunk/src/app-utils/file-utils.c
   gnucash/trunk/src/app-utils/gnc-component-manager.c
   gnucash/trunk/src/app-utils/gnc-ui-util.c
   gnucash/trunk/src/app-utils/option-util.c
   gnucash/trunk/src/backend/sql/gnc-backend-sql.c
   gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
   gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-backend-xml.c
   gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-owner-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
   gnucash/trunk/src/backend/xml/io-example-account.c
   gnucash/trunk/src/backend/xml/io-gncxml-v1.c
   gnucash/trunk/src/backend/xml/io-gncxml-v2.c
   gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c
   gnucash/trunk/src/backend/xml/sixtp.c
   gnucash/trunk/src/backend/xml/test/test-dom-converters1.c
   gnucash/trunk/src/backend/xml/test/test-file-stuff.c
   gnucash/trunk/src/backend/xml/test/test-load-xml2.c
   gnucash/trunk/src/backend/xml/test/test-string-converters.c
   gnucash/trunk/src/backend/xml/test/test-xml-account.c
   gnucash/trunk/src/backend/xml/test/test-xml-commodity.c
   gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
   gnucash/trunk/src/business/business-gnome/dialog-customer.c
   gnucash/trunk/src/business/business-gnome/dialog-employee.c
   gnucash/trunk/src/business/business-gnome/dialog-invoice.c
   gnucash/trunk/src/business/business-gnome/dialog-job.c
   gnucash/trunk/src/business/business-gnome/dialog-order.c
   gnucash/trunk/src/business/business-gnome/dialog-payment.c
   gnucash/trunk/src/business/business-gnome/dialog-vendor.c
   gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerModel.c
   gnucash/trunk/src/core-utils/test/test-gnc-uri-utils.c
   gnucash/trunk/src/core-utils/test/test-resolve-file-path.c
   gnucash/trunk/src/engine/Account.c
   gnucash/trunk/src/engine/Query.c
   gnucash/trunk/src/engine/Recurrence.c
   gnucash/trunk/src/engine/Split.c
   gnucash/trunk/src/engine/Transaction.c
   gnucash/trunk/src/engine/cap-gains.c
   gnucash/trunk/src/engine/engine-helpers.c
   gnucash/trunk/src/engine/gnc-commodity.c
   gnucash/trunk/src/engine/gnc-pricedb.c
   gnucash/trunk/src/engine/gncAddress.c
   gnucash/trunk/src/engine/gncBillTerm.c
   gnucash/trunk/src/engine/gncCustomer.c
   gnucash/trunk/src/engine/gncEmployee.c
   gnucash/trunk/src/engine/gncEntry.c
   gnucash/trunk/src/engine/gncInvoice.c
   gnucash/trunk/src/engine/gncJob.c
   gnucash/trunk/src/engine/gncOrder.c
   gnucash/trunk/src/engine/gncOwner.c
   gnucash/trunk/src/engine/gncTaxTable.c
   gnucash/trunk/src/engine/gncVendor.c
   gnucash/trunk/src/engine/test/test-address.c
   gnucash/trunk/src/engine/test/test-business.c
   gnucash/trunk/src/engine/test/test-commodities.c
   gnucash/trunk/src/engine/test/test-customer.c
   gnucash/trunk/src/engine/test/test-employee.c
   gnucash/trunk/src/engine/test/test-job.c
   gnucash/trunk/src/engine/test/test-object.c
   gnucash/trunk/src/engine/test/test-querynew.c
   gnucash/trunk/src/engine/test/test-vendor.c
   gnucash/trunk/src/gnome-utils/account-quickfill.c
   gnucash/trunk/src/gnome-utils/dialog-account.c
   gnucash/trunk/src/gnome-utils/dialog-commodity.c
   gnucash/trunk/src/gnome-utils/dialog-options.c
   gnucash/trunk/src/gnome-utils/dialog-transfer.c
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
   gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c
   gnucash/trunk/src/gnome-utils/gnc-query-list.c
   gnucash/trunk/src/gnome-utils/gnc-sx-list-tree-model-adapter.c
   gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c
   gnucash/trunk/src/gnome-utils/search-param.c
   gnucash/trunk/src/gnome/dialog-commodities.c
   gnucash/trunk/src/gnome/dialog-price-edit-db.c
   gnucash/trunk/src/gnome/dialog-price-editor.c
   gnucash/trunk/src/gnome/dialog-tax-info.c
   gnucash/trunk/src/html/gnc-html-webkit.c
   gnucash/trunk/src/html/gnc-html.c
   gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
   gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
   gnucash/trunk/src/import-export/import-backend.c
   gnucash/trunk/src/libqof/qof/qofclass.c
   gnucash/trunk/src/libqof/qof/qofinstance.c
   gnucash/trunk/src/libqof/qof/qoflog.c
   gnucash/trunk/src/libqof/qof/qofobject.c
   gnucash/trunk/src/libqof/qof/qofquery.c
   gnucash/trunk/src/libqof/qof/qofquerycore.c
   gnucash/trunk/src/libqof/qof/qofreference.c
   gnucash/trunk/src/libqof/qof/qofsession.c
   gnucash/trunk/src/libqof/qof/qofutil.c
   gnucash/trunk/src/libqof/qof/qofutil.h
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
   gnucash/trunk/src/register/ledger-core/split-register-control.c
   gnucash/trunk/src/register/ledger-core/split-register-model.c
   gnucash/trunk/src/register/ledger-core/split-register.c
   gnucash/trunk/src/register/register-core/basiccell.c
   gnucash/trunk/src/register/register-core/numcell.c
   gnucash/trunk/src/register/register-core/pricecell.c
   gnucash/trunk/src/register/register-core/table-allgui.c
   gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
   gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
Refactor safe_strcmp into the glib standard g_strcmp0

Modified: gnucash/trunk/src/app-utils/file-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/file-utils.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/app-utils/file-utils.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -275,7 +275,7 @@
                                           STATE_FILE_TOP, STATE_FILE_BOOK_GUID,
                                           NULL);
         DEBUG("File GncGUID is %s", file_guid ? file_guid : "<not found>");
-        if (safe_strcmp(guid, file_guid) == 0)
+        if (g_strcmp0(guid, file_guid) == 0)
         {
             DEBUG("Matched !!!");
             g_free(file_guid);

Modified: gnucash/trunk/src/app-utils/gnc-component-manager.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -559,7 +559,7 @@
         ComponentInfo *ci = node->data;
 
         if (component_class &&
-                safe_strcmp (component_class, ci->component_class) != 0)
+                g_strcmp0 (component_class, ci->component_class) != 0)
             continue;
 
         gnc_unregister_gui_component (ci->component_id);
@@ -791,7 +791,7 @@
         ComponentInfo *ci = node->data;
 
         if (component_class &&
-                safe_strcmp (component_class, ci->component_class) != 0)
+                g_strcmp0 (component_class, ci->component_class) != 0)
             continue;
 
         gnc_close_gui_component (ci->component_id);
@@ -848,7 +848,7 @@
     {
         ComponentInfo *ci = node->data;
 
-        if (safe_strcmp (component_class, ci->component_class) != 0)
+        if (g_strcmp0 (component_class, ci->component_class) != 0)
             continue;
 
         if (find_handler && !find_handler (find_data, ci->user_data))
@@ -900,7 +900,7 @@
         ComponentInfo *ci = node->data;
 
         if (component_class &&
-                safe_strcmp (component_class, ci->component_class) != 0)
+                g_strcmp0 (component_class, ci->component_class) != 0)
             continue;
 
         list = g_list_prepend (list, GINT_TO_POINTER (ci->component_id));

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -85,15 +85,15 @@
 
     string = gnc_gconf_get_string(GCONF_GENERAL, KEY_ACCOUNT_SEPARATOR, NULL);
 
-    if (!string || !*string || safe_strcmp(string, "colon") == 0)
+    if (!string || !*string || g_strcmp0(string, "colon") == 0)
         separator = ":";
-    else if (safe_strcmp(string, "slash") == 0)
+    else if (g_strcmp0(string, "slash") == 0)
         separator = "/";
-    else if (safe_strcmp(string, "backslash") == 0)
+    else if (g_strcmp0(string, "backslash") == 0)
         separator = "\\";
-    else if (safe_strcmp(string, "dash") == 0)
+    else if (g_strcmp0(string, "dash") == 0)
         separator = "-";
-    else if (safe_strcmp(string, "period") == 0)
+    else if (g_strcmp0(string, "period") == 0)
         separator = ".";
     else
         separator = string;
@@ -116,17 +116,17 @@
 
     choice = gnc_gconf_get_string(GCONF_GENERAL, KEY_REVERSED_ACCOUNTS, NULL);
 
-    if (safe_strcmp (choice, "none") == 0)
+    if (g_strcmp0 (choice, "none") == 0)
     {
     }
-    else if (safe_strcmp (choice, "income_expense") == 0)
+    else if (g_strcmp0 (choice, "income_expense") == 0)
     {
         reverse_type[ACCT_TYPE_INCOME]  = TRUE;
         reverse_type[ACCT_TYPE_EXPENSE] = TRUE;
     }
     else
     {
-        if (safe_strcmp (choice, "credit") != 0)
+        if (g_strcmp0 (choice, "credit") != 0)
             PERR("bad value '%s'", choice ? choice : "(null)");
         reverse_type[ACCT_TYPE_LIABILITY] = TRUE;
         reverse_type[ACCT_TYPE_PAYABLE]   = TRUE;
@@ -303,7 +303,7 @@
         gchar *return_string = NULL;
 
         tax_type = gnc_get_current_book_tax_type ();
-        if (tax_type == NULL || (safe_strcmp (tax_type, "") == 0))
+        if (tax_type == NULL || (g_strcmp0 (tax_type, "") == 0))
             return g_strdup (_("Tax entity type not specified"));
 
         atype = xaccAccountGetType (account);
@@ -463,7 +463,7 @@
                                                         (gint) copy_number);
                             if (tax_related)
                             {
-                                if (safe_strcmp (form, "") == 0)
+                                if (g_strcmp0 (form, "") == 0)
                                     return_string = g_strdup_printf ("%s", desc);
                                 else
                                     return_string = g_strdup_printf ("%s%s: %s",

Modified: gnucash/trunk/src/app-utils/option-util.c
===================================================================
--- gnucash/trunk/src/app-utils/option-util.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/app-utils/option-util.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1319,7 +1319,7 @@
     const GNCOptionSection *sa = a;
     const GNCOptionSection *sb = b;
 
-    return safe_strcmp(sa->section_name, sb->section_name);
+    return g_strcmp0(sa->section_name, sb->section_name);
 }
 
 static gint
@@ -1331,7 +1331,7 @@
     char *tag_b = gnc_option_sort_tag(ob);
     gint result;
 
-    result = safe_strcmp(tag_a, tag_b);
+    result = g_strcmp0(tag_a, tag_b);
 
     if (tag_a != NULL)
         free(tag_a);
@@ -1545,7 +1545,7 @@
         option = option_node->data;
 
         node_name = gnc_option_name(option);
-        result = safe_strcmp(name, node_name);
+        result = g_strcmp0(name, node_name);
         free(node_name);
 
         if (result == 0)
@@ -2152,7 +2152,7 @@
 
                 symbol = gnc_date_option_value_get_type (value);
 
-                if (safe_strcmp(symbol, "relative") == 0)
+                if (g_strcmp0(symbol, "relative") == 0)
                 {
                     SCM relative = gnc_date_option_value_get_relative (value);
 

Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -288,7 +288,7 @@
     const gchar *sa = (const gchar *) a;
     const gchar *sb = (const gchar *) b;
 
-    return( safe_strcmp( sa, sb ) );
+    return( g_strcmp0( sa, sb ) );
 }
 
 static gint
@@ -297,7 +297,7 @@
     const gnc_commodity *ca = (const gnc_commodity *) a;
     const gnc_commodity *cb = (const gnc_commodity *) b;
 
-    return( safe_strcmp( gnc_commodity_get_mnemonic( ca ),
+    return( g_strcmp0( gnc_commodity_get_mnemonic( ca ),
     gnc_commodity_get_mnemonic( cb ) ) );
 }
 

Modified: gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-transaction-sql.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/sql/gnc-transaction-sql.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -957,7 +957,7 @@
     pPredData = qof_query_term_get_pred_data( pTerm );
     isInverted = qof_query_term_is_inverted( pTerm );
 
-    if ( safe_strcmp( pPredData->type_name, QOF_TYPE_GUID ) == 0 )
+    if ( g_strcmp0( pPredData->type_name, QOF_TYPE_GUID ) == 0 )
     {
         query_guid_t guid_data = (query_guid_t)pPredData;
         GList* guid_entry;
@@ -992,7 +992,7 @@
         g_string_append( sql, "))" );
 
     }
-    else if ( safe_strcmp( pPredData->type_name, QOF_TYPE_CHAR ) == 0 )
+    else if ( g_strcmp0( pPredData->type_name, QOF_TYPE_CHAR ) == 0 )
     {
         query_char_t char_data = (query_char_t)pPredData;
         int i;
@@ -1024,7 +1024,7 @@
         }
 
     }
-    else if ( safe_strcmp( pPredData->type_name, QOF_TYPE_STRING ) == 0 )
+    else if ( g_strcmp0( pPredData->type_name, QOF_TYPE_STRING ) == 0 )
     {
         query_string_t string_data = (query_string_t)pPredData;
         sqlEscape* escape = sqlEscape_new();
@@ -1077,7 +1077,7 @@
             g_string_append_printf( sql, "%f", d );
 
         }
-        else if ( safe_strcmp( pPredData->type_name, QOF_TYPE_DATE ) == 0 )
+        else if ( g_strcmp0( pPredData->type_name, QOF_TYPE_DATE ) == 0 )
         {
             query_date_t date_data = (query_date_t)pPredData;
             gchar* datebuf;

Modified: gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -426,7 +426,7 @@
     {
         GNCLot *lot;
 
-        if (safe_strcmp("text", (char*) mark->name) == 0)
+        if (g_strcmp0("text", (char*) mark->name) == 0)
             continue;
 
         lot = dom_tree_to_lot(mark, pdata->book);

Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -593,7 +593,7 @@
     }
 
     filename = gnc_uri_get_path ( uri );
-    if (0 == safe_strcmp(filename, QOF_STDOUT))
+    if (0 == g_strcmp0(filename, QOF_STDOUT))
     {
         result = FALSE;
         goto det_exit;
@@ -731,7 +731,7 @@
         if (rc == 0)
         {
             /* We must never chmod the file /dev/null */
-            g_assert(safe_strcmp(tmp_name, "/dev/null") != 0);
+            g_assert(g_strcmp0(tmp_name, "/dev/null") != 0);
 
             /* Use the permissions from the original data file */
             if (g_chmod(tmp_name, statbuf.st_mode) != 0)
@@ -1243,13 +1243,13 @@
     if (!choice)
         choice = g_strdup("days");
 
-    if (safe_strcmp (choice, "never") == 0)
+    if (g_strcmp0 (choice, "never") == 0)
         be->file_retention_type = XML_RETAIN_NONE;
-    else if (safe_strcmp (choice, "forever") == 0)
+    else if (g_strcmp0 (choice, "forever") == 0)
         be->file_retention_type = XML_RETAIN_ALL;
     else
     {
-        if (safe_strcmp (choice, "days") != 0)
+        if (g_strcmp0 (choice, "days") != 0)
             PERR("bad value '%s'", choice ? choice : "(null)");
         be->file_retention_type = XML_RETAIN_DAYS;
     }

Modified: gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-commodity-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -141,7 +141,7 @@
 static void
 set_commodity_value(xmlNodePtr node, gnc_commodity* com)
 {
-    if (safe_strcmp((char*) node->name, cmdty_fraction) == 0)
+    if (g_strcmp0((char*) node->name, cmdty_fraction) == 0)
     {
         gint64 val;
         char *string;
@@ -153,11 +153,11 @@
         }
         xmlFree (string);
     }
-    else if (safe_strcmp((char*)node->name, cmdty_get_quotes) == 0)
+    else if (g_strcmp0((char*)node->name, cmdty_get_quotes) == 0)
     {
         gnc_commodity_set_quote_flag(com, TRUE);
     }
-    else if (safe_strcmp((char*)node->name, cmdty_quote_source) == 0)
+    else if (g_strcmp0((char*)node->name, cmdty_quote_source) == 0)
     {
         gnc_quote_source *source;
         char *string;
@@ -169,7 +169,7 @@
         gnc_commodity_set_quote_source(com, source);
         xmlFree (string);
     }
-    else if (safe_strcmp((char*)node->name, cmdty_slots) == 0)
+    else if (g_strcmp0((char*)node->name, cmdty_slots) == 0)
     {
         /* We ignore the results here */
         dom_tree_to_kvp_frame_given(node,
@@ -181,7 +181,7 @@
 
         for (mark = com_handlers; mark->tag; mark++)
         {
-            if (safe_strcmp(mark->tag, (char*)node->name) == 0)
+            if (g_strcmp0(mark->tag, (char*)node->name) == 0)
             {
                 gchar* val = dom_tree_to_text(node);
                 g_strstrip(val);
@@ -224,9 +224,9 @@
 
     for (node = tree->xmlChildrenNode; node; node = node->next)
     {
-        if (safe_strcmp((char*) node->name, cmdty_namespace) == 0)
+        if (g_strcmp0((char*) node->name, cmdty_namespace) == 0)
             exchange = (gchar*) xmlNodeGetContent (node->xmlChildrenNode);
-        if (safe_strcmp((char*) node->name, cmdty_id) == 0)
+        if (g_strcmp0((char*) node->name, cmdty_id) == 0)
             mnemonic = (gchar*) xmlNodeGetContent (node->xmlChildrenNode);
     }
 

Modified: gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -145,7 +145,7 @@
     g_return_val_if_fail( nodeTxt, FALSE );
     for ( i = 0; (tmp = uiFreqTypeStrs[i].str) != NULL; i++ )
     {
-        if ( safe_strcmp( nodeTxt, tmp ) == 0 )
+        if ( g_strcmp0( nodeTxt, tmp ) == 0 )
         {
             fspd->uift = uiFreqTypeStrs[i].uift;
             g_free( nodeTxt );

Modified: gnucash/trunk/src/backend/xml/gnc-owner-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-owner-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-owner-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -105,13 +105,13 @@
     char* txt = dom_tree_to_text(node);
     g_return_val_if_fail(txt, FALSE);
 
-    if (!safe_strcmp (txt, GNC_ID_CUSTOMER))
+    if (!g_strcmp0 (txt, GNC_ID_CUSTOMER))
         gncOwnerInitCustomer (pdata->owner, NULL);
-    else if (!safe_strcmp (txt, GNC_ID_JOB))
+    else if (!g_strcmp0 (txt, GNC_ID_JOB))
         gncOwnerInitJob (pdata->owner, NULL);
-    else if (!safe_strcmp (txt, GNC_ID_VENDOR))
+    else if (!g_strcmp0 (txt, GNC_ID_VENDOR))
         gncOwnerInitVendor (pdata->owner, NULL);
-    else if (!safe_strcmp (txt, GNC_ID_EMPLOYEE))
+    else if (!g_strcmp0 (txt, GNC_ID_EMPLOYEE))
         gncOwnerInitEmployee (pdata->owner, NULL);
     else
     {

Modified: gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -90,46 +90,46 @@
     if (!p || !sub_node) return FALSE;
 
     gnc_price_begin_edit (p);
-    if (safe_strcmp("price:id", (char*)sub_node->name) == 0)
+    if (g_strcmp0("price:id", (char*)sub_node->name) == 0)
     {
         GncGUID *c = dom_tree_to_guid(sub_node);
         if (!c) return FALSE;
         gnc_price_set_guid(p, c);
         g_free(c);
     }
-    else if (safe_strcmp("price:commodity", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:commodity", (char*)sub_node->name) == 0)
     {
         gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
         if (!c) return FALSE;
         gnc_price_set_commodity(p, c);
     }
-    else if (safe_strcmp("price:currency", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:currency", (char*)sub_node->name) == 0)
     {
         gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
         if (!c) return FALSE;
         gnc_price_set_currency(p, c);
     }
-    else if (safe_strcmp("price:time", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:time", (char*)sub_node->name) == 0)
     {
         Timespec t = dom_tree_to_timespec(sub_node);
         if (!dom_tree_valid_timespec(&t, sub_node->name)) return FALSE;
         gnc_price_set_time(p, t);
     }
-    else if (safe_strcmp("price:source", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:source", (char*)sub_node->name) == 0)
     {
         char *text = dom_tree_to_text(sub_node);
         if (!text) return FALSE;
         gnc_price_set_source(p, text);
         g_free(text);
     }
-    else if (safe_strcmp("price:type", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:type", (char*)sub_node->name) == 0)
     {
         char *text = dom_tree_to_text(sub_node);
         if (!text) return FALSE;
         gnc_price_set_typestr(p, text);
         g_free(text);
     }
-    else if (safe_strcmp("price:value", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:value", (char*)sub_node->name) == 0)
     {
         gnc_numeric *value = dom_tree_to_gnc_numeric(sub_node);
         if (!value) return FALSE;

Modified: gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -248,7 +248,7 @@
     SchedXaction *sx = pdata->sx;
     gchar *tmp = dom_tree_to_text( node );
 
-    sx->enabled = (safe_strcmp( tmp, "y" ) == 0 ? TRUE : FALSE );
+    sx->enabled = (g_strcmp0( tmp, "y" ) == 0 ? TRUE : FALSE );
 
     return TRUE;
 }
@@ -260,7 +260,7 @@
     SchedXaction *sx = pdata->sx;
     gchar *tmp = dom_tree_to_text( node );
 
-    sx->autoCreateOption = (safe_strcmp( tmp, "y" ) == 0 ? TRUE : FALSE );
+    sx->autoCreateOption = (g_strcmp0( tmp, "y" ) == 0 ? TRUE : FALSE );
 
     return TRUE;
 }
@@ -272,7 +272,7 @@
     SchedXaction *sx = pdata->sx;
     gchar *tmp = dom_tree_to_text( node );
 
-    sx->autoCreateNotify = (safe_strcmp( tmp, "y" ) == 0 ? TRUE : FALSE );
+    sx->autoCreateNotify = (g_strcmp0( tmp, "y" ) == 0 ? TRUE : FALSE );
 
     return TRUE;
 }

Modified: gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -348,10 +348,10 @@
     {
         GncTaxTableEntry *entry;
 
-        if (safe_strcmp ("text", (char*)mark->name) == 0)
+        if (g_strcmp0 ("text", (char*)mark->name) == 0)
             continue;
 
-        if (safe_strcmp (gnc_taxtableentry_string, (char*)mark->name))
+        if (g_strcmp0 (gnc_taxtableentry_string, (char*)mark->name))
             return FALSE;
 
         entry = dom_tree_to_ttentry (mark, pdata->book);

Modified: gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -76,7 +76,7 @@
     {
         const char *memo = xaccSplitGetMemo(spl);
 
-        if (memo && safe_strcmp(memo, "") != 0)
+        if (memo && g_strcmp0(memo, "") != 0)
         {
             xmlNewTextChild(ret, NULL, BAD_CAST "split:memo", (xmlChar*)memo);
         }
@@ -85,7 +85,7 @@
     {
         const char *action = xaccSplitGetAction(spl);
 
-        if (action && safe_strcmp(action, "") != 0)
+        if (action && g_strcmp0(action, "") != 0)
         {
             xmlNewTextChild(ret, NULL, BAD_CAST "split:action", (xmlChar*)action);
         }
@@ -163,7 +163,7 @@
     xmlAddChild(ret, commodity_ref_to_dom_tree("trn:currency",
                 xaccTransGetCurrency(trn)));
 
-    if (xaccTransGetNum(trn) && (safe_strcmp(xaccTransGetNum(trn), "") != 0))
+    if (xaccTransGetNum(trn) && (g_strcmp0(xaccTransGetNum(trn), "") != 0))
     {
         xmlNewTextChild(ret, NULL, BAD_CAST "trn:num", (xmlChar*)xaccTransGetNum(trn));
     }
@@ -537,10 +537,10 @@
     {
         Split *spl;
 
-        if (safe_strcmp("text", (char*)mark->name) == 0)
+        if (g_strcmp0("text", (char*)mark->name) == 0)
             continue;
 
-        if (safe_strcmp("trn:split", (char*)mark->name))
+        if (g_strcmp0("trn:split", (char*)mark->name))
         {
             return FALSE;
         }

Modified: gnucash/trunk/src/backend/xml/io-example-account.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-example-account.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/io-example-account.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -173,7 +173,7 @@
 {
     GncExampleAccount *gea = (GncExampleAccount*)globaldata;
 
-    if (safe_strcmp(tag, "gnc:account") == 0)
+    if (g_strcmp0(tag, "gnc:account") == 0)
     {
         add_account_local(gea, (Account*)data);
     }

Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -3631,46 +3631,46 @@
 
     gnc_price_begin_edit (p);
 
-    if (safe_strcmp("price:id", (char*)sub_node->name) == 0)
+    if (g_strcmp0("price:id", (char*)sub_node->name) == 0)
     {
         GncGUID *c = dom_tree_to_guid(sub_node);
         if (!c) return FALSE;
         gnc_price_set_guid(p, c);
         g_free(c);
     }
-    else if (safe_strcmp("price:commodity", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:commodity", (char*)sub_node->name) == 0)
     {
         gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
         if (!c) return FALSE;
         gnc_price_set_commodity(p, c);
     }
-    else if (safe_strcmp("price:currency", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:currency", (char*)sub_node->name) == 0)
     {
         gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
         if (!c) return FALSE;
         gnc_price_set_currency(p, c);
     }
-    else if (safe_strcmp("price:time", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:time", (char*)sub_node->name) == 0)
     {
         Timespec t = dom_tree_to_timespec(sub_node);
         if (!dom_tree_valid_timespec(&t, sub_node->name)) return FALSE;
         gnc_price_set_time(p, t);
     }
-    else if (safe_strcmp("price:source", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:source", (char*)sub_node->name) == 0)
     {
         char *text = dom_tree_to_text(sub_node);
         if (!text) return FALSE;
         gnc_price_set_source(p, text);
         g_free(text);
     }
-    else if (safe_strcmp("price:type", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:type", (char*)sub_node->name) == 0)
     {
         char *text = dom_tree_to_text(sub_node);
         if (!text) return FALSE;
         gnc_price_set_typestr(p, text);
         g_free(text);
     }
-    else if (safe_strcmp("price:value", (char*)sub_node->name) == 0)
+    else if (g_strcmp0("price:value", (char*)sub_node->name) == 0)
     {
         gnc_numeric *value = dom_tree_to_gnc_numeric(sub_node);
         if (!value) return FALSE;

Modified: gnucash/trunk/src/backend/xml/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -352,7 +352,7 @@
     if (be_data->ok == TRUE)
         return;
 
-    if (!safe_strcmp (be_data->tag, data->type_name))
+    if (!g_strcmp0 (be_data->tag, data->type_name))
         be_data->ok = TRUE;
 
     /* XXX: should we do anything with this counter? */
@@ -394,27 +394,27 @@
               strval ? strval : "(null)");
         ret = FALSE;
     }
-    else if (safe_strcmp(type, "transaction") == 0)
+    else if (g_strcmp0(type, "transaction") == 0)
     {
         sixdata->counter.transactions_total = val;
     }
-    else if (safe_strcmp(type, "account") == 0)
+    else if (g_strcmp0(type, "account") == 0)
     {
         sixdata->counter.accounts_total = val;
     }
-    else if (safe_strcmp(type, "book") == 0)
+    else if (g_strcmp0(type, "book") == 0)
     {
         sixdata->counter.books_total = val;
     }
-    else if (safe_strcmp(type, "commodity") == 0)
+    else if (g_strcmp0(type, "commodity") == 0)
     {
         sixdata->counter.commodities_total = val;
     }
-    else if (safe_strcmp(type, "schedxaction") == 0)
+    else if (g_strcmp0(type, "schedxaction") == 0)
     {
         sixdata->counter.schedXactions_total = val;
     }
-    else if (safe_strcmp(type, "budget") == 0)
+    else if (g_strcmp0(type, "budget") == 0)
     {
         sixdata->counter.budgets_total = val;
     }
@@ -534,7 +534,7 @@
     if (be_data->ok)
         return;
 
-    if (!safe_strcmp (be_data->tag, data->type_name))
+    if (!g_strcmp0 (be_data->tag, data->type_name))
     {
         if (data->add_item)
             (data->add_item)(be_data->gd, be_data->data);
@@ -548,31 +548,31 @@
 {
     sixtp_gdv2 *gd = (sixtp_gdv2*)globaldata;
 
-    if (safe_strcmp(tag, ACCOUNT_TAG) == 0)
+    if (g_strcmp0(tag, ACCOUNT_TAG) == 0)
     {
         add_account_local(gd, (Account*)data);
     }
-    else if (safe_strcmp(tag, PRICEDB_TAG) == 0)
+    else if (g_strcmp0(tag, PRICEDB_TAG) == 0)
     {
         add_pricedb_local(gd, (GNCPriceDB*)data);
     }
-    else if (safe_strcmp(tag, COMMODITY_TAG) == 0)
+    else if (g_strcmp0(tag, COMMODITY_TAG) == 0)
     {
         add_commodity_local(gd, (gnc_commodity*)data);
     }
-    else if (safe_strcmp(tag, TRANSACTION_TAG) == 0)
+    else if (g_strcmp0(tag, TRANSACTION_TAG) == 0)
     {
         add_transaction_local(gd, (Transaction*)data);
     }
-    else if (safe_strcmp(tag, SCHEDXACTION_TAG) == 0)
+    else if (g_strcmp0(tag, SCHEDXACTION_TAG) == 0)
     {
         add_schedXaction_local(gd, (SchedXaction*)data);
     }
-    else if (safe_strcmp(tag, TEMPLATE_TRANSACTION_TAG) == 0)
+    else if (g_strcmp0(tag, TEMPLATE_TRANSACTION_TAG) == 0)
     {
         add_template_transaction_local( gd, (gnc_template_xaction_data*)data );
     }
-    else if (safe_strcmp(tag, BUDGET_TAG) == 0)
+    else if (g_strcmp0(tag, BUDGET_TAG) == 0)
     {
         // Nothing needed here.
     }
@@ -600,7 +600,7 @@
 {
     sixtp_gdv2 *gd = (sixtp_gdv2*)globaldata;
 
-    if (safe_strcmp(tag, BOOK_TAG) == 0)
+    if (g_strcmp0(tag, BOOK_TAG) == 0)
     {
         add_book_local(gd, (QofBook*)data);
         book_callback(tag, globaldata, data);
@@ -900,7 +900,7 @@
 {
     const gchar *sa = (const gchar *) a;
     const gchar *sb = (const gchar *) b;
-    return(safe_strcmp(sa, sb));
+    return(g_strcmp0(sa, sb));
 }
 
 static gint
@@ -908,7 +908,7 @@
 {
     const gnc_commodity *ca = (const gnc_commodity *) a;
     const gnc_commodity *cb = (const gnc_commodity *) b;
-    return(safe_strcmp(gnc_commodity_get_mnemonic(ca),
+    return(g_strcmp0(gnc_commodity_get_mnemonic(ca),
                        gnc_commodity_get_mnemonic(cb)));
 }
 

Modified: gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -55,7 +55,7 @@
         type = (char*)xmlNodeGetContent (node->properties->xmlAttrPropertyValue);
 
         /* handle new and guid the same for the moment */
-        if ((safe_strcmp("guid", type) == 0) || (safe_strcmp("new", type) == 0))
+        if ((g_strcmp0("guid", type) == 0) || (g_strcmp0("new", type) == 0))
         {
             GncGUID *gid = g_new(GncGUID, 1);
             char *guid_str;
@@ -338,7 +338,7 @@
     {
         kvp_value *new_val;
 
-        if (safe_strcmp ((char*)mark->name, "text") == 0)
+        if (g_strcmp0 ((char*)mark->name, "text") == 0)
             continue;
 
         new_val = dom_tree_to_kvp_value(mark);
@@ -412,7 +412,7 @@
 
     for (mark = val_converters; mark->tag; mark++)
     {
-        if (safe_strcmp(type, mark->tag) == 0)
+        if (g_strcmp0(type, mark->tag) == 0)
         {
             ret = (mark->converter)(node);
         }
@@ -438,7 +438,7 @@
 
     for (mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if (safe_strcmp((char*)mark->name, "slot") == 0)
+        if (g_strcmp0((char*)mark->name, "slot") == 0)
         {
             xmlNodePtr mark2;
             gchar *key = NULL;
@@ -446,11 +446,11 @@
 
             for (mark2 = mark->xmlChildrenNode; mark2; mark2 = mark2->next)
             {
-                if (safe_strcmp((char*)mark2->name, "slot:key") == 0)
+                if (g_strcmp0((char*)mark2->name, "slot:key") == 0)
                 {
                     key = dom_tree_to_text(mark2);
                 }
-                else if (safe_strcmp((char*)mark2->name, "slot:value") == 0)
+                else if (g_strcmp0((char*)mark2->name, "slot:value") == 0)
                 {
                     val = dom_tree_to_kvp_value(mark2);
                 }
@@ -597,7 +597,7 @@
         case XML_TEXT_NODE:
             break;
         case XML_ELEMENT_NODE:
-            if (safe_strcmp("ts:date", (char*)n->name) == 0)
+            if (g_strcmp0("ts:date", (char*)n->name) == 0)
             {
                 if (seen_s)
                 {
@@ -620,7 +620,7 @@
                     seen_s = TRUE;
                 }
             }
-            else if (safe_strcmp("ts:ns", (char*)n->name) == 0)
+            else if (g_strcmp0("ts:ns", (char*)n->name) == 0)
             {
                 if (seen_ns)
                 {
@@ -686,7 +686,7 @@
         case XML_TEXT_NODE:
             break;
         case XML_ELEMENT_NODE:
-            if (safe_strcmp("gdate", (char*)n->name) == 0)
+            if (g_strcmp0("gdate", (char*)n->name) == 0)
             {
                 if (seen_date)
                 {
@@ -765,7 +765,7 @@
         case XML_TEXT_NODE:
             break;
         case XML_ELEMENT_NODE:
-            if (safe_strcmp("cmdty:space", (char*)n->name) == 0)
+            if (g_strcmp0("cmdty:space", (char*)n->name) == 0)
             {
                 if (space_str)
                 {
@@ -778,7 +778,7 @@
                     space_str = content;
                 }
             }
-            else if (safe_strcmp("cmdty:id", (char*)n->name) == 0)
+            else if (g_strcmp0("cmdty:id", (char*)n->name) == 0)
             {
                 if (id_str)
                 {
@@ -874,7 +874,7 @@
 {
     for (; handlers->tag != NULL; handlers++)
     {
-        if (safe_strcmp(tag, handlers->tag) == 0)
+        if (g_strcmp0(tag, handlers->tag) == 0)
         {
             (handlers->handler)(node, item);
             handlers->gotten = TRUE;
@@ -904,7 +904,7 @@
     for (achild = node->xmlChildrenNode; achild; achild = achild->next)
     {
         /* ignore stray text nodes */
-        if (safe_strcmp ((char*)achild->name, "text") == 0)
+        if (g_strcmp0 ((char*)achild->name, "text") == 0)
             continue;
 
         if (!gnc_xml_set_data((char*)achild->name, achild, data, handlers))

Modified: gnucash/trunk/src/backend/xml/sixtp.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/sixtp.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -49,7 +49,7 @@
 {
     return((cr->type == SIXTP_CHILD_RESULT_NODE)
            &&
-           (safe_strcmp(cr->tag, tag) == 0));
+           (g_strcmp0(cr->tag, tag) == 0));
 }
 
 void
@@ -511,13 +511,13 @@
 
     /* time to make sure we got the right closing tag.  Is this really
        necessary? */
-    if (safe_strcmp(current_frame->tag, (gchar*) name) != 0)
+    if (g_strcmp0(current_frame->tag, (gchar*) name) != 0)
     {
         g_warning("bad closing tag (start <%s>, end <%s>)", current_frame->tag, name);
         pdata->parsing_ok = FALSE;
 
         /* See if we're just off by one and try to recover */
-        if (safe_strcmp(parent_frame->tag, (gchar*) name) == 0)
+        if (g_strcmp0(parent_frame->tag, (gchar*) name) == 0)
         {
             pdata->stack = sixtp_pop_and_destroy_frame(pdata->stack);
             current_frame = (sixtp_stack_frame *) pdata->stack->data;

Modified: gnucash/trunk/src/backend/xml/test/test-dom-converters1.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-dom-converters1.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-dom-converters1.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -106,7 +106,7 @@
                          "null return from dom_tree_to_text");
             xmlElemDump(stdout, NULL, test_node);
         }
-        else if (safe_strcmp(test_string1, test_string2) == 0)
+        else if (g_strcmp0(test_string1, test_string2) == 0)
         {
             success_args("dom_tree_to_text", __FILE__, __LINE__, "with string %s",
                          test_string1);

Modified: gnucash/trunk/src/backend/xml/test/test-file-stuff.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-file-stuff.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-file-stuff.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -122,7 +122,7 @@
                          FALSE);
 
     verteststr = (char*) node->properties->xmlAttrPropertyValue->content;
-    if (safe_strcmp(verstr, verteststr) == 0)
+    if (g_strcmp0(verstr, verteststr) == 0)
     {
         return TRUE;
     }
@@ -146,7 +146,7 @@
     {
         return FALSE;
     }
-    else if (safe_strcmp(cmp1, str) == 0)
+    else if (g_strcmp0(cmp1, str) == 0)
     {
         g_free(cmp1);
         return TRUE;

Modified: gnucash/trunk/src/backend/xml/test/test-load-xml2.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-load-xml2.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-load-xml2.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -90,7 +90,7 @@
 
     remove_locks(filename);
 
-    ignore_lock = (safe_strcmp(g_getenv("SRCDIR"), ".") != 0);
+    ignore_lock = (g_strcmp0(g_getenv("SRCDIR"), ".") != 0);
     qof_session_begin(session, filename, ignore_lock, FALSE, TRUE);
 
     qof_session_load(session, NULL);

Modified: gnucash/trunk/src/backend/xml/test/test-string-converters.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-string-converters.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-string-converters.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -98,7 +98,7 @@
         backout = dom_tree_to_text(test_node);
 
         do_test_args(
-            safe_strcmp(backout, mark) == 0,
+            g_strcmp0(backout, mark) == 0,
             "string converting", __FILE__, __LINE__, "with string %s", mark);
     }
 }

Modified: gnucash/trunk/src/backend/xml/test/test-xml-account.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-account.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-xml-account.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -54,7 +54,7 @@
 {
     xmlNodePtr mark;
 
-    while (safe_strcmp ((char*)node->name, "text") == 0)
+    while (g_strcmp0 ((char*)node->name, "text") == 0)
     {
         node = node->next;
     }
@@ -64,31 +64,31 @@
         return g_strdup("version wrong.  Not 2.0.0 or not there");
     }
 
-    if (!node->name || safe_strcmp((char*)node->name, "gnc:account"))
+    if (!node->name || g_strcmp0((char*)node->name, "gnc:account"))
     {
         return g_strdup("Name of toplevel node is bad");
     }
 
     for (mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if (safe_strcmp((char*)mark->name, "text") == 0)
+        if (g_strcmp0((char*)mark->name, "text") == 0)
         {
         }
-        else if (safe_strcmp((char*)mark->name, "act:name") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:name") == 0)
         {
             if (!equals_node_val_vs_string(mark, xaccAccountGetName(act)))
             {
                 return g_strdup("names differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:id") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:id") == 0)
         {
             if (!equals_node_val_vs_guid(mark, xaccAccountGetGUID(act)))
             {
                 return g_strdup("ids differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:type") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:type") == 0)
         {
             gchar *txt;
             int type;
@@ -114,7 +114,7 @@
                 g_free(txt);
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:commodity") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:commodity") == 0)
         {
             /* This is somewhat BS, because if the commodity isn't a
                currency (and therefore built in) there isn't a
@@ -128,14 +128,14 @@
                 return g_strdup("commodities differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:code") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:code") == 0)
         {
             if (!equals_node_val_vs_string(mark, xaccAccountGetCode(act)))
             {
                 return g_strdup("codes differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:description") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:description") == 0)
         {
             if (!equals_node_val_vs_string(
                         mark, xaccAccountGetDescription(act)))
@@ -143,7 +143,7 @@
                 return g_strdup("descriptions differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:slots") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:slots") == 0)
         {
             /* xaccAccountDeleteOldData (act); */
 
@@ -152,7 +152,7 @@
                 return g_strdup("slots differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:parent") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:parent") == 0)
         {
             if (!equals_node_val_vs_guid(
                         mark, xaccAccountGetGUID(gnc_account_get_parent(act))))
@@ -160,28 +160,28 @@
                 return g_strdup("parent ids differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:commodity-scu") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:commodity-scu") == 0)
         {
             if (!equals_node_val_vs_int(mark, xaccAccountGetCommoditySCU(act)))
             {
                 return g_strdup("commodity scus differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:hidden") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:hidden") == 0)
         {
             if (!equals_node_val_vs_boolean(mark, xaccAccountGetHidden(act)))
             {
                 return g_strdup("Hidden flags differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:placeholder") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:placeholder") == 0)
         {
             if (!equals_node_val_vs_boolean(mark, xaccAccountGetPlaceholder(act)))
             {
                 return g_strdup("Placeholder flags differ");
             }
         }
-        else if (safe_strcmp((char*)mark->name, "act:security") == 0)
+        else if (g_strcmp0((char*)mark->name, "act:security") == 0)
         {
             return NULL; // This tag is ignored.
         }

Modified: gnucash/trunk/src/backend/xml/test/test-xml-commodity.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-commodity.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-xml-commodity.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -34,7 +34,7 @@
 {
     xmlNodePtr mark;
 
-    while (safe_strcmp ((char*)node->name, "text") == 0)
+    while (g_strcmp0 ((char*)node->name, "text") == 0)
         node = node->next;
 
     if (!check_dom_tree_version(node, "2.0.0"))
@@ -42,17 +42,17 @@
         return "version wrong.  Not 2.0.0 or not there";
     }
 
-    if (!node->name || safe_strcmp((char*)node->name, "gnc:commodity"))
+    if (!node->name || g_strcmp0((char*)node->name, "gnc:commodity"))
     {
         return "Name of toplevel node is bad";
     }
 
     for (mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if (safe_strcmp((char*)mark->name, "text") == 0)
+        if (g_strcmp0((char*)mark->name, "text") == 0)
         {
         }
-        else if (safe_strcmp((char*)mark->name, "cmdty:space") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:space") == 0)
         {
             if (!equals_node_val_vs_string(
                         mark, gnc_commodity_get_namespace_compat(com)))
@@ -60,7 +60,7 @@
                 return "namespaces differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "cmdty:id") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:id") == 0)
         {
             if (!equals_node_val_vs_string(
                         mark, gnc_commodity_get_mnemonic(com)))
@@ -68,7 +68,7 @@
                 return "mnemonic differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "cmdty:name") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:name") == 0)
         {
             if (!equals_node_val_vs_string(
                         mark, gnc_commodity_get_fullname(com)))
@@ -76,7 +76,7 @@
                 return "names differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "cmdty:xcode") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:xcode") == 0)
         {
             if (!equals_node_val_vs_string(
                         mark, gnc_commodity_get_cusip(com)))
@@ -84,7 +84,7 @@
                 return "exchange codes differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "cmdty:fraction") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:fraction") == 0)
         {
             gchar *txt;
             gint64 type;
@@ -112,9 +112,9 @@
             }
         }
         /* Legitimate tags which we don't yet have tests */
-        else if (safe_strcmp((char*)mark->name, "cmdty:get_quotes") == 0 ||
-                 safe_strcmp((char*)mark->name, "cmdty:quote_source") == 0 ||
-                 safe_strcmp((char*)mark->name, "cmdty:quote_tz") == 0)
+        else if (g_strcmp0((char*)mark->name, "cmdty:get_quotes") == 0 ||
+                 g_strcmp0((char*)mark->name, "cmdty:quote_source") == 0 ||
+                 g_strcmp0((char*)mark->name, "cmdty:quote_tz") == 0)
         {
             continue;
         }

Modified: gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-transaction.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/backend/xml/test/test-xml-transaction.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -69,7 +69,7 @@
 
         for (mark2 = mark->xmlChildrenNode; mark2; mark2 = mark2->next)
         {
-            if (safe_strcmp((char*)mark2->name, "split:value") == 0)
+            if (g_strcmp0((char*)mark2->name, "split:value") == 0)
             {
                 gnc_numeric *num = dom_tree_to_gnc_numeric(mark2);
 
@@ -80,7 +80,7 @@
 
                 g_free(num);
             }
-            else if (safe_strcmp((char*)mark2->name, "split:account") == 0)
+            else if (g_strcmp0((char*)mark2->name, "split:account") == 0)
             {
                 GncGUID *accid = dom_tree_to_guid(mark2);
                 Account *account = xaccSplitGetAccount (spl);
@@ -109,7 +109,7 @@
 
     for (mark = node->children; mark != NULL; mark = mark->next)
     {
-        if (safe_strcmp((char*)mark->name, "split:id") == 0)
+        if (g_strcmp0((char*)mark->name, "split:id") == 0)
         {
             GncGUID *id = dom_tree_to_guid(mark);
 
@@ -120,18 +120,18 @@
             }
             g_free(id);
         }
-        else if (safe_strcmp((char*)mark->name, "split:memo") == 0)
+        else if (g_strcmp0((char*)mark->name, "split:memo") == 0)
         {
             char *memo = dom_tree_to_text(mark);
 
-            if (safe_strcmp(memo, xaccSplitGetMemo(spl)) != 0)
+            if (g_strcmp0(memo, xaccSplitGetMemo(spl)) != 0)
             {
                 g_free(memo);
                 return "memos differ";
             }
             g_free(memo);
         }
-        else if (safe_strcmp((char*)mark->name, "split:reconciled-state") == 0)
+        else if (g_strcmp0((char*)mark->name, "split:reconciled-state") == 0)
         {
             char *rs = dom_tree_to_text(mark);
 
@@ -142,7 +142,7 @@
             }
             g_free(rs);
         }
-        else if (safe_strcmp((char*)mark->name, "split:value") == 0)
+        else if (g_strcmp0((char*)mark->name, "split:value") == 0)
         {
             gnc_numeric *num = dom_tree_to_gnc_numeric(mark);
             gnc_numeric val = xaccSplitGetValue(spl);
@@ -158,7 +158,7 @@
             }
             g_free(num);
         }
-        else if (safe_strcmp((char*)mark->name, "split:quantity") == 0)
+        else if (g_strcmp0((char*)mark->name, "split:quantity") == 0)
         {
             gnc_numeric *num = dom_tree_to_gnc_numeric(mark);
             gnc_numeric val = xaccSplitGetAmount(spl);
@@ -183,7 +183,7 @@
             }
             g_free(num);
         }
-        else if (safe_strcmp((char*)mark->name, "split:account") == 0)
+        else if (g_strcmp0((char*)mark->name, "split:account") == 0)
         {
             GncGUID *id = dom_tree_to_guid(mark);
             Account *account = xaccSplitGetAccount (spl);
@@ -237,7 +237,7 @@
 {
     xmlNodePtr mark;
 
-    while (safe_strcmp ((char*)node->name, "text") == 0)
+    while (g_strcmp0 ((char*)node->name, "text") == 0)
         node = node->next;
 
     if (!check_dom_tree_version(node, "2.0.0"))
@@ -245,17 +245,17 @@
         return "version wrong.  Not 2.0.0 or not there";
     }
 
-    if (!node->name || safe_strcmp((char*)node->name, "gnc:transaction"))
+    if (!node->name || g_strcmp0((char*)node->name, "gnc:transaction"))
     {
         return "Name of toplevel node is bad";
     }
 
     for (mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if (safe_strcmp((char*)mark->name, "text") == 0)
+        if (g_strcmp0((char*)mark->name, "text") == 0)
         {
         }
-        else if (safe_strcmp((char*)mark->name, "trn:id") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:id") == 0)
         {
             if (!equals_node_val_vs_guid(mark, xaccTransGetGUID(trn)))
             {
@@ -266,7 +266,7 @@
         /* This test will fail for many splits where the transaction has
          * splits in different commodities -- eg, buying or selling a
          * stock. jralls 2010-11-02 */
-        else if (safe_strcmp((char*)mark->name, "trn:currency") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:currency") == 0)
         {
 #if 0
             if (!equals_node_val_vs_commodity(
@@ -276,42 +276,42 @@
             }
 #endif
         }
-        else if (safe_strcmp((char*)mark->name, "trn:num") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:num") == 0)
         {
             if (!equals_node_val_vs_string(mark, xaccTransGetNum(trn)))
             {
                 return "nums differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "trn:date-posted") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:date-posted") == 0)
         {
             if (!equals_node_val_vs_date(mark, xaccTransRetDatePostedTS(trn)))
             {
                 return "posted dates differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "trn:date-entered") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:date-entered") == 0)
         {
             if (!equals_node_val_vs_date(mark, xaccTransRetDateEnteredTS(trn)))
             {
                 return "entered dates differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "trn:description") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:description") == 0)
         {
             if (!equals_node_val_vs_string(mark, xaccTransGetDescription(trn)))
             {
                 return "descriptions differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "trn:slots") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:slots") == 0)
         {
             if (!equals_node_val_vs_kvp_frame(mark, xaccTransGetSlots(trn)))
             {
                 return "slots differ";
             }
         }
-        else if (safe_strcmp((char*)mark->name, "trn:splits") == 0)
+        else if (g_strcmp0((char*)mark->name, "trn:splits") == 0)
         {
             char *msg = equals_node_val_vs_splits (mark, trn);
             if (msg != NULL)

Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -308,7 +308,7 @@
                                       const char * error_message)
 {
     const char *res = gtk_entry_get_text (GTK_ENTRY (entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         if (error_message)
             gnc_error_dialog (dialog, "%s", error_message);
@@ -358,7 +358,7 @@
         return;
 
     /* Set the customer id if one has not been chosen */
-    if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (cw->id_entry)), "") == 0)
+    if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (cw->id_entry)), "") == 0)
     {
         string = gncCustomerNextID (cw->book);
         gtk_entry_set_text (GTK_ENTRY (cw->id_entry), string);

Modified: gnucash/trunk/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-employee.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-employee.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -205,7 +205,7 @@
                                       const char * error_message)
 {
     const char *res = gtk_entry_get_text (GTK_ENTRY (entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         if (error_message)
             gnc_error_dialog (dialog, "%s", error_message);
@@ -242,7 +242,7 @@
     }
 
     /* Set the employee id if one has not been chosen */
-    if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (ew->id_entry)), "") == 0)
+    if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (ew->id_entry)), "") == 0)
     {
         string = gncEmployeeNextID (ew->book);
         gtk_entry_set_text (GTK_ENTRY (ew->id_entry), string);

Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -369,7 +369,7 @@
     /* Check the Owner */
     gnc_owner_get_owner (iw->owner_choice, &(iw->owner));
     res = gncOwnerGetName (&(iw->owner));
-    if (res == NULL || safe_strcmp (res, "") == 0)
+    if (res == NULL || g_strcmp0 (res, "") == 0)
     {
         gnc_error_dialog (iw_get_window(iw), "%s",
                           /* Translators: In this context,
@@ -383,7 +383,7 @@
 
     /* Check the ID; set one if necessary */
     res = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         /* Invoices and bills have separate counters.
            Therefore we pass the GncOwer to gncInvoiceNextID

Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -130,7 +130,7 @@
 
     /* Check for valid name */
     res = gtk_entry_get_text (GTK_ENTRY (jw->name_entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         const char *message = _("The Job must be given a name.");
         gnc_error_dialog(jw->dialog, "%s", message);
@@ -140,7 +140,7 @@
     /* Check for owner */
     gnc_owner_get_owner (jw->cust_edit, &(jw->owner));
     res = gncOwnerGetName (&(jw->owner));
-    if (res == NULL || safe_strcmp (res, "") == 0)
+    if (res == NULL || g_strcmp0 (res, "") == 0)
     {
         const char *message = _("You must choose an owner for this job.");
         gnc_error_dialog(jw->dialog, "%s", message);
@@ -149,7 +149,7 @@
 
     /* Set a valid id if one was not created */
     res = gtk_entry_get_text (GTK_ENTRY (jw->id_entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         string = gncJobNextID(jw->book);
         gtk_entry_set_text (GTK_ENTRY (jw->id_entry), string);

Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -165,7 +165,7 @@
 
     /* Check the ID */
     res = gtk_entry_get_text (GTK_ENTRY (ow->id_entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         gnc_error_dialog (ow->dialog, "%s",
                           _("The Order must be given an ID."));
@@ -175,7 +175,7 @@
     /* Check the Owner */
     gnc_owner_get_owner (ow->owner_choice, &(ow->owner));
     res = gncOwnerGetName (&(ow->owner));
-    if (res == NULL || safe_strcmp (res, "") == 0)
+    if (res == NULL || g_strcmp0 (res, "") == 0)
     {
         gnc_error_dialog (ow->dialog, "%s",
                           _("You need to supply Billing Information."));

Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -899,7 +899,7 @@
 
         text = gtk_entry_get_text(GTK_ENTRY (gtk_bin_get_child(GTK_BIN (GTK_COMBO_BOX(pw->post_combo)))));
 
-        if (!text || safe_strcmp (text, "") == 0)
+        if (!text || g_strcmp0 (text, "") == 0)
         {
 
             /* The code below assumes there will only be one account type.

Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -194,7 +194,7 @@
                                       const char * error_message)
 {
     const char *res = gtk_entry_get_text (GTK_ENTRY (entry));
-    if (safe_strcmp (res, "") == 0)
+    if (g_strcmp0 (res, "") == 0)
     {
         if (error_message)
             gnc_error_dialog (dialog, "%s", error_message);
@@ -229,7 +229,7 @@
     }
 
     /* Check for valid id and set one if necessary */
-    if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (vw->id_entry)), "") == 0)
+    if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (vw->id_entry)), "") == 0)
     {
         string = gncVendorNextID(vw->book);
         gtk_entry_set_text (GTK_ENTRY (vw->id_entry), string);

Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1130,7 +1130,7 @@
     if (!entry_key)
         return;
 
-    if (safe_strcmp(entry_key, full_gconf_path) == 0)
+    if (g_strcmp0(entry_key, full_gconf_path) == 0)
     {
         update_extra_toolbuttons(mainwindow);
     }

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -364,7 +364,7 @@
             if (entry == last_entry)
                 continue;
 
-            if (safe_strcmp (desc, gncEntryGetDescription (entry)) == 0)
+            if (g_strcmp0 (desc, gncEntryGetDescription (entry)) == 0)
                 return entry;
 
             last_entry = entry;
@@ -378,7 +378,7 @@
 {
     if (!cell || !new_value)
         return;
-    if (safe_strcmp (new_value, gnc_basic_cell_get_value (cell)) == 0)
+    if (g_strcmp0 (new_value, gnc_basic_cell_get_value (cell)) == 0)
         return;
 
     gnc_combo_cell_set_value ((ComboCell *) cell, new_value);

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerModel.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerModel.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerModel.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -28,7 +28,7 @@
 
 #include "Account.h"
 #include "gnc-ui-util.h"
-#include "qof.h"	/* for safe_strcmp */
+#include "qof.h"	/* for g_strcmp0 */
 
 #include "datecell.h"
 #include "checkboxcell.h"
@@ -1092,9 +1092,9 @@
 
         value = gnc_table_layout_get_cell_value (ledger->table->layout,
                 ENTRY_PAYMENT_CELL);
-        if (!safe_strcmp (value, _("Cash")))
+        if (!g_strcmp0 (value, _("Cash")))
             gncEntrySetBillPayment (entry, GNC_PAYMENT_CASH);
-        else if (!safe_strcmp (value, _("Charge")))
+        else if (!g_strcmp0 (value, _("Charge")))
             gncEntrySetBillPayment (entry, GNC_PAYMENT_CARD);
         else
             g_warning ("Invalid Payment cell: %s", value ? value : "(null)");

Modified: gnucash/trunk/src/core-utils/test/test-gnc-uri-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/test/test-gnc-uri-utils.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/core-utils/test/test-gnc-uri-utils.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -214,11 +214,11 @@
 
         gnc_uri_get_components( strs[i].uri, &tprotocol, &thostname,
                                 &tport, &tusername, &tpassword, &tpath );
-        testresult = ( safe_strcmp ( tprotocol, strs[i].protocol ) == 0 ) &
-                     ( safe_strcmp ( thostname, strs[i].hostname ) == 0 ) &
-                     ( safe_strcmp ( tusername, strs[i].username ) == 0 ) &
-                     ( safe_strcmp ( tpassword, strs[i].password ) == 0 ) &
-                     ( safe_strcmp ( tpath, strs[i].path ) == 0 ) &
+        testresult = ( g_strcmp0 ( tprotocol, strs[i].protocol ) == 0 ) &
+                     ( g_strcmp0 ( thostname, strs[i].hostname ) == 0 ) &
+                     ( g_strcmp0 ( tusername, strs[i].username ) == 0 ) &
+                     ( g_strcmp0 ( tpassword, strs[i].password ) == 0 ) &
+                     ( g_strcmp0 ( tpath, strs[i].path ) == 0 ) &
                      ( tport == strs[i].port );
         do_test_args(testresult,
                      "gnc_uri_get_components",
@@ -243,7 +243,7 @@
         gboolean testresult;
 
         tprotocol = gnc_uri_get_protocol( strs[i].uri );
-        testresult = ( safe_strcmp ( tprotocol, strs[i].protocol ) == 0 );
+        testresult = ( g_strcmp0 ( tprotocol, strs[i].protocol ) == 0 );
         do_test_args(testresult,
                      "gnc_uri_get_protocol",
                      __FILE__, __LINE__,
@@ -261,7 +261,7 @@
         gboolean testresult;
 
         tpath = gnc_uri_get_path( strs[i].uri );
-        testresult = ( safe_strcmp ( tpath, strs[i].path ) == 0 );
+        testresult = ( g_strcmp0 ( tpath, strs[i].path ) == 0 );
         do_test_args(testresult,
                      "gnc_uri_get_path",
                      __FILE__, __LINE__,
@@ -280,7 +280,7 @@
 
         turi = gnc_uri_create_uri( strs[i].protocol, strs[i].hostname, strs[i].port,
                                    strs[i].username, strs[i].password, strs[i].path );
-        testresult = ( safe_strcmp ( turi, strs[i].created_uri ) == 0 );
+        testresult = ( g_strcmp0 ( turi, strs[i].created_uri ) == 0 );
         do_test_args(testresult,
                      "gnc_uri_create_uri",
                      __FILE__, __LINE__,
@@ -300,7 +300,7 @@
         gboolean testresult;
 
         turi = gnc_uri_normalize_uri( strs[i].uri, strs[i].want_password );
-        testresult = ( safe_strcmp ( turi, strs[i].normalized_uri ) == 0 );
+        testresult = ( g_strcmp0 ( turi, strs[i].normalized_uri ) == 0 );
         do_test_args(testresult,
                      "gnc_uri_normalize_uri",
                      __FILE__, __LINE__,

Modified: gnucash/trunk/src/core-utils/test/test-resolve-file-path.c
===================================================================
--- gnucash/trunk/src/core-utils/test/test-resolve-file-path.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/core-utils/test/test-resolve-file-path.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -87,7 +87,7 @@
         }
 
         daout = gnc_resolve_file_path(dain);
-        do_test_args(safe_strcmp(daout, wantout) == 0,
+        do_test_args(g_strcmp0(daout, wantout) == 0,
                      "gnc_resolve_file_path",
                      __FILE__, __LINE__,
                      "%s (%s) vs %s", daout, dain, wantout);

Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/Account.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1309,19 +1309,19 @@
         return FALSE;
     }
 
-    if (safe_strcmp(priv_aa->accountName, priv_ab->accountName) != 0)
+    if (g_strcmp0(priv_aa->accountName, priv_ab->accountName) != 0)
     {
         PWARN ("names differ: %s vs %s", priv_aa->accountName, priv_ab->accountName);
         return FALSE;
     }
 
-    if (safe_strcmp(priv_aa->accountCode, priv_ab->accountCode) != 0)
+    if (g_strcmp0(priv_aa->accountCode, priv_ab->accountCode) != 0)
     {
         PWARN ("codes differ: %s vs %s", priv_aa->accountCode, priv_ab->accountCode);
         return FALSE;
     }
 
-    if (safe_strcmp(priv_aa->description, priv_ab->description) != 0)
+    if (g_strcmp0(priv_aa->description, priv_ab->description) != 0)
     {
         PWARN ("descriptions differ: %s vs %s", priv_aa->description, priv_ab->description);
         return FALSE;
@@ -1981,7 +1981,7 @@
     }
 
     /* Otherwise do a string sort */
-    result = safe_strcmp (da, db);
+    result = g_strcmp0 (da, db);
     if (result)
         return result;
 
@@ -2056,7 +2056,7 @@
 
     /* optimizations */
     priv = GET_PRIVATE(acc);
-    if (safe_strcmp(str, priv->accountName) == 0)
+    if (g_strcmp0(str, priv->accountName) == 0)
         return;
 
     xaccAccountBeginEdit(acc);
@@ -2075,7 +2075,7 @@
 
     /* optimizations */
     priv = GET_PRIVATE(acc);
-    if (safe_strcmp(str, priv->accountCode) == 0)
+    if (g_strcmp0(str, priv->accountCode) == 0)
         return;
 
     xaccAccountBeginEdit(acc);
@@ -2094,7 +2094,7 @@
 
     /* optimizations */
     priv = GET_PRIVATE(acc);
-    if (safe_strcmp(str, priv->description) == 0)
+    if (g_strcmp0(str, priv->description) == 0)
         return;
 
     xaccAccountBeginEdit(acc);
@@ -2635,7 +2635,7 @@
     {
         child = node->data;
         cpriv = GET_PRIVATE(child);
-        if (safe_strcmp(cpriv->accountName, name) == 0)
+        if (g_strcmp0(cpriv->accountName, name) == 0)
             return child;
     }
 
@@ -2668,7 +2668,7 @@
     {
         child = node->data;
         cpriv = GET_PRIVATE(child);
-        if (safe_strcmp(cpriv->accountCode, code) == 0)
+        if (g_strcmp0(cpriv->accountCode, code) == 0)
             return child;
     }
 
@@ -2707,7 +2707,7 @@
         Account *account = node->data;
 
         priv = GET_PRIVATE(account);
-        if (safe_strcmp(priv->accountName, names[0]) == 0)
+        if (g_strcmp0(priv->accountName, names[0]) == 0)
         {
             /* We found an account.  If the next entry is NULL, there is
              * nothing left in the name, so just return the account. */
@@ -3825,7 +3825,7 @@
 #undef GNC_RETURN_ENUM_AS_STRING
 
 #define GNC_RETURN_ON_MATCH(x) \
-  if(safe_strcmp(#x, (str)) == 0) { *type = ACCT_TYPE_ ## x; return(TRUE); }
+  if(g_strcmp0(#x, (str)) == 0) { *type = ACCT_TYPE_ ## x; return(TRUE); }
 
 gboolean
 xaccAccountStringToType(const char* str, GNCAccountType *type)
@@ -4355,7 +4355,7 @@
         Split *lsplit = slp->data;
         Transaction *ltrans = xaccSplitGetParent(lsplit);
 
-        if (safe_strcmp (description, xaccTransGetDescription (ltrans)) == 0)
+        if (g_strcmp0 (description, xaccTransGetDescription (ltrans)) == 0)
         {
             if (split) *split = lsplit;
             if (trans) *trans = ltrans;

Modified: gnucash/trunk/src/engine/Query.c
===================================================================
--- gnucash/trunk/src/engine/Query.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/Query.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -551,11 +551,11 @@
     if (!q || !guid || !id_type)
         return;
 
-    if (!safe_strcmp (id_type, GNC_ID_SPLIT))
+    if (!g_strcmp0 (id_type, GNC_ID_SPLIT))
         param_list = qof_query_build_param_list (QOF_PARAM_GUID, NULL);
-    else if (!safe_strcmp (id_type, GNC_ID_TRANS))
+    else if (!g_strcmp0 (id_type, GNC_ID_TRANS))
         param_list = qof_query_build_param_list (SPLIT_TRANS, QOF_PARAM_GUID, NULL);
-    else if (!safe_strcmp (id_type, GNC_ID_ACCOUNT))
+    else if (!g_strcmp0 (id_type, GNC_ID_ACCOUNT))
         param_list = qof_query_build_param_list (SPLIT_ACCOUNT, QOF_PARAM_GUID, NULL);
     else
         PERR ("Invalid match type: %s", id_type);
@@ -578,11 +578,11 @@
     if (!pred_data)
         return;
 
-    if (!safe_strcmp (id_type, GNC_ID_SPLIT))
+    if (!g_strcmp0 (id_type, GNC_ID_SPLIT))
         param_list = qof_query_build_param_list (SPLIT_KVP, NULL);
-    else if (!safe_strcmp (id_type, GNC_ID_TRANS))
+    else if (!g_strcmp0 (id_type, GNC_ID_TRANS))
         param_list = qof_query_build_param_list (SPLIT_TRANS, TRANS_KVP, NULL);
-    else if (!safe_strcmp (id_type, GNC_ID_ACCOUNT))
+    else if (!g_strcmp0 (id_type, GNC_ID_ACCOUNT))
         param_list = qof_query_build_param_list (SPLIT_ACCOUNT, ACCOUNT_KVP, NULL);
     else
         PERR ("Invalid match type: %s", id_type);

Modified: gnucash/trunk/src/engine/Recurrence.c
===================================================================
--- gnucash/trunk/src/engine/Recurrence.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/Recurrence.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -506,7 +506,7 @@
     int i;
 
     for (i = 0; i < NUM_PERIOD_TYPES; i++)
-        if (safe_strcmp(period_type_strings[i], str) == 0)
+        if (g_strcmp0(period_type_strings[i], str) == 0)
             return i;
     return -1;
 }
@@ -523,7 +523,7 @@
     int i;
 
     for (i = 0; i < NUM_WEEKEND_ADJS; i++)
-        if (safe_strcmp(weekend_adj_strings[i], str) == 0)
+        if (g_strcmp0(weekend_adj_strings[i], str) == 0)
             return i;
     return -1;
 }

Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/Split.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -564,14 +564,14 @@
     }
 
     /* If the same book, since these strings are cached we can just use pointer equality */
-    if ((same_book && sa->memo != sb->memo) || (!same_book && safe_strcmp(sa->memo, sb->memo) != 0))
+    if ((same_book && sa->memo != sb->memo) || (!same_book && g_strcmp0(sa->memo, sb->memo) != 0))
     {
         PWARN ("memos differ: (%p)%s vs (%p)%s",
                sa->memo, sa->memo, sb->memo, sb->memo);
         return FALSE;
     }
 
-    if ((same_book && sa->action != sb->action) || (!same_book && safe_strcmp(sa->action, sb->action) != 0))
+    if ((same_book && sa->action != sb->action) || (!same_book && g_strcmp0(sa->action, sb->action) != 0))
     {
         PWARN ("actions differ: %s vs %s", sa->action, sb->action);
         return FALSE;
@@ -1456,7 +1456,7 @@
     aa = sa->acc;
     ab = sb->acc;
 
-    return safe_strcmp(xaccAccountGetCode(aa), xaccAccountGetCode(ab));
+    return g_strcmp0(xaccAccountGetCode(aa), xaccAccountGetCode(ab));
 }
 
 int
@@ -1474,7 +1474,7 @@
 
     ca = xaccSplitGetCorrAccountFullName(sa);
     cb = xaccSplitGetCorrAccountFullName(sb);
-    retval = safe_strcmp(ca, cb);
+    retval = g_strcmp0(ca, cb);
     g_free(ca);
     g_free(cb);
     return retval;
@@ -1490,7 +1490,7 @@
 
     ca = xaccSplitGetCorrAccountCode(sa);
     cb = xaccSplitGetCorrAccountCode(sb);
-    return safe_strcmp(ca, cb);
+    return g_strcmp0(ca, cb);
 }
 
 static void

Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/Transaction.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -705,14 +705,14 @@
     /* If the same book, since we use cached strings, we can just compare pointer
      * equality for num and description
      */
-    if ((same_book && ta->num != tb->num) || (!same_book && safe_strcmp(ta->num, tb->num) != 0))
+    if ((same_book && ta->num != tb->num) || (!same_book && g_strcmp0(ta->num, tb->num) != 0))
     {
         PWARN ("num differs: %s vs %s", ta->num, tb->num);
         return FALSE;
     }
 
     if ((same_book && ta->description != tb->description)
-            || (!same_book && safe_strcmp(ta->description, tb->description)))
+            || (!same_book && g_strcmp0(ta->description, tb->description)))
     {
         PWARN ("descriptions differ: %s vs %s", ta->description, tb->description);
         return FALSE;

Modified: gnucash/trunk/src/engine/cap-gains.c
===================================================================
--- gnucash/trunk/src/engine/cap-gains.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/cap-gains.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -732,7 +732,7 @@
         return;
     }
 
-    if (safe_strcmp ("stock-split", xaccSplitGetType (split)) == 0)
+    if (g_strcmp0 ("stock-split", xaccSplitGetType (split)) == 0)
     {
         LEAVE ("Stock split split, returning.");
         return;

Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/engine-helpers.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -250,11 +250,11 @@
     QofGuidMatch res;
     const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
-    if (!safe_strcmp (how, "acct-match-all"))
+    if (!g_strcmp0 (how, "acct-match-all"))
         res = QOF_GUID_MATCH_ALL;
-    else if (!safe_strcmp (how, "acct-match-any"))
+    else if (!g_strcmp0 (how, "acct-match-any"))
         res = QOF_GUID_MATCH_ANY;
-    else if (!safe_strcmp (how, "acct-match-none"))
+    else if (!g_strcmp0 (how, "acct-match-none"))
         res = QOF_GUID_MATCH_NONE;
     else
     {
@@ -270,11 +270,11 @@
     QofQueryCompare res;
     const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
-    if (!safe_strcmp (how, "amt-match-atleast"))
+    if (!g_strcmp0 (how, "amt-match-atleast"))
         res = QOF_COMPARE_GTE;
-    else if (!safe_strcmp (how, "amt-match-atmost"))
+    else if (!g_strcmp0 (how, "amt-match-atmost"))
         res = QOF_COMPARE_LTE;
-    else if (!safe_strcmp (how, "amt-match-exactly"))
+    else if (!g_strcmp0 (how, "amt-match-exactly"))
         res = QOF_COMPARE_EQUAL;
     else
     {
@@ -291,15 +291,15 @@
     QofQueryCompare res;
     const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
-    if (!safe_strcmp (how, "kvp-match-lt"))
+    if (!g_strcmp0 (how, "kvp-match-lt"))
         res = QOF_COMPARE_LT;
-    else if (!safe_strcmp (how, "kvp-match-lte"))
+    else if (!g_strcmp0 (how, "kvp-match-lte"))
         res = QOF_COMPARE_LTE;
-    else if (!safe_strcmp (how, "kvp-match-eq"))
+    else if (!g_strcmp0 (how, "kvp-match-eq"))
         res = QOF_COMPARE_EQUAL;
-    else if (!safe_strcmp (how, "kvp-match-gte"))
+    else if (!g_strcmp0 (how, "kvp-match-gte"))
         res = QOF_COMPARE_GTE;
-    else if (!safe_strcmp (how, "kvp-match-gt"))
+    else if (!g_strcmp0 (how, "kvp-match-gt"))
         res = QOF_COMPARE_GT;
     else
     {
@@ -355,7 +355,7 @@
 
     how = SCM_SYMBOL_CHARS (SCM_CAR(how_scm));
 
-    if (!safe_strcmp (how, "balance-match-balanced"))
+    if (!g_strcmp0 (how, "balance-match-balanced"))
         *resp = TRUE;
     else
         *resp = FALSE;
@@ -374,11 +374,11 @@
 
     where = SCM_SYMBOL_CHARS (SCM_CAR(where_scm));
 
-    if (!safe_strcmp (where, "kvp-match-split"))
+    if (!g_strcmp0 (where, "kvp-match-split"))
         res = GNC_ID_SPLIT;
-    else if (!safe_strcmp (where, "kvp-match-trans"))
+    else if (!g_strcmp0 (where, "kvp-match-trans"))
         res = GNC_ID_TRANS;
-    else if (!safe_strcmp (where, "kvp-match-account"))
+    else if (!g_strcmp0 (where, "kvp-match-account"))
         res = GNC_ID_ACCOUNT;
     else
     {
@@ -829,7 +829,7 @@
     qt_scm = scm_cons (scm_str2symbol (pd->type_name), qt_scm);
     qt_scm = scm_cons (scm_long2num (pd->how), qt_scm);
 
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_STRING))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_STRING))
     {
         query_string_t pdata = (query_string_t) pd;
 
@@ -838,7 +838,7 @@
         qt_scm = scm_cons (scm_makfrom0str (pdata->matchstring), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_DATE))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_DATE))
     {
         query_date_t pdata = (query_date_t) pd;
 
@@ -846,7 +846,7 @@
         qt_scm = scm_cons (gnc_timespec2timepair (pdata->date), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_NUMERIC))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_NUMERIC))
     {
         query_numeric_t pdata = (query_numeric_t) pd;
 
@@ -854,7 +854,7 @@
         qt_scm = scm_cons (gnc_query_numeric2scm (pdata->amount), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_GUID))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_GUID))
     {
         query_guid_t pdata = (query_guid_t) pd;
 
@@ -862,28 +862,28 @@
         qt_scm = scm_cons (gnc_guid_glist2scm (pdata->guids), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_INT64))
     {
         query_int64_t pdata = (query_int64_t) pd;
 
         qt_scm = scm_cons (gnc_gint64_to_scm (pdata->val), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_DOUBLE))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_DOUBLE))
     {
         query_double_t pdata = (query_double_t) pd;
 
         qt_scm = scm_cons (scm_make_real (pdata->val), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_BOOLEAN))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_BOOLEAN))
     {
         query_boolean_t pdata = (query_boolean_t) pd;
 
         qt_scm = scm_cons (SCM_BOOL (pdata->val), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_CHAR))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_CHAR))
     {
         query_char_t pdata = (query_char_t) pd;
 
@@ -891,7 +891,7 @@
         qt_scm = scm_cons (scm_makfrom0str (pdata->char_list), qt_scm);
 
     }
-    else if (!safe_strcmp (pd->type_name, QOF_TYPE_KVP))
+    else if (!g_strcmp0 (pd->type_name, QOF_TYPE_KVP))
     {
         query_kvp_t pdata = (query_kvp_t) pd;
 
@@ -954,7 +954,7 @@
 
         /* Now compute the predicate */
 
-        if (!safe_strcmp (type, QOF_TYPE_STRING))
+        if (!g_strcmp0 (type, QOF_TYPE_STRING))
         {
             QofStringMatch options;
             gboolean is_regex;
@@ -982,7 +982,7 @@
             scm_dynwind_free (matchstring);
             scm_dynwind_end ();
         }
-        else if (!safe_strcmp (type, QOF_TYPE_DATE))
+        else if (!g_strcmp0 (type, QOF_TYPE_DATE))
         {
             QofDateMatch options;
             Timespec date;
@@ -1002,7 +1002,7 @@
             pd = qof_query_date_predicate (compare_how, options, date);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_NUMERIC))
+        else if (!g_strcmp0 (type, QOF_TYPE_NUMERIC))
         {
             QofNumericMatch options;
             gnc_numeric val;
@@ -1022,7 +1022,7 @@
             pd = qof_query_numeric_predicate (compare_how, options, val);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_GUID))
+        else if (!g_strcmp0 (type, QOF_TYPE_GUID))
         {
             QofGuidMatch options;
             GList *guids;
@@ -1044,7 +1044,7 @@
             gnc_guid_glist_free (guids);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_INT64))
+        else if (!g_strcmp0 (type, QOF_TYPE_INT64))
         {
             gint64 val;
 
@@ -1057,7 +1057,7 @@
             pd = qof_query_int64_predicate (compare_how, val);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_DOUBLE))
+        else if (!g_strcmp0 (type, QOF_TYPE_DOUBLE))
         {
             double val;
 
@@ -1070,7 +1070,7 @@
             pd = qof_query_double_predicate (compare_how, val);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_BOOLEAN))
+        else if (!g_strcmp0 (type, QOF_TYPE_BOOLEAN))
         {
             gboolean val;
 
@@ -1083,7 +1083,7 @@
             pd = qof_query_boolean_predicate (compare_how, val);
 
         }
-        else if (!safe_strcmp (type, QOF_TYPE_CHAR))
+        else if (!g_strcmp0 (type, QOF_TYPE_CHAR))
         {
             QofCharMatch options;
             gchar *char_list;
@@ -1105,7 +1105,7 @@
             scm_dynwind_free (char_list);
             scm_dynwind_end ();
         }
-        else if (!safe_strcmp (type, QOF_TYPE_KVP))
+        else if (!g_strcmp0 (type, QOF_TYPE_KVP))
         {
             GSList *kvp_path;
             KvpValue *value;
@@ -1204,7 +1204,7 @@
 
         q = qof_query_create_for(GNC_ID_SPLIT);
 
-        if (!safe_strcmp (pd_type, "pd-date"))
+        if (!g_strcmp0 (pd_type, "pd-date"))
         {
             gboolean use_start;
             gboolean use_end;
@@ -1251,7 +1251,7 @@
             ok = TRUE;
 
         }
-        else if (!safe_strcmp (pd_type, "pd-amount"))
+        else if (!g_strcmp0 (pd_type, "pd-amount"))
         {
             QofQueryCompare how;
             QofNumericMatch amt_sgn;
@@ -1282,19 +1282,19 @@
             val = double_to_gnc_numeric (amount, GNC_DENOM_AUTO,
                                          GNC_HOW_DENOM_SIGFIGS(6) | GNC_HOW_RND_ROUND_HALF_UP);
 
-            if (!safe_strcmp (pr_type, "pr-price"))
+            if (!g_strcmp0 (pr_type, "pr-price"))
             {
                 xaccQueryAddSharePriceMatch (q, val, how, QOF_QUERY_OR);
                 ok = TRUE;
 
             }
-            else if (!safe_strcmp (pr_type, "pr-shares"))
+            else if (!g_strcmp0 (pr_type, "pr-shares"))
             {
                 xaccQueryAddSharesMatch (q, val, how, QOF_QUERY_OR);
                 ok = TRUE;
 
             }
-            else if (!safe_strcmp (pr_type, "pr-value"))
+            else if (!g_strcmp0 (pr_type, "pr-value"))
             {
                 xaccQueryAddValueMatch (q, val, amt_sgn, how, QOF_QUERY_OR);
                 ok = TRUE;
@@ -1306,7 +1306,7 @@
             }
 
         }
-        else if (!safe_strcmp (pd_type, "pd-account"))
+        else if (!g_strcmp0 (pd_type, "pd-account"))
         {
             QofGuidMatch how;
             GList *account_guids;
@@ -1341,7 +1341,7 @@
             ok = TRUE;
 
         }
-        else if (!safe_strcmp (pd_type, "pd-string"))
+        else if (!g_strcmp0 (pd_type, "pd-string"))
         {
             gboolean case_sens;
             gboolean use_regexp;
@@ -1372,28 +1372,28 @@
             scm_dynwind_begin (0);
             matchstring = scm_to_locale_string (scm);
 
-            if (!safe_strcmp (pr_type, "pr-action"))
+            if (!g_strcmp0 (pr_type, "pr-action"))
             {
                 xaccQueryAddActionMatch (q, matchstring, case_sens, use_regexp,
                                          QOF_QUERY_OR);
                 ok = TRUE;
 
             }
-            else if (!safe_strcmp (pr_type, "pr-desc"))
+            else if (!g_strcmp0 (pr_type, "pr-desc"))
             {
                 xaccQueryAddDescriptionMatch (q, matchstring, case_sens,
                                               use_regexp, QOF_QUERY_OR);
                 ok = TRUE;
 
             }
-            else if (!safe_strcmp (pr_type, "pr-memo"))
+            else if (!g_strcmp0 (pr_type, "pr-memo"))
             {
                 xaccQueryAddMemoMatch (q, matchstring, case_sens, use_regexp,
                                        QOF_QUERY_OR);
                 ok = TRUE;
 
             }
-            else if (!safe_strcmp (pr_type, "pr-num"))
+            else if (!g_strcmp0 (pr_type, "pr-num"))
             {
                 xaccQueryAddNumberMatch (q, matchstring, case_sens, use_regexp,
                                          QOF_QUERY_OR);
@@ -1408,7 +1408,7 @@
             scm_dynwind_end ();
 
         }
-        else if (!safe_strcmp (pd_type, "pd-cleared"))
+        else if (!g_strcmp0 (pd_type, "pd-cleared"))
         {
             cleared_match_t how;
 
@@ -1424,7 +1424,7 @@
             ok = TRUE;
 
         }
-        else if (!safe_strcmp (pd_type, "pd-balance"))
+        else if (!g_strcmp0 (pd_type, "pd-balance"))
         {
             gboolean how;
 
@@ -1441,7 +1441,7 @@
             ok = TRUE;
 
         }
-        else if (!safe_strcmp (pd_type, "pd-guid"))
+        else if (!g_strcmp0 (pd_type, "pd-guid"))
         {
             GncGUID guid;
             QofIdType id_type;
@@ -1469,7 +1469,7 @@
             ok = TRUE;
 
         }
-        else if (!safe_strcmp (pd_type, "pd-kvp"))
+        else if (!g_strcmp0 (pd_type, "pd-kvp"))
         {
             GSList *path;
             KvpValue *value;
@@ -1794,79 +1794,79 @@
     if (!symbol)
         return NULL;
 
-    if (!safe_strcmp (symbol, "by-none"))
+    if (!g_strcmp0 (symbol, "by-none"))
     {
         path = NULL;
     }
-    else if (!safe_strcmp (symbol, "by-standard"))
+    else if (!g_strcmp0 (symbol, "by-standard"))
     {
         path = g_slist_prepend (path, QUERY_DEFAULT_SORT);
 
     }
-    else if (!safe_strcmp (symbol, "by-date") ||
-             !safe_strcmp (symbol, "by-date-rounded"))
+    else if (!g_strcmp0 (symbol, "by-date") ||
+             !g_strcmp0 (symbol, "by-date-rounded"))
     {
         path = g_slist_prepend (path, TRANS_DATE_POSTED);
         path = g_slist_prepend (path, SPLIT_TRANS);
 
     }
-    else if (!safe_strcmp (symbol, "by-date-entered") ||
-             !safe_strcmp (symbol, "by-date-entered-rounded"))
+    else if (!g_strcmp0 (symbol, "by-date-entered") ||
+             !g_strcmp0 (symbol, "by-date-entered-rounded"))
     {
         path = g_slist_prepend (path, TRANS_DATE_ENTERED);
         path = g_slist_prepend (path, SPLIT_TRANS);
 
     }
-    else if (!safe_strcmp (symbol, "by-date-reconciled") ||
-             !safe_strcmp (symbol, "by-date-reconciled-rounded"))
+    else if (!g_strcmp0 (symbol, "by-date-reconciled") ||
+             !g_strcmp0 (symbol, "by-date-reconciled-rounded"))
     {
         path = g_slist_prepend (path, SPLIT_DATE_RECONCILED);
 
     }
-    else if (!safe_strcmp (symbol, "by-num"))
+    else if (!g_strcmp0 (symbol, "by-num"))
     {
         path = g_slist_prepend (path, TRANS_NUM);
         path = g_slist_prepend (path, SPLIT_TRANS);
 
     }
-    else if (!safe_strcmp (symbol, "by-amount"))
+    else if (!g_strcmp0 (symbol, "by-amount"))
     {
         path = g_slist_prepend (path, SPLIT_VALUE);
 
     }
-    else if (!safe_strcmp (symbol, "by-memo"))
+    else if (!g_strcmp0 (symbol, "by-memo"))
     {
         path = g_slist_prepend (path, SPLIT_MEMO);
 
     }
-    else if (!safe_strcmp (symbol, "by-desc"))
+    else if (!g_strcmp0 (symbol, "by-desc"))
     {
         path = g_slist_prepend (path, TRANS_DESCRIPTION);
         path = g_slist_prepend (path, SPLIT_TRANS);
 
     }
-    else if (!safe_strcmp (symbol, "by-reconcile"))
+    else if (!g_strcmp0 (symbol, "by-reconcile"))
     {
         path = g_slist_prepend (path, SPLIT_RECONCILE);
 
     }
-    else if (!safe_strcmp (symbol, "by-account-full-name"))
+    else if (!g_strcmp0 (symbol, "by-account-full-name"))
     {
         path = g_slist_prepend (path, SPLIT_ACCT_FULLNAME);
 
     }
-    else if (!safe_strcmp (symbol, "by-account-code"))
+    else if (!g_strcmp0 (symbol, "by-account-code"))
     {
         path = g_slist_prepend (path, ACCOUNT_CODE_);
         path = g_slist_prepend (path, SPLIT_ACCOUNT);
 
     }
-    else if (!safe_strcmp (symbol, "by-corr-account-full-name"))
+    else if (!g_strcmp0 (symbol, "by-corr-account-full-name"))
     {
         path = g_slist_prepend (path, SPLIT_CORR_ACCT_NAME);
 
     }
-    else if (!safe_strcmp (symbol, "by-corr-account-code"))
+    else if (!g_strcmp0 (symbol, "by-corr-account-code"))
     {
         path = g_slist_prepend (path, SPLIT_CORR_ACCT_CODE);
 
@@ -1927,7 +1927,7 @@
             break;
         }
 
-        if (safe_strcmp ("terms", symbol) == 0)
+        if (g_strcmp0 ("terms", symbol) == 0)
         {
             if (q)
                 qof_query_destroy (q);
@@ -1941,7 +1941,7 @@
             }
 
         }
-        else if (safe_strcmp ("primary-sort", symbol) == 0)
+        else if (g_strcmp0 ("primary-sort", symbol) == 0)
         {
             if (!scm_is_symbol (value))
             {
@@ -1953,7 +1953,7 @@
             primary_sort = SCM_SYMBOL_CHARS (value);
 
         }
-        else if (safe_strcmp ("secondary-sort", symbol) == 0)
+        else if (g_strcmp0 ("secondary-sort", symbol) == 0)
         {
             if (!scm_is_symbol (value))
             {
@@ -1965,7 +1965,7 @@
             secondary_sort = SCM_SYMBOL_CHARS (value);
 
         }
-        else if (safe_strcmp ("tertiary-sort", symbol) == 0)
+        else if (g_strcmp0 ("tertiary-sort", symbol) == 0)
         {
             if (!scm_is_symbol (value))
             {
@@ -1977,22 +1977,22 @@
             tertiary_sort = SCM_SYMBOL_CHARS (value);
 
         }
-        else if (safe_strcmp ("primary-increasing", symbol) == 0)
+        else if (g_strcmp0 ("primary-increasing", symbol) == 0)
         {
             primary_increasing = scm_is_true (value);
 
         }
-        else if (safe_strcmp ("secondary-increasing", symbol) == 0)
+        else if (g_strcmp0 ("secondary-increasing", symbol) == 0)
         {
             secondary_increasing = scm_is_true (value);
 
         }
-        else if (safe_strcmp ("tertiary-increasing", symbol) == 0)
+        else if (g_strcmp0 ("tertiary-increasing", symbol) == 0)
         {
             tertiary_increasing = scm_is_true (value);
 
         }
-        else if (safe_strcmp ("max-splits", symbol) == 0)
+        else if (g_strcmp0 ("max-splits", symbol) == 0)
         {
             if (!scm_is_number (value))
             {
@@ -2074,7 +2074,7 @@
             break;
         }
 
-        if (!safe_strcmp ("terms", symbol))
+        if (!g_strcmp0 ("terms", symbol))
         {
             if (q)
                 qof_query_destroy (q);
@@ -2087,7 +2087,7 @@
             }
 
         }
-        else if (!safe_strcmp ("search-for", symbol))
+        else if (!g_strcmp0 ("search-for", symbol))
         {
             if (!scm_is_symbol (value))
             {
@@ -2097,7 +2097,7 @@
             search_for = SCM_SYMBOL_CHARS (value);
 
         }
-        else if (safe_strcmp ("primary-sort", symbol) == 0)
+        else if (g_strcmp0 ("primary-sort", symbol) == 0)
         {
             if (! gnc_query_scm2sort (value, &sp1, &so1, &si1))
             {
@@ -2106,7 +2106,7 @@
             }
 
         }
-        else if (!safe_strcmp ("secondary-sort", symbol))
+        else if (!g_strcmp0 ("secondary-sort", symbol))
         {
             if (! gnc_query_scm2sort (value, &sp2, &so2, &si2))
             {
@@ -2115,7 +2115,7 @@
             }
 
         }
-        else if (!safe_strcmp ("tertiary-sort", symbol))
+        else if (!g_strcmp0 ("tertiary-sort", symbol))
         {
             if (! gnc_query_scm2sort (value, &sp3, &so3, &si3))
             {
@@ -2124,7 +2124,7 @@
             }
 
         }
-        else if (!safe_strcmp ("max-results", symbol))
+        else if (!g_strcmp0 ("max-results", symbol))
         {
             if (!scm_is_number (value))
             {
@@ -2189,7 +2189,7 @@
     if (!type)
         return NULL;
 
-    if (!safe_strcmp (type, "query-v2"))
+    if (!g_strcmp0 (type, "query-v2"))
         q = gnc_scm2query_v2 (SCM_CDR (query_scm));
 
     return q;

Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gnc-commodity.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -380,38 +380,38 @@
     GList *node;
     gint i;
 
-    if ((name == NULL) || (safe_strcmp(name, "") == 0))
+    if ((name == NULL) || (g_strcmp0(name, "") == 0))
     {
         return NULL;
     }
 
-    if (safe_strcmp(name, currency_quote_source.internal_name) == 0)
+    if (g_strcmp0(name, currency_quote_source.internal_name) == 0)
         return &currency_quote_source;
-    if (safe_strcmp(name, currency_quote_source.old_internal_name) == 0)
+    if (g_strcmp0(name, currency_quote_source.old_internal_name) == 0)
         return &currency_quote_source;
 
     for (i = 0; i < num_single_quote_sources; i++)
     {
-        if (safe_strcmp(name, single_quote_sources[i].internal_name) == 0)
+        if (g_strcmp0(name, single_quote_sources[i].internal_name) == 0)
             return &single_quote_sources[i];
-        if (safe_strcmp(name, single_quote_sources[i].old_internal_name) == 0)
+        if (g_strcmp0(name, single_quote_sources[i].old_internal_name) == 0)
             return &single_quote_sources[i];
     }
 
     for (i = 0; i < num_multiple_quote_sources; i++)
     {
-        if (safe_strcmp(name, multiple_quote_sources[i].internal_name) == 0)
+        if (g_strcmp0(name, multiple_quote_sources[i].internal_name) == 0)
             return &multiple_quote_sources[i];
-        if (safe_strcmp(name, multiple_quote_sources[i].old_internal_name) == 0)
+        if (g_strcmp0(name, multiple_quote_sources[i].old_internal_name) == 0)
             return &multiple_quote_sources[i];
     }
 
     for (i = 0, node = new_quote_sources; node; node = node->next, i++)
     {
         source = node->data;
-        if (safe_strcmp(name, source->internal_name) == 0)
+        if (g_strcmp0(name, source->internal_name) == 0)
             return source;
-        if (safe_strcmp(name, source->old_internal_name) == 0)
+        if (g_strcmp0(name, source->old_internal_name) == 0)
             return source;
     }
 
@@ -1449,7 +1449,7 @@
     priv_a = GET_PRIVATE(a);
     priv_b = GET_PRIVATE(b);
     if (priv_a->namespace != priv_b->namespace) return FALSE;
-    if (safe_strcmp(priv_a->mnemonic, priv_b->mnemonic) != 0) return FALSE;
+    if (g_strcmp0(priv_a->mnemonic, priv_b->mnemonic) != 0) return FALSE;
     return TRUE;
 }
 
@@ -1473,7 +1473,7 @@
     same_book = qof_instance_get_book(QOF_INSTANCE(a)) == qof_instance_get_book(QOF_INSTANCE(b));
 
     if ((same_book && priv_a->namespace != priv_b->namespace)
-            || (!same_book && safe_strcmp( gnc_commodity_namespace_get_name(priv_a->namespace),
+            || (!same_book && g_strcmp0( gnc_commodity_namespace_get_name(priv_a->namespace),
                                            gnc_commodity_namespace_get_name(priv_b->namespace)) != 0))
     {
         DEBUG ("namespaces differ: %p(%s) vs %p(%s)",
@@ -1482,19 +1482,19 @@
         return FALSE;
     }
 
-    if (safe_strcmp(priv_a->mnemonic, priv_b->mnemonic) != 0)
+    if (g_strcmp0(priv_a->mnemonic, priv_b->mnemonic) != 0)
     {
         DEBUG ("mnemonics differ: %s vs %s", priv_a->mnemonic, priv_b->mnemonic);
         return FALSE;
     }
 
-    if (safe_strcmp(priv_a->fullname, priv_b->fullname) != 0)
+    if (g_strcmp0(priv_a->fullname, priv_b->fullname) != 0)
     {
         DEBUG ("fullnames differ: %s vs %s", priv_a->fullname, priv_b->fullname);
         return FALSE;
     }
 
-    if (safe_strcmp(priv_a->cusip, priv_b->cusip) != 0)
+    if (g_strcmp0(priv_a->cusip, priv_b->cusip) != 0)
     {
         DEBUG ("cusips differ: %s vs %s", priv_a->cusip, priv_b->cusip);
         return FALSE;
@@ -1549,14 +1549,14 @@
 gboolean
 gnc_commodity_namespace_is_iso(const char *namespace)
 {
-    return ((safe_strcmp(namespace, GNC_COMMODITY_NS_ISO) == 0) ||
-            (safe_strcmp(namespace, GNC_COMMODITY_NS_CURRENCY) == 0));
+    return ((g_strcmp0(namespace, GNC_COMMODITY_NS_ISO) == 0) ||
+            (g_strcmp0(namespace, GNC_COMMODITY_NS_CURRENCY) == 0));
 }
 
 static const gchar *
 gnc_commodity_table_map_namespace(const char * namespace)
 {
-    if (safe_strcmp(namespace, GNC_COMMODITY_NS_ISO) == 0)
+    if (g_strcmp0(namespace, GNC_COMMODITY_NS_ISO) == 0)
         return GNC_COMMODITY_NS_CURRENCY;
     return namespace;
 }
@@ -1618,7 +1618,7 @@
     GHashTable *tbl = ((gnc_commodity_namespace*)value)->cm_table;
     guint *count = (guint*)user_data;
 
-    if (safe_strcmp((char*)key, GNC_COMMODITY_NS_CURRENCY) == 0)
+    if (g_strcmp0((char*)key, GNC_COMMODITY_NS_CURRENCY) == 0)
     {
         /* don't count default commodities */
         return;
@@ -1958,8 +1958,8 @@
     if (!cm) return FALSE;
 
     ns_name = gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->namespace);
-    return (!safe_strcmp(ns_name, GNC_COMMODITY_NS_LEGACY) ||
-            !safe_strcmp(ns_name, GNC_COMMODITY_NS_CURRENCY));
+    return (!g_strcmp0(ns_name, GNC_COMMODITY_NS_LEGACY) ||
+            !g_strcmp0(ns_name, GNC_COMMODITY_NS_CURRENCY));
 }
 
 /********************************************************************

Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gnc-pricedb.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -433,7 +433,7 @@
 gnc_price_set_source(GNCPrice *p, const char *s)
 {
     if (!p) return;
-    if (safe_strcmp(p->source, s) != 0)
+    if (g_strcmp0(p->source, s) != 0)
     {
         char *tmp;
 
@@ -450,7 +450,7 @@
 gnc_price_set_typestr(GNCPrice *p, const char* type)
 {
     if (!p) return;
-    if (safe_strcmp(p->type, type) != 0)
+    if (g_strcmp0(p->type, type) != 0)
     {
         gchar *tmp;
 
@@ -564,11 +564,11 @@
     if (!timespec_equal (&ts1, &ts2))
         return FALSE;
 
-    if (safe_strcmp (gnc_price_get_source (p1),
+    if (g_strcmp0 (gnc_price_get_source (p1),
                      gnc_price_get_source (p2)) != 0)
         return FALSE;
 
-    if (safe_strcmp (gnc_price_get_typestr (p1),
+    if (g_strcmp0 (gnc_price_get_typestr (p1),
                      gnc_price_get_typestr (p2)) != 0)
         return FALSE;
 
@@ -1190,7 +1190,7 @@
     if (!data->delete_user)
     {
         source = gnc_price_get_source (price);
-        if (safe_strcmp(source, "Finance::Quote") != 0)
+        if (g_strcmp0(source, "Finance::Quote") != 0)
         {
             LEAVE("Not an automatic quote");
             return TRUE;
@@ -2314,12 +2314,12 @@
     ca = (gnc_commodity *) kvpa->key;
     cb = (gnc_commodity *) kvpb->key;
 
-    cmp_result = safe_strcmp(gnc_commodity_get_namespace(ca),
+    cmp_result = g_strcmp0(gnc_commodity_get_namespace(ca),
                              gnc_commodity_get_namespace(cb));
 
     if (cmp_result != 0) return cmp_result;
 
-    return safe_strcmp(gnc_commodity_get_mnemonic(ca),
+    return g_strcmp0(gnc_commodity_get_mnemonic(ca),
                        gnc_commodity_get_mnemonic(cb));
 }
 

Modified: gnucash/trunk/src/engine/gncAddress.c
===================================================================
--- gnucash/trunk/src/engine/gncAddress.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncAddress.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -392,7 +392,7 @@
 	char * tmp; \
 	\
 	if (member == str) return; \
-	if (!safe_strcmp (member, str)) return; \
+	if (!g_strcmp0 (member, str)) return; \
 	gncAddressBeginEdit (obj); \
 	tmp = CACHE_INSERT (str); \
 	CACHE_REMOVE (member); \
@@ -566,7 +566,7 @@
     if (!a && b) return 1;
     if (a && !b) return -1;
 
-    return safe_strcmp (a->name, b->name);
+    return g_strcmp0 (a->name, b->name);
 }
 
 gboolean
@@ -578,42 +578,42 @@
     g_return_val_if_fail(GNC_IS_ADDRESS(a), FALSE);
     g_return_val_if_fail(GNC_IS_ADDRESS(b), FALSE);
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("names differ: %s vs %s", a->name, b->name);
         return FALSE;
     }
-    if (safe_strcmp(a->addr1, b->addr1) != 0)
+    if (g_strcmp0(a->addr1, b->addr1) != 0)
     {
         PWARN("address lines 1 differ: %s vs %s", a->addr1, b->addr1);
         return FALSE;
     }
-    if (safe_strcmp(a->addr2, b->addr2) != 0)
+    if (g_strcmp0(a->addr2, b->addr2) != 0)
     {
         PWARN("address lines 2 differ: %s vs %s", a->addr2, b->addr1);
         return FALSE;
     }
-    if (safe_strcmp(a->addr3, b->addr3) != 0)
+    if (g_strcmp0(a->addr3, b->addr3) != 0)
     {
         PWARN("address lines 3 differ: %s vs %s", a->addr3, b->addr3);
         return FALSE;
     }
-    if (safe_strcmp(a->addr4, b->addr4) != 0)
+    if (g_strcmp0(a->addr4, b->addr4) != 0)
     {
         PWARN("address lines 4 differ: %s vs %s", a->addr4, b->addr4);
         return FALSE;
     }
-    if (safe_strcmp(a->phone, b->phone) != 0)
+    if (g_strcmp0(a->phone, b->phone) != 0)
     {
         PWARN("phone numbers differ: %s vs %s", a->phone, b->phone);
         return FALSE;
     }
-    if (safe_strcmp(a->fax, b->fax) != 0)
+    if (g_strcmp0(a->fax, b->fax) != 0)
     {
         PWARN("fax numbers differ: %s vs %s", a->fax, b->fax);
         return FALSE;
     }
-    if (safe_strcmp(a->email, b->email) != 0)
+    if (g_strcmp0(a->email, b->email) != 0)
     {
         PWARN("email addresses differ: %s vs %s", a->email, b->email);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncBillTerm.c
===================================================================
--- gnucash/trunk/src/engine/gncBillTerm.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncBillTerm.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -73,7 +73,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncBillTermBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -490,7 +490,7 @@
     for ( ; list; list = list->next)
     {
         GncBillTerm *term = list->data;
-        if (!safe_strcmp (term->name, name))
+        if (!g_strcmp0 (term->name, name))
             return list->data;
     }
     return NULL;
@@ -625,10 +625,10 @@
     if (!a) return -1;
     if (!b) return 1;
 
-    ret = safe_strcmp (a->name, b->name);
+    ret = g_strcmp0 (a->name, b->name);
     if (ret) return ret;
 
-    return safe_strcmp (a->desc, b->desc);
+    return g_strcmp0 (a->desc, b->desc);
 }
 
 gboolean gncBillTermEqual(const GncBillTerm *a, const GncBillTerm *b)
@@ -639,13 +639,13 @@
     g_return_val_if_fail(GNC_IS_BILLTERM(a), FALSE);
     g_return_val_if_fail(GNC_IS_BILLTERM(b), FALSE);
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("Names differ: %s vs %s", a->name, b->name);
         return FALSE;
     }
 
-    if (safe_strcmp(a->desc, b->desc) != 0)
+    if (g_strcmp0(a->desc, b->desc) != 0)
     {
         PWARN("Descriptions differ: %s vs %s", a->desc, b->desc);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncCustomer.c
===================================================================
--- gnucash/trunk/src/engine/gncCustomer.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncCustomer.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -316,7 +316,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncCustomerBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -682,19 +682,19 @@
     g_return_val_if_fail(GNC_IS_CUSTOMER(a), FALSE);
     g_return_val_if_fail(GNC_IS_CUSTOMER(b), FALSE);
 
-    if (safe_strcmp(a->id, b->id) != 0)
+    if (g_strcmp0(a->id, b->id) != 0)
     {
         PWARN("IDs differ: %s vs %s", a->id, b->id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("Names differ: %s vs %s", a->name, b->name);
         return FALSE;
     }
 
-    if (safe_strcmp(a->notes, b->notes) != 0)
+    if (g_strcmp0(a->notes, b->notes) != 0)
     {
         PWARN("Notes differ: %s vs %s", a->notes, b->notes);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncEmployee.c
===================================================================
--- gnucash/trunk/src/engine/gncEmployee.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncEmployee.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -422,7 +422,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncEmployeeBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -684,13 +684,13 @@
     g_return_val_if_fail(GNC_IS_EMPLOYEE(a), FALSE);
     g_return_val_if_fail(GNC_IS_EMPLOYEE(b), FALSE);
 
-    if (safe_strcmp(a->id, b->id) != 0)
+    if (g_strcmp0(a->id, b->id) != 0)
     {
         PWARN("IDs differ: %s vs %s", a->id, b->id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->username, b->username) != 0)
+    if (g_strcmp0(a->username, b->username) != 0)
     {
         PWARN("Usernames differ: %s vs %s", a->username, b->username);
         return FALSE;
@@ -714,13 +714,13 @@
         return FALSE;
     }
 
-    if (safe_strcmp(a->language, b->language) != 0)
+    if (g_strcmp0(a->language, b->language) != 0)
     {
         PWARN("Languages differ: %s vs %s", a->language, b->language);
         return FALSE;
     }
 
-    if (safe_strcmp(a->acl, b->acl) != 0)
+    if (g_strcmp0(a->acl, b->acl) != 0)
     {
         PWARN("ACLs differ: %s vs %s", a->acl, b->acl);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncEntry.c
===================================================================
--- gnucash/trunk/src/engine/gncEntry.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncEntry.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -191,7 +191,7 @@
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
-	if (!safe_strcmp (member, str)) return; \
+	if (!g_strcmp0 (member, str)) return; \
 	gncEntryBeginEdit (obj); \
 	tmp = CACHE_INSERT (str); \
 	CACHE_REMOVE (member); \
@@ -1522,17 +1522,17 @@
     compare = timespec_cmp (&(a->date_entered), &(b->date_entered));
     if (compare) return compare;
 
-    compare = safe_strcmp (a->desc, b->desc);
+    compare = g_strcmp0 (a->desc, b->desc);
     if (compare) return compare;
 
-    compare = safe_strcmp (a->action, b->action);
+    compare = g_strcmp0 (a->action, b->action);
     if (compare) return compare;
 
     return qof_instance_guid_compare(a, b);
 }
 
 #define CHECK_STRING(X, Y, FIELD) \
-    if (safe_strcmp((X)->FIELD, (Y)->FIELD) != 0) \
+    if (g_strcmp0((X)->FIELD, (Y)->FIELD) != 0) \
     { \
         PWARN("%s differ: %s vs %s", #FIELD, (X)->FIELD, (Y)->FIELD); \
         return FALSE; \

Modified: gnucash/trunk/src/engine/gncInvoice.c
===================================================================
--- gnucash/trunk/src/engine/gncInvoice.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncInvoice.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -87,7 +87,7 @@
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
-	if (!safe_strcmp (member, str)) return; \
+	if (!g_strcmp0 (member, str)) return; \
 	gncInvoiceBeginEdit (obj); \
 	tmp = CACHE_INSERT (str); \
 	CACHE_REMOVE (member); \
@@ -1039,7 +1039,7 @@
     {
         return;
     }
-    if (0 == safe_strcmp(qof_collection_get_type(entry_coll), GNC_ID_ENTRY))
+    if (0 == g_strcmp0(qof_collection_get_type(entry_coll), GNC_ID_ENTRY))
     {
         qof_collection_foreach(entry_coll, qofInvoiceEntryCB, invoice);
     }
@@ -1788,7 +1788,7 @@
     if (!a) return -1;
     if (!b) return 1;
 
-    compare = safe_strcmp (a->id, b->id);
+    compare = g_strcmp0 (a->id, b->id);
     if (compare) return compare;
 
     compare = timespec_cmp (&(a->date_opened), &(b->date_opened));
@@ -1808,25 +1808,25 @@
     g_return_val_if_fail(GNC_IS_INVOICE(a), FALSE);
     g_return_val_if_fail(GNC_IS_INVOICE(b), FALSE);
 
-    if (safe_strcmp(a->id, b->id) != 0)
+    if (g_strcmp0(a->id, b->id) != 0)
     {
         PWARN("IDs differ: %s vs %s", a->id, b->id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->notes, b->notes) != 0)
+    if (g_strcmp0(a->notes, b->notes) != 0)
     {
         PWARN("Notes differ: %s vs %s", a->notes, b->notes);
         return FALSE;
     }
 
-    if (safe_strcmp(a->billing_id, b->billing_id) != 0)
+    if (g_strcmp0(a->billing_id, b->billing_id) != 0)
     {
         PWARN("Billing IDs differ: %s vs %s", a->billing_id, b->billing_id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->printname, b->printname) != 0)
+    if (g_strcmp0(a->printname, b->printname) != 0)
     {
         PWARN("Printnames differ: %s vs %s", a->printname, b->printname);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncJob.c
===================================================================
--- gnucash/trunk/src/engine/gncJob.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncJob.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -239,7 +239,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncJobBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -421,7 +421,7 @@
     if (!a && b) return 1;
     if (a && !b) return -1;
 
-    return (safe_strcmp(a->id, b->id));
+    return (g_strcmp0(a->id, b->id));
 }
 
 gboolean gncJobEqual(const GncJob * a, const GncJob *b)
@@ -432,19 +432,19 @@
     g_return_val_if_fail(GNC_IS_JOB(a), FALSE);
     g_return_val_if_fail(GNC_IS_JOB(b), FALSE);
 
-    if (safe_strcmp(a->id, b->id) != 0)
+    if (g_strcmp0(a->id, b->id) != 0)
     {
         PWARN("IDs differ: %s vs %s", a->id, b->id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("Names differ: %s vs %s", a->name, b->name);
         return FALSE;
     }
 
-    if (safe_strcmp(a->desc, b->desc) != 0)
+    if (g_strcmp0(a->desc, b->desc) != 0)
     {
         PWARN("Descriptions differ: %s vs %s", a->desc, b->desc);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncOrder.c
===================================================================
--- gnucash/trunk/src/engine/gncOrder.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncOrder.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -65,7 +65,7 @@
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
-	if (!safe_strcmp (member, str)) return; \
+	if (!g_strcmp0 (member, str)) return; \
 	gncOrderBeginEdit (obj); \
 	tmp = CACHE_INSERT (str); \
 	CACHE_REMOVE (member); \
@@ -516,7 +516,7 @@
     if (!a) return -1;
     if (!b) return 1;
 
-    compare = safe_strcmp (a->id, b->id);
+    compare = g_strcmp0 (a->id, b->id);
     if (compare) return compare;
 
     compare = timespec_cmp (&(a->opened), &(b->opened));

Modified: gnucash/trunk/src/engine/gncOwner.c
===================================================================
--- gnucash/trunk/src/engine/gncOwner.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncOwner.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -267,22 +267,22 @@
     {
         return;
     }
-    if (0 == safe_strcmp(ent->e_type, GNC_ID_CUSTOMER))
+    if (0 == g_strcmp0(ent->e_type, GNC_ID_CUSTOMER))
     {
         owner->type = GNC_OWNER_CUSTOMER;
         gncOwnerInitCustomer(owner, (GncCustomer*)ent);
     }
-    else if (0 == safe_strcmp(ent->e_type, GNC_ID_JOB))
+    else if (0 == g_strcmp0(ent->e_type, GNC_ID_JOB))
     {
         owner->type = GNC_OWNER_JOB;
         gncOwnerInitJob(owner, (GncJob*)ent);
     }
-    else if (0 == safe_strcmp(ent->e_type, GNC_ID_VENDOR))
+    else if (0 == g_strcmp0(ent->e_type, GNC_ID_VENDOR))
     {
         owner->type = GNC_OWNER_VENDOR;
         gncOwnerInitVendor(owner, (GncVendor*)ent);
     }
-    else if (0 == safe_strcmp(ent->e_type, GNC_ID_EMPLOYEE))
+    else if (0 == g_strcmp0(ent->e_type, GNC_ID_EMPLOYEE))
     {
         owner->type = GNC_OWNER_EMPLOYEE;
         gncOwnerInitEmployee(owner, (GncEmployee*)ent);
@@ -1166,25 +1166,25 @@
 {
     if (!book || !owner || !type || !guid) return FALSE;
 
-    if (0 == safe_strcmp(type, GNC_ID_CUSTOMER))
+    if (0 == g_strcmp0(type, GNC_ID_CUSTOMER))
     {
         GncCustomer *customer = gncCustomerLookup(book, guid);
         gncOwnerInitCustomer(owner, customer);
         return (NULL != customer);
     }
-    else if (0 == safe_strcmp(type, GNC_ID_JOB))
+    else if (0 == g_strcmp0(type, GNC_ID_JOB))
     {
         GncJob *job = gncJobLookup(book, guid);
         gncOwnerInitJob(owner, job);
         return (NULL != job);
     }
-    else if (0 == safe_strcmp(type, GNC_ID_VENDOR))
+    else if (0 == g_strcmp0(type, GNC_ID_VENDOR))
     {
         GncVendor *vendor = gncVendorLookup(book, guid);
         gncOwnerInitVendor(owner, vendor);
         return (NULL != vendor);
     }
-    else if (0 == safe_strcmp(type, GNC_ID_EMPLOYEE))
+    else if (0 == g_strcmp0(type, GNC_ID_EMPLOYEE))
     {
         GncEmployee *employee = gncEmployeeLookup(book, guid);
         gncOwnerInitEmployee(owner, employee);

Modified: gnucash/trunk/src/engine/gncTaxTable.c
===================================================================
--- gnucash/trunk/src/engine/gncTaxTable.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncTaxTable.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -103,7 +103,7 @@
 }
 #undef GNC_RETURN_ENUM_AS_STRING
 #define GNC_RETURN_ON_MATCH(s,x) \
-  if(safe_strcmp((s), (str)) == 0) { *type = x; return(TRUE); }
+  if(g_strcmp0((s), (str)) == 0) { *type = x; return(TRUE); }
 gboolean
 gncAmountStringToType (const char *str, GncAmountType *type)
 {
@@ -136,7 +136,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncTaxTableBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -657,7 +657,7 @@
     for ( ; list; list = list->next)
     {
         GncTaxTable *table = list->data;
-        if (!safe_strcmp (table->name, name))
+        if (!g_strcmp0 (table->name, name))
             return list->data;
     }
     return NULL;
@@ -793,7 +793,7 @@
 
     name_a = gnc_account_get_full_name (a->account);
     name_b = gnc_account_get_full_name (b->account);
-    retval = safe_strcmp(name_a, name_b);
+    retval = g_strcmp0(name_a, name_b);
     g_free(name_a);
     g_free(name_b);
 
@@ -808,7 +808,7 @@
     if (!a && !b) return 0;
     if (!a) return -1;
     if (!b) return 1;
-    return safe_strcmp (a->name, b->name);
+    return g_strcmp0 (a->name, b->name);
 }
 
 gboolean gncTaxTableEntryEqual(const GncTaxTableEntry *a, const GncTaxTableEntry *b)
@@ -845,7 +845,7 @@
     g_return_val_if_fail(GNC_IS_TAXTABLE(a), FALSE);
     g_return_val_if_fail(GNC_IS_TAXTABLE(b), FALSE);
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("Names differ: %s vs %s", a->name, b->name);
         return FALSE;

Modified: gnucash/trunk/src/engine/gncVendor.c
===================================================================
--- gnucash/trunk/src/engine/gncVendor.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/gncVendor.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -449,7 +449,7 @@
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
-        if (!safe_strcmp (member, str)) return; \
+        if (!g_strcmp0 (member, str)) return; \
         gncVendorBeginEdit (obj); \
         tmp = CACHE_INSERT (str); \
         CACHE_REMOVE (member); \
@@ -745,19 +745,19 @@
     g_return_val_if_fail(GNC_IS_VENDOR(a), FALSE);
     g_return_val_if_fail(GNC_IS_VENDOR(b), FALSE);
 
-    if (safe_strcmp(a->id, b->id) != 0)
+    if (g_strcmp0(a->id, b->id) != 0)
     {
         PWARN("IDs differ: %s vs %s", a->id, b->id);
         return FALSE;
     }
 
-    if (safe_strcmp(a->name, b->name) != 0)
+    if (g_strcmp0(a->name, b->name) != 0)
     {
         PWARN("Names differ: %s vs %s", a->name, b->name);
         return FALSE;
     }
 
-    if (safe_strcmp(a->notes, b->notes) != 0)
+    if (g_strcmp0(a->notes, b->notes) != 0)
     {
         PWARN("Notes differ");
         return FALSE;

Modified: gnucash/trunk/src/engine/test/test-address.c
===================================================================
--- gnucash/trunk/src/engine/test/test-address.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-address.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -81,7 +81,7 @@
     do_test (!gncAddressIsDirty (address), "test if start dirty");
     set (address, str);
     do_test (gncAddressIsDirty (address), "test dirty later");
-    do_test (safe_strcmp (get (address), str) == 0, message);
+    do_test (g_strcmp0 (get (address), str) == 0, message);
     gncAddressClearDirty (address);
 }
 

Modified: gnucash/trunk/src/engine/test/test-business.c
===================================================================
--- gnucash/trunk/src/engine/test/test-business.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-business.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -65,7 +65,7 @@
         do_test (gncBusinessLookup ("snm98sn snml say  dyikh9y9ha") == NULL,
                  "lookup non-existant business object");
 
-        do_test (!safe_strcmp (gncBusinessGetTypeLabel (TEST_MODULE_NAME),
+        do_test (!g_strcmp0 (gncBusinessGetTypeLabel (TEST_MODULE_NAME),
                                _(TEST_MODULE_DESC)),
                  "test description return");
     }

Modified: gnucash/trunk/src/engine/test/test-commodities.c
===================================================================
--- gnucash/trunk/src/engine/test/test-commodities.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-commodities.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -71,19 +71,19 @@
             com != NULL, "commodity with data new and destroy");
 
         do_test(
-            safe_strcmp(fullname, gnc_commodity_get_fullname(com)) == 0,
+            g_strcmp0(fullname, gnc_commodity_get_fullname(com)) == 0,
             "fullnames equal test");
 
         do_test(
-            safe_strcmp(namespace, gnc_commodity_get_namespace(com)) == 0,
+            g_strcmp0(namespace, gnc_commodity_get_namespace(com)) == 0,
             "namespace equal test");
 
         do_test(
-            safe_strcmp(mnemonic, gnc_commodity_get_mnemonic(com)) == 0,
+            g_strcmp0(mnemonic, gnc_commodity_get_mnemonic(com)) == 0,
             "mnemonic equal test");
 
         do_test(
-            safe_strcmp(cusip, gnc_commodity_get_cusip(com)) == 0,
+            g_strcmp0(cusip, gnc_commodity_get_cusip(com)) == 0,
             "cusip equal test");
 
         do_test(
@@ -93,25 +93,25 @@
         fullname = get_random_string();
         gnc_commodity_set_fullname(com, fullname);
         do_test(
-            safe_strcmp(fullname, gnc_commodity_get_fullname(com)) == 0,
+            g_strcmp0(fullname, gnc_commodity_get_fullname(com)) == 0,
             "reset fullnames equal test");
 
         namespace = get_random_commodity_namespace();
         gnc_commodity_set_namespace(com, namespace);
         do_test(
-            safe_strcmp(namespace, gnc_commodity_get_namespace(com)) == 0,
+            g_strcmp0(namespace, gnc_commodity_get_namespace(com)) == 0,
             "reset namespace equal test");
 
         mnemonic = get_random_string();
         gnc_commodity_set_mnemonic(com, mnemonic);
         do_test(
-            safe_strcmp(mnemonic, gnc_commodity_get_mnemonic(com)) == 0,
+            g_strcmp0(mnemonic, gnc_commodity_get_mnemonic(com)) == 0,
             "reset mnemonic equal test");
 
         cusip = get_random_string();
         gnc_commodity_set_cusip(com, cusip);
         do_test(
-            safe_strcmp(cusip, gnc_commodity_get_cusip(com)) == 0,
+            g_strcmp0(cusip, gnc_commodity_get_cusip(com)) == 0,
             "reset cusip equal test");
 
         fraction = get_random_int_in_range(0, 10000);

Modified: gnucash/trunk/src/engine/test/test-customer.c
===================================================================
--- gnucash/trunk/src/engine/test/test-customer.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-customer.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -117,7 +117,7 @@
         gncCustomerCommitEdit(customer);
         res = qof_object_printable (GNC_ID_CUSTOMER, customer);
         do_test (res != NULL, "Printable NULL?");
-        do_test (safe_strcmp (str, res) == 0, "Printable equals");
+        do_test (g_strcmp0 (str, res) == 0, "Printable equals");
     }
 
     do_test (gncCustomerGetJoblist (customer, TRUE) == NULL, "joblist empty");
@@ -154,7 +154,7 @@
      * without having circular dependencies.
      */
     // do_test (!gncCustomerIsDirty (customer), "test dirty after commit");
-    do_test (safe_strcmp (get (customer), str) == 0, message);
+    do_test (g_strcmp0 (get (customer), str) == 0, message);
     gncCustomerSetActive (customer, FALSE);
     count++;
 }

Modified: gnucash/trunk/src/engine/test/test-employee.c
===================================================================
--- gnucash/trunk/src/engine/test/test-employee.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-employee.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -122,7 +122,7 @@
         gncAddressSetName (addr, str);
         res = qof_object_printable (GNC_ID_EMPLOYEE, employee);
         do_test (res != NULL, "Printable NULL?");
-        do_test (safe_strcmp (str, res) == 0, "Printable equals");
+        do_test (g_strcmp0 (str, res) == 0, "Printable equals");
     }
 
     qof_book_destroy (book);
@@ -148,7 +148,7 @@
      * without having circular dependencies.
      */
     // do_test (!gncEmployeeIsDirty (employee), "test dirty after commit");
-    do_test (safe_strcmp (get (employee), str) == 0, message);
+    do_test (g_strcmp0 (get (employee), str) == 0, message);
     gncEmployeeSetActive (employee, FALSE);
     count++;
 }

Modified: gnucash/trunk/src/engine/test/test-job.c
===================================================================
--- gnucash/trunk/src/engine/test/test-job.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-job.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -118,7 +118,7 @@
         gncJobSetName (job, str);
         res = qof_object_printable (GNC_ID_JOB, job);
         do_test (res != NULL, "Printable NULL?");
-        do_test (safe_strcmp (str, res) == 0, "Printable equals");
+        do_test (g_strcmp0 (str, res) == 0, "Printable equals");
     }
     {
         GList *list;
@@ -167,7 +167,7 @@
      * without having circular dependencies.
      */
     // do_test (!qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty after commit");
-    do_test (safe_strcmp (get (job), str) == 0, message);
+    do_test (g_strcmp0 (get (job), str) == 0, message);
     gncJobSetActive (job, FALSE);
     count++;
 }

Modified: gnucash/trunk/src/engine/test/test-object.c
===================================================================
--- gnucash/trunk/src/engine/test/test-object.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-object.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -81,7 +81,7 @@
         do_test (qof_object_lookup ("snm98sn snml say  dyikh9y9ha") == NULL,
                  "lookup non-existant object object");
 
-        do_test (!safe_strcmp (qof_object_get_type_label (TEST_MODULE_NAME),
+        do_test (!g_strcmp0 (qof_object_get_type_label (TEST_MODULE_NAME),
                                _(TEST_MODULE_DESC)),
                  "test description return");
     }

Modified: gnucash/trunk/src/engine/test/test-querynew.c
===================================================================
--- gnucash/trunk/src/engine/test/test-querynew.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-querynew.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -81,7 +81,7 @@
              == (QofAccessFunc)test_core_param,
              "qof_class_get_parameter_getter");
 
-    do_test (safe_strcmp (qof_class_get_parameter_type (TEST_MODULE_NAME,
+    do_test (g_strcmp0 (qof_class_get_parameter_type (TEST_MODULE_NAME,
                           TEST_PARAM),
                           TEST_CORE) == 0, "qof_class_get_parameter_type");
 

Modified: gnucash/trunk/src/engine/test/test-vendor.c
===================================================================
--- gnucash/trunk/src/engine/test/test-vendor.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/engine/test/test-vendor.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -120,7 +120,7 @@
         gncVendorSetName (vendor, str);
         res = qof_object_printable (GNC_ID_VENDOR, vendor);
         do_test (res != NULL, "Printable NULL?");
-        do_test (safe_strcmp (str, res) == 0, "Printable equals");
+        do_test (g_strcmp0 (str, res) == 0, "Printable equals");
     }
 
     qof_book_destroy (book);
@@ -146,7 +146,7 @@
      * without having circular dependencies.
      */
     // do_test (!gncVendorIsDirty (vendor), "test dirty after commit");
-    do_test (safe_strcmp (get (vendor), str) == 0, message);
+    do_test (g_strcmp0 (get (vendor), str) == 0, message);
     gncVendorSetActive (vendor, FALSE);
     count++;
 }

Modified: gnucash/trunk/src/gnome/dialog-commodities.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-commodities.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome/dialog-commodities.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -280,7 +280,7 @@
 
     /* Never show the template list */
     name = gnc_commodity_namespace_get_name (namespace);
-    if (safe_strcmp (name, "template") == 0)
+    if (g_strcmp0 (name, "template") == 0)
         return FALSE;
 
     /* Check whether or not to show commodities */

Modified: gnucash/trunk/src/gnome/dialog-price-edit-db.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-edit-db.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome/dialog-price-edit-db.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -354,7 +354,7 @@
 
     /* Never show the template list */
     name = gnc_commodity_namespace_get_name (namespace);
-    if (safe_strcmp (name, "template") == 0)
+    if (g_strcmp0 (name, "template") == 0)
         return FALSE;
 
     /* See if this namespace has commodities */

Modified: gnucash/trunk/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-editor.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome/dialog-price-editor.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -101,16 +101,16 @@
 static int
 type_string_to_index (const char *type)
 {
-    if (safe_strcmp (type, "bid") == 0)
+    if (g_strcmp0 (type, "bid") == 0)
         return 0;
 
-    if (safe_strcmp (type, "ask") == 0)
+    if (g_strcmp0 (type, "ask") == 0)
         return 1;
 
-    if (safe_strcmp (type, "last") == 0)
+    if (g_strcmp0 (type, "last") == 0)
         return 2;
 
-    if (safe_strcmp (type, "nav") == 0)
+    if (g_strcmp0 (type, "nav") == 0)
         return 3;
 
     return 4;

Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -234,7 +234,7 @@
     SCM codes;
 
     if (ti_dialog->tax_type == NULL ||
-            (safe_strcmp (ti_dialog->tax_type, "") == 0))
+            (g_strcmp0 (ti_dialog->tax_type, "") == 0))
     {
         destroy_txf_infos (infos);
         return NULL;
@@ -302,7 +302,7 @@
             str = g_strdup (SCM_SYMBOL_CHARS (scm));
         else
             str = g_strdup ("");
-        if (safe_strcmp (str, "not-impl") == 0)
+        if (g_strcmp0 (str, "not-impl") == 0)
         {
             g_free (str);
             continue;
@@ -310,7 +310,7 @@
 
         txf_info = g_new0 (TXFInfo, 1);
 
-        if (safe_strcmp (str, "none") == 0)
+        if (g_strcmp0 (str, "none") == 0)
             txf_info->payer_name_source = NULL;
         else
             txf_info->payer_name_source = g_strdup (str);
@@ -417,7 +417,7 @@
                 g_free (temp);
                 g_free (temp2);
             }
-            if (safe_strcmp (until, now) != 0)
+            if (g_strcmp0 (until, now) != 0)
                 g_free (until);
         }
         if (year != 0)
@@ -538,7 +538,7 @@
                                          " - ",
                                          tax_type_info->description, NULL);
         /* save combo text for current tax type code */
-        if (safe_strcmp (ti_dialog->tax_type, tax_type_info->type_code) == 0)
+        if (g_strcmp0 (ti_dialog->tax_type, tax_type_info->type_code) == 0)
             ti_dialog->tax_type_combo_text = tax_type_info->combo_box_entry;
         /* the last will be default */
         ti_dialog->default_tax_type = tax_type_info->combo_box_entry;
@@ -633,7 +633,7 @@
     {
         TXFInfo *info = infos->data;
 
-        if (safe_strcmp (code, info->code) == 0)
+        if (g_strcmp0 (code, info->code) == 0)
             return info;
     }
 
@@ -681,7 +681,7 @@
     gtk_tree_path_free(path);
 
     str = xaccAccountGetTaxUSPayerNameSource (account);
-    if (safe_strcmp (str, "parent") == 0)
+    if (g_strcmp0 (str, "parent") == 0)
         gtk_toggle_button_set_active
         (GTK_TOGGLE_BUTTON (ti_dialog->parent_account_button), TRUE);
     else
@@ -924,13 +924,13 @@
     if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
     {
         button_name = gtk_buildable_get_name(GTK_BUILDABLE(w));
-        if (safe_strcmp (button_name, "income_radio") == 0)
+        if (g_strcmp0 (button_name, "income_radio") == 0)
             ti_dialog->account_type = ACCT_TYPE_INCOME;
-        else if (safe_strcmp (button_name, "expense_radio") == 0)
+        else if (g_strcmp0 (button_name, "expense_radio") == 0)
             ti_dialog->account_type = ACCT_TYPE_EXPENSE;
-        else if (safe_strcmp (button_name, "asset_radio") == 0)
+        else if (g_strcmp0 (button_name, "asset_radio") == 0)
             ti_dialog->account_type = ACCT_TYPE_ASSET;
-        else if (safe_strcmp (button_name, "liab_eq_radio") == 0)
+        else if (g_strcmp0 (button_name, "liab_eq_radio") == 0)
             ti_dialog->account_type = ACCT_TYPE_LIABILITY;
         else
             return;
@@ -1052,8 +1052,8 @@
 set_focus_sensitivity (TaxInfoDialog *ti_dialog)
 {
     if ((ti_dialog->tax_type == NULL) ||
-            (safe_strcmp (ti_dialog->tax_type, "Other") == 0) ||
-            (safe_strcmp (ti_dialog->tax_type, "") == 0))
+            (g_strcmp0 (ti_dialog->tax_type, "Other") == 0) ||
+            (g_strcmp0 (ti_dialog->tax_type, "") == 0))
     {
         gtk_widget_grab_focus (ti_dialog->tax_identity_edit_button);
         gtk_widget_set_sensitive (ti_dialog->acct_info, FALSE);
@@ -1102,7 +1102,7 @@
             if (selected_type)
             {
                 entry_type = selected_type->type_code;
-                if (!(safe_strcmp (ti_dialog->tax_type, entry_type) == 0))
+                if (!(g_strcmp0 (ti_dialog->tax_type, entry_type) == 0))
                 {
                     ti_dialog->tax_type_changed = TRUE;
                     gnc_set_current_book_tax_type (entry_type);
@@ -1139,7 +1139,7 @@
                 }
             }
         }
-        if (!(safe_strcmp (ti_dialog->tax_name, entry_name) == 0))
+        if (!(g_strcmp0 (ti_dialog->tax_name, entry_name) == 0))
         {
             gnc_set_current_book_tax_name (entry_name);
             ti_dialog->tax_name = g_strdup (entry_name);
@@ -1184,7 +1184,7 @@
     content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
     name_entry = gtk_entry_new();
     ti_dialog->entity_name_entry = name_entry;
-    if (!(safe_strcmp (ti_dialog->tax_name, NULL) == 0))
+    if (!(g_strcmp0 (ti_dialog->tax_name, NULL) == 0))
         gtk_entry_set_text (GTK_ENTRY (name_entry), ti_dialog->tax_name);
     label = gtk_label_new (_("Name"));
     gtk_misc_set_alignment (GTK_MISC (label), 1.00, 0.50);
@@ -1206,7 +1206,7 @@
 
         gtk_list_store_append(store, &iter);
         gtk_list_store_set(store, &iter, 0, tax_type_info->combo_box_entry, -1);
-        if (safe_strcmp (ti_dialog->tax_type, tax_type_info->type_code) == 0)
+        if (g_strcmp0 (ti_dialog->tax_type, tax_type_info->type_code) == 0)
             current_item = item;
         item++;
     }

Modified: gnucash/trunk/src/gnome-utils/account-quickfill.c
===================================================================
--- gnucash/trunk/src/gnome-utils/account-quickfill.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/account-quickfill.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -369,7 +369,7 @@
         if (match)
         {
             match_str = gnc_quickfill_string (match);
-            if (match_str && (safe_strcmp(match_str, name) != 0))
+            if (match_str && (g_strcmp0(match_str, name) != 0))
             {
                 PINFO ("got match for %s", name);
                 break;

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -368,21 +368,21 @@
 
     string = gtk_entry_get_text (GTK_ENTRY(aw->name_entry));
     old_string = xaccAccountGetName (account);
-    if (safe_strcmp (string, old_string) != 0)
+    if (g_strcmp0 (string, old_string) != 0)
         xaccAccountSetName (account, string);
 
     string = gtk_entry_get_text (GTK_ENTRY(aw->description_entry));
     old_string = xaccAccountGetDescription (account);
-    if (safe_strcmp (string, old_string) != 0)
+    if (g_strcmp0 (string, old_string) != 0)
         xaccAccountSetDescription (account, string);
 
     gtk_color_button_get_color(GTK_COLOR_BUTTON(aw->color_entry_button), &color );
     string = gdk_color_to_string(&color);
-    if (safe_strcmp (string, DEFAULT_COLOR) == 0)
+    if (g_strcmp0 (string, DEFAULT_COLOR) == 0)
         string = "Not Set";
 
     old_string = xaccAccountGetColor (account);
-    if (safe_strcmp (string, old_string) != 0)
+    if (g_strcmp0 (string, old_string) != 0)
         xaccAccountSetColor (account, string);
 
     commodity = (gnc_commodity *)
@@ -408,7 +408,7 @@
 
     string = gtk_entry_get_text (GTK_ENTRY(aw->code_entry));
     old_string = xaccAccountGetCode (account);
-    if (safe_strcmp (string, old_string) != 0)
+    if (g_strcmp0 (string, old_string) != 0)
         xaccAccountSetCode (account, string);
 
     gtk_text_buffer_get_start_iter (aw->notes_text_buffer, &start);
@@ -758,7 +758,7 @@
 
     /* check for valid name */
     name = gtk_entry_get_text(GTK_ENTRY(aw->name_entry));
-    if (safe_strcmp(name, "") == 0)
+    if (g_strcmp0(name, "") == 0)
     {
         const char *message = _("The account must be given a name.");
         gnc_error_dialog(aw->dialog, "%s", message);
@@ -1663,7 +1663,7 @@
         {
             account = node->data;
 
-            if (safe_strcmp(xaccAccountGetName (account), *ptr) == 0)
+            if (g_strcmp0(xaccAccountGetName (account), *ptr) == 0)
             {
                 /* We found an account. */
                 *base_account = account;

Modified: gnucash/trunk/src/gnome-utils/dialog-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-commodity.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/dialog-commodity.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -711,7 +711,7 @@
 
     namespace = gtk_entry_get_text( GTK_ENTRY( gtk_bin_get_child( GTK_BIN( GTK_COMBO_BOX(cbwe)))));
 
-    if (safe_strcmp (namespace, GNC_COMMODITY_NS_ISO) == 0)
+    if (g_strcmp0 (namespace, GNC_COMMODITY_NS_ISO) == 0)
     {
         /* In case the user types in ISO4217, map it to CURRENCY. */
         return g_strdup(GNC_COMMODITY_NS_CURRENCY);
@@ -870,7 +870,7 @@
     guint i = 0;
     while (!found && known_timezones[i])
     {
-        if (safe_strcmp(timezone, known_timezones[i]) != 0)
+        if (g_strcmp0(timezone, known_timezones[i]) != 0)
         {
             i++;
         }

Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -462,7 +462,7 @@
     show_time = gnc_option_show_time(option);
     use24 = gnc_gconf_get_bool(GCONF_GENERAL, "24hour_time", FALSE);
 
-    if (safe_strcmp(type, "relative") != 0)
+    if (g_strcmp0(type, "relative") != 0)
     {
         ab_widget = gnc_date_edit_new(time(NULL), show_time, use24);
         entry = GNC_DATE_EDIT(ab_widget)->date_entry;
@@ -476,7 +476,7 @@
         }
     }
 
-    if (safe_strcmp(type, "absolute") != 0)
+    if (g_strcmp0(type, "absolute") != 0)
     {
         int i;
         num_values = gnc_option_num_permissible_values(option);
@@ -518,20 +518,20 @@
         }
     }
 
-    if (safe_strcmp(type, "absolute") == 0)
+    if (g_strcmp0(type, "absolute") == 0)
     {
         free(type);
         gnc_option_set_widget (option, ab_widget);
         return ab_widget;
     }
-    else if (safe_strcmp(type, "relative") == 0)
+    else if (g_strcmp0(type, "relative") == 0)
     {
         gnc_option_set_widget (option, rel_widget);
         free(type);
 
         return rel_widget;
     }
-    else if (safe_strcmp(type, "both") == 0)
+    else if (g_strcmp0(type, "both") == 0)
     {
         box = gtk_hbox_new(FALSE, 5);
 
@@ -1212,7 +1212,7 @@
         page = gnc_options_dialog_append_page(propertybox, section);
 
         section_name = gnc_option_section_name(section);
-        if (safe_strcmp(section_name, default_section_name) == 0)
+        if (g_strcmp0(section_name, default_section_name) == 0)
             default_page = page;
     }
 
@@ -2259,17 +2259,17 @@
         symbol_str = gnc_date_option_value_get_type (value);
         if (symbol_str)
         {
-            if (safe_strcmp(symbol_str, "relative") == 0)
+            if (g_strcmp0(symbol_str, "relative") == 0)
             {
                 SCM relative = gnc_date_option_value_get_relative (value);
 
                 index = gnc_option_permissible_value_index(option, relative);
-                if (safe_strcmp(date_option_type, "relative") == 0)
+                if (g_strcmp0(date_option_type, "relative") == 0)
                 {
                     /* GtkComboBox per-item tooltip changes needed below */
                     gnc_combott_set_active(GNC_COMBOTT(widget), index);
                 }
-                else if (safe_strcmp(date_option_type, "both") == 0)
+                else if (g_strcmp0(date_option_type, "both") == 0)
                 {
                     GList *widget_list;
                     GtkWidget *rel_date_widget;
@@ -2287,17 +2287,17 @@
                     bad_value = TRUE;
                 }
             }
-            else if (safe_strcmp(symbol_str, "absolute") == 0)
+            else if (g_strcmp0(symbol_str, "absolute") == 0)
             {
                 Timespec ts;
 
                 ts = gnc_date_option_value_get_absolute (value);
 
-                if (safe_strcmp(date_option_type, "absolute") == 0)
+                if (g_strcmp0(date_option_type, "absolute") == 0)
                 {
                     gnc_date_edit_set_time(GNC_DATE_EDIT(widget), ts.tv_sec);
                 }
-                else if (safe_strcmp(date_option_type, "both") == 0)
+                else if (g_strcmp0(date_option_type, "both") == 0)
                 {
                     GList *widget_list;
                     GtkWidget *ab_widget;
@@ -2688,7 +2688,7 @@
     SCM type, val, result = SCM_UNDEFINED;
     char *subtype = gnc_option_date_option_get_subtype(option);
 
-    if (safe_strcmp(subtype, "relative") == 0)
+    if (g_strcmp0(subtype, "relative") == 0)
     {
         /* GtkComboBox per-item tooltip changes needed below */
         index = gnc_combott_get_active(GNC_COMBOTT(widget));
@@ -2697,7 +2697,7 @@
         val = gnc_option_permissible_value(option, index);
         result = scm_cons(type, val);
     }
-    else if (safe_strcmp(subtype, "absolute") == 0)
+    else if (g_strcmp0(subtype, "absolute") == 0)
     {
         Timespec ts;
 
@@ -2706,7 +2706,7 @@
 
         result = scm_cons(scm_str2symbol("absolute"), gnc_timespec2timepair(ts));
     }
-    else if (safe_strcmp(subtype, "both") == 0)
+    else if (g_strcmp0(subtype, "both") == 0)
     {
         Timespec ts;
         int index;

Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -674,7 +674,7 @@
         changed = TRUE;
     }
 
-    if ( !safe_strcmp(gtk_entry_get_text(GTK_ENTRY(xferData->memo_entry)), "" ))
+    if ( !g_strcmp0(gtk_entry_get_text(GTK_ENTRY(xferData->memo_entry)), "" ))
     {
         DEBUG("updating memo");
         gtk_entry_set_text( GTK_ENTRY(xferData->memo_entry),

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1998,7 +1998,7 @@
     color_string = g_strstrip(g_strdup(color_in));
 
     /* Optimization, if the color hasn't changed, don't update. */
-    if (*color_string == '\0' || 0 == safe_strcmp(color_string, gnc_plugin_page_get_page_color(page)))
+    if (*color_string == '\0' || 0 == g_strcmp0(color_string, gnc_plugin_page_get_page_color(page)))
     {
         g_free(color_string);
         LEAVE("empty string or color unchanged");

Modified: gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-menu-extensions.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -87,15 +87,15 @@
         return FALSE;
     }
 
-    if (safe_strcmp(string, "menu-item") == 0)
+    if (g_strcmp0(string, "menu-item") == 0)
     {
         *type = GTK_UI_MANAGER_MENUITEM;
     }
-    else if (safe_strcmp(string, "menu") == 0)
+    else if (g_strcmp0(string, "menu") == 0)
     {
         *type = GTK_UI_MANAGER_MENU;
     }
-    else if (safe_strcmp(string, "separator") == 0)
+    else if (g_strcmp0(string, "separator") == 0)
     {
         *type = GTK_UI_MANAGER_SEPARATOR;
     }

Modified: gnucash/trunk/src/gnome-utils/gnc-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-query-list.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-query-list.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -201,7 +201,7 @@
         const char *type = gnc_search_param_get_param_type (param);
 
         /* if this is a boolean, ignore it now -- we'll use a checkmark later */
-        if (safe_strcmp (type, QOF_TYPE_BOOLEAN))
+        if (g_strcmp0 (type, QOF_TYPE_BOOLEAN))
             continue;
 
         result = (gboolean) GPOINTER_TO_INT(gnc_search_param_compute_value(param, entry));
@@ -733,8 +733,8 @@
     if (list->numeric_inv_sort)
     {
         const char *type = gnc_search_param_get_param_type (param);
-        if (!safe_strcmp(type, QOF_TYPE_NUMERIC) ||
-                !safe_strcmp(type, QOF_TYPE_DEBCRED))
+        if (!g_strcmp0(type, QOF_TYPE_NUMERIC) ||
+                !g_strcmp0(type, QOF_TYPE_DEBCRED))
             sort_order = !sort_order;
     }
 
@@ -840,7 +840,7 @@
             gpointer res = item->data;
 
             /* if this is a boolean, ignore it now -- we'll use a checkmark later */
-            if (!safe_strcmp (type, QOF_TYPE_BOOLEAN))
+            if (!g_strcmp0 (type, QOF_TYPE_BOOLEAN))
             {
                 strings[i++] = g_strdup("");
                 continue;
@@ -857,8 +857,8 @@
             }
 
             /* Now convert this to a text value for the row */
-            if (!safe_strcmp(type, QOF_TYPE_DEBCRED) ||
-                    !safe_strcmp(type, QOF_TYPE_NUMERIC))
+            if (!g_strcmp0(type, QOF_TYPE_DEBCRED) ||
+                    !g_strcmp0(type, QOF_TYPE_NUMERIC))
             {
                 gnc_numeric (*nfcn)(gpointer, QofParam *) =
                     (gnc_numeric(*)(gpointer, QofParam *))(qp->param_getfcn);

Modified: gnucash/trunk/src/gnome-utils/gnc-sx-list-tree-model-adapter.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-sx-list-tree-model-adapter.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-sx-list-tree-model-adapter.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -377,7 +377,7 @@
 
     a_caseless = g_utf8_casefold(xaccSchedXactionGetName(a_inst->sx), -1);
     b_caseless = g_utf8_casefold(xaccSchedXactionGetName(b_inst->sx), -1);
-    rtn = safe_strcmp(a_caseless, b_caseless);
+    rtn = g_strcmp0(a_caseless, b_caseless);
     g_free(a_caseless);
     g_free(b_caseless);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1570,7 +1570,7 @@
         return;
     type = entity->e_type;
 
-    if (safe_strcmp(type, GNC_ID_SPLIT) == 0) {
+    if (g_strcmp0(type, GNC_ID_SPLIT) == 0) {
         /* Get the split.*/
         split = (Split *) entity;
 
@@ -1581,7 +1581,7 @@
         default:
             DEBUG("ignored event for %p (%s)", split, name);
         }
-    } else if (safe_strcmp(type, GNC_ID_TRANS) == 0) {
+    } else if (g_strcmp0(type, GNC_ID_TRANS) == 0) {
         /* Get the trans.*/
         trans = (Transaction *) entity;
 
@@ -1607,7 +1607,7 @@
         default:
             DEBUG("ignored event for %p (%s)", trans, name);
         }
-    } else if (safe_strcmp(type, GNC_ID_ACCOUNT) == 0) {
+    } else if (g_strcmp0(type, GNC_ID_ACCOUNT) == 0) {
         switch (event_type) {
             Account *acc;
         case GNC_EVENT_ITEM_ADDED:

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -506,13 +506,13 @@
                            GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT,
                            &tax_info_sub_acct,
                            -1);
-        if ((safe_strcmp (tax_info_sub_acct, "") == 0) ||
+        if ((g_strcmp0 (tax_info_sub_acct, "") == 0) ||
                 (tax_info_sub_acct == NULL))
             g_object_set(renderer, "text",
                          (tax_info == NULL ? "" : tax_info), NULL);
         else
         {
-            if ((safe_strcmp (tax_info, "") == 0) ||
+            if ((g_strcmp0 (tax_info, "") == 0) ||
                     (tax_info == NULL))
                 g_object_set(renderer, "text",
                              (tax_info_sub_acct == NULL ? "" : tax_info_sub_acct),
@@ -2279,7 +2279,7 @@
 void
 gnc_tree_view_account_code_edited_cb(Account *account, GtkTreeViewColumn *col, const gchar *new_code)
 {
-    if (safe_strcmp(xaccAccountGetCode(account), new_code) == 0)
+    if (g_strcmp0(xaccAccountGetCode(account), new_code) == 0)
         return;
     xaccAccountSetCode(account, new_code);
 }
@@ -2287,7 +2287,7 @@
 void
 gnc_tree_view_account_description_edited_cb(Account *account, GtkTreeViewColumn *col, const gchar *new_desc)
 {
-    if (safe_strcmp(xaccAccountGetDescription(account), new_desc) == 0)
+    if (g_strcmp0(xaccAccountGetDescription(account), new_desc) == 0)
         return;
     xaccAccountSetDescription(account, new_desc);
 }
@@ -2295,7 +2295,7 @@
 void
 gnc_tree_view_account_notes_edited_cb(Account *account, GtkTreeViewColumn *col, const gchar *new_notes)
 {
-    if (safe_strcmp(xaccAccountGetNotes(account), new_notes) == 0)
+    if (g_strcmp0(xaccAccountGetNotes(account), new_notes) == 0)
         return;
     xaccAccountSetNotes(account, new_notes);
 }

Modified: gnucash/trunk/src/gnome-utils/search-param.c
===================================================================
--- gnucash/trunk/src/gnome-utils/search-param.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/gnome-utils/search-param.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -279,7 +279,7 @@
     a_priv = GNC_SEARCH_PARAM_GET_PRIVATE(a);
     b_priv = GNC_SEARCH_PARAM_GET_PRIVATE(b);
     if (a_priv->type == b_priv->type ||
-            !safe_strcmp (a_priv->type, b_priv->type))
+            !g_strcmp0 (a_priv->type, b_priv->type))
         return TRUE;
 
     return FALSE;

Modified: gnucash/trunk/src/html/gnc-html-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-webkit.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/html/gnc-html-webkit.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -260,9 +260,9 @@
     regcomp(&compiled_m, machine_rexp, REG_EXTENDED);
     regcomp(&compiled_p, path_rexp, REG_EXTENDED);
 
-    if (!safe_strcmp (type, URL_TYPE_HTTP) ||
-            !safe_strcmp (type, URL_TYPE_SECURE) ||
-            !safe_strcmp (type, URL_TYPE_FTP))
+    if (!g_strcmp0 (type, URL_TYPE_HTTP) ||
+            !g_strcmp0 (type, URL_TYPE_SECURE) ||
+            !g_strcmp0 (type, URL_TYPE_FTP))
     {
 
         /* step 1: split the machine name away from the path
@@ -479,11 +479,11 @@
 
     do
     {
-        if ( !safe_strcmp( type, URL_TYPE_SECURE ) ||
-                !safe_strcmp( type, URL_TYPE_HTTP ) )
+        if ( !g_strcmp0( type, URL_TYPE_SECURE ) ||
+                !g_strcmp0( type, URL_TYPE_HTTP ) )
         {
 
-            if ( !safe_strcmp( type, URL_TYPE_SECURE ) )
+            if ( !g_strcmp0( type, URL_TYPE_SECURE ) )
             {
                 if ( !https_allowed() )
                 {
@@ -865,23 +865,23 @@
         return;
     }
 
-    if ( safe_strcmp( type, URL_TYPE_SCHEME ) == 0 )
+    if ( g_strcmp0( type, URL_TYPE_SCHEME ) == 0 )
     {
         gnc_html_open_scm( GNC_HTML_WEBKIT(self), location, label, new_window );
 
     }
-    else if ( safe_strcmp( type, URL_TYPE_JUMP ) == 0 )
+    else if ( g_strcmp0( type, URL_TYPE_JUMP ) == 0 )
     {
         /* Webkit jumps to the anchor on its own */
     }
-    else if ( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ||
-              safe_strcmp( type, URL_TYPE_HTTP ) == 0 ||
-              safe_strcmp( type, URL_TYPE_FILE ) == 0 )
+    else if ( g_strcmp0( type, URL_TYPE_SECURE ) == 0 ||
+              g_strcmp0( type, URL_TYPE_HTTP ) == 0 ||
+              g_strcmp0( type, URL_TYPE_FILE ) == 0 )
     {
 
         do
         {
-            if ( safe_strcmp( type, URL_TYPE_SECURE ) == 0 )
+            if ( g_strcmp0( type, URL_TYPE_SECURE ) == 0 )
             {
                 if ( !https_allowed() )
                 {
@@ -893,7 +893,7 @@
                 }
             }
 
-            if ( safe_strcmp( type, URL_TYPE_HTTP ) == 0 )
+            if ( g_strcmp0( type, URL_TYPE_HTTP ) == 0 )
             {
                 if ( !http_allowed() )
                 {

Modified: gnucash/trunk/src/html/gnc-html.c
===================================================================
--- gnucash/trunk/src/html/gnc-html.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/html/gnc-html.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -264,7 +264,7 @@
 
     g_free( protocol );
 
-    if ( !safe_strcmp( retval, URL_TYPE_FILE ) )
+    if ( !g_strcmp0( retval, URL_TYPE_FILE ) )
     {
         if ( !found_protocol && path && self && priv->base_location )
         {
@@ -285,7 +285,7 @@
         }
 
     }
-    else if ( !safe_strcmp( retval, URL_TYPE_JUMP ) )
+    else if ( !g_strcmp0( retval, URL_TYPE_JUMP ) )
     {
         *url_location = NULL;
         g_free( path );

Modified: gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
===================================================================
--- gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -446,13 +446,13 @@
     if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
     {
         button_name = gtk_buildable_get_name(GTK_BUILDABLE(w));
-        if (safe_strcmp (button_name, "income_radio") == 0)
+        if (g_strcmp0 (button_name, "income_radio") == 0)
             info->csva.account_type = ACCT_TYPE_INCOME;
-        else if (safe_strcmp (button_name, "expense_radio") == 0)
+        else if (g_strcmp0 (button_name, "expense_radio") == 0)
             info->csva.account_type = ACCT_TYPE_EXPENSE;
-        else if (safe_strcmp (button_name, "asset_radio") == 0)
+        else if (g_strcmp0 (button_name, "asset_radio") == 0)
             info->csva.account_type = ACCT_TYPE_ASSET;
-        else if (safe_strcmp (button_name, "liab_eq_radio") == 0)
+        else if (g_strcmp0 (button_name, "liab_eq_radio") == 0)
             info->csva.account_type = ACCT_TYPE_LIABILITY;
         else
             return;

Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -888,7 +888,7 @@
              * model 0, string 0, model 1, string 1, ..., model ncols, string ncols. */
             gtk_tree_model_get(store, &iter, 2 * i + 1, &contents, -1);
             /* If this column has the same string that the user selected ... */
-            if (!safe_strcmp(contents, new_text))
+            if (!g_strcmp0(contents, new_text))
             {
                 /* ... set this column to the "None" type. (We can't allow duplicate types.) */
                 gtk_list_store_set(GTK_LIST_STORE(store), &iter, 2 * i + 1,
@@ -991,7 +991,7 @@
         for (type = 0; type < GNC_CSV_NUM_COL_TYPES; type++)
         {
             /* ... we find one that matches with what's in the column. */
-            if (!safe_strcmp(contents, _(gnc_csv_column_type_strs[type])))
+            if (!g_strcmp0(contents, _(gnc_csv_column_type_strs[type])))
             {
                 /* Set the column_types array appropriately and quit. */
                 column_types->data[i] = type;

Modified: gnucash/trunk/src/import-export/import-backend.c
===================================================================
--- gnucash/trunk/src/import-export/import-backend.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/import-export/import-backend.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -701,7 +701,7 @@
                     conversion_ok = FALSE;
 
                 if ( (conversion_ok && (split_number == new_trans_number)) ||
-                        (safe_strcmp(new_trans_str, split_str) == 0) )
+                        (g_strcmp0(new_trans_str, split_str) == 0) )
                 {
                     /* An exact match of the Check number gives a +4 */
                     prob += 4;

Modified: gnucash/trunk/src/libqof/qof/qofclass.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofclass.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofclass.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -278,51 +278,51 @@
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_STRING))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_STRING))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_NUMERIC))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_NUMERIC))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_DATE))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_DATE))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_CHAR))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_CHAR))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_DEBCRED))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_DEBCRED))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_GUID))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_GUID))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_INT32))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_INT32))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_INT64))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_INT64))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_DOUBLE))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_DOUBLE))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_KVP))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_KVP))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_TYPE_BOOLEAN))
+    if (0 == g_strcmp0(param->param_type, QOF_TYPE_BOOLEAN))
     {
         return;
     }
-    if (0 == safe_strcmp(param->param_type, QOF_ID_BOOK))
+    if (0 == g_strcmp0(param->param_type, QOF_ID_BOOK))
     {
         return;
     }

Modified: gnucash/trunk/src/libqof/qof/qofinstance.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofinstance.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofinstance.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -297,7 +297,7 @@
      * OK, it might eliminate programming errors. */
 
     col_type = qof_collection_get_type(col);
-    if (safe_strcmp(col_type, type))
+    if (g_strcmp0(col_type, type))
     {
         PERR ("attempt to insert \"%s\" into \"%s\"", type, col_type);
         return;

Modified: gnucash/trunk/src/libqof/qof/qoflog.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qoflog.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qoflog.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -162,7 +162,7 @@
             fout = fopen(fname, "wb");
 #else
             /* We must not overwrite /dev/null */
-            g_assert(safe_strcmp(log_filename, "/dev/null") != 0);
+            g_assert(g_strcmp0(log_filename, "/dev/null") != 0);
 
             /* Windows prevents renaming of open files, so the next command silently fails there
              * No problem, the filename on Winows will simply have the random characters */

Modified: gnucash/trunk/src/libqof/qof/qofobject.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofobject.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofobject.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -355,7 +355,7 @@
     for (iter = object_modules; iter; iter = iter->next)
     {
         obj = iter->data;
-        if (!safe_strcmp (obj->e_type, name))
+        if (!g_strcmp0 (obj->e_type, name))
             return obj;
     }
     return NULL;

Modified: gnucash/trunk/src/libqof/qof/qofquery.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquery.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofquery.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -492,7 +492,7 @@
         if (sort->comp_fcn == NULL)
             sort->obj_cmp = qof_class_get_default_sort (resObj->param_type);
     }
-    else if (!safe_strcmp (sort->param_list->data, QUERY_DEFAULT_SORT))
+    else if (!g_strcmp0 (sort->param_list->data, QUERY_DEFAULT_SORT))
     {
         sort->use_default = TRUE;
     }
@@ -580,7 +580,7 @@
         if (!l1 && l2) return -1;
         if (l1 && !l2) return 1;
 
-        ret = safe_strcmp (l1->data, l2->data);
+        ret = g_strcmp0 (l1->data, l2->data);
         if (ret)
             return ret;
 
@@ -851,7 +851,7 @@
     /* Make sure we're searching for the same thing */
     g_return_val_if_fail (subq->search_for, NULL);
     g_return_val_if_fail (primaryq->search_for, NULL);
-    g_return_val_if_fail(!safe_strcmp(subq->search_for, primaryq->search_for),
+    g_return_val_if_fail(!g_strcmp0(subq->search_for, primaryq->search_for),
                          NULL);
 
     /* Perform the subquery */
@@ -894,7 +894,7 @@
     if (!q || !obj_type)
         return;
 
-    if (safe_strcmp (q->search_for, obj_type))
+    if (g_strcmp0 (q->search_for, obj_type))
     {
         q->search_for = (QofIdType) obj_type;
         q->changed = 1;
@@ -1103,7 +1103,7 @@
     if (!q2) return q1;
 
     if (q1->search_for && q2->search_for)
-        g_return_val_if_fail (safe_strcmp (q1->search_for, q2->search_for) == 0,
+        g_return_val_if_fail (g_strcmp0 (q1->search_for, q2->search_for) == 0,
                               NULL);
 
     search_for = (q1->search_for ? q1->search_for : q2->search_for);
@@ -1702,8 +1702,8 @@
     g_string_append (gs, (gchar *) pd->type_name);
 
     /* Char Predicate and GncGUID predicate don't use the 'how' field. */
-    if (safe_strcmp (pd->type_name, QOF_TYPE_CHAR) &&
-            safe_strcmp (pd->type_name, QOF_TYPE_GUID))
+    if (g_strcmp0 (pd->type_name, QOF_TYPE_CHAR) &&
+            g_strcmp0 (pd->type_name, QOF_TYPE_GUID))
     {
         g_string_append_printf (gs, " how: %s",
                                 qof_query_printStringForHow (pd->how));
@@ -1747,7 +1747,7 @@
 qof_query_printValueForParam (QofQueryPredData *pd, GString * gs)
 {
 
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_GUID))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_GUID))
     {
         GList *node;
         query_guid_t pdata = (query_guid_t) pd;
@@ -1761,7 +1761,7 @@
         }
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_STRING))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_STRING))
     {
         query_string_t pdata = (query_string_t) pd;
         g_string_append_printf (gs, " Match type %s",
@@ -1771,7 +1771,7 @@
                                 pdata->matchstring);
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_NUMERIC))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_NUMERIC))
     {
         query_numeric_t pdata = (query_numeric_t) pd;
         g_string_append_printf (gs, " Match type %s",
@@ -1780,7 +1780,7 @@
                                 gnc_num_dbg_to_string (pdata->amount));
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_KVP))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_KVP))
     {
         GSList *node;
         query_kvp_t pdata = (query_kvp_t) pd;
@@ -1793,25 +1793,25 @@
                                 kvp_value_to_string (pdata->value));
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_INT64))
     {
         query_int64_t pdata = (query_int64_t) pd;
         g_string_append_printf (gs, " int64: %" G_GINT64_FORMAT, pdata->val);
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_INT32))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_INT32))
     {
         query_int32_t pdata = (query_int32_t) pd;
         g_string_append_printf (gs, " int32: %d", pdata->val);
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_DOUBLE))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_DOUBLE))
     {
         query_double_t pdata = (query_double_t) pd;
         g_string_append_printf (gs, " double: %.18g", pdata->val);
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_DATE))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_DATE))
     {
         query_date_t pdata = (query_date_t) pd;
         g_string_append_printf (gs, " Match type %s",
@@ -1819,7 +1819,7 @@
         g_string_append_printf (gs, " query_date: %s", gnc_print_date (pdata->date));
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_CHAR))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_CHAR))
     {
         query_char_t pdata = (query_char_t) pd;
         g_string_append_printf (gs, " Match type %s",
@@ -1827,7 +1827,7 @@
         g_string_append_printf (gs, " char list: %s", pdata->char_list);
         return;
     }
-    if (!safe_strcmp (pd->type_name, QOF_TYPE_BOOLEAN))
+    if (!g_strcmp0 (pd->type_name, QOF_TYPE_BOOLEAN))
     {
         query_boolean_t pdata = (query_boolean_t) pd;
         g_string_append_printf (gs, " boolean: %s", pdata->val ? "TRUE" : "FALSE");

Modified: gnucash/trunk/src/libqof/qof/qofquerycore.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquerycore.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofquerycore.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -105,12 +105,12 @@
 #define VERIFY_PDATA(str) { \
         g_return_if_fail (pd != NULL); \
         g_return_if_fail (pd->type_name == str || \
-                        !safe_strcmp (str, pd->type_name)); \
+                        !g_strcmp0 (str, pd->type_name)); \
 }
 #define VERIFY_PDATA_R(str) { \
         g_return_val_if_fail (pd != NULL, NULL); \
         g_return_val_if_fail (pd->type_name == str || \
-                                !safe_strcmp (str, pd->type_name), \
+                                !g_strcmp0 (str, pd->type_name), \
                                 NULL); \
 }
 #define VERIFY_PREDICATE(str) { \
@@ -118,7 +118,7 @@
         g_return_val_if_fail (getter->param_getfcn != NULL, PREDICATE_ERROR); \
         g_return_val_if_fail (pd != NULL, PREDICATE_ERROR); \
         g_return_val_if_fail (pd->type_name == str || \
-                                !safe_strcmp (str, pd->type_name), \
+                                !g_strcmp0 (str, pd->type_name), \
                                 PREDICATE_ERROR); \
 }
 
@@ -186,7 +186,7 @@
     if (options == QOF_STRING_MATCH_CASEINSENSITIVE)
         return safe_strcasecmp (s1, s2);
 
-    return safe_strcmp (s1, s2);
+    return g_strcmp0 (s1, s2);
 }
 
 int
@@ -216,7 +216,7 @@
     if (options == QOF_STRING_MATCH_CASEINSENSITIVE)
         return safe_strcasecmp (sr1, sr2);
 
-    return safe_strcmp (sr1, sr2);
+    return g_strcmp0 (sr1, sr2);
 }
 
 static void
@@ -253,7 +253,7 @@
 
     if (pd1->options != pd2->options) return FALSE;
     if (pd1->is_regex != pd2->is_regex) return FALSE;
-    return (safe_strcmp (pd1->matchstring, pd2->matchstring) == 0);
+    return (g_strcmp0 (pd1->matchstring, pd2->matchstring) == 0);
 }
 
 QofQueryPredData *
@@ -1170,7 +1170,7 @@
     const query_char_t pd2 = (const query_char_t) p2;
 
     if (pd1->options != pd2->options) return FALSE;
-    return (safe_strcmp (pd1->char_list, pd2->char_list) == 0);
+    return (g_strcmp0 (pd1->char_list, pd2->char_list) == 0);
 }
 
 QofQueryPredData *
@@ -1277,7 +1277,7 @@
 
     for ( ; n1 && n2; n1 = n1->next, n2 = n2->next)
     {
-        if (safe_strcmp (n1->data, n2->data) != 0)
+        if (g_strcmp0 (n1->data, n2->data) != 0)
             return FALSE;
     }
 
@@ -1928,7 +1928,7 @@
     if (!p1 || !p2) return FALSE;
 
     if (p1->how != p2->how) return FALSE;
-    if (safe_strcmp (p1->type_name, p2->type_name)) return FALSE;
+    if (g_strcmp0 (p1->type_name, p2->type_name)) return FALSE;
 
     pred_equal = g_hash_table_lookup (predEqualTable, p1->type_name);
     g_return_val_if_fail (pred_equal, FALSE);

Modified: gnucash/trunk/src/libqof/qof/qofreference.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofreference.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofreference.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -71,9 +71,9 @@
         /* collect and choice handling */
         collect_setter = (void(*)(QofInstance*, QofCollection*))ref->param->param_setfcn;
         choice_setter = (void(*)(QofInstance*, QofInstance*))ref->param->param_setfcn;
-        if ((0 == safe_strcmp(ref->param->param_type, QOF_TYPE_COLLECT)) &&
+        if ((0 == g_strcmp0(ref->param->param_type, QOF_TYPE_COLLECT)) &&
                 (0 == guid_compare(qof_instance_get_guid(ent), ref->ent_guid)) &&
-                (0 == safe_strcmp(ref->type, ent->e_type)))
+                (0 == g_strcmp0(ref->type, ent->e_type)))
         {
             QofCollection *temp_col;
             char cm_sa[GUID_ENCODING_LENGTH + 1];
@@ -97,7 +97,7 @@
                 qof_collection_destroy(temp_col);
             }
         }
-        if (0 == safe_strcmp(ref->param->param_type, QOF_TYPE_CHOICE))
+        if (0 == g_strcmp0(ref->param->param_type, QOF_TYPE_CHOICE))
         {
             coll = qof_book_get_collection(partial_book, ref->type);
             reference = qof_collection_lookup_entity(coll, ref->ref_guid);
@@ -164,7 +164,7 @@
 {
     g_return_val_if_fail(param, NULL);
     param = qof_class_get_parameter(ent->e_type, param->param_name);
-    g_return_val_if_fail(0 != safe_strcmp(param->param_type, QOF_TYPE_COLLECT), NULL);
+    g_return_val_if_fail(0 != g_strcmp0(param->param_type, QOF_TYPE_COLLECT), NULL);
     return create_reference(ent, param);
 }
 

Modified: gnucash/trunk/src/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofsession.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -366,7 +366,7 @@
     qecd = (QofInstanceCopyData*)data;
     g_return_if_fail (param != NULL);
     /* KVP doesn't need a set routine to be copied. */
-    if (0 == safe_strcmp (param->param_type, QOF_TYPE_KVP))
+    if (0 == g_strcmp0 (param->param_type, QOF_TYPE_KVP))
     {
         qecd->param_list = g_slist_prepend (qecd->param_list, param);
         return;
@@ -450,7 +450,7 @@
     cm_param = (QofParam*) data;
     g_return_if_fail (cm_param != NULL);
     context->param = cm_param;
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_STRING) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_STRING) == 0)
     {
         cm_string = (gchar*)cm_param->param_getfcn (importEnt, cm_param);
         if (cm_string)
@@ -463,7 +463,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_DATE) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_DATE) == 0)
     {
         date_getter = (Timespec (*)(QofInstance*, QofParam*))cm_param->param_getfcn;
         cm_date = date_getter (importEnt, cm_param);
@@ -474,8 +474,8 @@
         }
         registered_type = TRUE;
     }
-    if ((safe_strcmp (cm_param->param_type, QOF_TYPE_NUMERIC) == 0)  ||
-            (safe_strcmp (cm_param->param_type, QOF_TYPE_DEBCRED) == 0))
+    if ((g_strcmp0 (cm_param->param_type, QOF_TYPE_NUMERIC) == 0)  ||
+            (g_strcmp0 (cm_param->param_type, QOF_TYPE_DEBCRED) == 0))
     {
         numeric_getter = (gnc_numeric (*)(QofInstance*, QofParam*))cm_param->param_getfcn;
         cm_numeric = numeric_getter (importEnt, cm_param);
@@ -486,7 +486,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_GUID) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_GUID) == 0)
     {
         cm_guid = (const GncGUID*)cm_param->param_getfcn (importEnt, cm_param);
         guid_setter = (void (*)(QofInstance*, const GncGUID*))cm_param->param_setfcn;
@@ -496,7 +496,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_INT32) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_INT32) == 0)
     {
         int32_getter = (gint32 (*)(QofInstance*, QofParam*)) cm_param->param_getfcn;
         cm_i32 = int32_getter (importEnt, cm_param);
@@ -507,7 +507,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_INT64) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_INT64) == 0)
     {
         int64_getter = (gint64 (*)(QofInstance*, QofParam*)) cm_param->param_getfcn;
         cm_i64 = int64_getter (importEnt, cm_param);
@@ -518,7 +518,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_DOUBLE) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_DOUBLE) == 0)
     {
         double_getter = (double (*)(QofInstance*, QofParam*)) cm_param->param_getfcn;
         cm_double = double_getter (importEnt, cm_param);
@@ -529,7 +529,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_BOOLEAN) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_BOOLEAN) == 0)
     {
         boolean_getter = (gboolean (*)(QofInstance*, QofParam*)) cm_param->param_getfcn;
         cm_boolean = boolean_getter (importEnt, cm_param);
@@ -540,7 +540,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_KVP) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_KVP) == 0)
     {
         cm_kvp = (KvpFrame*)cm_param->param_getfcn (importEnt, cm_param);
         kvp_frame_setter = (void (*)(QofInstance*, KvpFrame*))cm_param->param_setfcn;
@@ -558,7 +558,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_CHAR) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_CHAR) == 0)
     {
         cm_char = (gchar*)cm_param->param_getfcn (importEnt, cm_param);
         char_setter = (void (*)(QofInstance*, char*))cm_param->param_setfcn;
@@ -568,7 +568,7 @@
         }
         registered_type = TRUE;
     }
-    if (safe_strcmp (cm_param->param_type, QOF_TYPE_COLLECT) == 0)
+    if (g_strcmp0 (cm_param->param_type, QOF_TYPE_COLLECT) == 0)
     {
         cm_col = (QofCollection*)cm_param->param_getfcn (importEnt, cm_param);
         if (cm_col)
@@ -871,7 +871,7 @@
         {
             continue;
         }
-        if (0 == safe_strcmp (ref_param->param_type, QOF_TYPE_COLLECT))
+        if (0 == g_strcmp0 (ref_param->param_type, QOF_TYPE_COLLECT))
         {
             QofCollection *col;
 

Modified: gnucash/trunk/src/libqof/qof/qofutil.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofutil.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofutil.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -97,29 +97,6 @@
 }
 
 gint
-safe_strcmp (const gchar * da, const gchar * db)
-{
-    if ((da) && (db))
-    {
-        if ((da) != (db))
-        {
-            gint retval = strcmp ((da), (db));
-            /* if strings differ, return */
-            if (retval) return retval;
-        }
-    }
-    else if ((!(da)) && (db))
-    {
-        return -1;
-    }
-    else if ((da) && (!(db)))
-    {
-        return +1;
-    }
-    return 0;
-}
-
-gint
 safe_strcasecmp (const gchar * da, const gchar * db)
 {
     if ((da) && (db))

Modified: gnucash/trunk/src/libqof/qof/qofutil.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofutil.h	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/libqof/qof/qofutil.h	2012-08-07 17:24:55 UTC (rev 22290)
@@ -177,21 +177,6 @@
  * otherwise. */
 gboolean qof_utf8_substr_nocase (const gchar *haystack, const gchar *needle);
 
-/** The safe_strcmp compares strings da and db the same way that strcmp()
- does, except that either may be null.  This routine assumes that
- a non-null string is always greater than a null string.
-
- @param da string 1.
- @param db string 2.
-
- @return If da == NULL && db != NULL, returns -1.
-         If da != NULL && db == NULL, returns +1.
-         If da != NULL && db != NULL, returns the result of
-                   strcmp(da, db).
-         If da == NULL && db == NULL, returns 0.
-*/
-gint safe_strcmp (const gchar * da, const gchar * db);
-
 /** case sensitive comparison of strings da and db - either
 may be NULL. A non-NULL string is greater than a NULL string.
 

Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -207,9 +207,9 @@
     default:
         style_string = gnc_gconf_get_string(GCONF_GENERAL_REGISTER,
                                             "default_style", NULL);
-        if (safe_strcmp(style_string, "journal") == 0)
+        if (g_strcmp0(style_string, "journal") == 0)
             new_style = REG_STYLE_JOURNAL;
-        else if (safe_strcmp(style_string, "auto_ledger") == 0)
+        else if (g_strcmp0(style_string, "auto_ledger") == 0)
             new_style = REG_STYLE_AUTO_LEDGER;
         else
             new_style = REG_STYLE_LEDGER;

Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -256,8 +256,8 @@
     name = cell->cell.value;
     DEBUG("Changed to %s", name ? name : "NULL");
     if (!name || *name == '\0' ||
-            safe_strcmp (name, SPLIT_TRANS_STR) == 0 ||
-            safe_strcmp (name, STOCK_SPLIT_STR) == 0)
+            g_strcmp0 (name, SPLIT_TRANS_STR) == 0 ||
+            g_strcmp0 (name, STOCK_SPLIT_STR) == 0)
         return TRUE;
 
     /* Create the account if necessary. Also checks for a placeholder. */
@@ -612,7 +612,7 @@
                 continue;
         }
 
-        if (safe_strcmp (memo, xaccSplitGetMemo (split)) == 0)
+        if (g_strcmp0 (memo, xaccSplitGetMemo (split)) == 0)
             return split;
     }
 
@@ -709,7 +709,7 @@
             if (trans == last_trans)
                 continue;
 
-            if (safe_strcmp (description, xaccTransGetDescription (trans)) == 0)
+            if (g_strcmp0 (description, xaccTransGetDescription (trans)) == 0)
                 return trans;
 
             last_trans = trans;
@@ -1048,8 +1048,8 @@
     if ((name == NULL) || (*name == '\0'))
         return;
 
-    buy  = safe_strcmp (name, ACTION_BUY_STR)  == 0;
-    sell = safe_strcmp (name, ACTION_SELL_STR) == 0;
+    buy  = g_strcmp0 (name, ACTION_BUY_STR)  == 0;
+    sell = g_strcmp0 (name, ACTION_SELL_STR) == 0;
     if (!buy && !sell)
         return;
 
@@ -1093,8 +1093,8 @@
         return;
     name = ((ComboCell *)cell)->cell.value;
 
-    if (!safe_strcmp(name, "") ||
-            !safe_strcmp(name, buy ? ACTION_SELL_STR : ACTION_BUY_STR))
+    if (!g_strcmp0(name, "") ||
+            !g_strcmp0(name, buy ? ACTION_SELL_STR : ACTION_BUY_STR))
     {
         gnc_combo_cell_set_value((ComboCell *)cell,
                                  buy ? ACTION_BUY_STR : ACTION_SELL_STR);
@@ -1146,7 +1146,7 @@
 
     /* If 'name' is "-- Split Transaction --" then return NULL or the
        register acct */
-    if (!safe_strcmp (name, SPLIT_TRANS_STR))
+    if (!g_strcmp0 (name, SPLIT_TRANS_STR))
     {
         return NULL;
     }

Modified: gnucash/trunk/src/register/ledger-core/split-register-model.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-model.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/ledger-core/split-register-model.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -554,8 +554,8 @@
 
     cursor_name = vcell->cellblock->cursor_name;
 
-    if (safe_strcmp (cursor_name, CURSOR_SINGLE_JOURNAL) == 0 ||
-            safe_strcmp (cursor_name, CURSOR_SINGLE_LEDGER) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_SINGLE_JOURNAL) == 0 ||
+            g_strcmp0 (cursor_name, CURSOR_SINGLE_LEDGER) == 0)
     {
         if (is_current)
             return vcell->start_primary_color ?
@@ -566,8 +566,8 @@
                reg_colors.primary_bg_color : reg_colors.secondary_bg_color;
     }
 
-    if (safe_strcmp (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
-            safe_strcmp (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
+            g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
     {
         double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
                                 "alternate_color_by_transaction",
@@ -594,7 +594,7 @@
                reg_colors.secondary_bg_color;
     }
 
-    if (safe_strcmp (cursor_name, CURSOR_SPLIT) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_SPLIT) == 0)
     {
         if (is_current)
             return reg_colors.split_active_bg_color;
@@ -637,8 +637,8 @@
 
     cursor_name = vcell->cellblock->cursor_name;
 
-    if (safe_strcmp (cursor_name, CURSOR_SINGLE_JOURNAL) == 0 ||
-            safe_strcmp (cursor_name, CURSOR_SINGLE_LEDGER) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_SINGLE_JOURNAL) == 0 ||
+            g_strcmp0 (cursor_name, CURSOR_SINGLE_LEDGER) == 0)
     {
         if (is_current)
             return vcell->start_primary_color ?
@@ -649,8 +649,8 @@
                COLOR_PRIMARY : COLOR_SECONDARY;
     }
 
-    if (safe_strcmp (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
-            safe_strcmp (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
+            g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
     {
         double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
                                 "alternate_color_by_transaction",
@@ -677,7 +677,7 @@
                COLOR_SECONDARY;
     }
 
-    if (safe_strcmp (cursor_name, CURSOR_SPLIT) == 0)
+    if (g_strcmp0 (cursor_name, CURSOR_SPLIT) == 0)
     {
         if (is_current)
             return COLOR_SPLIT_ACTIVE;
@@ -1357,7 +1357,7 @@
 
         if (s)
             name = g_strdup (SPLIT_TRANS_STR);
-        else if (safe_strcmp ("stock-split", xaccSplitGetType (split)) == 0)
+        else if (g_strcmp0 ("stock-split", xaccSplitGetType (split)) == 0)
             name = g_strdup (STOCK_SPLIT_STR);
         else
             name = g_strdup ("");
@@ -1399,7 +1399,7 @@
         if (s)
             help = _("This transaction has multiple splits; "
                      "press the Split button to see them all");
-        else if (safe_strcmp ("stock-split", xaccSplitGetType (split)) == 0)
+        else if (g_strcmp0 ("stock-split", xaccSplitGetType (split)) == 0)
             help = _("This transaction is a stock split; "
                      "press the Split button to see details");
         else
@@ -1860,7 +1860,7 @@
 
     split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
 
-    if (safe_strcmp ("stock-split", xaccSplitGetType (split)) == 0)
+    if (g_strcmp0 ("stock-split", xaccSplitGetType (split)) == 0)
         return XACC_CELL_ALLOW_NONE;
 
     return XACC_CELL_ALLOW_ALL;

Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/ledger-core/split-register.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1757,7 +1757,7 @@
 
     /* Now have the account. */
     account_name = gnc_get_account_name_for_register (account);
-    if (safe_strcmp(account_name, gnc_basic_cell_get_value(bcell)))
+    if (g_strcmp0(account_name, gnc_basic_cell_get_value(bcell)))
     {
         /* The name has changed. Update the cell. */
         gnc_combo_cell_set_value (cell, account_name);

Modified: gnucash/trunk/src/register/register-core/basiccell.c
===================================================================
--- gnucash/trunk/src/register/register-core/basiccell.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/register-core/basiccell.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -48,7 +48,7 @@
 gnc_cell_name_equal (const char * cell_name_1,
                      const char * cell_name_2)
 {
-    return (safe_strcmp (cell_name_1, cell_name_2) == 0);
+    return (g_strcmp0 (cell_name_1, cell_name_2) == 0);
 }
 
 BasicCell *

Modified: gnucash/trunk/src/register/register-core/numcell.c
===================================================================
--- gnucash/trunk/src/register/register-core/numcell.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/register-core/numcell.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -144,7 +144,7 @@
         number = 0;
 
     /* If there is already a non-number there, don't accelerate. */
-    if (accel && !is_num && (safe_strcmp(_cell->value, "") != 0))
+    if (accel && !is_num && (g_strcmp0(_cell->value, "") != 0))
         accel = FALSE;
 
     if (accel)
@@ -157,7 +157,7 @@
         strcpy (buff, "");
         snprintf (buff, sizeof(buff), "%ld", number);
 
-        if (safe_strcmp (buff, "") == 0)
+        if (g_strcmp0 (buff, "") == 0)
             return;
 
         gnc_basic_cell_set_value_internal (&cell->cell, buff);

Modified: gnucash/trunk/src/register/register-core/pricecell.c
===================================================================
--- gnucash/trunk/src/register/register-core/pricecell.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/register-core/pricecell.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -250,7 +250,7 @@
     buff = gnc_price_cell_print_value (cell);
     cell->need_to_parse = FALSE;
 
-    if (safe_strcmp (buff, cell->cell.value) == 0)
+    if (g_strcmp0 (buff, cell->cell.value) == 0)
         return FALSE;
 
     gnc_basic_cell_set_value_internal (&cell->cell, buff);

Modified: gnucash/trunk/src/register/register-core/table-allgui.c
===================================================================
--- gnucash/trunk/src/register/register-core/table-allgui.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/register-core/table-allgui.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -1126,7 +1126,7 @@
 
         can_edit = enter (cell, cursor_position, start_selection, end_selection);
 
-        if (safe_strcmp (old_value, cell->value) != 0)
+        if (g_strcmp0 (old_value, cell->value) != 0)
         {
             if (gnc_table_model_read_only (table->model))
             {
@@ -1186,7 +1186,7 @@
 
         leave (cell);
 
-        if (safe_strcmp (old_value, cell->value) != 0)
+        if (g_strcmp0 (old_value, cell->value) != 0)
         {
             if (gnc_table_model_read_only (table->model))
             {
@@ -1292,7 +1292,7 @@
         gnc_basic_cell_set_value (cell, newval);
     }
 
-    if (safe_strcmp (old_value, cell->value) != 0)
+    if (g_strcmp0 (old_value, cell->value) != 0)
     {
         changed = TRUE;
         cell->changed = TRUE;
@@ -1362,7 +1362,7 @@
     result = cell->direct_update (cell, cursor_position, start_selection,
                                   end_selection, gui_data);
 
-    if (safe_strcmp (old_value, cell->value) != 0)
+    if (g_strcmp0 (old_value, cell->value) != 0)
     {
         if (!gnc_table_confirm_change (table, virt_loc))
         {

Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-list.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-list.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -131,7 +131,7 @@
     gboolean found;
 
     gtk_tree_model_get(model, iter, 0, &iterStr, -1);
-    found = safe_strcmp(to_find->string_to_find, iterStr) == 0;
+    found = g_strcmp0(to_find->string_to_find, iterStr) == 0;
     g_free(iterStr);
     if (found)
     {

Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c	2012-08-07 17:24:33 UTC (rev 22289)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c	2012-08-07 17:24:55 UTC (rev 22290)
@@ -397,7 +397,7 @@
 static int
 gnc_plugin_page_report_check_urltype(URLType t)
 {
-    if (!safe_strcmp (t, URL_TYPE_REPORT))
+    if (!g_strcmp0 (t, URL_TYPE_REPORT))
     {
         return TRUE;
     }
@@ -473,7 +473,7 @@
      * if any URL is clicked.  If an options URL is clicked, we want to
      * know about it */
     priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
-    if (!safe_strcmp (type, URL_TYPE_REPORT)
+    if (!g_strcmp0 (type, URL_TYPE_REPORT)
             && location
             && (strlen(location) > 3)
             && !strncmp("id=", location, 3))
@@ -481,7 +481,7 @@
         report_id = atoi(location + 3);
         DEBUG( "parsed id=%d", report_id );
     }
-    else if (!safe_strcmp( type, URL_TYPE_OPTIONS)
+    else if (!g_strcmp0( type, URL_TYPE_OPTIONS)
              && location
              && (strlen(location) > 10)
              && !strncmp("report-id=", location, 10))
@@ -636,7 +636,7 @@
     }
 
     if (node
-            && !safe_strcmp (node->type, URL_TYPE_REPORT)\
+            && !g_strcmp0 (node->type, URL_TYPE_REPORT)\
             && !strncmp("id=", node->location, 3))
     {
         sscanf(node->location + 3, "%d", &report_id);



More information about the gnucash-changes mailing list