r23359 - gnucash/trunk/src - Code reindentation in tests

Geert Janssens gjanssens at code.gnucash.org
Thu Oct 31 18:23:34 EDT 2013


Author: gjanssens
Date: 2013-10-31 18:23:28 -0400 (Thu, 31 Oct 2013)
New Revision: 23359
Trac: http://svn.gnucash.org/trac/changeset/23359

Modified:
   gnucash/trunk/src/backend/dbi/test/test-backend-dbi-basic.c
   gnucash/trunk/src/backend/dbi/test/test-backend-dbi.c
   gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
   gnucash/trunk/src/backend/sql/test/utest-gnc-backend-sql.c
   gnucash/trunk/src/backend/xml/test/test-xml-commodity.c
   gnucash/trunk/src/engine/test/test-business.c
   gnucash/trunk/src/engine/test/test-object.c
   gnucash/trunk/src/engine/test/test-querynew.c
   gnucash/trunk/src/engine/test/utest-Account.c
   gnucash/trunk/src/engine/test/utest-Budget.c
   gnucash/trunk/src/engine/test/utest-Split.c
   gnucash/trunk/src/engine/test/utest-Transaction.c
   gnucash/trunk/src/import-export/test/test-import-parse.c
   gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
   gnucash/trunk/src/libqof/qof/test/test-qofbook.c
   gnucash/trunk/src/test-core/unittest-support.c
   gnucash/trunk/src/test-core/unittest-support.h
Log:
Code reindentation in tests

Command used: astyle --indent=spaces=4 --brackets=break --suffix=none <files>

Modified: gnucash/trunk/src/backend/dbi/test/test-backend-dbi-basic.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-backend-dbi-basic.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/backend/dbi/test/test-backend-dbi-basic.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -228,9 +228,9 @@
     gnc_uri_get_components  (url, &protocol, &host, &portnum,
                              &username, &password, &dbname);
     if (g_strcmp0 (protocol, "postgres") == 0)
-	conn = dbi_conn_new (pgsql);
+        conn = dbi_conn_new (pgsql);
     else
-	conn = dbi_conn_new (protocol);
+        conn = dbi_conn_new (protocol);
     port = g_strdup_printf ("%d", portnum);
     if (conn == NULL)
     {
@@ -285,7 +285,7 @@
     guint loglevel = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new (logdomain, loglevel, msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-                                           (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     qof_session_end (fixture->session);
     qof_session_destroy (fixture->session);
     if (fixture->filename)
@@ -338,7 +338,7 @@
     guint loglevel = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new (log_domain, loglevel, msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-                                                 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     if (fixture->filename)
         url = fixture->filename;
 
@@ -364,7 +364,7 @@
     // Compare with the original data
     compare_books (qof_session_get_book (session_2),
                    qof_session_get_book (session_3));
-/* fixture->session belongs to the fixture and teardown() will clean it up */
+    /* fixture->session belongs to the fixture and teardown() will clean it up */
     qof_session_end (session_2);
     qof_session_destroy (session_2);
     qof_session_end (session_3);
@@ -397,7 +397,7 @@
     session_1 = qof_session_new ();
     qof_session_begin (session_1, url, FALSE, TRUE, TRUE);
     if (session_1 &&
-        qof_session_get_error (session_1) != ERR_BACKEND_NO_ERR)
+            qof_session_get_error (session_1) != ERR_BACKEND_NO_ERR)
     {
         g_warning ("Session Error: %d, %s", qof_session_get_error (session_1),
                    qof_session_get_error_message (session_1));
@@ -422,7 +422,7 @@
     session_2 = qof_session_new ();
     qof_session_begin (session_2, url, TRUE, FALSE, FALSE);
     if (session_2 &&
-        qof_session_get_error (session_2) != ERR_BACKEND_NO_ERR)
+            qof_session_get_error (session_2) != ERR_BACKEND_NO_ERR)
     {
         g_warning ("Session Error: %d, %s", qof_session_get_error(session_2),
                    qof_session_get_error_message(session_2));
@@ -438,7 +438,7 @@
 
 cleanup:
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-                                                 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     if (session_2 != NULL)
     {
         qof_session_end (session_2);
@@ -473,9 +473,9 @@
     if (sess && qof_session_get_error(sess) != ERR_BACKEND_NO_ERR)
     {
         g_warning ("Session Error: %d, %s", qof_session_get_error(sess),
-                  qof_session_get_error_message(sess));
+                   qof_session_get_error_message(sess));
         g_test_message ("DB Session Creation Failed");
-	g_assert (FALSE);
+        g_assert (FALSE);
         goto cleanup;
     }
     qof_session_swap_data (fixture->session, sess);
@@ -550,7 +550,7 @@
     qof_session_destroy (session_2);
 
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-                                                 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     qof_session_end (session_3);
     qof_session_destroy (session_3);
 }
@@ -566,8 +566,8 @@
     GNC_TEST_ADD (subsuite, "version_control", Fixture, url, setup_memory,
                   test_dbi_version_control, teardown);
     GNC_TEST_ADD (subsuite, "business_store_and_reload", Fixture, url,
-		  setup_business, test_dbi_version_control, teardown);
-g_free (subsuite);
+                  setup_business, test_dbi_version_control, teardown);
+    g_free (subsuite);
 
 }
 
@@ -578,18 +578,18 @@
     GList *drivers = NULL;
     while ((driver = dbi_driver_list (driver)))
     {
-	drivers = g_list_prepend (drivers,
-				  (gchar*)dbi_driver_get_name (driver));
+        drivers = g_list_prepend (drivers,
+                                  (gchar*)dbi_driver_get_name (driver));
     }
     if (g_list_find_custom (drivers, "sqlite3", (GCompareFunc)g_strcmp0))
-	create_dbi_test_suite ("sqlite3", "sqlite3");
+        create_dbi_test_suite ("sqlite3", "sqlite3");
     if (strlen (TEST_MYSQL_URL) > 0 &&
-	g_list_find_custom (drivers, "mysql", (GCompareFunc)g_strcmp0))
+            g_list_find_custom (drivers, "mysql", (GCompareFunc)g_strcmp0))
         create_dbi_test_suite ("mysql", TEST_MYSQL_URL);
     if (strlen (TEST_PGSQL_URL) > 0 &&
-	g_list_find_custom (drivers, "pgsql", (GCompareFunc)g_strcmp0))
+            g_list_find_custom (drivers, "pgsql", (GCompareFunc)g_strcmp0))
     {
-	g_setenv ("PGOPTIONS", "-c client_min_messages=WARNING", FALSE);
+        g_setenv ("PGOPTIONS", "-c client_min_messages=WARNING", FALSE);
         create_dbi_test_suite ("postgres", TEST_PGSQL_URL);
     }
 

Modified: gnucash/trunk/src/backend/dbi/test/test-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-backend-dbi.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/backend/dbi/test/test-backend-dbi.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -41,7 +41,7 @@
     cashobjects_register();
     g_assert (qof_load_backend_library ("../.libs/", GNC_LIB_NAME));
     g_assert (qof_load_backend_library ("../../xml/.libs",
-					"gncmod-backend-xml"));
+                                        "gncmod-backend-xml"));
 
     test_suite_gnc_backend_dbi ();
 

Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -47,7 +47,7 @@
 
 void
 do_compare( QofBook* book_1, QofBook* book_2, const gchar* id,
-	    QofInstanceForeachCB cb, const gchar* msg )
+            QofInstanceForeachCB cb, const gchar* msg )
 {
     QofCollection* coll;
     CompareInfoStruct info;
@@ -75,7 +75,7 @@
     CompareInfoStruct* info = (CompareInfoStruct*)user_data;
     Transaction* tx_1 = GNC_TRANS(inst);
     Transaction* tx_2 = xaccTransLookup( qof_instance_get_guid(inst),
-					 info->book_2 );
+                                         info->book_2 );
 
     g_assert (xaccTransEqual (tx_1, tx_2, TRUE, TRUE, TRUE, FALSE));
 }
@@ -84,7 +84,7 @@
 compare_txs( QofBook* book_1, QofBook* book_2 )
 {
     do_compare( book_1, book_2, GNC_ID_TRANS,
-		compare_single_tx, "Transaction lists match" );
+                compare_single_tx, "Transaction lists match" );
 }
 
 static SchedXaction*
@@ -124,7 +124,7 @@
     g_assert (rl_2 != NULL);
     g_assert_cmpint (g_list_length (rl_1), ==, g_list_length (rl_2));
     for (ritem1 = rl_1, ritem2 = rl_2; ritem1 != NULL && ritem2 != NULL;
-         ritem1 = g_list_next (ritem1), ritem2 = g_list_next (ritem2))
+            ritem1 = g_list_next (ritem1), ritem2 = g_list_next (ritem2))
     {
         Recurrence *r1 = ritem1->data, *r2 = ritem2->data;
 
@@ -165,7 +165,7 @@
 compare_sxs( QofBook* book_1, QofBook* book_2 )
 {
     do_compare( book_1, book_2, GNC_ID_SCHEDXACTION,
-		compare_single_sx, "Scheduled transaction lists match" );
+                compare_single_sx, "Scheduled transaction lists match" );
 }
 
 static void
@@ -174,7 +174,7 @@
     CompareInfoStruct* info = (CompareInfoStruct*)user_data;
     GNCLot *lot_1 = GNC_LOT(inst);
     GNCLot *lot_2 = gnc_lot_lookup (qof_instance_get_guid(inst),
-					 info->book_2 );
+                                    info->book_2 );
     GList *split1, *splits1, *splits2;
 
     g_assert (xaccAccountEqual( gnc_lot_get_account (lot_1),
@@ -230,7 +230,7 @@
 compare_pricedbs( QofBook* book_1, QofBook* book_2 )
 {
     do_compare( book_1, book_2, GNC_ID_TRANS,
-		compare_single_tx, "Transaction lists match" );
+                compare_single_tx, "Transaction lists match" );
 }
 
 void

Modified: gnucash/trunk/src/backend/sql/test/utest-gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/test/utest-gnc-backend-sql.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/backend/sql/test/utest-gnc-backend-sql.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -584,21 +584,21 @@
     GDateTime *dt = NULL;
 
     sscanf (datestr, "%04d-%02d-%02d %02d:%02d:%02lf",
-	    &yr, &mo, &da, &hr, &min, &sec);
+            &yr, &mo, &da, &hr, &min, &sec);
     g_assert_cmpint (1, <=, yr);
     g_assert_cmpint (9999, >=, yr);
     g_assert_cmpint (1, <=, mo);
     g_assert_cmpint (12, >=, mo);
     g_assert_cmpint (1, <=, da);
     if (mo == 1 || mo == 3 || mo == 5 || mo == 7
-	|| mo == 8 || mo == 10 || mo == 12)
-	g_assert_cmpint (31, >=, da);
+            || mo == 8 || mo == 10 || mo == 12)
+        g_assert_cmpint (31, >=, da);
     else if (mo != 2)
-	g_assert_cmpint (30, >=, da);
+        g_assert_cmpint (30, >=, da);
     else if (yr % 4 == 0 && !(yr % 400 == 0 && yr % 2000 != 0))
-	g_assert_cmpint (29, >=, da);
+        g_assert_cmpint (29, >=, da);
     else
-	g_assert_cmpint (28, >=, da);
+        g_assert_cmpint (28, >=, da);
     g_assert_cmpint (0, <=, hr);
     g_assert_cmpint (60, >=, hr);
     g_assert_cmpint (0, <=, min);
@@ -616,27 +616,31 @@
 static void
 test_gnc_sql_convert_timespec_to_string ()
 {
-    GncSqlBackend be = {{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-			 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-			 0, NULL, 0, "", NULL, 0, "", NULL, NULL},
-			NULL, NULL, FALSE, FALSE, FALSE, 0, 0, NULL,
-			"%4d-%02d-%02d %02d:%02d:%02d"};
+    GncSqlBackend be = {{
+            NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+            0, NULL, 0, "", NULL, 0, "", NULL, NULL
+        },
+        NULL, NULL, FALSE, FALSE, FALSE, 0, 0, NULL,
+        "%4d-%02d-%02d %02d:%02d:%02d"
+    };
     gchar *date[numtests] = {"1995-03-11 19:17:26",
-			     "2001-04-20 11:44:07",
-			     "1964-02-29 09:15:23",
-			     "1959-04-02 00:00:00",
-			     "2043-11-22 05:32:45",
-			     "2153-12-18 01:15:30"};
+                             "2001-04-20 11:44:07",
+                             "1964-02-29 09:15:23",
+                             "1959-04-02 00:00:00",
+                             "2043-11-22 05:32:45",
+                             "2153-12-18 01:15:30"
+                            };
     int i;
     for (i = 0; i < numtests; i++)
     {
 
-	Timespec *ts = gnc_date_string_to_timespec_gmt (date[i]);
-	gchar *datestr = gnc_sql_convert_timespec_to_string (&be, *ts);
-	g_assert_cmpstr (date[i], ==, datestr);
+        Timespec *ts = gnc_date_string_to_timespec_gmt (date[i]);
+        gchar *datestr = gnc_sql_convert_timespec_to_string (&be, *ts);
+        g_assert_cmpstr (date[i], ==, datestr);
 
-	g_free (datestr);
-	g_slice_free (Timespec, ts);
+        g_free (datestr);
+        g_slice_free (Timespec, ts);
     }
 
 }

Modified: gnucash/trunk/src/backend/xml/test/test-xml-commodity.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-commodity.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/backend/xml/test/test-xml-commodity.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -110,12 +110,12 @@
                 g_free(txt);
             }
         }
-	else if (g_strcmp0((char*)mark->name, "cmdty:slots") == 0)
-	{
+        else if (g_strcmp0((char*)mark->name, "cmdty:slots") == 0)
+        {
             if (!equals_node_val_vs_kvp_frame(mark,
-					      gnc_commodity_get_kvp_frame(com)))
+                                              gnc_commodity_get_kvp_frame(com)))
                 return "slots differ";
-	}
+        }
         /* Legitimate tags which we don't yet have tests */
         else if (g_strcmp0((char*)mark->name, "cmdty:get_quotes") == 0 ||
                  g_strcmp0((char*)mark->name, "cmdty:quote_source") == 0 ||

Modified: gnucash/trunk/src/engine/test/test-business.c
===================================================================
--- gnucash/trunk/src/engine/test/test-business.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/test-business.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -66,7 +66,7 @@
                  "lookup non-existant business object");
 
         do_test (!g_strcmp0 (gncBusinessGetTypeLabel (TEST_MODULE_NAME),
-                               _(TEST_MODULE_DESC)),
+                             _(TEST_MODULE_DESC)),
                  "test description return");
     }
 

Modified: gnucash/trunk/src/engine/test/test-object.c
===================================================================
--- gnucash/trunk/src/engine/test/test-object.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/test-object.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -71,7 +71,7 @@
                  "lookup non-existant object object");
 
         do_test (!g_strcmp0 (qof_object_get_type_label (TEST_MODULE_NAME),
-                               _(TEST_MODULE_DESC)),
+                             _(TEST_MODULE_DESC)),
                  "test description return");
     }
 

Modified: gnucash/trunk/src/engine/test/test-querynew.c
===================================================================
--- gnucash/trunk/src/engine/test/test-querynew.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/test-querynew.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -82,8 +82,8 @@
              "qof_class_get_parameter_getter");
 
     do_test (g_strcmp0 (qof_class_get_parameter_type (TEST_MODULE_NAME,
-                          TEST_PARAM),
-                          TEST_CORE) == 0, "qof_class_get_parameter_type");
+                        TEST_PARAM),
+                        TEST_CORE) == 0, "qof_class_get_parameter_type");
 
     /*  do_test (qof_class_get_default_sort (TEST_MODULE_NAME) == test_sort,
     	   "qof_class_get_default_sort");

Modified: gnucash/trunk/src/engine/test/utest-Account.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Account.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/utest-Account.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -677,7 +677,7 @@
      */
     oldlogger = g_log_set_default_handler ((GLogFunc)test_null_handler, &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
-				  &check);
+                                  &check);
     gnc_book_set_root_account (book1, fixture->acct);
     g_assert (gnc_book_get_root_account (book1) == acc1);
     g_assert_cmpint (check.hits, ==, 1);
@@ -1172,7 +1172,7 @@
     g_assert (!priv->balance_dirty);
     test_signal_assert_hits (sig1, 4);
     test_signal_assert_hits (sig3, 1);
-   /* And do it again to make sure that it fails when the split has
+    /* And do it again to make sure that it fails when the split has
      * already been removed */
     g_assert (!gnc_account_remove_split (fixture->acct, split3));
     g_assert_cmpuint (g_list_length (priv->splits), == , 2);
@@ -1930,7 +1930,7 @@
     dbal = gnc_numeric_to_double (bal);
     xaccAccountRecomputeBalance (fixture->acct);
     val = xaccAccountGetBalanceAsOfDate (fixture->acct,
-					 (gnc_time (NULL) - offset));
+                                         (gnc_time (NULL) - offset));
     dval = gnc_numeric_to_double (val);
     g_assert_cmpfloat (dval, == , dbal);
 }
@@ -2237,7 +2237,7 @@
             compat = xaccParentAccountTypesCompatibleWith (type);
             g_log_remove_handler (logdomain, loghandler);
             g_assert_cmpint (compat, == , 0);
-	    g_assert_cmpint (check1.hits, ==, 1);
+            g_assert_cmpint (check1.hits, ==, 1);
             g_free (msg1);
             continue;
         }

Modified: gnucash/trunk/src/engine/test/utest-Budget.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Budget.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/utest-Budget.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -661,7 +661,7 @@
      */
     oldlogger = g_log_set_default_handler ((GLogFunc)test_null_handler, &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
-				  &check);
+                                  &check);
     gnc_book_set_root_account (book1, fixture->acct);
     g_assert (gnc_book_get_root_account (book1) == acc1);
     g_assert_cmpint (check.hits, ==, 1);
@@ -1132,8 +1132,8 @@
     g_assert (!priv->balance_dirty);
     test_signal_assert_hits (sig1, 4);
     test_signal_assert_hits (sig3, 1);
-   /* And do it again to make sure that it fails when the split has
-     * already been removed */
+    /* And do it again to make sure that it fails when the split has
+      * already been removed */
     g_assert (!gnc_account_remove_split (fixture->acct, split3));
     g_assert_cmpuint (g_list_length (priv->splits), == , 2);
     g_assert (priv->sort_dirty);
@@ -1890,7 +1890,7 @@
     dbal = gnc_numeric_to_double (bal);
     xaccAccountRecomputeBalance (fixture->acct);
     val = xaccAccountGetBalanceAsOfDate (fixture->acct,
-					 (gnc_time (NULL) - offset));
+                                         (gnc_time (NULL) - offset));
     dval = gnc_numeric_to_double (val);
     g_assert_cmpfloat (dval, == , dbal);
 }
@@ -2197,7 +2197,7 @@
             compat = xaccParentAccountTypesCompatibleWith (type);
             g_log_remove_handler (logdomain, loghandler);
             g_assert_cmpint (compat, == , 0);
-	    g_assert_cmpint (check1.hits, ==, 1);
+            g_assert_cmpint (check1.hits, ==, 1);
             g_free (msg1);
             continue;
         }
@@ -2513,7 +2513,8 @@
         int end_day;
     } PeriodInfo;
     PeriodInfo period_info[] = { { G_DATE_JANUARY, 31 }, { G_DATE_FEBRUARY, 29 }, { G_DATE_MARCH, 31 }, { G_DATE_APRIL, 30 }, { G_DATE_MAY, 31 }, { G_DATE_JUNE, 30 },
-                                 { G_DATE_JULY, 31 }, { G_DATE_AUGUST, 31 }, { G_DATE_SEPTEMBER, 30 }, { G_DATE_OCTOBER, 31 }, { G_DATE_NOVEMBER, 30 }, { G_DATE_DECEMBER, 31 } };
+        { G_DATE_JULY, 31 }, { G_DATE_AUGUST, 31 }, { G_DATE_SEPTEMBER, 30 }, { G_DATE_OCTOBER, 31 }, { G_DATE_NOVEMBER, 30 }, { G_DATE_DECEMBER, 31 }
+    };
 
     r = gnc_budget_get_recurrence(budget);
     g_assert_cmpint(r->ptype, ==, PERIOD_MONTH);

Modified: gnucash/trunk/src/engine/test/utest-Split.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Split.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/utest-Split.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -137,7 +137,7 @@
     g_assert (gnc_numeric_zero_p (split->reconciled_balance));
     g_assert_cmpint (split->gains, ==, GAINS_STATUS_UNKNOWN);
     g_assert (split->gains_split == NULL);
-/* Make sure that the parent's init has been run */
+    /* Make sure that the parent's init has been run */
     g_assert (split->inst.kvp_data != NULL);
 
     g_object_unref (split);
@@ -148,16 +148,16 @@
 static void
 test_gnc_split_dispose ()
 {
-/* gnc_split_dispose doesn't do anything besides chain up to its
- * parent, so we twiddle the parent QofInstance to populate its
- * collection object (which is released by its dispose) then run
- * dispose on Split and make sure that the collection object is indeed
- * released.
- *
- * TODO: Split keeps references to two Account objects, two
- * Transaction objects, a Split object, and a GNCLot object. All of
- * these should be unreffed in gnc_split_dispose.
- */
+    /* gnc_split_dispose doesn't do anything besides chain up to its
+     * parent, so we twiddle the parent QofInstance to populate its
+     * collection object (which is released by its dispose) then run
+     * dispose on Split and make sure that the collection object is indeed
+     * released.
+     *
+     * TODO: Split keeps references to two Account objects, two
+     * Transaction objects, a Split object, and a GNCLot object. All of
+     * these should be unreffed in gnc_split_dispose.
+     */
     Split *split = g_object_new (GNC_TYPE_SPLIT, NULL);
     QofInstance *instance = QOF_INSTANCE (split);
     QofBook *book = qof_book_new ();
@@ -187,11 +187,11 @@
 static void
 test_gnc_split_set_get_property ()
 {
-/* TODO: Several of the parameters set by gnc_split_init are not
- * properties, and two members of struct split_s (orig_parent and
- * reconciled) are neither initialized in gnc_split_init nor
- * properties.
- */
+    /* TODO: Several of the parameters set by gnc_split_init are not
+     * properties, and two members of struct split_s (orig_parent and
+     * reconciled) are neither initialized in gnc_split_init nor
+     * properties.
+     */
     QofBook *book = qof_book_new ();
     gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand", "CURRENCY", "GNR", "", 100);
     Transaction *txn = xaccMallocTransaction (book), *rtxn = NULL;
@@ -211,41 +211,41 @@
     qof_commit_edit (QOF_INSTANCE (txn));
 
     g_object_set (G_OBJECT (split),
-		  "action", "foo",
-		  "memo", "bar",
-		  "value", &value,
-		  "amount", &amount,
-		  "reconcile-date", &time,
-		  "account", acc,
-		  "lot", lot,
-		  "transaction", txn,
-		  NULL);
+                  "action", "foo",
+                  "memo", "bar",
+                  "value", &value,
+                  "amount", &amount,
+                  "reconcile-date", &time,
+                  "account", acc,
+                  "lot", lot,
+                  "transaction", txn,
+                  NULL);
 
     g_object_get (G_OBJECT (split),
-		  "action", &r_action,
-		  "memo", &r_memo,
-		  "value", &r_value,
-		  "amount", &r_amount,
-		  "reconcile-date", &rtime,
-		  "transaction", &rtxn,
-		  "account", &racc,
-		  "lot", &rlot,
-		  NULL);
+                  "action", &r_action,
+                  "memo", &r_memo,
+                  "value", &r_value,
+                  "amount", &r_amount,
+                  "reconcile-date", &rtime,
+                  "transaction", &rtxn,
+                  "account", &racc,
+                  "lot", &rlot,
+                  NULL);
 
     g_assert_cmpstr (r_action, ==, "foo");
     g_assert_cmpstr (r_memo, ==, "bar");
     g_assert (gnc_numeric_equal (*r_value, value));
-/* Setting the transaction causes the amount to be scrubbed into the value */
+    /* Setting the transaction causes the amount to be scrubbed into the value */
     g_assert (gnc_numeric_equal (*r_amount, value));
     g_assert (timespec_equal (rtime, &time));
     g_assert (txn == rtxn);
     g_assert (acc == racc);
     g_assert (lot == rlot);
 
-/* The official destroy functions all step on each other. We'll take a
- * few leaks to save trouble; it will all work fine once the
- * refactoring is taken care of.
- */
+    /* The official destroy functions all step on each other. We'll take a
+     * few leaks to save trouble; it will all work fine once the
+     * refactoring is taken care of.
+     */
     g_object_unref (txn);
     g_object_unref (acc);
     g_object_unref (lot);
@@ -272,12 +272,12 @@
 static void
 test_xaccMallocSplit (Fixture *fixture, gconstpointer pData)
 {
-/* We use this in the setup, so we can just verify that it works. */
+    /* We use this in the setup, so we can just verify that it works. */
     g_assert (fixture->split != NULL);
 }
 /* xaccDupeSplit
 Split *
-xaccDupeSplit (const Split *s)// C: 1 
+xaccDupeSplit (const Split *s)// C: 1
 */
 static void
 test_xaccDupeSplit (Fixture *fixture, gconstpointer pData)
@@ -300,18 +300,18 @@
     g_assert (timespec_equal (&(split->date_reconciled), &(f_split->date_reconciled)));
     g_assert (gnc_numeric_equal (split->value, f_split->value));
     g_assert (gnc_numeric_equal (split->amount, f_split->amount));
-/* xaccDupeSplit intentionally doesn't copy the balances */
+    /* xaccDupeSplit intentionally doesn't copy the balances */
     g_assert (gnc_numeric_zero_p (split->balance));
     g_assert (gnc_numeric_zero_p (split->cleared_balance));
     g_assert (gnc_numeric_zero_p (split->reconciled_balance));
-/* FIXME: gains and gains_split are not copied */
+    /* FIXME: gains and gains_split are not copied */
     g_assert_cmpint (split->gains, !=, f_split->gains);
     g_assert (split->gains_split != f_split->gains_split);
 
 }
 /* xaccSplitClone
 Split *
-xaccSplitClone (const Split *s)// C: 1 
+xaccSplitClone (const Split *s)// C: 1
 */
 static void
 test_xaccSplitClone (Fixture *fixture, gconstpointer pData)
@@ -325,7 +325,7 @@
     g_assert (qof_instance_get_book (split) == qof_instance_get_book (f_split));
     g_assert (split->parent == NULL);
     g_assert (split->acc == f_split->acc);
-/* Clone doesn't copy the orig_acc */
+    /* Clone doesn't copy the orig_acc */
     g_assert (split->orig_acc == NULL);
     g_assert (split->lot == f_split->lot);
     g_assert_cmpstr (split->memo, ==, f_split->memo);
@@ -348,7 +348,7 @@
 */
 /* xaccFreeSplit
 void
-xaccFreeSplit (Split *split)// C: 3 in 1 
+xaccFreeSplit (Split *split)// C: 3 in 1
 Not testable and wrong besides.
 */
 /* mark_split
@@ -360,18 +360,18 @@
 {
     gboolean sort_dirty, balance_dirty;
     g_object_get (fixture->split->acc,
-		  "sort-dirty", &sort_dirty,
-		  "balance-dirty", &balance_dirty,
-		  NULL);
+                  "sort-dirty", &sort_dirty,
+                  "balance-dirty", &balance_dirty,
+                  NULL);
     g_assert_cmpint (sort_dirty, ==, FALSE);
     g_assert_cmpint (balance_dirty, ==, FALSE);
 
     mark_split (fixture->split);
 
     g_object_get (fixture->split->acc,
-		  "sort-dirty", &sort_dirty,
-		  "balance-dirty", &balance_dirty,
-		  NULL);
+                  "sort-dirty", &sort_dirty,
+                  "balance-dirty", &balance_dirty,
+                  NULL);
     g_assert_cmpint (sort_dirty, ==, TRUE);
     g_assert_cmpint (balance_dirty, ==, TRUE);
 }
@@ -391,7 +391,7 @@
     gnc_numeric bar = gnc_numeric_create (456, 100);
 
     hdlr = g_log_set_handler ("gnc.engine", loglevel,
-			      (GLogFunc)test_checked_handler, &check);
+                              (GLogFunc)test_checked_handler, &check);
 
     g_assert_cmpint (fixture->func->xaccSplitEqualCheckBal ("test ", foo, foo), ==, TRUE);
     g_assert_cmpint (fixture->func->xaccSplitEqualCheckBal ("test ", foo, bar), ==, FALSE);
@@ -436,9 +436,9 @@
     test_add_error (&checkD);
 
     hdlr  = g_log_set_handler (logdomain, loglevel,
-			       (GLogFunc)test_list_handler, &checkA);
-/* Note that check_splits is just passed through to xaccTransEqual, so we don't vary it here. */
-/* Test that a NULL comparison fails */
+                               (GLogFunc)test_list_handler, &checkA);
+    /* Note that check_splits is just passed through to xaccTransEqual, so we don't vary it here. */
+    /* Test that a NULL comparison fails */
     g_assert (xaccSplitEqual (fixture->split, NULL, TRUE, TRUE, TRUE) == FALSE);
     g_assert (xaccSplitEqual (NULL, split1, TRUE, TRUE, TRUE) == FALSE);
     g_assert_cmpint (checkA.hits, ==, 2);
@@ -446,31 +446,31 @@
     g_assert_cmpint (checkC.hits, ==, 0);
     g_assert_cmpint (checkD.hits, ==, 0);
     checkA.msg = msg02;
-/* Clone creates splits with different GUIDs: Make sure that it fails comparison */
+    /* Clone creates splits with different GUIDs: Make sure that it fails comparison */
     g_assert (xaccSplitEqual (fixture->split, split1, TRUE, TRUE, TRUE) == FALSE);
-/* Test that the parent comparison fails */
+    /* Test that the parent comparison fails */
     g_assert (xaccSplitEqual (fixture->split, split1, FALSE, TRUE, TRUE) == FALSE);
-/* Now set split1's parent so that it passes -- we're also checking that the GUID check is disabled when we pass FALSE to check_guids */
+    /* Now set split1's parent so that it passes -- we're also checking that the GUID check is disabled when we pass FALSE to check_guids */
     g_assert_cmpint (checkA.hits, ==, 3);
     g_assert_cmpint (checkB.hits, ==, 1);
     g_assert_cmpint (checkC.hits, ==, 1);
     g_assert_cmpint (checkD.hits, ==, 0);
     split1->parent = fixture->split->parent;
     g_assert (xaccSplitEqual (fixture->split, split1, FALSE, TRUE, TRUE) == TRUE);
-/* Now set the GUIDs equal and see that the comparison passes */
+    /* Now set the GUIDs equal and see that the comparison passes */
     g_object_set (G_OBJECT (split1),
-		  "guid", qof_instance_get_guid (QOF_INSTANCE(fixture->split)),
-		  NULL);
+                  "guid", qof_instance_get_guid (QOF_INSTANCE(fixture->split)),
+                  NULL);
     g_assert (xaccSplitEqual (fixture->split, split1, TRUE, TRUE, TRUE) == TRUE);
     g_assert_cmpint (checkA.hits, ==, 3);
     g_assert_cmpint (checkB.hits, ==, 1);
     g_assert_cmpint (checkC.hits, ==, 1);
     g_assert_cmpint (checkD.hits, ==, 0);
-/* Change the memo and action and test that each in turn causes the comparison to fail */
+    /* Change the memo and action and test that each in turn causes the comparison to fail */
     split1->memo = "baz";
     msg03 = g_strdup_printf ("[xaccSplitEqual] memos differ: (%p)%s vs (%p)%s",
-		     fixture->split->memo, fixture->split->memo,
-		     split1->memo, split1->memo);
+                             fixture->split->memo, fixture->split->memo,
+                             split1->memo, split1->memo);
     checkA.msg = msg03;
     g_assert (xaccSplitEqual (fixture->split, split1, TRUE, TRUE, TRUE) == FALSE);
     g_assert_cmpint (checkA.hits, ==, 4);
@@ -483,13 +483,13 @@
     g_assert (xaccSplitEqual (fixture->split, split1, TRUE, TRUE, TRUE) == FALSE);
     g_log_remove_handler (logdomain, hdlr);
     hdlr  = g_log_set_handler (logdomain, loglevel,
-			       (GLogFunc)test_list_handler, &checkA);
+                               (GLogFunc)test_list_handler, &checkA);
     g_assert (xaccSplitEqual (fixture->split, split1, TRUE, TRUE, TRUE) == FALSE);
     g_assert_cmpint (checkA.hits, ==, 6);
     g_assert_cmpint (checkB.hits, ==, 1);
     g_assert_cmpint (checkC.hits, ==, 1);
     g_assert_cmpint (checkD.hits, ==, 0);
-/* Split2 doesn't have balances copied from fixture->split, so the balance test fails */
+    /* Split2 doesn't have balances copied from fixture->split, so the balance test fails */
     checkB.msg = msg12;
     checkC.msg = msg13;
     g_assert (xaccSplitEqual (fixture->split, split2, TRUE, TRUE, TRUE) == FALSE);
@@ -533,7 +533,8 @@
 Note that there is no xaccSplitBeginEdit.
 Note: Unfortunately most of the internals of this function can't be monitored without a mock Account object.
 */
-typedef struct {
+typedef struct
+{
     guint hits;
     QofBackendError lasterr;
 } TestErr;
@@ -565,7 +566,7 @@
     test_add_error (&checkB);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_list_handler, &checkA);
     hdlr = g_log_set_handler (logdomain, loglevel,
-			      (GLogFunc)test_list_handler, &checkA);
+                              (GLogFunc)test_list_handler, &checkA);
 
     fixture->split->orig_acc = oacc;
     fixture->split->orig_parent = opar;
@@ -579,9 +580,9 @@
     xaccSplitCommitEdit (fixture->split);
 
     g_object_get (fixture->split->acc,
-		  "sort-dirty", &sort_dirty,
-		  "balance-dirty", &balance_dirty,
-		  NULL);
+                  "sort-dirty", &sort_dirty,
+                  "balance-dirty", &balance_dirty,
+                  NULL);
     g_assert_cmpint (sort_dirty, ==, TRUE);
     g_assert_cmpint (balance_dirty, ==, FALSE);
     g_assert (qof_instance_is_dirty (QOF_INSTANCE (fixture->split->parent)));
@@ -597,16 +598,16 @@
 
     qof_instance_mark_clean (QOF_INSTANCE (fixture->split->parent));
     g_object_set (fixture->split->acc,
-		  "sort-dirty", FALSE,
-		  "balance-dirty", FALSE,
-		  NULL);
+                  "sort-dirty", FALSE,
+                  "balance-dirty", FALSE,
+                  NULL);
 
     qof_instance_set_dirty (QOF_INSTANCE (fixture->split));
     xaccSplitCommitEdit (fixture->split);
     g_object_get (fixture->split->acc,
-		  "sort-dirty", &sort_dirty,
-		  "balance-dirty", &balance_dirty,
-		  NULL);
+                  "sort-dirty", &sort_dirty,
+                  "balance-dirty", &balance_dirty,
+                  NULL);
     g_assert_cmpint (sort_dirty, ==, TRUE);
     g_assert_cmpint (balance_dirty, ==, FALSE);
     g_assert (!qof_instance_is_dirty (QOF_INSTANCE (fixture->split->parent)));
@@ -640,19 +641,19 @@
     Split *split2 = xaccMallocSplit (xaccSplitGetBook (fixture->split));
     Account *acc = fixture->split->acc;
 
-/* Set a second split on txn1 so that txn1 isn't destroyed when we
- * remove fixture->split from it.
- */
+    /* Set a second split on txn1 so that txn1 isn't destroyed when we
+     * remove fixture->split from it.
+     */
     xaccTransBeginEdit (txn1);
     xaccSplitSetParent (split2, txn1);
     xaccTransCommitEdit (txn1);
 
     sig1 = test_signal_new (QOF_INSTANCE (txn1),
-			    GNC_EVENT_ITEM_REMOVED, NULL);
+                            GNC_EVENT_ITEM_REMOVED, NULL);
     sig2 = test_signal_new (QOF_INSTANCE (txn2),
-			    GNC_EVENT_ITEM_ADDED, NULL);
+                            GNC_EVENT_ITEM_ADDED, NULL);
     sig3 = test_signal_new (QOF_INSTANCE (txn1),
-			    GNC_EVENT_ITEM_ADDED, NULL);
+                            GNC_EVENT_ITEM_ADDED, NULL);
     fixture->split->orig_acc = NULL;
     g_assert (fixture->split->acc != fixture->split->orig_acc);
     fixture->split->orig_parent = NULL;
@@ -687,7 +688,7 @@
 }
 /* xaccSplitLookup
 Split *
-xaccSplitLookup (const GncGUID *guid, QofBook *book)// C: 24 in 9 
+xaccSplitLookup (const GncGUID *guid, QofBook *book)// C: 24 in 9
 */
 static void
 test_xaccSplitLookup (Fixture *fixture, gconstpointer pData)
@@ -703,7 +704,7 @@
 }
 /* xaccSplitDetermineGainStatus
 void
-xaccSplitDetermineGainStatus (Split *split)// C: 7 in 2 
+xaccSplitDetermineGainStatus (Split *split)// C: 7 in 2
 */
 static void
 test_xaccSplitDetermineGainStatus (Fixture *fixture, gconstpointer pData)
@@ -781,7 +782,7 @@
 */
 /* xaccSplitSetSharePriceAndAmount
 void
-xaccSplitSetSharePriceAndAmount (Split *s, gnc_numeric price, gnc_numeric amt)// C: 1 
+xaccSplitSetSharePriceAndAmount (Split *s, gnc_numeric price, gnc_numeric amt)// C: 1
 */
 static void
 test_xaccSplitSetSharePriceAndAmount (Fixture *fixture, gconstpointer pData)
@@ -809,7 +810,7 @@
 */
 /* xaccSplitSetSharePrice
 void
-xaccSplitSetSharePrice (Split *s, gnc_numeric price)// C: 2 in 1 
+xaccSplitSetSharePrice (Split *s, gnc_numeric price)// C: 2 in 1
 */
 static void
 test_xaccSplitSetSharePrice (Fixture *fixture, gconstpointer pData)
@@ -880,7 +881,7 @@
     Account *acc = fixture->split->acc;
     gchar *msg1 = "[xaccSplitSetBaseValue()] split must have a parent account";
     gchar *fmt = "[xaccSplitSetBaseValue()] inappropriate base currency %s "
-	"given split currency=%s and commodity=%s\n";
+                 "given split currency=%s and commodity=%s\n";
     gchar *logdomain = "gnc.engine";
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct check = { loglevel, logdomain, msg1, 0 };
@@ -890,14 +891,14 @@
 
     GLogFunc oldlogger = g_log_set_default_handler ((GLogFunc)test_null_handler, &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
-				  &check);
-/* No parent account */
+                                  &check);
+    /* No parent account */
     fixture->split->acc = NULL;
     xaccSplitSetBaseValue (fixture->split, value, fixture->comm);
     g_assert (!qof_instance_is_dirty (QOF_INSTANCE (fixture->split)));
     xaccTransRollbackEdit (fixture->split->parent);
     g_assert_cmpint (check.hits, ==, 1);
-/* Base currency ==  currency, != commodity */
+    /* Base currency ==  currency, != commodity */
     fixture->split->acc = acc;
     xaccSplitSetBaseValue (fixture->split, value, fixture->curr);
     g_assert_cmpint (fixture->split->value.num, ==, 360);
@@ -907,7 +908,7 @@
     g_assert (qof_instance_is_dirty (QOF_INSTANCE (fixture->split)));
     g_assert_cmpint (check.hits, ==, 1);
 
-/* Base currency == currency, == commodity */
+    /* Base currency == currency, == commodity */
     qof_instance_mark_clean (QOF_INSTANCE (fixture->split));
     fixture->split->value = old_val;
     fixture->split->amount = old_amt;
@@ -920,7 +921,7 @@
     g_assert_cmpint (fixture->split->amount.denom, ==, 240);
     g_assert (qof_instance_is_dirty (QOF_INSTANCE (fixture->split)));
     g_assert_cmpint (check.hits, ==, 1);
-/* Base currency != currency, == commodity */
+    /* Base currency != currency, == commodity */
     qof_instance_mark_clean (QOF_INSTANCE (fixture->split));
     fixture->split->value = old_val;
     fixture->split->amount = old_amt;
@@ -932,10 +933,10 @@
     g_assert (qof_instance_is_dirty (QOF_INSTANCE (fixture->split)));
     g_assert_cmpint (check.hits, ==, 1);
 
-/* Base currency != currency, != commodity */
+    /* Base currency != currency, != commodity */
     check.msg = g_strdup_printf (fmt, gnc_commodity_get_printname (gnaira),
-				 gnc_commodity_get_printname (fixture->curr),
-				 gnc_commodity_get_printname (fixture->comm));
+                                 gnc_commodity_get_printname (fixture->curr),
+                                 gnc_commodity_get_printname (fixture->comm));
 
     qof_instance_mark_clean (QOF_INSTANCE (fixture->split));
     fixture->split->amount = old_amt;
@@ -957,18 +958,18 @@
 */
 /* xaccSplitConvertAmount
 gnc_numeric
-xaccSplitConvertAmount (const Split *split, const Account * account)// C: 1 
+xaccSplitConvertAmount (const Split *split, const Account * account)// C: 1
 */
 static void
 test_xaccSplitConvertAmount (void)
 {
     QofBook *book = qof_book_new ();
     gnc_commodity *gnaira = gnc_commodity_new (book, "Gnaira", "CURRENCY",
-					       "GNA", "", 240);
+                            "GNA", "", 240);
     gnc_commodity *gncxx = gnc_commodity_new (book, "Wildebeest Fund", "FUND",
-					       "GNCXX", "", 1000);
+                           "GNCXX", "", 1000);
     gnc_commodity *gnm = gnc_commodity_new (book, "Gnome, Inc.", "NYSE",
-					       "GNM", "", 1000);
+                                            "GNM", "", 1000);
 
     Account *acc = xaccMallocAccount (book);
     Account *o_acc = xaccMallocAccount (book);
@@ -1001,40 +1002,40 @@
     o_split->amount = gnc_numeric_neg (gnaira_amt);
     o_split->value = gnc_numeric_neg (gnaira_amt);
 
-/* accounts are equal, return the amount */
+    /* accounts are equal, return the amount */
     xaccTransCommitEdit (txn);
     result = xaccSplitConvertAmount (split, acc);
     g_assert (gnc_numeric_equal (result, gnaira_amt));
 
-/* commodities are equal, return the amount */
+    /* commodities are equal, return the amount */
     result = xaccSplitConvertAmount (split, o_acc);
     g_assert (gnc_numeric_equal (result, gnaira_amt));
 
-/* commodities are different, but transaction is balanced: Returns the
- * value of o_split
- */
+    /* commodities are different, but transaction is balanced: Returns the
+     * value of o_split
+     */
     o_split->amount = gncxx_amt;
     xaccAccountSetCommodity (o_acc, gncxx);
     result = xaccSplitConvertAmount (split, o_acc);
     g_assert_cmpint (result.num, ==, -300000);
     g_assert_cmpint (result.denom, ==, 1000);
 
-/* commodities are different, transaction is balanced, account isn't
- * the balancing account. Raises error and returns 0,0
- */
+    /* commodities are different, transaction is balanced, account isn't
+     * the balancing account. Raises error and returns 0,0
+     */
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
-				  &check);
+                                  &check);
     result = xaccSplitConvertAmount (split, ya_acc);
     g_assert (gnc_numeric_zero_p (result));
     g_assert_cmpint (check.hits, ==, 1);
 
-/* Transaction isn't balanced, split has 0 value, returns that */
+    /* Transaction isn't balanced, split has 0 value, returns that */
     split->value = gnc_numeric_zero ();
     result = xaccSplitConvertAmount (split, o_acc);
     g_assert (gnc_numeric_zero_p (result));
     g_assert_cmpint (check.hits, ==, 1);
 
-/* Transaction isn't balanced, compute a conversion */
+    /* Transaction isn't balanced, compute a conversion */
     split->value = gnc_numeric_create (71330, 240);
     result = xaccSplitConvertAmount (split, o_acc);
     g_assert_cmpint (result.num, ==, -402131);
@@ -1054,7 +1055,7 @@
 }
 /* xaccSplitDestroy
 gboolean
-xaccSplitDestroy (Split *split)// C: 17 in 9 SCM: 1 
+xaccSplitDestroy (Split *split)// C: 17 in 9 SCM: 1
 */
 static void
 notify_destroy (gpointer pdata, GObject *obj)
@@ -1068,7 +1069,7 @@
 {
     QofBook *book = qof_book_new ();
     gnc_commodity *gnaira = gnc_commodity_new (book, "Gnaira", "CURRENCY",
-					       "GNA", "", 240);
+                            "GNA", "", 240);
     Account *acc = xaccMallocAccount (book);
     Transaction *txn = xaccMallocTransaction (book);
     Split *split1 = xaccMallocSplit (book);
@@ -1097,7 +1098,7 @@
 }
 /* xaccSplitOrder
 gint
-xaccSplitOrder (const Split *sa, const Split *sb)// C: 5 in 3 
+xaccSplitOrder (const Split *sa, const Split *sb)// C: 5 in 3
 */
 static void
 test_xaccSplitOrder (Fixture *fixture, gconstpointer pData)
@@ -1111,41 +1112,41 @@
     g_assert_cmpint (xaccSplitOrder (split, split), ==, 0);
     g_assert_cmpint (xaccSplitOrder (NULL, split), ==, -1);
     g_assert_cmpint (xaccSplitOrder (split, NULL), ==, 1);
-/* This is testing the call to xaccTransOrder: split has a parent and
- * o_split doesn't, so xaccTransOrder returns -1.
- */
+    /* This is testing the call to xaccTransOrder: split has a parent and
+     * o_split doesn't, so xaccTransOrder returns -1.
+     */
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, -1);
 
-/* This is testing the call to xaccTransOrder_num_action: split and o_split have
- * parents with the same date_posted so will sort on tran-num or
- * split-action based on book option.
- */
+    /* This is testing the call to xaccTransOrder_num_action: split and o_split have
+     * parents with the same date_posted so will sort on tran-num or
+     * split-action based on book option.
+     */
     o_split->parent = o_txn;
     split->parent->date_posted = timespec_now ();
     o_split->parent->date_posted = split->parent->date_posted;
 
-/* The book_use_split_action_for_num_field book option hasn't been set so it
- * should sort on tran-num, so xaccTransOrder_num_action returns -1.
- */
+    /* The book_use_split_action_for_num_field book option hasn't been set so it
+     * should sort on tran-num, so xaccTransOrder_num_action returns -1.
+     */
     split->parent->num = "123";
     split->action = "5";
     o_split->parent->num = "124";
     o_split->action = "6";
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, -1);
 
-/* Reverse, so xaccTransOrder_num_action returns +1.
- */
+    /* Reverse, so xaccTransOrder_num_action returns +1.
+     */
     split->parent->num = "124";
     o_split->parent->num = "123";
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, +1);
 
-/* Now set the book_use_split_action_for_num_field book option so it will
- * sort on split-action, so xaccTransOrder_num_action returns -1, initially.
- */
+    /* Now set the book_use_split_action_for_num_field book option so it will
+     * sort on split-action, so xaccTransOrder_num_action returns -1, initially.
+     */
 
     /* create correct slot path */
     slot_path = (const char *) g_strconcat( KVP_OPTION_PATH, "/",
-            OPTION_SECTION_ACCOUNTS, "/", OPTION_NAME_NUM_FIELD_SOURCE, NULL );
+                                            OPTION_SECTION_ACCOUNTS, "/", OPTION_NAME_NUM_FIELD_SOURCE, NULL );
     g_assert( slot_path != NULL );
     g_test_message( "Testing with use-split-action-for-num set to true - t" );
     qof_book_set_string_option( xaccSplitGetBook (split), slot_path, "t" );
@@ -1156,18 +1157,18 @@
     split->action = "7";
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, +1);
 
-/* Revert settings for the rest of the test */
+    /* Revert settings for the rest of the test */
     o_split->action = NULL;
     split->action = "foo";
     o_split->parent = NULL;
     qof_book_set_string_option( xaccSplitGetBook (split), slot_path, "f" );
     g_assert(qof_book_use_split_action_for_num_field(xaccSplitGetBook(split)) == FALSE);
     split->parent = NULL;
-/* This should return > 0 because o_split has no memo string */
+    /* This should return > 0 because o_split has no memo string */
     g_assert_cmpint (xaccSplitOrder (split, o_split), >, 0);
     o_split->memo = "baz";
     g_assert_cmpint (xaccSplitOrder (split, o_split), <, 0);
-/* This should return > 0 because o_split has no action string */
+    /* This should return > 0 because o_split has no action string */
     o_split->memo = split->memo;
     g_assert_cmpint (xaccSplitOrder (split, o_split), >, 0);
     o_split->action = "waldo";
@@ -1192,7 +1193,7 @@
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, -1);
 
     o_split->value = split->value;
-/* Make sure that it doesn't crash if o_split->date_reconciled == NULL */
+    /* Make sure that it doesn't crash if o_split->date_reconciled == NULL */
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==, 1);
     o_split->date_reconciled = timespec_now();
     o_split->date_reconciled.tv_sec -= 50;
@@ -1204,23 +1205,23 @@
     o_split->date_reconciled.tv_nsec = split->date_reconciled.tv_nsec;
 
     g_assert_cmpint (xaccSplitOrder (split, o_split), ==,
-		     qof_instance_guid_compare (split, o_split));
+                     qof_instance_guid_compare (split, o_split));
 
-/* so that it won't assert during teardown */
+    /* so that it won't assert during teardown */
     split->parent = txn;
     test_destroy (o_split);
     test_destroy (o_txn);
 }
 /* xaccSplitOrderDateOnly
 gint
-xaccSplitOrderDateOnly (const Split *sa, const Split *sb)// C: 2 in 1 
+xaccSplitOrderDateOnly (const Split *sa, const Split *sb)// C: 2 in 1
 */
 static void
 test_xaccSplitOrderDateOnly (Fixture *fixture, gconstpointer pData)
 {
-/* Doesn't do what you'd first think: It orders based on the
- * transaction date posted.
- */
+    /* Doesn't do what you'd first think: It orders based on the
+     * transaction date posted.
+     */
     Split *split = fixture->split;
     Split *o_split = xaccMallocSplit (xaccSplitGetBook (split));
     Transaction *txn = split->parent;
@@ -1229,9 +1230,9 @@
     g_assert_cmpint (xaccSplitOrderDateOnly (split, split), ==, 0);
     g_assert_cmpint (xaccSplitOrderDateOnly (NULL, split), ==, -1);
     g_assert_cmpint (xaccSplitOrderDateOnly (split, NULL), ==, 1);
-/* This is testing the call to xaccTransOrder: split has a parent and
- * o_split doesn't, so xaccTransOrder returns -1.
- */
+    /* This is testing the call to xaccTransOrder: split has a parent and
+     * o_split doesn't, so xaccTransOrder returns -1.
+     */
     o_split->parent = NULL;
     g_assert_cmpint (xaccSplitOrderDateOnly (split, o_split), ==, -1);
     split->parent = NULL;
@@ -1277,9 +1278,9 @@
 #undef _func
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new ("gnc.engine",
-						    loglevel, msg);
+                             loglevel, msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
 
     xaccAccountSetCommodity (acc1, fixture->curr);
     xaccAccountSetCommodity (acc2, fixture->curr);
@@ -1457,7 +1458,7 @@
     Split *split1 = xaccMallocSplit (book);
 
     gnc_commodity *gnaira = gnc_commodity_new (book, "Gnaira", "CURRENCY",
-					       "GNA", "", 240);
+                            "GNA", "", 240);
     xaccAccountSetCommodity (fixture->split->acc, gnaira);
     xaccAccountSetCommodity (acc1, gnaira);
     split1->acc = acc1;
@@ -1537,7 +1538,7 @@
 }
 /* xaccSplitCompareOtherAccountCodes
 int
-xaccSplitCompareOtherAccountCodes(const Split *sa, const Split *sb)// SCM: 1 
+xaccSplitCompareOtherAccountCodes(const Split *sa, const Split *sb)// SCM: 1
 */
 static void
 test_xaccSplitCompareOtherAccountCodes (Fixture *fixture, gconstpointer pData)
@@ -1598,12 +1599,12 @@
     TestSignal sig1, sig2;
     gchar *logdomain = "gnc.engine";
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
-/* FIXME: This error doesn't actually stop execution, so we need to test for it happening. */
+    /* FIXME: This error doesn't actually stop execution, so we need to test for it happening. */
     gchar *msg = "[xaccSplitSetParent()] You may not add the split to more"
-	" than one transaction during the BeginEdit/CommitEdit block.";
+                 " than one transaction during the BeginEdit/CommitEdit block.";
     TestErrorStruct check = { loglevel, logdomain, msg, 0 };
     GLogFunc oldlogger = g_log_set_default_handler ((GLogFunc)test_null_handler,
-						    &check);
+                         &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler, &check);
     sig1 = test_signal_new (QOF_INSTANCE (txn2), GNC_EVENT_ITEM_ADDED, NULL);
     sig2 = test_signal_new (QOF_INSTANCE (txn), GNC_EVENT_ITEM_REMOVED, NULL);
@@ -1622,7 +1623,7 @@
     test_signal_free (sig1);
     test_signal_free (sig2);
     g_log_set_default_handler (oldlogger, NULL);
-/* txn already destroyed by xaccTransCommitEdit() */
+    /* txn already destroyed by xaccTransCommitEdit() */
 }
 /* xaccSplitGetSharePrice
 gnc_numeric
@@ -1634,24 +1635,24 @@
     gnc_numeric result, quotient;
     gnc_numeric expected = gnc_numeric_create (1, 1);
     Split *split = fixture->split;
-/* Warning: this is a define in Split.c */
+    /* Warning: this is a define in Split.c */
     const guint PRICE_SIGFIGS = 6;
     char *logdomain = "gnc.engine";
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct check = { loglevel, logdomain, NULL, 0 };
     guint hdlr = g_log_set_handler (logdomain, loglevel,
-				    (GLogFunc)test_checked_handler, &check);
+                                    (GLogFunc)test_checked_handler, &check);
     GLogFunc oldhandler = g_log_set_default_handler ((GLogFunc)test_null_handler, &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
-				  &check);
+                                  &check);
 
     result = xaccSplitGetSharePrice (NULL);
     g_assert (gnc_numeric_equal (result, expected));
 
     expected = gnc_numeric_div (split->value, split->amount,
-				GNC_DENOM_AUTO,
-				GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
-				GNC_HOW_RND_ROUND_HALF_UP);
+                                GNC_DENOM_AUTO,
+                                GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
+                                GNC_HOW_RND_ROUND_HALF_UP);
 
     result = xaccSplitGetSharePrice (split);
     g_assert (gnc_numeric_equal (result, expected));
@@ -1669,21 +1670,21 @@
     g_assert (gnc_numeric_equal (result, expected));
     g_assert_cmpint (check.hits, ==, 0);
 
-/* Now invent some value/ammount pairs which cause numeric errors to test the limits */
+    /* Now invent some value/ammount pairs which cause numeric errors to test the limits */
     split->amount = gnc_numeric_create (987654321, 10);
     split->value = gnc_numeric_create (3, 789304166);
     quotient = gnc_numeric_div (split->value, split->amount,
-				GNC_DENOM_AUTO,
-				GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
-				GNC_HOW_RND_ROUND_HALF_UP);
+                                GNC_DENOM_AUTO,
+                                GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
+                                GNC_HOW_RND_ROUND_HALF_UP);
     check.msg = g_strdup_printf ("[xaccSplitGetSharePrice()] "
-				 "Computing share price failed (%d): [ %"
-				 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
-				 " ] / [ %" G_GINT64_FORMAT " / %"
-				 G_GINT64_FORMAT " ]",
-				 gnc_numeric_check(quotient), split->value.num,
-				 split->value.denom, split->amount.num,
-				 split->amount.denom);
+                                 "Computing share price failed (%d): [ %"
+                                 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
+                                 " ] / [ %" G_GINT64_FORMAT " / %"
+                                 G_GINT64_FORMAT " ]",
+                                 gnc_numeric_check(quotient), split->value.num,
+                                 split->value.denom, split->amount.num,
+                                 split->amount.denom);
     expected = gnc_numeric_create (0, 1);
     result = xaccSplitGetSharePrice (split);
     g_assert (gnc_numeric_equal (result, expected));
@@ -1693,17 +1694,17 @@
     split->amount = gnc_numeric_create (987654321, 10);
     split->value = gnc_numeric_create (3, 0);
     quotient = gnc_numeric_div (split->value, split->amount,
-				GNC_DENOM_AUTO,
-				GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
-				GNC_HOW_RND_ROUND_HALF_UP);
+                                GNC_DENOM_AUTO,
+                                GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
+                                GNC_HOW_RND_ROUND_HALF_UP);
     check.msg = g_strdup_printf ("[xaccSplitGetSharePrice()] "
-				 "Computing share price failed (%d): [ %"
-				 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
-				 " ] / [ %" G_GINT64_FORMAT " / %"
-				 G_GINT64_FORMAT " ]",
-				 gnc_numeric_check(quotient), split->value.num,
-				 split->value.denom, split->amount.num,
-				 split->amount.denom);
+                                 "Computing share price failed (%d): [ %"
+                                 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
+                                 " ] / [ %" G_GINT64_FORMAT " / %"
+                                 G_GINT64_FORMAT " ]",
+                                 gnc_numeric_check(quotient), split->value.num,
+                                 split->value.denom, split->amount.num,
+                                 split->amount.denom);
     expected = gnc_numeric_create (0, 1);
     result = xaccSplitGetSharePrice (split);
     g_assert (gnc_numeric_equal (result, expected));
@@ -1713,17 +1714,17 @@
     split->amount = gnc_numeric_create (9, 0);
     split->value = gnc_numeric_create (3, 789304166);
     quotient = gnc_numeric_div (split->value, split->amount,
-				GNC_DENOM_AUTO,
-				GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
-				GNC_HOW_RND_ROUND_HALF_UP);
+                                GNC_DENOM_AUTO,
+                                GNC_HOW_DENOM_SIGFIGS (PRICE_SIGFIGS) |
+                                GNC_HOW_RND_ROUND_HALF_UP);
     check.msg = g_strdup_printf ("[xaccSplitGetSharePrice()] "
-				 "Computing share price failed (%d): [ %"
-				 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
-				 " ] / [ %" G_GINT64_FORMAT " / %"
-				 G_GINT64_FORMAT " ]",
-				 gnc_numeric_check(quotient), split->value.num,
-				 split->value.denom, split->amount.num,
-				 split->amount.denom);
+                                 "Computing share price failed (%d): [ %"
+                                 G_GINT64_FORMAT " / %" G_GINT64_FORMAT
+                                 " ] / [ %" G_GINT64_FORMAT " / %"
+                                 G_GINT64_FORMAT " ]",
+                                 gnc_numeric_check(quotient), split->value.num,
+                                 split->value.denom, split->amount.num,
+                                 split->amount.denom);
     expected = gnc_numeric_create (0, 1);
     result = xaccSplitGetSharePrice (split);
     g_assert (gnc_numeric_equal (result, expected));
@@ -1791,8 +1792,8 @@
     kvp_frame_set_slot (split1->inst.kvp_data, "lot-split", NULL);
     g_assert (kvp_frame_get_slot (split1->inst.kvp_data, "lot-split") == NULL);
     kvp_frame_set_slot_path (book_slots, kvptrue, KVP_OPTION_PATH,
-			     OPTION_SECTION_ACCOUNTS,
-			     OPTION_NAME_TRADING_ACCOUNTS, NULL);
+                             OPTION_SECTION_ACCOUNTS,
+                             OPTION_NAME_TRADING_ACCOUNTS, NULL);
     g_assert (xaccTransUseTradingAccounts (txn));
     g_assert (xaccSplitGetOtherSplit (split) == NULL);
     split2->acc = acc2;
@@ -1819,9 +1820,9 @@
     g_assert (gnc_numeric_zero_p (fixture->split->value));
     g_assert (gnc_numeric_zero_p (fixture->split->amount));
     g_assert (gnc_numeric_equal (xaccSplitVoidFormerAmount (fixture->split),
-				 amount));
+                                 amount));
     g_assert (gnc_numeric_equal (xaccSplitVoidFormerValue (fixture->split),
-				 value));
+                                 value));
     g_assert_cmpint (fixture->split->reconciled, ==, VREC);
     xaccSplitUnvoid (fixture->split);
     g_assert (gnc_numeric_equal (fixture->split->value, value));

Modified: gnucash/trunk/src/engine/test/utest-Transaction.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Transaction.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/engine/test/utest-Transaction.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -147,12 +147,12 @@
     txn->description = CACHE_INSERT ("Waldo Pepper");
     xaccTransBeginEdit (txn);
     {
-	 xaccTransSetCurrency (txn, fixture->curr);
-	 xaccSplitSetParent (split1, txn);
-	 xaccSplitSetParent (split2, txn);
-	 kvp_frame_set_string (frame, trans_notes_str, "Salt pork sausage");
-	 kvp_frame_set_double (frame, "/qux/quux/corge", 123.456);
-	 qof_instance_set_slots (QOF_INSTANCE (txn), frame);
+        xaccTransSetCurrency (txn, fixture->curr);
+        xaccSplitSetParent (split1, txn);
+        xaccSplitSetParent (split2, txn);
+        kvp_frame_set_string (frame, trans_notes_str, "Salt pork sausage");
+        kvp_frame_set_double (frame, "/qux/quux/corge", 123.456);
+        qof_instance_set_slots (QOF_INSTANCE (txn), frame);
     }
     xaccTransCommitEdit (txn);
     xaccAccountSortSplits(fixture->acc1, FALSE);
@@ -190,9 +190,9 @@
     gains_split2->value = gnc_numeric_create (-30, 240);
     xaccTransBeginEdit (fixture->gains_txn);
     {
-	 xaccTransSetCurrency (fixture->gains_txn, base->curr);
-	 xaccSplitSetParent (gains_split1, fixture->gains_txn);
-	 xaccSplitSetParent (gains_split2, fixture->gains_txn);
+        xaccTransSetCurrency (fixture->gains_txn, base->curr);
+        xaccSplitSetParent (gains_split1, fixture->gains_txn);
+        xaccSplitSetParent (gains_split2, fixture->gains_txn);
     }
     xaccTransCommitEdit (fixture->gains_txn);
     base_split = g_list_nth_data (base->txn->splits, 1);
@@ -237,16 +237,16 @@
     gchar *msg = g_strdup_printf ("[check_open()] transaction %p not open for editing", fixture->txn);
     GLogLevelFlags loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new ("gnc.engine", loglevel,
-						    msg);
+                             msg);
     g_free (msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     check_open (fixture->txn);
     g_assert_cmpint (check->hits, ==, 1);
     xaccTransBeginEdit (fixture->txn);
     check_open (fixture->txn);
     g_assert_cmpint (check->hits, ==, 1);
-/* Don't commit the edit, there's nothing to balance! */
+    /* Don't commit the edit, there's nothing to balance! */
     xaccTransRollbackEdit (fixture->txn);
 }
 /* xaccTransStillHasSplit
@@ -294,17 +294,17 @@
 
     for (splits = (fixture->txn)->splits; splits; splits = splits->next)
     {
-	if (!splits->data) continue;
-	g_assert (!qof_instance_get_dirty_flag (splits->data));
-	check_split_dirty (splits->data, FALSE);
+        if (!splits->data) continue;
+        g_assert (!qof_instance_get_dirty_flag (splits->data));
+        check_split_dirty (splits->data, FALSE);
     }
     fixture->func->mark_trans (fixture->txn);
     g_assert (!qof_instance_get_dirty_flag (fixture->txn));
     for (splits = (fixture->txn)->splits; splits; splits = splits->next)
     {
-	if (!splits->data) continue;
-	g_assert (!qof_instance_get_dirty_flag (splits->data));
-	check_split_dirty (splits->data, TRUE);
+        if (!splits->data) continue;
+        g_assert (!qof_instance_get_dirty_flag (splits->data));
+        check_split_dirty (splits->data, TRUE);
     }
 }
 /* gen_event_trans
@@ -316,9 +316,9 @@
     Split *split = fixture->txn->splits->data;
     GNCLot *lot = gnc_lot_new (qof_instance_get_book (QOF_INSTANCE (fixture->txn)));
     TestSignal sig1 = test_signal_new (QOF_INSTANCE (fixture->acc1),
-				       GNC_EVENT_ITEM_CHANGED, split);
+                                       GNC_EVENT_ITEM_CHANGED, split);
     TestSignal sig2 = test_signal_new (QOF_INSTANCE (lot),
-				       QOF_EVENT_MODIFY, NULL);
+                                       QOF_EVENT_MODIFY, NULL);
     gnc_lot_add_split (lot, split);
     test_signal_assert_hits (sig1, 1);
     test_signal_assert_hits (sig2, 3);
@@ -362,7 +362,7 @@
     Split *split = g_object_new (GNC_TYPE_SPLIT, "book", book, NULL);
     Split *s_ref = split;
     gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand", "CURRENCY",
-					    "GNR", "", 240), *t_curr = NULL;
+                          "GNR", "", 240), *t_curr = NULL;
     gnc_commodity *c_ref = curr;
     g_object_add_weak_pointer (G_OBJECT (split), (gpointer*) &s_ref);
     g_object_add_weak_pointer (G_OBJECT (curr), (gpointer*) &c_ref);
@@ -374,15 +374,15 @@
     g_assert (c_ref != NULL);
 
     g_object_run_dispose (G_OBJECT (txn));
-/* If gnc_transaction_dispose was written correctly, txn->splits and
- * txn->curr would be null and all of the splits would be destroyed,
- * so all of these would be equal instead of unequal.
- */
+    /* If gnc_transaction_dispose was written correctly, txn->splits and
+     * txn->curr would be null and all of the splits would be destroyed,
+     * so all of these would be equal instead of unequal.
+     */
     g_assert (txn->splits != NULL);
     g_assert (txn->common_currency != NULL);
     g_assert (s_ref != NULL);
     g_assert (c_ref != NULL);
-/* And these would be unnecessary -- in fact, they would assert */
+    /* And these would be unnecessary -- in fact, they would assert */
     test_destroy (split);
     test_destroy (curr);
 
@@ -409,23 +409,23 @@
     Transaction *txn = g_object_new (GNC_TYPE_TRANSACTION, "book", book, NULL);
     gchar *num = "42", *desc = "The Answer", *t_num = NULL, *t_desc = NULL, *phony = NULL;
     gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand", "CURRENCY",
-					    "GNR", "", 240), *t_curr = NULL;
+                          "GNR", "", 240), *t_curr = NULL;
     Timespec now = timespec_now (), *t_entered = NULL, *t_posted = NULL;
     time_t secs = (time_t)now.tv_sec;
     gchar *msg1 = "g_object_set_valist: object class " _Q "Transaction' has no property named " _Q "bogus'";
     gchar *msg2 = g_strdup_printf ("[xaccTransSetDateInternal] addr=%p set date to %" G_GUINT64_FORMAT ".%09ld %s",
-				   txn, now.tv_sec, now.tv_nsec, ctime (&secs));
+                                   txn, now.tv_sec, now.tv_nsec, ctime (&secs));
     GLogLevelFlags loglevel1 = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
     GLogLevelFlags loglevel2 = G_LOG_LEVEL_INFO;
     TestErrorStruct *check1 = test_error_struct_new ("GLib-GObject",
-						     loglevel1, msg1);
+                              loglevel1, msg1);
     TestErrorStruct *check2 = test_error_struct_new ("gnc.engine",
-						     loglevel2, msg2);
+                              loglevel2, msg2);
     g_free (msg2);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check1,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     fixture->hdlrs = test_log_set_handler (fixture->hdlrs, check2,
-					   (GLogFunc)test_checked_handler);
+                                           (GLogFunc)test_checked_handler);
     g_assert_cmpstr (txn->num, ==, "");
     g_assert_cmpstr (txn->description, ==, "");
     g_assert (txn->common_currency == NULL);
@@ -433,16 +433,16 @@
     g_assert_cmpint (txn->date_entered.tv_nsec, ==, 0);
     g_assert_cmpint (txn->date_posted.tv_sec, ==, 0);
     g_assert_cmpint (txn->date_posted.tv_nsec, ==, 0);
-/* Kick up the edit counter to keep from committing */
+    /* Kick up the edit counter to keep from committing */
     xaccTransBeginEdit (txn);
     g_object_set (G_OBJECT (txn),
-		  "num", num,
-		  "description", desc,
-		  "currency", curr,
-		  "post-date", &now,
-		  "enter-date", &now,
-		  "bogus", phony,
-		  NULL);
+                  "num", num,
+                  "description", desc,
+                  "currency", curr,
+                  "post-date", &now,
+                  "enter-date", &now,
+                  "bogus", phony,
+                  NULL);
 
     g_assert_cmpstr (txn->num, ==, num);
     g_assert_cmpstr (txn->description, ==, desc);
@@ -455,13 +455,13 @@
     g_free (check1->msg);
     check1->msg = g_strdup ("g_object_get_valist: object class " _Q "Transaction' has no property named " _Q "bogus'");
     g_object_get (G_OBJECT (txn),
-		  "num", &t_num,
-		  "description", &t_desc,
-		  "currency", &t_curr,
-		  "post-date", &t_posted,
-		  "enter-date", &t_entered,
-		  "bogus", &phony,
-		  NULL);
+                  "num", &t_num,
+                  "description", &t_desc,
+                  "currency", &t_curr,
+                  "post-date", &t_posted,
+                  "enter-date", &t_entered,
+                  "bogus", &phony,
+                  NULL);
 
     g_assert_cmpstr (t_num, ==, num);
     g_assert_cmpstr (t_desc, ==, desc);
@@ -480,7 +480,7 @@
  * xaccInitTransaction
 No way to really test class_init directly -- though the above tests cover everything pretty well indirectly. xaccInitTransaction is a useless one-line function that sets the book in the parent QofInstance.
  */
- static void
+static void
 test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
 {
     QofBook *book = qof_book_new ();
@@ -496,9 +496,9 @@
     gchar *logdomain = "gnc.engine";
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new ("gnc.engine", loglevel,
-						    msg);
+                             msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     test_signal_assert_hits (sig1, 0);
     txn = xaccMallocTransaction (NULL);
     g_assert (txn == NULL);
@@ -533,13 +533,14 @@
     values[0] = gnc_numeric_create (100, 240);
     values[1] = gnc_numeric_create (75, 240);
     values[2] = gnc_numeric_create (-125, 240);
-/* Prevent xaccTransCommitEdit in xaccSplitSetParent from doing anything */
+    /* Prevent xaccTransCommitEdit in xaccSplitSetParent from doing anything */
     xaccTransBeginEdit (txn);
-     for (i = 0; i < G_N_ELEMENTS (split); i++) {
-	split[i] = xaccMallocSplit (book);
-	split[i]->value = values[i];
-	split[i]->acc = fixture->acc1;
-	xaccSplitSetParent (split[i], txn);
+    for (i = 0; i < G_N_ELEMENTS (split); i++)
+    {
+        split[i] = xaccMallocSplit (book);
+        split[i]->value = values[i];
+        split[i]->acc = fixture->acc1;
+        xaccSplitSetParent (split[i], txn);
     }
 
     node = txn->splits;
@@ -584,30 +585,30 @@
     old->date_posted = posted;
     old->date_entered = entered;
     kvp_frame_set_string (old->inst.kvp_data, "/foo/bar/baz",
-			  "The Great Waldo Pepper");
+                          "The Great Waldo Pepper");
 
     new = xaccDupeTransaction (old);
 
     g_assert_cmpstr (new->num, ==, old->num);
     g_assert_cmpstr (new->description, ==, old->description);
     for (newnode = new->splits; newnode && oldnode;
-	 newnode = g_list_next (newnode))
+            newnode = g_list_next (newnode))
     {
-	g_assert (xaccSplitEqual (newnode->data, oldnode->data,
-				  TRUE, FALSE, TRUE));
-	oldnode = g_list_next (oldnode);
+        g_assert (xaccSplitEqual (newnode->data, oldnode->data,
+                                  TRUE, FALSE, TRUE));
+        oldnode = g_list_next (oldnode);
     }
     g_assert (newnode == NULL);
     g_assert (oldnode == NULL);
     g_assert (timespec_equal (&(new->date_posted), &posted));
     g_assert (timespec_equal (&(new->date_entered), &entered));
     g_assert (qof_instance_version_cmp (QOF_INSTANCE (new),
-					  QOF_INSTANCE (old)) == 0);
+                                        QOF_INSTANCE (old)) == 0);
     g_assert (new->orig == NULL);
     g_assert (new->common_currency == fixture->curr);
     g_assert (new->inst.e_type == NULL);
     g_assert (guid_equal (qof_instance_get_guid (QOF_INSTANCE (new)),
-			  guid_null ()));
+                          guid_null ()));
     g_assert (qof_instance_get_book (QOF_INSTANCE (new)) == old_book);
     g_assert (kvp_frame_compare (old->inst.kvp_data, new->inst.kvp_data) == 0);
 
@@ -635,27 +636,27 @@
     g_assert_cmpstr (new->description, ==, old->description);
 
     g_assert_cmpint (xaccTransCountSplits (old), ==,
-		     xaccTransCountSplits (new));
+                     xaccTransCountSplits (new));
 
     xaccTransSortSplits (new);
     xaccTransSortSplits (old);
 
     oldnode = old->splits;
     for (newnode = new->splits; newnode && oldnode;
-	 newnode = g_list_next (newnode))
+            newnode = g_list_next (newnode))
     {
-	g_assert (xaccSplitEqual (newnode->data, oldnode->data,
-				  FALSE, FALSE, FALSE));
-	oldnode = g_list_next (oldnode);
+        g_assert (xaccSplitEqual (newnode->data, oldnode->data,
+                                  FALSE, FALSE, FALSE));
+        oldnode = g_list_next (oldnode);
     }
     g_assert (newnode == NULL);
     g_assert (oldnode == NULL);
     g_assert (timespec_equal (&(new->date_posted), &posted));
     g_assert (timespec_equal (&(new->date_entered), &entered));
     g_assert (qof_instance_version_cmp (QOF_INSTANCE (new),
-					QOF_INSTANCE (old)) == 0);
+                                        QOF_INSTANCE (old)) == 0);
     g_assert_cmpint (qof_instance_get_version_check (new), ==,
-		     qof_instance_get_version_check (old));
+                     qof_instance_get_version_check (old));
     g_assert (new->orig == NULL);
     g_assert (new->common_currency == fixture->curr);
 
@@ -691,17 +692,17 @@
     xaccAccountSetCommodity (acc1, fixture->comm);
     xaccTransCopyFromClipBoard (txn, to_txn, fixture->acc1, acc1, FALSE);
     g_assert (gnc_commodity_equal (txn->common_currency,
-				   to_txn->common_currency));
+                                   to_txn->common_currency));
     g_assert (timespec_equal (&(to_txn->date_entered), &now));
     g_assert (timespec_equal (&(to_txn->date_posted), &txn->date_posted));
     g_assert_cmpstr (txn->num, ==, to_txn->num);
     /* Notes also tests that KVP is copied */
     g_assert_cmpstr (xaccTransGetNotes (txn), ==, xaccTransGetNotes (to_txn));
     g_assert_cmpstr (xaccTransGetDescription (txn), ==,
-		     xaccTransGetDescription (to_txn));
+                     xaccTransGetDescription (to_txn));
     g_assert_cmpstr (xaccTransGetNotes (txn), ==, xaccTransGetNotes (to_txn));
     g_assert_cmpint (xaccTransCountSplits (txn), ==,
-		     xaccTransCountSplits (to_txn));
+                     xaccTransCountSplits (to_txn));
 }
 
 static void
@@ -717,17 +718,17 @@
     xaccAccountSetCommodity (acc1, fixture->comm);
     xaccTransCopyFromClipBoard (txn, to_txn, fixture->acc1, acc1, TRUE);
     g_assert (gnc_commodity_equal (txn->common_currency,
-				   to_txn->common_currency));
+                                   to_txn->common_currency));
     g_assert (timespec_equal (&(to_txn->date_entered), &now));
     g_assert (timespec_equal (&(to_txn->date_posted), &never));
     g_assert_cmpstr (to_txn->num, ==, txn->num);
     /* Notes also tests that KVP is copied */
     g_assert_cmpstr (xaccTransGetNotes (txn), ==, xaccTransGetNotes (to_txn));
     g_assert_cmpstr (xaccTransGetDescription (txn), ==,
-		     xaccTransGetDescription (to_txn));
+                     xaccTransGetDescription (to_txn));
     g_assert_cmpstr (xaccTransGetNotes (txn), ==, xaccTransGetNotes (to_txn));
     g_assert_cmpint (xaccTransCountSplits (txn), ==,
-		     xaccTransCountSplits (to_txn));
+                     xaccTransCountSplits (to_txn));
 }
 
 /* xaccFreeTransaction
@@ -742,7 +743,7 @@
     Split *split = txn->splits->data;
     gchar *txn_num = "321";
     g_object_add_weak_pointer (G_OBJECT (txn->splits->data), (gpointer)&split);
-/* so the "free" doesn't, leaving the structure for us to test */
+    /* so the "free" doesn't, leaving the structure for us to test */
     g_object_ref (txn);
     g_object_ref (orig);
     orig->num = CACHE_INSERT (txn_num);
@@ -805,8 +806,8 @@
     test_add_error (cleanup);
 
     fixture->hdlrs = test_log_set_handler (fixture->hdlrs, check,
-					   (GLogFunc)test_list_handler);
-/* Booleans are check_guids, check_splits, check_balances, assume_ordered */
+                                           (GLogFunc)test_list_handler);
+    /* Booleans are check_guids, check_splits, check_balances, assume_ordered */
     g_assert (xaccTransEqual (NULL, NULL, TRUE, TRUE, TRUE, TRUE));
     g_assert (!xaccTransEqual (txn0, NULL, TRUE, TRUE, TRUE, TRUE));
     g_assert (!xaccTransEqual (NULL, txn0, TRUE, TRUE, TRUE, TRUE));
@@ -818,7 +819,7 @@
     check->hits = 0;
 
     g_assert_cmpint (xaccTransCountSplits (txn0), ==,
-		     xaccTransCountSplits (txn1));
+                     xaccTransCountSplits (txn1));
 
     g_free (check->msg);
     check->msg = g_strdup ("[xaccTransEqual] GUIDs differ");
@@ -897,7 +898,7 @@
     cleanup->msg = g_strdup_printf (cleanup_fmt, clone->orig);
     clone->description = CACHE_INSERT ("Waldo Pepper");
     kvp_frame_set_double (qof_instance_get_slots (QOF_INSTANCE (clone)),
-			  "/qux/quux/corge", 654.321);
+                          "/qux/quux/corge", 654.321);
     xaccTransCommitEdit (clone);
     g_free (cleanup->msg);
     g_free (check->msg);
@@ -910,7 +911,7 @@
     cleanup->msg = g_strdup_printf (cleanup_fmt, clone->orig);
     clone->description = CACHE_INSERT ("Waldo Pepper");
     kvp_frame_set_double (qof_instance_get_slots (QOF_INSTANCE (clone)),
-			  "/qux/quux/corge", 123.456);
+                          "/qux/quux/corge", 123.456);
     xaccTransCommitEdit (clone);
     g_free (cleanup->msg);
     g_free (check->msg);
@@ -919,7 +920,7 @@
     guid_to_string_buff (qof_instance_get_guid (split0), split_guid0);
     guid_to_string_buff (qof_instance_get_guid (split1), split_guid1);
     check2.msg = g_strdup_printf (
-	"[xaccTransEqual] splits %s and %s differ", split_guid1, split_guid0);
+                     "[xaccTransEqual] splits %s and %s differ", split_guid1, split_guid0);
 
     g_assert (!xaccTransEqual (clone, txn0, TRUE, TRUE, TRUE, TRUE));
     g_assert (xaccTransEqual (clone, txn0, FALSE, FALSE, FALSE, TRUE));
@@ -930,7 +931,7 @@
     g_free (check2.msg);
     check->msg = g_strdup("[xaccSplitEqual] amounts differ: 13333/1000 vs 100000/1000");
     check2.msg = g_strdup_printf (
-	"[xaccTransEqual] splits %s and %s differ", split_guid0, split_guid0);
+                     "[xaccTransEqual] splits %s and %s differ", split_guid0, split_guid0);
     qof_instance_set_guid (split1, qof_instance_get_guid (split0));
     g_assert (!xaccTransEqual (clone, txn0, TRUE, TRUE, TRUE, TRUE));
     g_assert (xaccTransEqual (clone, txn0, TRUE, FALSE, FALSE, TRUE));
@@ -938,32 +939,32 @@
     g_assert_cmpint (check2.hits, ==, 2);
 
     qof_instance_set_guid (xaccTransGetSplit (txn1, 0),
-			   qof_instance_get_guid (split0));
+                           qof_instance_get_guid (split0));
     qof_instance_set_guid (xaccTransGetSplit (txn1, 1),
-			   qof_instance_get_guid (xaccTransGetSplit (txn0, 1)));
+                           qof_instance_get_guid (xaccTransGetSplit (txn0, 1)));
     g_free (check->msg);
     {
-	 Split* split00 = xaccTransGetSplit (txn0, 0);
-	 Split* split01 = xaccTransGetSplit (txn0, 1);
-	 Split* split10 = xaccTransGetSplit (txn1, 0);
-	 Split* split11 = xaccTransGetSplit (txn1, 1);
-	 gchar *bal00 = gnc_numeric_to_string (split00->balance);
-	 gchar *bal01 = gnc_numeric_to_string (split01->balance);
-	 gchar *bal10 = gnc_numeric_to_string (split10->balance);
-	 gchar *bal11 = gnc_numeric_to_string (split11->balance);
-	 check->msg = g_strdup_printf("[xaccSplitEqualCheckBal] balances differ: %s vs %s", bal10, bal00);
-	 check3.msg = g_strdup_printf("[xaccSplitEqualCheckBal] balances differ: %s vs %s", bal11, bal01);
+        Split* split00 = xaccTransGetSplit (txn0, 0);
+        Split* split01 = xaccTransGetSplit (txn0, 1);
+        Split* split10 = xaccTransGetSplit (txn1, 0);
+        Split* split11 = xaccTransGetSplit (txn1, 1);
+        gchar *bal00 = gnc_numeric_to_string (split00->balance);
+        gchar *bal01 = gnc_numeric_to_string (split01->balance);
+        gchar *bal10 = gnc_numeric_to_string (split10->balance);
+        gchar *bal11 = gnc_numeric_to_string (split11->balance);
+        check->msg = g_strdup_printf("[xaccSplitEqualCheckBal] balances differ: %s vs %s", bal10, bal00);
+        check3.msg = g_strdup_printf("[xaccSplitEqualCheckBal] balances differ: %s vs %s", bal11, bal01);
 
-	 test_add_error (&check3);
-	 g_assert (!xaccTransEqual (txn1, txn0, TRUE, TRUE, TRUE, TRUE));
-	 g_assert (xaccTransEqual (txn1, txn0, TRUE, TRUE, FALSE, TRUE));
-	 g_assert_cmpint (check->hits, ==, 12);
-	 g_assert_cmpint (check2.hits, ==, 3);
-	 g_assert_cmpint (check3.hits, ==, 0);
+        test_add_error (&check3);
+        g_assert (!xaccTransEqual (txn1, txn0, TRUE, TRUE, TRUE, TRUE));
+        g_assert (xaccTransEqual (txn1, txn0, TRUE, TRUE, FALSE, TRUE));
+        g_assert_cmpint (check->hits, ==, 12);
+        g_assert_cmpint (check2.hits, ==, 3);
+        g_assert_cmpint (check3.hits, ==, 0);
 
-	 split10->balance = split00->balance;
-	 split11->balance = split01->balance;
-	 g_assert (xaccTransEqual (txn1, txn0, TRUE, TRUE, TRUE, TRUE));
+        split10->balance = split00->balance;
+        split11->balance = split01->balance;
+        g_assert (xaccTransEqual (txn1, txn0, TRUE, TRUE, TRUE, TRUE));
     }
     g_free (check3.msg);
     g_free (check2.msg);
@@ -985,7 +986,7 @@
     Transaction *txn = fixture->txn;
     QofInstance *inst = QOF_INSTANCE (txn);
     g_assert (xaccTransLookup (qof_instance_get_guid (inst),
-			       qof_instance_get_book (inst)) == txn);
+                               qof_instance_get_book (inst)) == txn);
 }
 /* xaccTransGetImbalanceValue
 gnc_numeric
@@ -997,7 +998,7 @@
     QofBook *book = qof_instance_get_book (QOF_INSTANCE (fixture->txn));
     Split *split1 = xaccMallocSplit (book);
     g_assert (gnc_numeric_equal (xaccTransGetImbalanceValue (fixture->txn),
-				  gnc_numeric_zero ()));
+                                 gnc_numeric_zero ()));
     split1->acc = fixture->acc1;
     split1->memo = CACHE_INSERT ("foo");
     split1->action = CACHE_INSERT ("bar");
@@ -1007,7 +1008,7 @@
     xaccSplitSetParent (split1, fixture->txn);
 
     g_assert (gnc_numeric_equal (xaccTransGetImbalanceValue (fixture->txn),
-				 split1->value));
+                                 split1->value));
     xaccTransCommitEdit (fixture->txn);
 }
 /* xaccTransGetImbalance
@@ -1035,11 +1036,11 @@
     g_assert_cmpint (g_list_length (mlist), ==, 1);
     xaccTransCommitEdit (fixture->txn);
     gnc_monetary_list_free (mlist);
- }
+}
 
 static void
 test_xaccTransGetImbalance_trading (Fixture *fixture,
-					       gconstpointer pData)
+                                    gconstpointer pData)
 {
     QofBook *book = qof_instance_get_book (QOF_INSTANCE (fixture->txn));
     Split *split1 = xaccMallocSplit (book);
@@ -1048,13 +1049,13 @@
     Account *acc2 = xaccMallocAccount (book);
     gnc_numeric value;
     gchar *trading_account_path = g_strdup_printf("%s/%s/%s", KVP_OPTION_PATH,
-						  OPTION_SECTION_ACCOUNTS,
-						  OPTION_NAME_TRADING_ACCOUNTS);
+                                  OPTION_SECTION_ACCOUNTS,
+                                  OPTION_NAME_TRADING_ACCOUNTS);
     MonetaryList *mlist;
 
     qof_book_set_string_option( book, trading_account_path, "t" );
     g_free (trading_account_path);
- /* Without trading splits, the list is unbalanced */
+    /* Without trading splits, the list is unbalanced */
     mlist = xaccTransGetImbalance (fixture->txn);
     g_assert_cmpint (g_list_length (mlist), ==, 2);
     gnc_monetary_list_free (mlist);
@@ -1063,9 +1064,9 @@
     xaccAccountSetCommodity (acc2, fixture->curr);
     xaccAccountSetType (acc1, ACCT_TYPE_TRADING);
     xaccAccountSetType (acc2, ACCT_TYPE_TRADING);
-/* The setup transaction is unbalanced in a trading-accounts environment. */
+    /* The setup transaction is unbalanced in a trading-accounts environment. */
     g_assert (!xaccTransIsBalanced (fixture->txn));
-/* Make it look like a proper trading accounts transactionm */
+    /* Make it look like a proper trading accounts transactionm */
     split1->acc = acc1;
     split1->memo = CACHE_INSERT ("foo");
     split1->action = CACHE_INSERT ("bar");
@@ -1099,7 +1100,7 @@
     xaccTransCommitEdit (fixture->txn);
     test_destroy (acc1);
     test_destroy (acc2);
- }
+}
 
 
 /* xaccTransIsBalanced
@@ -1123,7 +1124,7 @@
     xaccSplitSetParent (split1, fixture->txn);
     g_assert (! xaccTransIsBalanced (fixture->txn));
     xaccTransCommitEdit (fixture->txn);
- }
+}
 
 
 static void
@@ -1135,8 +1136,8 @@
     Account *acc1 = xaccMallocAccount (book);
     Account *acc2 = xaccMallocAccount (book);
     gchar *trading_account_path = g_strdup_printf("%s/%s/%s", KVP_OPTION_PATH,
-						  OPTION_SECTION_ACCOUNTS,
-						  OPTION_NAME_TRADING_ACCOUNTS);
+                                  OPTION_SECTION_ACCOUNTS,
+                                  OPTION_NAME_TRADING_ACCOUNTS);
 
     qof_book_set_string_option( book, trading_account_path, "t" );
     g_free (trading_account_path);
@@ -1144,7 +1145,7 @@
     xaccAccountSetCommodity (acc2, fixture->comm);
     xaccAccountSetType (acc1, ACCT_TYPE_TRADING);
     xaccAccountSetType (acc2, ACCT_TYPE_TRADING);
-/* The setup transaction is unbalanced in a trading-accounts environment. */
+    /* The setup transaction is unbalanced in a trading-accounts environment. */
     g_assert (!xaccTransIsBalanced (fixture->txn));
     split1->acc = acc1;
     split1->memo = CACHE_INSERT ("foo");
@@ -1179,12 +1180,12 @@
 static void
 test_xaccTransGetAccountValue (Fixture *fixture, gconstpointer pData)
 {
-     gnc_numeric val1 = {3200, 240}, val2 = {-3200, 240};
+    gnc_numeric val1 = {3200, 240}, val2 = {-3200, 240};
 
-     g_assert (gnc_numeric_zero_p (xaccTransGetAccountValue (fixture->txn, NULL)));
-     g_assert (gnc_numeric_zero_p (xaccTransGetAccountValue (NULL, fixture->acc1)));
-     g_assert (gnc_numeric_eq (xaccTransGetAccountValue (fixture->txn, fixture->acc1), val1));
-     g_assert (gnc_numeric_eq (xaccTransGetAccountValue (fixture->txn, fixture->acc2), val2));
+    g_assert (gnc_numeric_zero_p (xaccTransGetAccountValue (fixture->txn, NULL)));
+    g_assert (gnc_numeric_zero_p (xaccTransGetAccountValue (NULL, fixture->acc1)));
+    g_assert (gnc_numeric_eq (xaccTransGetAccountValue (fixture->txn, fixture->acc1), val1));
+    g_assert (gnc_numeric_eq (xaccTransGetAccountValue (fixture->txn, fixture->acc2), val2));
 
 }
 /* xaccTransGetAccountAmount
@@ -1194,12 +1195,12 @@
 static void
 test_xaccTransGetAccountAmount (Fixture *fixture, gconstpointer pData)
 {
-     gnc_numeric amt1 = {100000, 1000}, amt2 = {-3200, 240};
+    gnc_numeric amt1 = {100000, 1000}, amt2 = {-3200, 240};
 
-     g_assert (gnc_numeric_zero_p (xaccTransGetAccountAmount (fixture->txn, NULL)));
-     g_assert (gnc_numeric_zero_p (xaccTransGetAccountAmount (NULL, fixture->acc1)));
-     g_assert (gnc_numeric_eq (xaccTransGetAccountAmount (fixture->txn, fixture->acc1), amt1));
-     g_assert (gnc_numeric_eq (xaccTransGetAccountAmount (fixture->txn, fixture->acc2), amt2));
+    g_assert (gnc_numeric_zero_p (xaccTransGetAccountAmount (fixture->txn, NULL)));
+    g_assert (gnc_numeric_zero_p (xaccTransGetAccountAmount (NULL, fixture->acc1)));
+    g_assert (gnc_numeric_eq (xaccTransGetAccountAmount (fixture->txn, fixture->acc1), amt1));
+    g_assert (gnc_numeric_eq (xaccTransGetAccountAmount (fixture->txn, fixture->acc2), amt2));
 
 }
 /* xaccTransGetRateForCommodity
@@ -1211,27 +1212,27 @@
 static void
 test_xaccTransGetRateForCommodity (Fixture *fixture, gconstpointer pData)
 {
-     gnc_numeric rate = gnc_numeric_zero ();
-     QofBook *book = qof_instance_get_book (QOF_INSTANCE (fixture->txn));
-     Split *split0 = xaccMallocSplit (book);
-     Split *split1 = xaccTransFindSplitByAccount(fixture->txn, fixture->acc1);
-     g_assert (!xaccTransGetRateForCommodity (NULL, fixture->comm,
-					      split0, &rate));
-     g_assert (!xaccTransGetRateForCommodity (fixture->txn, NULL,
-					      split0, &rate));
-     g_assert (!xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
-					      NULL, &rate));
-     g_assert (xaccTransGetRateForCommodity (fixture->txn, fixture->curr,
-					      split0, &rate));
-     g_assert (gnc_numeric_equal (rate, gnc_numeric_create (1, 1)));
-     rate = gnc_numeric_zero ();
-     g_assert (!xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
-					      split0, &rate));
-     g_assert (gnc_numeric_zero_p (rate));
+    gnc_numeric rate = gnc_numeric_zero ();
+    QofBook *book = qof_instance_get_book (QOF_INSTANCE (fixture->txn));
+    Split *split0 = xaccMallocSplit (book);
+    Split *split1 = xaccTransFindSplitByAccount(fixture->txn, fixture->acc1);
+    g_assert (!xaccTransGetRateForCommodity (NULL, fixture->comm,
+              split0, &rate));
+    g_assert (!xaccTransGetRateForCommodity (fixture->txn, NULL,
+              split0, &rate));
+    g_assert (!xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
+              NULL, &rate));
+    g_assert (xaccTransGetRateForCommodity (fixture->txn, fixture->curr,
+                                            split0, &rate));
+    g_assert (gnc_numeric_equal (rate, gnc_numeric_create (1, 1)));
+    rate = gnc_numeric_zero ();
+    g_assert (!xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
+              split0, &rate));
+    g_assert (gnc_numeric_zero_p (rate));
 
-     g_assert (xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
-					      split1, &rate));
-     g_assert (gnc_numeric_equal (rate, gnc_numeric_create (1800, 240)));
+    g_assert (xaccTransGetRateForCommodity (fixture->txn, fixture->comm,
+                                            split1, &rate));
+    g_assert (gnc_numeric_equal (rate, gnc_numeric_create (1800, 240)));
 
 }
 /* xaccTransGetAccountConvRate
@@ -1244,25 +1245,25 @@
     gchar *msg1 = "[xaccTransGetAccountConvRate()] How can amount be nonzero and value be zero?";
     guint loglevel = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new ("gnc.engine", loglevel,
-						    msg1);
+                             msg1);
     Split *split1 = xaccTransFindSplitByAccount(fixture->txn, fixture->acc1);
     gnc_numeric rate;
 
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
 
-     g_assert (gnc_numeric_equal (xaccTransGetAccountConvRate (fixture->txn,
-							       fixture->acc2),
-				  gnc_numeric_create (1, 1)));
+    g_assert (gnc_numeric_equal (xaccTransGetAccountConvRate (fixture->txn,
+                                 fixture->acc2),
+                                 gnc_numeric_create (1, 1)));
 
-     g_assert (gnc_numeric_equal (xaccTransGetAccountConvRate (fixture->txn,
-							       fixture->acc1),
-				  gnc_numeric_create (1800, 240)));
-     g_assert_cmpint (check->hits, ==, 0);
-     split1->value = gnc_numeric_zero();
-     rate = xaccTransGetAccountConvRate (fixture->txn, fixture->acc1);
-     g_assert_cmpint (gnc_numeric_check (rate), ==, GNC_ERROR_ARG);
-     g_assert_cmpint (check->hits, ==, 1);
+    g_assert (gnc_numeric_equal (xaccTransGetAccountConvRate (fixture->txn,
+                                 fixture->acc1),
+                                 gnc_numeric_create (1800, 240)));
+    g_assert_cmpint (check->hits, ==, 0);
+    split1->value = gnc_numeric_zero();
+    rate = xaccTransGetAccountConvRate (fixture->txn, fixture->acc1);
+    g_assert_cmpint (gnc_numeric_check (rate), ==, GNC_ERROR_ARG);
+    g_assert_cmpint (check->hits, ==, 1);
 }
 /* xaccTransGetAccountBalance
 gnc_numeric
@@ -1280,12 +1281,12 @@
 #undef _func
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new ("gnc.engine", loglevel,
-						    msg1);
+                             msg1);
     Split *split1 = xaccTransFindSplitByAccount(fixture->txn, fixture->acc1);
     gnc_numeric rate;
 
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
 
     rate = xaccTransGetAccountBalance (NULL, fixture->acc1);
     g_assert_cmpint (gnc_numeric_check (rate), ==, GNC_ERROR_ARG);
@@ -1320,14 +1321,14 @@
     gnc_commodity *curr = gnc_commodity_new (book, "Japanese Yen", "CURRENCY", "JPY", "¥", 1);
     Split *split1 = xaccTransFindSplitByAccount (fixture->txn, fixture->acc1);
     gnc_numeric old_val = xaccSplitGetValue (split1);
-/* Prevent commit in xaccTransSetCurrency() */
+    /* Prevent commit in xaccTransSetCurrency() */
     xaccTransBeginEdit(fixture->txn);
     xaccTransSetCurrency (fixture->txn, curr);
     g_assert (fixture->txn->common_currency == curr);
     g_assert_cmpint (xaccSplitGetValue (split1).denom, ==,
-		     gnc_commodity_get_fraction (curr));
+                     gnc_commodity_get_fraction (curr));
     g_assert_cmpint (xaccSplitGetValue (split1).num, ==,
-		     old_val.num / old_val.denom);
+                     old_val.num / old_val.denom);
 }
 /* xaccTransBeginEdit
 void
@@ -1346,7 +1347,7 @@
     TestErrorStruct *check1 = test_error_struct_new (logdomain, loglevel, msg1);
     TestErrorStruct *check2 = test_error_struct_new (logdomain, loglevel, msg2);
     guint hdlr = g_log_set_handler (logdomain, loglevel,
-				    (GLogFunc)test_list_handler, NULL);
+                                    (GLogFunc)test_list_handler, NULL);
     test_add_error (check1);
     test_add_error (check2);
 
@@ -1389,8 +1390,8 @@
     test_clear_error_list ();
     test_error_struct_free (check1);
     test_error_struct_free (check2);
-/* qof_book_destroy has already removed enough of the innards that
-   trying to unref the txn and book crashes. */
+    /* qof_book_destroy has already removed enough of the innards that
+       trying to unref the txn and book crashes. */
 }
 /* xaccTransDestroy
 void
@@ -1452,9 +1453,9 @@
     Split *base_split = g_list_nth_data (base->txn->splits, 1);
     QofBook *book = qof_instance_get_book (base->txn);
     TestSignal sig = test_signal_new (QOF_INSTANCE (base->txn),
-				      QOF_EVENT_DESTROY, NULL);
+                                      QOF_EVENT_DESTROY, NULL);
     g_object_add_weak_pointer (G_OBJECT (base->txn->splits->data),
-			       (gpointer)&base_split);
+                               (gpointer)&base_split);
     g_object_ref (base->txn);
     g_object_ref (fixture->gains_txn);
 
@@ -1481,7 +1482,7 @@
     g_assert (!fixture->func->was_trans_emptied (fixture->txn));
     fixture->txn->splits = NULL;
     g_assert (fixture->func->was_trans_emptied (fixture->txn));
-/* Restore the list so teardown can free the splits */
+    /* Restore the list so teardown can free the splits */
     fixture->txn->splits = list;
 }
 /* trans_on_error
@@ -1500,14 +1501,14 @@
 {
     QofBackendError errcode = ERR_BACKEND_MODIFIED;
     gchar *msg =
-	"[trans_on_error()] Another user has modified this transaction\n"
-	"\tjust a moment ago. Please look at their changes,\n"
-	"\tand try again, if needed.\n";
+        "[trans_on_error()] Another user has modified this transaction\n"
+        "\tjust a moment ago. Please look at their changes,\n"
+        "\tand try again, if needed.\n";
     gchar *logdomain = "gnc.engine";
     guint loglevel = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
     TestErrorStruct *check = test_error_struct_new (logdomain, loglevel, msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-					   (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     gnc_engine_add_commit_error_callback ((EngineCommitErrorCallback)commit_error_cb, NULL);
     xaccTransBeginEdit (fixture->txn);
     g_assert_cmpint (qof_instance_get_editlevel (fixture->txn), ==, 1);
@@ -1530,17 +1531,17 @@
     Account *acct0 = split0->acc;
     Transaction *orig = NULL;
     TestSignal *sig_d_remove = test_signal_new (QOF_INSTANCE (destr_split),
-					      QOF_EVENT_REMOVE, NULL);
+                               QOF_EVENT_REMOVE, NULL);
     TestSignal *sig_b_remove = test_signal_new (QOF_INSTANCE (bogus_split),
-					      QOF_EVENT_REMOVE, NULL);
+                               QOF_EVENT_REMOVE, NULL);
     TestSignal *sig_d_destroy = test_signal_new (QOF_INSTANCE (destr_split),
-					      QOF_EVENT_DESTROY, NULL);
+                                QOF_EVENT_DESTROY, NULL);
     TestSignal *sig_b_modify = test_signal_new (QOF_INSTANCE (bogus_split),
-					      QOF_EVENT_MODIFY, NULL);
+                               QOF_EVENT_MODIFY, NULL);
     TestSignal *sig_t_modify = test_signal_new (QOF_INSTANCE (fixture->txn),
-					      QOF_EVENT_MODIFY, NULL);
+                               QOF_EVENT_MODIFY, NULL);
     TestSignal *sig_a_changed = test_signal_new (QOF_INSTANCE (acct0),
-					      GNC_EVENT_ITEM_CHANGED, NULL);
+                                GNC_EVENT_ITEM_CHANGED, NULL);
 
     xaccTransBeginEdit (fixture->txn);
     orig = fixture->txn->orig;
@@ -1608,18 +1609,18 @@
     Account *acc1 = xaccMallocAccount (book);
     Account *acc2 = xaccMallocAccount (book);
     gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand",
-					     "CURRENCY", "GNR", "", 240);
+                          "CURRENCY", "GNR", "", 240);
     gnc_commodity *comm = gnc_commodity_new (book, "Wildebeest Fund",
-					    "FUND", "WBFXX", "", 1000);
+                          "FUND", "WBFXX", "", 1000);
 
     Timespec posted = gnc_dmy2timespec (21, 4, 2012);
 
     TestSignal *sig_1_modify = test_signal_new (QOF_INSTANCE (split1),
-					      QOF_EVENT_MODIFY, NULL);
+                               QOF_EVENT_MODIFY, NULL);
     TestSignal *sig_2_modify = test_signal_new (QOF_INSTANCE (split2),
-					      QOF_EVENT_MODIFY, NULL);
+                               QOF_EVENT_MODIFY, NULL);
     TestSignal *sig_txn_destroy = test_signal_new (QOF_INSTANCE (txn),
-					      QOF_EVENT_DESTROY, NULL);
+                                  QOF_EVENT_DESTROY, NULL);
 
 
     xaccAccountSetCommodity (acc1, comm);
@@ -1641,13 +1642,13 @@
     txn->description = CACHE_INSERT ("Waldo Pepper");
     xaccTransBeginEdit (txn);
     {
-	 xaccTransSetCurrency (txn, curr);
-	 xaccSplitSetParent (split1, txn);
-	 xaccSplitSetParent (split2, txn);
-         /* xaccTransCommitEdit doesn't do anything with kvp
-	 kvp_frame_set_double (frame, "/qux/quux/corge", 123.456);
-	 qof_instance_set_slots (QOF_INSTANCE (txn), frame);
-	 */
+        xaccTransSetCurrency (txn, curr);
+        xaccSplitSetParent (split1, txn);
+        xaccSplitSetParent (split2, txn);
+        /* xaccTransCommitEdit doesn't do anything with kvp
+        kvp_frame_set_double (frame, "/qux/quux/corge", 123.456);
+         qof_instance_set_slots (QOF_INSTANCE (txn), frame);
+         */
     }
     /* Setup's done, now test: */
     xaccTransCommitEdit (txn);
@@ -1691,7 +1692,7 @@
     Timespec orig_entered = txn->date_entered;
     KvpFrame *base_frame = NULL;
     TestSignal *sig_account = test_signal_new (QOF_INSTANCE (fixture->acc1),
-					       GNC_EVENT_ITEM_CHANGED, NULL);
+                              GNC_EVENT_ITEM_CHANGED, NULL);
     MockBackend *mbe = (MockBackend*)qof_book_get_backend (book);
     Split *split_00 = txn->splits->data, *split_01 = txn->splits->next->data;
     Split *split_02 = xaccMallocSplit (book);
@@ -1737,9 +1738,9 @@
     g_assert_cmpuint (g_list_length (txn->splits), ==, 2);
     g_assert_cmpint (GPOINTER_TO_INT(split_02->memo), ==, 1);
     g_assert (xaccSplitEqual (txn->splits->data, split_10,
-			      FALSE, FALSE, FALSE));
+                              FALSE, FALSE, FALSE));
     g_assert (xaccSplitEqual (txn->splits->next->data, split_10,
-			      FALSE, FALSE, FALSE));
+                              FALSE, FALSE, FALSE));
     g_assert_cmpstr (mbe->last_call, ==, "rollback");
     g_assert_cmpuint (qof_instance_get_editlevel (QOF_INSTANCE (txn)), ==, 0);
     g_assert (qof_instance_get_destroying (txn) == FALSE);
@@ -1758,9 +1759,9 @@
     guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
     gchar *msg = "[xaccTransRollbackEdit()] Rollback Failed.  Ouch!";
     TestErrorStruct *check = test_error_struct_new ("gnc.engine",
-						    loglevel, msg);
+                             loglevel, msg);
     fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
-						 (GLogFunc)test_checked_handler);
+                     (GLogFunc)test_checked_handler);
     g_object_ref (fixture->txn);
     xaccTransBeginEdit (fixture->txn);
     mock_backend_set_error (mbe, ERR_BACKEND_MODIFIED);
@@ -1795,7 +1796,7 @@
     g_assert_cmpint (xaccTransOrder_num_action (NULL, NULL, txnA, NULL), ==, 1);
     g_assert_cmpint (xaccTransOrder_num_action (NULL, NULL, NULL, NULL), ==, 0);
     g_assert_cmpint (xaccTransOrder_num_action (txnA, NULL, txnB, NULL), ==,
-		     qof_instance_guid_compare (txnA, txnB));
+                     qof_instance_guid_compare (txnA, txnB));
     txnB->description = CACHE_INSERT ("Salt Peanuts");
     g_assert_cmpint (xaccTransOrder_num_action (txnA, NULL, txnB, NULL), >=, 1);
     txnB->date_entered.tv_sec += 1;
@@ -1870,7 +1871,7 @@
 static void
 test_xaccTransVoid (Fixture *fixture, gconstpointer pData)
 {
-/* Actual function variables start here. */
+    /* Actual function variables start here. */
     KvpFrame *frame = fixture->txn->inst.kvp_data;
     gchar *void_reason = "Voided for Unit Test";
     gchar *txn_notes = g_strdup (kvp_frame_get_string (frame, trans_notes_str));
@@ -1881,37 +1882,37 @@
 
     xaccTransVoid (fixture->txn, void_reason);
     g_assert_cmpstr (kvp_frame_get_string (frame, trans_notes_str), ==,
-		     "Voided transaction");
+                     "Voided transaction");
     g_assert_cmpstr (kvp_frame_get_string (frame, void_former_notes_str), ==,
-		     txn_notes);
+                     txn_notes);
     g_assert_cmpstr (kvp_frame_get_string (frame, void_reason_str), ==,
-		     void_reason);
+                     void_reason);
     gnc_timespec_to_iso8601_buff (now, iso8601_str);
     g_assert_cmpstr (kvp_frame_get_string (frame, void_time_str), ==,
-		     iso8601_str);
+                     iso8601_str);
     g_assert_cmpstr (kvp_frame_get_string (frame, TRANS_READ_ONLY_REASON), ==,
-		     "Transaction Voided");
+                     "Transaction Voided");
     for (split = fixture->txn->splits; split; split=g_list_next (split))
     {
-	g_assert (gnc_numeric_zero_p (((Split*)(split->data))->value));
-	g_assert (gnc_numeric_zero_p (((Split*)(split->data))->amount));
+        g_assert (gnc_numeric_zero_p (((Split*)(split->data))->value));
+        g_assert (gnc_numeric_zero_p (((Split*)(split->data))->amount));
     }
 
     xaccTransUnvoid (fixture->txn);
 
     g_assert_cmpstr (kvp_frame_get_string (frame, trans_notes_str), ==,
-		     txn_notes);
+                     txn_notes);
     g_assert (kvp_frame_get_slot (frame, void_former_notes_str) == NULL);
     g_assert (kvp_frame_get_slot (frame, void_reason_str) == NULL);
     g_assert (kvp_frame_get_slot (frame, void_time_str) == NULL);
     g_assert (kvp_frame_get_slot (frame, TRANS_READ_ONLY_REASON) == NULL);
     for (split = fixture->txn->splits; split; split=g_list_next (split))
     {
-	g_assert (!gnc_numeric_zero_p (((Split*)(split->data))->value));
-	g_assert (!gnc_numeric_zero_p (((Split*)(split->data))->amount));
+        g_assert (!gnc_numeric_zero_p (((Split*)(split->data))->value));
+        g_assert (!gnc_numeric_zero_p (((Split*)(split->data))->amount));
     }
 
-     g_free (txn_notes);
+    g_free (txn_notes);
 
 }
 /* xaccTransReverse
@@ -1926,24 +1927,24 @@
     GList *orig_splits = NULL, *rev_splits = NULL;
 
     g_assert (guid_equal (kvp_frame_get_guid (frame, TRANS_REVERSED_BY),
-			  xaccTransGetGUID (rev)));
+                          xaccTransGetGUID (rev)));
 
     g_assert (qof_instance_is_dirty (QOF_INSTANCE (rev)));
     g_assert_cmpint (g_list_length (fixture->txn->splits), ==,
-		     g_list_length (rev->splits));
+                     g_list_length (rev->splits));
     for (orig_splits = fixture->txn->splits,
-	     rev_splits = g_list_reverse (rev->splits);
-	 orig_splits && rev_splits;
-	 orig_splits = g_list_next (orig_splits),
-	     rev_splits = g_list_next (rev_splits))
+            rev_splits = g_list_reverse (rev->splits);
+            orig_splits && rev_splits;
+            orig_splits = g_list_next (orig_splits),
+            rev_splits = g_list_next (rev_splits))
     {
-	Split *orig_split = orig_splits->data;
-	Split *rev_split = rev_splits->data;
-	g_assert (gnc_numeric_equal (orig_split->amount,
-				     gnc_numeric_neg (rev_split->amount)));
-	g_assert (gnc_numeric_equal (orig_split->value,
-				     gnc_numeric_neg (rev_split->value)));
-	g_assert_cmpint (xaccSplitGetReconcile (rev_split), ==, NREC);
+        Split *orig_split = orig_splits->data;
+        Split *rev_split = rev_splits->data;
+        g_assert (gnc_numeric_equal (orig_split->amount,
+                                     gnc_numeric_neg (rev_split->amount)));
+        g_assert (gnc_numeric_equal (orig_split->value,
+                                     gnc_numeric_neg (rev_split->value)));
+        g_assert_cmpint (xaccSplitGetReconcile (rev_split), ==, NREC);
     }
 
     fixture->func->xaccFreeTransaction (rev);
@@ -1960,7 +1961,7 @@
 */
 static void
 test_xaccTransScrubGainsDate_no_dirty (GainsFixture *fixture,
-				       gconstpointer pData)
+                                       gconstpointer pData)
 {
     Split *base_split = g_list_nth_data (fixture->base.txn->splits, 1);
     Split *gains_split = base_split->gains_split;
@@ -1971,15 +1972,15 @@
     fixture->base.func->xaccTransScrubGainsDate (fixture->base.txn);
 
     g_assert (!timespec_equal (&(fixture->base.txn->date_posted),
-			      &(fixture->gains_txn->date_posted)));
+                               &(fixture->gains_txn->date_posted)));
     g_assert_cmphex (base_split->gains & GAINS_STATUS_DATE_DIRTY, ==, 0);
     g_assert_cmphex (base_split->gains_split->gains & GAINS_STATUS_DATE_DIRTY,
-		     ==, 0);
+                     ==, 0);
 }
 
 static void
 test_xaccTransScrubGainsDate_base_dirty (GainsFixture *fixture,
-				       gconstpointer pData)
+        gconstpointer pData)
 {
     Split *base_split = g_list_nth_data (fixture->base.txn->splits, 1);
     Split *gains_split = base_split->gains_split;
@@ -1990,15 +1991,15 @@
     fixture->base.func->xaccTransScrubGainsDate (fixture->base.txn);
 
     g_assert (timespec_equal (&(fixture->base.txn->date_posted),
-			      &(fixture->gains_txn->date_posted)));
+                              &(fixture->gains_txn->date_posted)));
     g_assert_cmphex (base_split->gains & GAINS_STATUS_DATE_DIRTY, ==, 0);
     g_assert_cmphex (base_split->gains_split->gains & GAINS_STATUS_DATE_DIRTY,
-		     ==, 0);
+                     ==, 0);
 }
 
 static void
 test_xaccTransScrubGainsDate_gains_dirty (GainsFixture *fixture,
-				       gconstpointer pData)
+        gconstpointer pData)
 {
     Split *base_split = g_list_nth_data (fixture->base.txn->splits, 1);
     Split *gains_split = base_split->gains_split;
@@ -2009,10 +2010,10 @@
     fixture->base.func->xaccTransScrubGainsDate (fixture->base.txn);
 
     g_assert (timespec_equal (&(fixture->base.txn->date_posted),
-			      &(fixture->gains_txn->date_posted)));
+                              &(fixture->gains_txn->date_posted)));
     g_assert_cmphex (base_split->gains & GAINS_STATUS_DATE_DIRTY, ==, 0);
     g_assert_cmphex (base_split->gains_split->gains & GAINS_STATUS_DATE_DIRTY,
-		     ==, 0);
+                     ==, 0);
 }
 
 /* xaccTransScrubGains Local: 1:0:0

Modified: gnucash/trunk/src/import-export/test/test-import-parse.c
===================================================================
--- gnucash/trunk/src/import-export/test/test-import-parse.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/import-export/test/test-import-parse.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -59,8 +59,8 @@
 
 static void
 run_check(GncImportFormat (*check_fcn)(const char*, GncImportFormat),
-const char *numbers[], GncImportFormat formats,
-const char* msg, GncImportFormat expected)
+          const char *numbers[], GncImportFormat formats,
+          const char* msg, GncImportFormat expected)
 {
     while (*numbers)
     {
@@ -77,14 +77,14 @@
     fmts = GNCIF_NUM_PERIOD | GNCIF_NUM_COMMA | GNCIF_DATE_MDY;
 
     run_check(gnc_import_test_numeric, period_numbers, fmts,
-    "Period numbers", GNCIF_NUM_PERIOD);
+              "Period numbers", GNCIF_NUM_PERIOD);
     run_check(gnc_import_test_numeric, comma_numbers, fmts,
-    "Comma numbers", GNCIF_NUM_COMMA);
+              "Comma numbers", GNCIF_NUM_COMMA);
 
     run_check(gnc_import_test_numeric, period_numbers_ambig, fmts,
-    "Ambiguous Period numbers", GNCIF_NUM_PERIOD | GNCIF_NUM_COMMA);
+              "Ambiguous Period numbers", GNCIF_NUM_PERIOD | GNCIF_NUM_COMMA);
     run_check(gnc_import_test_numeric, comma_numbers_ambig, fmts,
-    "Ambiguous Comma numbers", GNCIF_NUM_PERIOD | GNCIF_NUM_COMMA);
+              "Ambiguous Comma numbers", GNCIF_NUM_PERIOD | GNCIF_NUM_COMMA);
 }
 
 static void
@@ -100,9 +100,9 @@
     run_check(gnc_import_test_date, dates_dmy, fmts, "d/m/y dates", GNCIF_DATE_DMY);
 
     run_check(gnc_import_test_date, dates_yxx, fmts, "y/x/x dates",
-    GNCIF_DATE_YMD | GNCIF_DATE_YDM);
+              GNCIF_DATE_YMD | GNCIF_DATE_YDM);
     run_check(gnc_import_test_date, dates_xxy, fmts, "x/x/y dates",
-    GNCIF_DATE_DMY | GNCIF_DATE_MDY);
+              GNCIF_DATE_DMY | GNCIF_DATE_MDY);
 }
 
 static void

Modified: gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-gnc-date.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/libqof/qof/test/test-gnc-date.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -65,8 +65,8 @@
 {
     time64 secs[6] = {-43238956734LL, -1123692LL, 432761LL,
                       723349832LL, 887326459367LL,
-                     1364160236LL // This is "Sunday 2013-03-24" (to verify the Sunday
-                                  // difference between g_date_time and tm->tm_wday)
+                      1364160236LL // This is "Sunday 2013-03-24" (to verify the Sunday
+                      // difference between g_date_time and tm->tm_wday)
                      };
     guint ind;
 #ifdef __clang__
@@ -84,32 +84,32 @@
 
     for (ind = 0; ind < G_N_ELEMENTS (secs); ind++)
     {
-	struct tm* time = gnc_localtime (&secs[ind]);
-	GDateTime *gdt = gncdt.new_from_unix_local (secs[ind]);
-	if (gdt == NULL)
-	{
-	     g_assert (time == NULL);
-	     continue;
-	}
-	g_assert_cmpint (time->tm_year + 1900, ==, g_date_time_get_year (gdt));
-	g_assert_cmpint (time->tm_mon + 1, ==, g_date_time_get_month (gdt));
-	g_assert_cmpint (time->tm_mday, ==, g_date_time_get_day_of_month (gdt));
-	g_assert_cmpint (time->tm_hour, ==, g_date_time_get_hour (gdt));
-	g_assert_cmpint (time->tm_min, ==, g_date_time_get_minute (gdt));
-	g_assert_cmpint (time->tm_sec, ==, g_date_time_get_second (gdt));
+        struct tm* time = gnc_localtime (&secs[ind]);
+        GDateTime *gdt = gncdt.new_from_unix_local (secs[ind]);
+        if (gdt == NULL)
+        {
+            g_assert (time == NULL);
+            continue;
+        }
+        g_assert_cmpint (time->tm_year + 1900, ==, g_date_time_get_year (gdt));
+        g_assert_cmpint (time->tm_mon + 1, ==, g_date_time_get_month (gdt));
+        g_assert_cmpint (time->tm_mday, ==, g_date_time_get_day_of_month (gdt));
+        g_assert_cmpint (time->tm_hour, ==, g_date_time_get_hour (gdt));
+        g_assert_cmpint (time->tm_min, ==, g_date_time_get_minute (gdt));
+        g_assert_cmpint (time->tm_sec, ==, g_date_time_get_second (gdt));
         // Watch out: struct tm has wday=0..6 with Sunday=0, but GDateTime has wday=1..7 with Sunday=7.
         g_assert_cmpint (time->tm_wday, ==, (g_date_time_get_day_of_week (gdt) % 7));
-	g_assert_cmpint (time->tm_yday, ==, g_date_time_get_day_of_year (gdt));
-	if (g_date_time_is_daylight_savings (gdt))
-	    g_assert_cmpint (time->tm_isdst, ==, 1);
-	else
-	    g_assert_cmpint (time->tm_isdst, ==, 0);
+        g_assert_cmpint (time->tm_yday, ==, g_date_time_get_day_of_year (gdt));
+        if (g_date_time_is_daylight_savings (gdt))
+            g_assert_cmpint (time->tm_isdst, ==, 1);
+        else
+            g_assert_cmpint (time->tm_isdst, ==, 0);
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	g_assert_cmpint (time->tm_gmtoff, ==,
-	    g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND);
+        g_assert_cmpint (time->tm_gmtoff, ==,
+                         g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND);
 #endif
-	g_date_time_unref (gdt);
-	gnc_tm_free (time);
+        g_date_time_unref (gdt);
+        gnc_tm_free (time);
     }
     g_assert_cmpint (check.hits, ==, 1);
     g_log_set_default_handler (hdlr, NULL);
@@ -119,22 +119,24 @@
 test_gnc_gmtime (void)
 {
     time64 secs[6] = {-43238956734LL, -1123692LL, 432761LL,
-		      723349832LL, 887326459367LL, 1175964426LL};
-    struct tm answers[6] = {
+                      723349832LL, 887326459367LL, 1175964426LL
+                     };
+    struct tm answers[6] =
+    {
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	 { 6, 41, 2, 24, 9, -1301, 4, 297, 0, 0, NULL },
-	 { 48, 51, 23, 18, 11, 69, 4, 352, 0, 0, NULL },
-	 { 41, 12, 0, 6, 0, 70, 2, 6, 0, 0, NULL },
-	 { 32, 30, 2, 3, 11, 92, 4, 338, 0, 0, NULL },
-	 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
-	 { 6, 47, 16, 7, 3, 107, 6, 97, 0, 0, NULL },
+        { 6, 41, 2, 24, 9, -1301, 4, 297, 0, 0, NULL },
+        { 48, 51, 23, 18, 11, 69, 4, 352, 0, 0, NULL },
+        { 41, 12, 0, 6, 0, 70, 2, 6, 0, 0, NULL },
+        { 32, 30, 2, 3, 11, 92, 4, 338, 0, 0, NULL },
+        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
+        { 6, 47, 16, 7, 3, 107, 6, 97, 0, 0, NULL },
 #else
-	 { 6, 41, 2, 24, 9, -1301, 4, 297, 0 },
-	 { 48, 51, 23, 18, 11, 69, 4, 352, 0 },
-	 { 41, 12, 0, 6, 0, 70, 2, 6, 0 },
-	 { 32, 30, 2, 3, 11, 92, 4, 338, 0 },
-	 { 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-	 { 6, 47, 16, 7, 3, 107, 6, 97, 0 },
+        { 6, 41, 2, 24, 9, -1301, 4, 297, 0 },
+        { 48, 51, 23, 18, 11, 69, 4, 352, 0 },
+        { 41, 12, 0, 6, 0, 70, 2, 6, 0 },
+        { 32, 30, 2, 3, 11, 92, 4, 338, 0 },
+        { 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        { 6, 47, 16, 7, 3, 107, 6, 97, 0 },
 #endif
     };
     guint ind;
@@ -153,27 +155,27 @@
 
     for (ind = 0; ind < G_N_ELEMENTS (secs); ind++)
     {
-	struct tm* time = gnc_gmtime (&secs[ind]);
-	GDateTime *gdt = g_date_time_new_from_unix_utc (secs[ind]);
-	if (gdt == NULL)
-	{
-	     g_assert (time == NULL);
-	     continue;
-	}
-	g_assert_cmpint (time->tm_year, ==, answers[ind].tm_year);
-	g_assert_cmpint (time->tm_mon, ==, answers[ind].tm_mon);
-	g_assert_cmpint (time->tm_mday, ==, answers[ind].tm_mday);
-	g_assert_cmpint (time->tm_hour, ==, answers[ind].tm_hour);
-	g_assert_cmpint (time->tm_min, ==, answers[ind].tm_min);
-	g_assert_cmpint (time->tm_sec, ==, answers[ind].tm_sec);
-	g_assert_cmpint (time->tm_wday, ==, answers[ind].tm_wday);
-	g_assert_cmpint (time->tm_yday, ==, answers[ind].tm_yday);
-	    g_assert_cmpint (time->tm_isdst, ==, 0);
+        struct tm* time = gnc_gmtime (&secs[ind]);
+        GDateTime *gdt = g_date_time_new_from_unix_utc (secs[ind]);
+        if (gdt == NULL)
+        {
+            g_assert (time == NULL);
+            continue;
+        }
+        g_assert_cmpint (time->tm_year, ==, answers[ind].tm_year);
+        g_assert_cmpint (time->tm_mon, ==, answers[ind].tm_mon);
+        g_assert_cmpint (time->tm_mday, ==, answers[ind].tm_mday);
+        g_assert_cmpint (time->tm_hour, ==, answers[ind].tm_hour);
+        g_assert_cmpint (time->tm_min, ==, answers[ind].tm_min);
+        g_assert_cmpint (time->tm_sec, ==, answers[ind].tm_sec);
+        g_assert_cmpint (time->tm_wday, ==, answers[ind].tm_wday);
+        g_assert_cmpint (time->tm_yday, ==, answers[ind].tm_yday);
+        g_assert_cmpint (time->tm_isdst, ==, 0);
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	g_assert_cmpint (time->tm_gmtoff, ==, 0);
+        g_assert_cmpint (time->tm_gmtoff, ==, 0);
 #endif
-	g_date_time_unref (gdt);
-	gnc_tm_free (time);
+        g_date_time_unref (gdt);
+        gnc_tm_free (time);
     }
     g_assert_cmpint (check.hits, ==, 1);
     g_log_set_default_handler (hdlr, NULL);
@@ -182,57 +184,60 @@
 static void
 test_gnc_mktime (void)
 {
-    struct {
-	time64 secs;
-	gint wday;
-	gint yday;
-    } ans[5] = {
-	{ -43238956734LL, 4, 297 },
-	{ -1123692LL, 4, 352 },
-	{ 432761LL, 2, 6 },
-	{ 723349832LL, 4, 338 },
-	{ 1175964426LL, 6, 97 }
+    struct
+    {
+        time64 secs;
+        gint wday;
+        gint yday;
+    } ans[5] =
+    {
+        { -43238956734LL, 4, 297 },
+        { -1123692LL, 4, 352 },
+        { 432761LL, 2, 6 },
+        { 723349832LL, 4, 338 },
+        { 1175964426LL, 6, 97 }
     };
 
-    struct tm time[5] = {
+    struct tm time[5] =
+    {
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	{ 6, 41, 2, 24, 9, -1301, 0, 0, -1, 0, NULL },
-	{ 48, 51, 23, 18, 11, 69, 0, 0, -1, 0, NULL },
-	{ 41, 12, 0, 6, 0, 70, 0, 0, -1, 0, NULL },
-	{ 32, 30, 2, 3, 11, 92, 0, 0, -1, 0, NULL },
-	{ 6, 47, 16, 7, 3, 107, 0, 0, -1, 0, NULL },
+        { 6, 41, 2, 24, 9, -1301, 0, 0, -1, 0, NULL },
+        { 48, 51, 23, 18, 11, 69, 0, 0, -1, 0, NULL },
+        { 41, 12, 0, 6, 0, 70, 0, 0, -1, 0, NULL },
+        { 32, 30, 2, 3, 11, 92, 0, 0, -1, 0, NULL },
+        { 6, 47, 16, 7, 3, 107, 0, 0, -1, 0, NULL },
 #else
-	{ 6, 41, 2, 24, 9, -1301, 0, 0, -1 },
-	{ 48, 51, 23, 18, 11, 69, 0, 0, -1 },
-	{ 41, 12, 0, 6, 0, 70, 0, 0, -1 },
-	{ 32, 30, 2, 3, 11, 92, 0, 0, -1 },
-	{ 6, 47, 16, 7, 3, 107, 0, 0, -1 },
+        { 6, 41, 2, 24, 9, -1301, 0, 0, -1 },
+        { 48, 51, 23, 18, 11, 69, 0, 0, -1 },
+        { 41, 12, 0, 6, 0, 70, 0, 0, -1 },
+        { 32, 30, 2, 3, 11, 92, 0, 0, -1 },
+        { 6, 47, 16, 7, 3, 107, 0, 0, -1 },
 #endif
     };
     guint ind;
 
     for (ind = 0; ind < G_N_ELEMENTS (time); ind++)
     {
-	time64 secs = gnc_mktime (&time[ind]);
-	GDateTime *gdt = gncdt.new_local (time[ind].tm_year + 1900,
-					  time[ind].tm_mon + 1,
-					  time[ind].tm_mday,
-					  time[ind].tm_hour,
-					  time[ind].tm_min,
-					  (gdouble)time[ind].tm_sec);
-	time64 offset = g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND;
-	g_assert_cmpint (secs, ==, ans[ind].secs - offset);
-	g_assert_cmpint (time[ind].tm_wday, ==, ans[ind].wday);
-	g_assert_cmpint (time[ind].tm_yday, ==, ans[ind].yday);
-	if (g_date_time_is_daylight_savings (gdt))
-	    g_assert_cmpint (time[ind].tm_isdst, ==, 1);
-	else
-	    g_assert_cmpint (time[ind].tm_isdst, ==, 0);
+        time64 secs = gnc_mktime (&time[ind]);
+        GDateTime *gdt = gncdt.new_local (time[ind].tm_year + 1900,
+                                          time[ind].tm_mon + 1,
+                                          time[ind].tm_mday,
+                                          time[ind].tm_hour,
+                                          time[ind].tm_min,
+                                          (gdouble)time[ind].tm_sec);
+        time64 offset = g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND;
+        g_assert_cmpint (secs, ==, ans[ind].secs - offset);
+        g_assert_cmpint (time[ind].tm_wday, ==, ans[ind].wday);
+        g_assert_cmpint (time[ind].tm_yday, ==, ans[ind].yday);
+        if (g_date_time_is_daylight_savings (gdt))
+            g_assert_cmpint (time[ind].tm_isdst, ==, 1);
+        else
+            g_assert_cmpint (time[ind].tm_isdst, ==, 0);
 
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	g_assert_cmpint (time[ind].tm_gmtoff, ==, offset);
+        g_assert_cmpint (time[ind].tm_gmtoff, ==, offset);
 #endif
-	g_date_time_unref (gdt);
+        g_date_time_unref (gdt);
     }
 }
 
@@ -243,60 +248,66 @@
 static void
 test_gnc_mktime_normalization (void)
 {
-     struct answer {
-	  time64 secs;
-	  gint wday;
-	  gint yday;
+    struct answer
+    {
+        time64 secs;
+        gint wday;
+        gint yday;
     } ans = { 723349832LL, 4, 338 };
 
     struct tm normal_time =
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	 { 32, 30, 2, 3, 11, 92, 0, 0, -1, 0, NULL };
+    {
+        32, 30, 2, 3, 11, 92, 0, 0, -1, 0, NULL
+    };
 #else
-         { 32, 30, 2, 3, 11, 92, 0, 0, -1 };
+    {
+        32, 30, 2, 3, 11, 92, 0, 0, -1
+    };
 #endif
 
-    struct tm time[4] = {
+    struct tm time[4] =
+    {
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	 { 92, -31, 27, -29, 24, 91, 0, 0, -1, 0, NULL },
-	 { -28, 91, -47, 35, -2, 93, 0, 0, -1, 0, NULL },
-	 { -28, 91, -47, 66, -3, 93, 0, 0, -1, 0, NULL },
-	 { -28, 91, -47, 35, -26, 95, 0, 0, -1, 0, NULL },
+        { 92, -31, 27, -29, 24, 91, 0, 0, -1, 0, NULL },
+        { -28, 91, -47, 35, -2, 93, 0, 0, -1, 0, NULL },
+        { -28, 91, -47, 66, -3, 93, 0, 0, -1, 0, NULL },
+        { -28, 91, -47, 35, -26, 95, 0, 0, -1, 0, NULL },
 #else
-	 { 92, -31, 27, -29, 24, 91, 0, 0, -1 },
-	 { -28, 91, -47, 35, -2, 93, 0, 0, -1 },
-	 { -28, 91, -47, 66, -3, 93, 0, 0, -1 },
-	 { -28, 91, -47, 35, -26, 95, 0, 0, -1 },
+        { 92, -31, 27, -29, 24, 91, 0, 0, -1 },
+        { -28, 91, -47, 35, -2, 93, 0, 0, -1 },
+        { -28, 91, -47, 66, -3, 93, 0, 0, -1 },
+        { -28, 91, -47, 35, -26, 95, 0, 0, -1 },
 #endif
     };
     guint ind;
     for (ind = 0; ind < G_N_ELEMENTS (time); ind++)
     {
-	 time64 secs = gnc_mktime (&time[ind]);
-	 GDateTime *gdt = gncdt.new_local (time[ind].tm_year + 1900,
-					  time[ind].tm_mon + 1,
-					  time[ind].tm_mday,
-					  time[ind].tm_hour,
-					  time[ind].tm_min,
-					  (gdouble)time[ind].tm_sec);
-	 time64 offset = g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND;
-	 g_assert_cmpfloat (time[ind].tm_sec, ==, normal_time.tm_sec);
-	 g_assert_cmpint (time[ind].tm_min, ==, normal_time.tm_min);
-	 g_assert_cmpint (time[ind].tm_hour, ==, normal_time.tm_hour);
-	 g_assert_cmpint (time[ind].tm_mday, ==, normal_time.tm_mday);
-	 g_assert_cmpint (time[ind].tm_mon, ==, normal_time.tm_mon);
-	 g_assert_cmpint (time[ind].tm_year, ==, normal_time.tm_year);
-	 g_assert_cmpint (secs, ==, ans.secs - offset);
-	 g_assert_cmpint (time[ind].tm_wday, ==, ans.wday);
-	 g_assert_cmpint (time[ind].tm_yday, ==, ans.yday);
-	if (g_date_time_is_daylight_savings (gdt))
-	    g_assert_cmpint (time[ind].tm_isdst, ==, 1);
-	else
-	    g_assert_cmpint (time[ind].tm_isdst, ==, 0);
+        time64 secs = gnc_mktime (&time[ind]);
+        GDateTime *gdt = gncdt.new_local (time[ind].tm_year + 1900,
+                                          time[ind].tm_mon + 1,
+                                          time[ind].tm_mday,
+                                          time[ind].tm_hour,
+                                          time[ind].tm_min,
+                                          (gdouble)time[ind].tm_sec);
+        time64 offset = g_date_time_get_utc_offset (gdt) / G_TIME_SPAN_SECOND;
+        g_assert_cmpfloat (time[ind].tm_sec, ==, normal_time.tm_sec);
+        g_assert_cmpint (time[ind].tm_min, ==, normal_time.tm_min);
+        g_assert_cmpint (time[ind].tm_hour, ==, normal_time.tm_hour);
+        g_assert_cmpint (time[ind].tm_mday, ==, normal_time.tm_mday);
+        g_assert_cmpint (time[ind].tm_mon, ==, normal_time.tm_mon);
+        g_assert_cmpint (time[ind].tm_year, ==, normal_time.tm_year);
+        g_assert_cmpint (secs, ==, ans.secs - offset);
+        g_assert_cmpint (time[ind].tm_wday, ==, ans.wday);
+        g_assert_cmpint (time[ind].tm_yday, ==, ans.yday);
+        if (g_date_time_is_daylight_savings (gdt))
+            g_assert_cmpint (time[ind].tm_isdst, ==, 1);
+        else
+            g_assert_cmpint (time[ind].tm_isdst, ==, 0);
 #ifdef HAVE_STRUCT_TM_GMTOFF
-	g_assert_cmpint (time[ind].tm_gmtoff, ==, offset);
+        g_assert_cmpint (time[ind].tm_gmtoff, ==, offset);
 #endif
-	g_date_time_unref (gdt);
+        g_date_time_unref (gdt);
     }
 }
 
@@ -304,16 +315,17 @@
 test_gnc_ctime (void)
 {
     time64 secs[5] = {-43238956734LL, -1123692LL, 432761LL,
-		      723349832LL, 1175964426LL};
+                      723349832LL, 1175964426LL
+                     };
     guint ind;
     for (ind = 0; ind < G_N_ELEMENTS (secs); ind++)
     {
-	GDateTime *gdt = gncdt.new_from_unix_local (secs[ind]);
-	gchar* datestr = gnc_ctime (&secs[ind]);
+        GDateTime *gdt = gncdt.new_from_unix_local (secs[ind]);
+        gchar* datestr = gnc_ctime (&secs[ind]);
         g_assert_cmpstr (datestr, ==,
-                     g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y"));
-	g_date_time_unref (gdt);
-	g_free (datestr);
+                         g_date_time_format (gdt, "%a %b %e %H:%M:%S %Y"));
+        g_date_time_unref (gdt);
+        g_free (datestr);
     }
 }
 
@@ -427,17 +439,17 @@
 {
     gchar *suffixes[] = {"utf8", "UTF-8"};
     guint i;
-/* Msys defines a different set of locales */
+    /* Msys defines a different set of locales */
 #ifdef G_OS_WIN32
     if (g_strcmp0 (locale, "en_US") == 0
-	&& setlocale (category, "English_US"))
-	return;
+            && setlocale (category, "English_US"))
+        return;
     if (g_strcmp0 (locale, "en_GB") == 0
-	&& setlocale (category, "English_UK"))
-	return;
+            && setlocale (category, "English_UK"))
+        return;
     if (g_strcmp0 (locale, "fr_FR") == 0
-	&& setlocale (category, "French_France"))
-	return;
+            && setlocale (category, "French_France"))
+        return;
 
 #endif
     if (setlocale (category, locale) != NULL)
@@ -596,14 +608,14 @@
     tt = timespec_diff (&tf, &th);
     if (sizeof (glong) > 4)
     {
-	glong nsec_diff_norm = 2 * nsec3 - 2 * NANOS_PER_SECOND - NANOS_PER_SECOND;
-	g_assert_cmpint (tt.tv_sec, ==, secs2 - secs1 + 2);
-	g_assert_cmpint (tt.tv_nsec, ==,  nsec_diff_norm);
+        glong nsec_diff_norm = 2 * nsec3 - 2 * NANOS_PER_SECOND - NANOS_PER_SECOND;
+        g_assert_cmpint (tt.tv_sec, ==, secs2 - secs1 + 2);
+        g_assert_cmpint (tt.tv_nsec, ==,  nsec_diff_norm);
     }
     else
     {
-	g_assert_cmpint (tt.tv_sec, ==, secs2 - secs1 - 3);
-	g_assert_cmpint (tt.tv_nsec, <, 0); /* Overflow nanosecs */
+        g_assert_cmpint (tt.tv_sec, ==, secs2 - secs1 - 3);
+        g_assert_cmpint (tt.tv_nsec, <, 0); /* Overflow nanosecs */
     }
     tt = timespec_diff (&tg, &td);
     g_assert_cmpint (tt.tv_sec, ==, -secs2 - secs3 + 1);
@@ -694,7 +706,7 @@
     g_assert_cmpint (na.tv_sec, ==, ra.tv_sec);
     g_assert_cmpint (nb.tv_sec, ==, rb.tv_sec);
     g_assert_cmpint (nc.tv_sec, ==, rc.tv_sec);
- }
+}
 
 /* gnc_date_get_last_mday
 int gnc_date_get_last_mday (int month, int year)// C: 1  Local: 1:0:0
@@ -808,7 +820,7 @@
     gchar *locale = g_strdup (setlocale (LC_TIME, NULL));
     struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0
 #ifdef HAVE_STRUCT_TM_GMTOFF
-                     , 0, 0
+        , 0, 0
 #endif
     };
 
@@ -851,11 +863,11 @@
     g_assert_cmpstr (buff, ==, "1974-11-23");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), 2, 2, 1961),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "1961-02-02");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), 16, 6, 2045),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "2045-06-16");
 
     qof_date_format_set (QOF_DATE_FORMAT_LOCALE);
@@ -864,8 +876,8 @@
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
 
 
@@ -873,16 +885,16 @@
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     tm_set_dmy (&tm, 2045, 6, 16);
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
 
     test_gnc_setlocale (LC_TIME, "en_GB");
@@ -890,23 +902,23 @@
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
     tm_set_dmy (&tm, 1961, 2, 2);
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     tm_set_dmy (&tm, 2045, 6, 16);
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
 
     test_gnc_setlocale (LC_TIME, "fr_FR");
@@ -914,23 +926,23 @@
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
     tm_set_dmy (&tm, 1961, 2, 2);
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     tm_set_dmy (&tm, 2045, 6, 16);
     strftime(t_buff, MAX_DATE_LENGTH, GNC_D_FMT, &tm);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_dmy_buff (buff, sizeof (buff), tm.tm_mday,
-					      tm.tm_mon + 1, tm.tm_year + 1900),
-		     ==, strlen (buff));
+                     tm.tm_mon + 1, tm.tm_year + 1900),
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, t_buff);
 
     setlocale (LC_TIME, locale);
@@ -977,105 +989,105 @@
     qof_date_format_set (QOF_DATE_FORMAT_UK);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "23/11/1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02/02/1961");
 
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "16/06/2045");
 
     qof_date_format_set (QOF_DATE_FORMAT_CE);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "23.11.1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02.02.1961");
 
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "16.06.2045");
 
     qof_date_format_set (QOF_DATE_FORMAT_US);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "11/23/1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02/02/1961");
 
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "06/16/2045");
 
     qof_date_format_set (QOF_DATE_FORMAT_ISO);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "1974-11-23");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "1961-02-02");
 
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "2045-06-16");
 
     qof_date_format_set (QOF_DATE_FORMAT_LOCALE);
     test_gnc_setlocale (LC_TIME, "en_US");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd1, GNC_D_FMT));
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd2, GNC_D_FMT));
 
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd3, GNC_D_FMT));
 
     test_gnc_setlocale (LC_TIME, "en_GB");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd1, GNC_D_FMT));
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd2, GNC_D_FMT));
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd3, GNC_D_FMT));
 
     test_gnc_setlocale (LC_TIME, "fr_FR");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd1, GNC_D_FMT));
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd2, GNC_D_FMT));
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_date_buff (buff, sizeof (buff), tm3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, g_date_time_format (gd3, GNC_D_FMT));
 
     setlocale (LC_TIME, locale);
@@ -1100,59 +1112,59 @@
     qof_date_format_set (QOF_DATE_FORMAT_UK);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "23/11/1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02/02/1961");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "16/06/2045");
 
     qof_date_format_set (QOF_DATE_FORMAT_CE);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "23.11.1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02.02.1961");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "16.06.2045");
 
 
     qof_date_format_set (QOF_DATE_FORMAT_US);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "11/23/1974");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "02/02/1961");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "06/16/2045");
 
 
     qof_date_format_set (QOF_DATE_FORMAT_ISO);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "1974-11-23");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "1961-02-02");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_assert_cmpstr (buff, ==, "2045-06-16");
 
 
@@ -1160,34 +1172,34 @@
     test_gnc_setlocale (LC_TIME, "en_US");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd1);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd2);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd3);
     g_assert_cmpstr (buff, ==, t_buff);
 
     test_gnc_setlocale (LC_TIME, "en_GB");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd1);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd2);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd3);
     g_assert_cmpstr (buff, ==, t_buff);
 
@@ -1195,17 +1207,17 @@
     test_gnc_setlocale (LC_TIME, "fr_FR");
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd1),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd1);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd2),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd2);
     g_assert_cmpstr (buff, ==, t_buff);
     memset ((gpointer)buff, 0, sizeof (buff));
     g_assert_cmpint (qof_print_gdate (buff, sizeof (buff), gd3),
-		     ==, strlen (buff));
+                     ==, strlen (buff));
     g_date_strftime (t_buff, MAX_DATE_LENGTH, GNC_D_FMT, gd3);
     g_assert_cmpstr (buff, ==, t_buff);
 
@@ -1279,25 +1291,25 @@
     test_assert_qof_print_date (tm1,
                                 g_date_time_format (gd1, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm2,
-                                g_date_time_format (gd2, GNC_D_FMT));
+            g_date_time_format (gd2, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm3,
-                                    g_date_time_format (gd3, GNC_D_FMT));
+            g_date_time_format (gd3, GNC_D_FMT));
 
     test_gnc_setlocale (LC_TIME, "en_GB");
     test_assert_qof_print_date (tm1,
                                 g_date_time_format (gd1, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm2,
-                                g_date_time_format (gd2, GNC_D_FMT));
+            g_date_time_format (gd2, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm3,
-                                    g_date_time_format (gd3, GNC_D_FMT));
+            g_date_time_format (gd3, GNC_D_FMT));
 
     test_gnc_setlocale (LC_TIME, "fr_FR");
     test_assert_qof_print_date (tm1,
                                 g_date_time_format (gd1, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm2,
-                                g_date_time_format (gd2, GNC_D_FMT));
+            g_date_time_format (gd2, GNC_D_FMT));
     test_assert_qof_print_date_outside_range (tm3,
-                                    g_date_time_format (gd3, GNC_D_FMT));
+            g_date_time_format (gd3, GNC_D_FMT));
 
     setlocale (LC_TIME, locale);
     g_free (locale);
@@ -1403,7 +1415,7 @@
     gint month = g_date_time_get_month (gdt);
     struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0
 #ifndef G_OS_WIN32
-                     , 0, 0
+        , 0, 0
 #endif
     };
     gchar buff[MAX_DATE_LENGTH];
@@ -1430,7 +1442,7 @@
     g_assert_cmpint (mo, ==, 6);
     g_assert_cmpint (yr, ==, 2045);
 
-   qof_date_format_set (QOF_DATE_FORMAT_US);
+    qof_date_format_set (QOF_DATE_FORMAT_US);
     g_assert (qof_scan_date ("11/23/1974", &day, &mo, &yr));
     g_assert_cmpint (day, ==, 23);
     g_assert_cmpint (mo, ==, 11);
@@ -1470,14 +1482,14 @@
 
     if (month < 10) /* Sliding window won't test well after October */
     {
-	qof_date_completion_set (QOF_DATE_COMPLETION_SLIDING, month + 1);
+        qof_date_completion_set (QOF_DATE_COMPLETION_SLIDING, month + 1);
 
-	g_assert (qof_scan_date ("12-23", &day, &mo, &yr));
-	g_assert_cmpint (day, ==, 23);
-	g_assert_cmpint (mo, ==, 12);
-	g_assert_cmpint (yr, ==, year - 1);
+        g_assert (qof_scan_date ("12-23", &day, &mo, &yr));
+        g_assert_cmpint (day, ==, 23);
+        g_assert_cmpint (mo, ==, 12);
+        g_assert_cmpint (yr, ==, year - 1);
 
-	qof_date_completion_set (QOF_DATE_COMPLETION_THISYEAR, 0);
+        qof_date_completion_set (QOF_DATE_COMPLETION_THISYEAR, 0);
     }
 
     qof_date_format_set (QOF_DATE_FORMAT_UK);
@@ -1510,9 +1522,9 @@
     g_assert (qof_scan_date (buff, &day, &mo, &yr));
     g_assert_cmpint (day, ==, tm.tm_mday);
     g_assert_cmpint (mo, ==, tm.tm_mon + 1);
-/* Some locale date formats result in a 2-digit year, which strptime
- * interprets as being in the current century.
- */
+    /* Some locale date formats result in a 2-digit year, which strptime
+     * interprets as being in the current century.
+     */
     g_assert_cmpint (yr % 100, ==, tm.tm_year % 100);
 
     tm_set_dmy (&tm, 2045, 6, 16);
@@ -1680,8 +1692,8 @@
     gchar *tz = g_date_time_format (ngdt, "%z");
 #endif
     gchar *retval = g_strdup_printf ("%s:%02d.%06d %s", date_base,
-			      g_date_time_get_second (ngdt),
-			      g_date_time_get_microsecond (ngdt), tz);
+                                     g_date_time_get_second (ngdt),
+                                     g_date_time_get_microsecond (ngdt), tz);
     g_date_time_unref (ngdt);
     g_free (date_base);
     g_free (tz);
@@ -1716,7 +1728,7 @@
 #undef _func
     TestErrorStruct check = { loglevel, logdomain, msg, 0 };
     GLogFunc oldlogger = g_log_set_default_handler ((GLogFunc)test_null_handler,
-						    &check);
+                         &check);
     g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler, &check);
 
     memset (buff, 0, sizeof buff);
@@ -1845,7 +1857,7 @@
     gdt_local = gncdt.to_local (gdt5);
     g_date_time_get_ymd (gdt_local, &yr, &mo, &day);
     g_date_time_unref (gdt_local);
-/* 2038 Bug */
+    /* 2038 Bug */
     g_assert_cmpint (r_day, ==, day);
     g_assert_cmpint (r_mo, ==, mo);
     g_assert_cmpint (r_yr, ==, yr);
@@ -2057,7 +2069,7 @@
     g_date_time_unref (gdt_local);
     g_date_set_dmy (&date2, day, mon, yr);
     g_assert_cmpint (g_date_get_julian (&date1),
-			 ==, g_date_get_julian (&date2));
+                     ==, g_date_get_julian (&date2));
 
     g_date_time_unref (gdt0);
     g_date_time_unref (gdt1);
@@ -2162,7 +2174,7 @@
     gdt_day_begin = gncdt.new_local (yr, mon, day, 0, 0, 0);
     t_time = g_date_time_to_unix (gdt_day_begin);
     r_time = gnc_time64_get_day_start (time);
-/* This will work in the half of the world where localtime is later than UTC */
+    /* This will work in the half of the world where localtime is later than UTC */
     g_assert_cmpint (t_time, ==, r_time);
 
     gdt_local = gncdt.to_local (gdt1);
@@ -2357,7 +2369,7 @@
 void
 test_suite_gnc_date (void)
 {
-     _gnc_date_time_init (&gncdt);
+    _gnc_date_time_init (&gncdt);
 
 
     GNC_TEST_ADD_FUNC (suitename, "gnc localtime", test_gnc_localtime);

Modified: gnucash/trunk/src/libqof/qof/test/test-qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofbook.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/libqof/qof/test/test-qofbook.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -432,7 +432,7 @@
 
     /* create correct slot path */
     slot_path = (const char *) g_strconcat( KVP_OPTION_PATH, "/",
-            OPTION_SECTION_ACCOUNTS, "/", OPTION_NAME_NUM_FIELD_SOURCE, NULL );
+                                            OPTION_SECTION_ACCOUNTS, "/", OPTION_NAME_NUM_FIELD_SOURCE, NULL );
     g_assert( slot_path != NULL );
 
     g_test_message( "Testing default: No selection has been specified" );
@@ -610,7 +610,7 @@
     G_GNUC_UNUSED QofCollection *m_col, *m_col2;
     QofIdType my_type = "my_type", my_type2 = "my_type2";
     guint param = (guint) g_test_rand_int();
-/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
+    /* GLib assertion messages which aren't filtered to make clang's output like gcc's */
 #ifdef __clang__
 #define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
 #else

Modified: gnucash/trunk/src/test-core/unittest-support.c
===================================================================
--- gnucash/trunk/src/test-core/unittest-support.c	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/test-core/unittest-support.c	2013-10-31 22:23:28 UTC (rev 23359)
@@ -35,10 +35,10 @@
 static TestStruct tdata;
 static gboolean
 test_checked_nohit_handler (const char *log_domain, GLogLevelFlags log_level,
-			    const gchar *msg, gpointer user_data);
+                            const gchar *msg, gpointer user_data);
 static gboolean
 test_list_nohit_handler (const char *log_domain, GLogLevelFlags log_level,
-			 const gchar *msg, gpointer user_data);
+                         const gchar *msg, gpointer user_data);
 
 TestErrorStruct*
 test_error_struct_new (gchar *log_domain, GLogLevelFlags log_level, gchar *msg)
@@ -64,21 +64,21 @@
     TestLogHandler *hdlr = g_slice_new0 (TestLogHandler);
     hdlr->error = error;
     hdlr->handler = g_log_set_handler (error->log_domain, error->log_level,
-				       handler, error);
+                                       handler, error);
     return g_slist_prepend (list, hdlr);
 }
 
 GSList*
 test_log_set_fatal_handler (GSList *list, TestErrorStruct *error,
-			    GLogFunc handler)
+                            GLogFunc handler)
 {
     TestLogHandler *hdlr = g_slice_new0 (TestLogHandler);
     GTestLogFatalFunc f_hdlr = handler == (GLogFunc)test_list_handler ?
-	(GTestLogFatalFunc)test_list_nohit_handler :
-	(GTestLogFatalFunc)test_checked_nohit_handler;
+                               (GTestLogFatalFunc)test_list_nohit_handler :
+                               (GTestLogFatalFunc)test_checked_nohit_handler;
     hdlr->error = error;
     hdlr->handler = g_log_set_handler (error->log_domain, error->log_level,
-				       handler, error);
+                                       handler, error);
     g_test_log_set_fatal_handler (f_hdlr, error);
     return g_slist_prepend (list, hdlr);
 }
@@ -144,7 +144,7 @@
 
 static gboolean
 do_test_list_handler (const char *log_domain, GLogLevelFlags log_level,
-		      const gchar *msg, gpointer user_data, gboolean hits)
+                      const gchar *msg, gpointer user_data, gboolean hits)
 {
     GList *list = g_list_first (message_queue);
     const guint fatal = G_LOG_FLAG_FATAL;
@@ -155,11 +155,11 @@
         if (!g_strcmp0 (log_domain, error->log_domain)
                 && ((log_level | fatal) == (error->log_level | fatal))
                 && !g_strcmp0 (msg, error->msg))
-	{
-	    if (hits)
-		++(error->hits);
+        {
+            if (hits)
+                ++(error->hits);
             return FALSE;
-	}
+        }
         list = g_list_next (list);
     }
     /* No list or no matches, fall through */
@@ -168,21 +168,21 @@
 
 gboolean
 test_list_handler (const char *log_domain, GLogLevelFlags log_level,
-		      const gchar *msg, gpointer user_data)
+                   const gchar *msg, gpointer user_data)
 {
     return do_test_list_handler (log_domain, log_level, msg, user_data, TRUE);
 }
 
 gboolean
 test_list_nohit_handler (const char *log_domain, GLogLevelFlags log_level,
-			 const gchar *msg, gpointer user_data)
+                         const gchar *msg, gpointer user_data)
 {
     return do_test_list_handler (log_domain, log_level, msg, user_data, FALSE);
 }
 
 static gboolean
 do_test_checked_handler (const char *log_domain, GLogLevelFlags log_level,
-			 const gchar *msg, gpointer user_data, gboolean hits)
+                         const gchar *msg, gpointer user_data, gboolean hits)
 {
     TestErrorStruct *tdata = (TestErrorStruct*)user_data;
 
@@ -199,7 +199,7 @@
         return FALSE;
     }
     if (hits)
-	++(tdata->hits);
+        ++(tdata->hits);
     return FALSE;
 
 }
@@ -209,20 +209,20 @@
                       const gchar *msg, gpointer user_data )
 {
     return do_test_checked_handler (log_domain, log_level, msg,
-				    user_data, TRUE);
+                                    user_data, TRUE);
 }
 
 static gboolean
 test_checked_nohit_handler (const char *log_domain, GLogLevelFlags log_level,
-			    const gchar *msg, gpointer user_data )
+                            const gchar *msg, gpointer user_data )
 {
     return do_test_checked_handler (log_domain, log_level, msg,
-				    user_data, FALSE);
+                                    user_data, FALSE);
 }
 
 gboolean
 test_log_handler (const char *log_domain, GLogLevelFlags log_level,
-                      const gchar *msg, gpointer user_data )
+                  const gchar *msg, gpointer user_data )
 {
     gchar *level = test_log_level (log_level);
     g_printf ( "<%s> (%s) %s\n", level, log_domain, msg);

Modified: gnucash/trunk/src/test-core/unittest-support.h
===================================================================
--- gnucash/trunk/src/test-core/unittest-support.h	2013-10-31 22:22:53 UTC (rev 23358)
+++ gnucash/trunk/src/test-core/unittest-support.h	2013-10-31 22:23:28 UTC (rev 23359)
@@ -106,8 +106,8 @@
  * @return: A TestErrorStruct *
  */
 TestErrorStruct* test_error_struct_new (gchar *log_domain,
-					GLogLevelFlags log_level,
-					gchar *msg);
+                                        GLogLevelFlags log_level,
+                                        gchar *msg);
 
 /**
  * Free a TestErrorStruct created with test_error_struct_new
@@ -137,7 +137,7 @@
  * @return: The new GSList pointer.
  */
 GSList *test_log_set_handler (GSList *list, TestErrorStruct *error,
-			      GLogFunc handler);
+                              GLogFunc handler);
 
 /**
  * Set a log handler and add it to a GList for removal at teardown;
@@ -156,7 +156,7 @@
  * @return: The new GSList pointer.
  */
 GSList *test_log_set_fatal_handler (GSList *list, TestErrorStruct *error,
-			      GLogFunc handler);
+                                    GLogFunc handler);
 
 /* Clears all the log handlers. Pass this to g_slist_free() in teardown */
 void test_free_log_handler (gpointer item);
@@ -177,7 +177,7 @@
  * g_return_if_fail() error messages make it to the surface.
  */
 gboolean test_log_handler (const char *log_domain, GLogLevelFlags log_level,
-			   const gchar *msg, gpointer user_data);
+                           const gchar *msg, gpointer user_data);
 /**
  * Just returns FALSE or suppresses the message regardless of what the
  * error is. Use this only as a last resort.



More information about the gnucash-changes mailing list