GnuCash Daily Diff

Dave Peticolas peticolas@linas.org
Sat, 2 Jun 2001 08:04:40 -0500 (CDT)


Index: gnucash/ChangeLog
diff -u gnucash/ChangeLog:1.542 gnucash/ChangeLog:1.546
--- gnucash/ChangeLog:1.542	Fri Jun  1 03:48:38 2001
+++ gnucash/ChangeLog	Sat Jun  2 06:31:45 2001
@@ -1,4 +1,32 @@
+2001-06-02  Dave Peticolas  <dave@krondo.com>
+
+	* src/register/gnome/gnucash-date-picker.c (gnc_date_picker_new):
+	fix bug
+
+	* src/SplitLedger.c: fix mem leak
+
+	* src/gnome/top-level.c: handle X errors ourselves
+
 2001-06-01  Dave Peticolas  <dave@krondo.com>
+
+	* src/gnc-ui-util.c: use new scanf macro below
+
+	* src/engine/sixtp-dom-parsers.c (string_to_integer): use new
+	scanf macro below
+
+	* src/engine/sixtp-utils.c: use new scanf macro below
+
+	* src/engine/gnc-numeric.c: use new scanf macro below
+
+	* src/engine/gnc-engine-util.h: define GNC_SCANF_LLD macro to use
+	for scanf long long int conversion. This is needed since there is
+	not a common solution between Linux, Solaris, and FreeBSD. Thanks
+	to Matthew Condell for finding the problem and to Matt and Alan
+	Orndorff for testing it.
+
+	* configure.in: invoke conversion test below
+
+	* acinclude.m4: add test for %lld scanf conversion
 
 	* README: update info
 
Index: gnucash/acinclude.m4
diff -u gnucash/acinclude.m4:1.9 gnucash/acinclude.m4:1.10
--- gnucash/acinclude.m4:1.9	Tue May 29 17:41:40 2001
+++ gnucash/acinclude.m4	Fri Jun  1 23:40:21 2001
@@ -279,10 +279,13 @@
 
 AC_DEFUN([STRUCT_TM_GMTOFF_CHECK],
 [
-  AC_CACHE_CHECK([for the tm_gmtoff member of struct tm], am_cv_struct_tm_gmtoff,
-    [AC_TRY_LINK([#include <time.h>
-                  #define _GNU_SOURCE
-                  #define __EXTENSIONS__],
+  AC_CACHE_CHECK([for the tm_gmtoff member of struct tm],
+                 am_cv_struct_tm_gmtoff,
+    [AC_TRY_LINK([
+        #include <time.h>
+        #define _GNU_SOURCE
+        #define __EXTENSIONS__
+],
       [struct tm tm;
        tm.tm_gmtoff = 0;],
       am_cv_struct_tm_gmtoff=yes,
@@ -291,5 +294,32 @@
   if test $am_cv_struct_tm_gmtoff = yes; then
     AC_DEFINE(HAVE_STRUCT_TM_GMTOFF, 1,
       [Define if you have the tm_gmtoff member of struct tm.])
+  fi
+])
+
+AC_DEFUN([SCANF_LLD_CHECK],
+[
+  AC_CACHE_CHECK([if scanf supports %lld conversions],
+                 am_cv_scanf_lld,
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+
+int main ()
+{
+  long long int d;
+
+  d = 0;
+  if ((sscanf ("10000000000", "%lld", &d) != 1) || (d != 10000000000))
+    exit (1);
+
+  exit (0);
+}
+],
+        am_cv_scanf_lld=yes,
+        am_cv_scanf_lld=no))
+  if test $am_cv_scanf_lld = yes; then
+    AC_DEFINE(HAVE_SCANF_LLD, 1,
+      [Define if scanf supports %lld conversions.])
   fi
 ])
Index: gnucash/configure.in
diff -u gnucash/configure.in:1.191 gnucash/configure.in:1.192
--- gnucash/configure.in:1.191	Tue May 29 17:41:41 2001
+++ gnucash/configure.in	Fri Jun  1 23:40:21 2001
@@ -46,6 +46,7 @@
 AC_CHECK_FUNCS(stpcpy memcpy timegm)
 
 STRUCT_TM_GMTOFF_CHECK
+SCANF_LLD_CHECK
 
 AM_PATH_GLIB
 
Index: gnucash/po/de.po
diff -u gnucash/po/de.po:1.78 gnucash/po/de.po:1.79
--- gnucash/po/de.po:1.78	Mon May 28 01:41:08 2001
+++ gnucash/po/de.po	Fri Jun  1 11:12:56 2001
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gnucash 1.5\n"
 "POT-Creation-Date: 2001-05-27 23:32-0700\n"
-"PO-Revision-Date: 2001-05-22 15:58-07:00\n"
+"PO-Revision-Date: 2001-06-01 11:23+00:00\n"
 "Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
 "Language-Team: DE\n"
 "MIME-Version: 1.0\n"
@@ -27,17 +27,18 @@
 "    %s\n"
 "is not supported by this version of GnuCash."
 msgstr ""
+"Die URL\n"
+"    %s\n"
+"kann von dieser GnuCash Version nicht verarbeitet werden."
 
 #: src/FileDialog.c:77
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Can't parse the URL\n"
 "   %s\n"
 msgstr ""
-"Kann Datei\n"
+"Folgende URL konnte nicht verarbeitet werden:\n"
 "     %s\n"
-" nicht öffnen.\n"
-"%s"
 
 #: src/FileDialog.c:83
 #, c-format
@@ -142,7 +143,7 @@
 msgstr "Ein unbekannter Eingabe/Ausgabefehler ist aufgetreten."
 
 #: src/FileDialog.c:176
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "GnuCash could not obtain the lock for\n"
 "   %s.\n"
@@ -151,10 +152,11 @@
 "\n"
 "Do you want to proceed with opening the database?"
 msgstr ""
-"Gnucash konnte die Datei %s nicht öffnen.\n"
-"Diese Datei wird möglicherweise von einem anderen\n"
-"User benutzt. In diesem Fall sollten Sie die Datei nicht\n"
-"öffnen.\n"
+"Für die Datei \n"
+"    %s\n"
+"konnte keine exklusive Schreibberechtigung erreicht werden. Diese\n"
+"Datei ist wahrscheinlich von jemand anderem in Benutzung. In diesem\n"
+"Fall sollten Sie die Datei nicht öffnen.\n"
 "\n"
 "Möchten Sie trotzdem mit dem Öffnen der Datei fortfahren?"
 
@@ -202,11 +204,11 @@
 #: src/engine/Transaction.c:2021 src/register/splitreg.c:739
 #: src/scm/report/guile-strings.c:344
 msgid "-- Split Transaction --"
-msgstr "-- Split Buchung --"
+msgstr "-- Mehrteilige Buchung --"
 
 #: src/SplitLedger.c:126 src/register/splitreg.c:747
 msgid "-- Stock Split --"
-msgstr "-- Aktien Split --"
+msgstr "-- Aktienteilung --"
 
 #: src/SplitLedger.c:822
 msgid "Rebalance Transaction"
@@ -222,7 +224,7 @@
 
 #: src/SplitLedger.c:861
 msgid "Let GnuCash add an adjusting split"
-msgstr "Automatisch einen ausgleichenden Split einfügen"
+msgstr "Automatisch eine ausgleichende Teilbuchung einfügen"
 
 #: src/SplitLedger.c:866
 msgid "Adjust current account split total"
@@ -255,7 +257,7 @@
 "You are about to overwrite an existing split.\n"
 "Are you sure you want to do that?"
 msgstr ""
-"Sie sind dabei, einen existierenden Split zu überschreiben.\n"
+"Sie sind dabei, eine bestehende Teilbuchung zu überschreiben.\n"
 "Sind Sie sicher, daß Sie das möchten?"
 
 #: src/SplitLedger.c:2360
@@ -263,7 +265,7 @@
 "You are about to overwrite an existing transaction.\n"
 "Are you sure you want to do that?"
 msgstr ""
-"Sie sind dabei eine bestehende Buchung zu überschreiben. \n"
+"Sie sind dabei, eine bestehende Buchung zu überschreiben. \n"
 "Sind Sie sicher, daß Sie das möchten?"
 
 #: src/SplitLedger.c:3088
@@ -514,7 +516,7 @@
 #: src/engine/Transaction.c:2042 src/gnome/druid-stock-split.c:395
 #: src/gnome/window-register.c:865 src/register/splitreg.c:241
 msgid "Split"
-msgstr "Split"
+msgstr "Teilbuchung"
 
 #: src/engine/io-gncbin-r.c:482
 msgid "Lost Accounts"
@@ -846,9 +848,8 @@
 msgstr "Sind Sie sicher, dass Sie den aktuellen Preis löschen wollen?"
 
 #: src/gnome/dialog-price-editor.c:540
-#, fuzzy
 msgid "Remove old prices"
-msgstr "Aktuellen Preis entfernen."
+msgstr "Alte Preise entfernen"
 
 #: src/gnome/dialog-price-editor.c:554
 msgid "All prices before the date below will be deleted."
@@ -1057,7 +1058,7 @@
 
 #: src/gnome/druid-qif-import.c:1287 src/gnome/druid-qif-import.c:1724
 msgid "(split)"
-msgstr "(Split)"
+msgstr "(Teilbuchung)"
 
 #: src/gnome/druid-qif-import.c:1451
 msgid "You must enter a Type for the commodity."
@@ -1401,7 +1402,7 @@
 
 #: src/gnome/glade-gnc-dialogs.c:1130
 msgid "splits having amounts of:"
-msgstr "Splits mit folgenden Summen:"
+msgstr "Teilbuchung mit folgendem Betrag:"
 
 #: src/gnome/glade-gnc-dialogs.c:1151 src/gnome/glade-gnc-dialogs.c:1278
 #: src/gnome/glade-gnc-dialogs.c:1348
@@ -1431,7 +1432,7 @@
 
 #: src/gnome/glade-gnc-dialogs.c:1198
 msgid "Find splits whose Memo contains:"
-msgstr "Suche Splits, deren Memo folgendes enthält:"
+msgstr "Suche Teilbuchungen, deren Memo folgendes enthält:"
 
 #: src/gnome/glade-gnc-dialogs.c:1241
 msgid "Match number of shares"
@@ -2626,11 +2627,11 @@
 
 #: src/gnome/glade-gnc-dialogs.c:6474 src/gnome/glade-gnc-dialogs.c:6661
 msgid "Stock Split"
-msgstr "Aktien Split"
+msgstr "Aktienteilung"
 
 #: src/gnome/glade-gnc-dialogs.c:6494
 msgid "This wizard will help you record a stock split or stock merger."
-msgstr "Dieser Wizard wird Ihnen helfen, einen Aktiensplit einzugeben."
+msgstr "Dieser Assistent hilft Ihnen, eine Aktienteilung einzugeben."
 
 #: src/gnome/glade-gnc-dialogs.c:6505
 msgid "Stock Account"
@@ -2639,11 +2640,11 @@
 #: src/gnome/glade-gnc-dialogs.c:6514
 msgid ""
 "Select the account for which you want to record a stock split or merger."
-msgstr "Wählen Sie das Konto, für das ein Aktiensplit eingegeben werden soll."
+msgstr "Wählen Sie das Konto, für das Sie eine Aktienteilung eingeben möchten."
 
 #: src/gnome/glade-gnc-dialogs.c:6578
 msgid "Stock Split Details"
-msgstr "Aktiensplit Details"
+msgstr "Aktienteilung Details"
 
 #: src/gnome/glade-gnc-dialogs.c:6587
 msgid ""
@@ -2654,10 +2655,8 @@
 "You can also enter a description of the transaction, or accept the default "
 "one."
 msgstr ""
-"Geben Sie die Anzahl der Aktien ein, die sie durch den Aktiensplit oder "
-"Kapitalschnitt gewonnen oder verloren haben.\n"
-"Für einen Kaptialschnitt (negativer Split) geben Sie eine negative Zahl "
-"ein.\n"
+"Geben Sie die Anzahl der Aktien ein, die sie durch die Aktienteilung oder Zusammenschluß gewonnen oder verloren haben.\n"
+"Für einen Zusammenschluß geben Sie eine negative Zahl ein.\n"
 "Sie können auch eine Beschreibung der Buchung eingeben."
 
 #: src/gnome/glade-gnc-dialogs.c:6618
@@ -2669,8 +2668,8 @@
 "If you want to record a stock price for the split, enter it below.\n"
 "You may safely leave it blank."
 msgstr ""
-"Wenn Sie einen Aktienkurs für den Split eingeben wollen, geben Sie den\n"
-"Kurs unten an. Sie können das Kurseingabefeld auch leer lassen."
+"Wenn Sie einen Aktienkurs für die Teilbuchung eingeben wollen, geben\n"
+"Sie den Kurs unten an. Sie können das Kurseingabefeld auch leer lassen."
 
 #: src/gnome/glade-gnc-dialogs.c:6692
 msgid "New Price:"
@@ -2685,9 +2684,9 @@
 "If you received a cash disbursement as a result of the stock split,\n"
 "enter the details of that payment here. Otherwise, just click `Next'."
 msgstr ""
-"Wenn Sie einen Ausgleichsbetrag in Zusammenhang mit dem Aktiensplit\n"
+"Wenn Sie einen Ausgleichsbetrag in Zusammenhang mit der Aktienteilung\n"
 "erhalten haben, geben Sie diese Buchung hier ein. Wenn Sie keinen\n"
-"Ausgleichsbetrag erhalten haben, klicken Sie einfach \"Weiter\"."
+"Ausgleichsbetrag erhalten haben, klicken Sie \"Weiter\"."
 
 #: src/gnome/glade-gnc-dialogs.c:6777
 msgid "Cash Amount:"
@@ -2707,9 +2706,9 @@
 "You may also press `Back' to review your choices, or `Cancel' to\n"
 "quit without making any changes."
 msgstr ""
-"Wenn Sie die Eingabe des Aktiensplits abgeschlossen haben, klicken Sie\n"
-"\"Ende\". Sie können auch \"Zurück\" klicken um Ihre Eingaben zu\n"
-"überprüfen oder \"Abbrechen\" um diesen Dialog zu beenden ohne die\n"
+"Wenn Sie die Eingabe der Aktienteilung abgeschlossen haben, klicken\n"
+"Sie \"Ende\". Sie können auch \"Zurück\" klicken, um Ihre Eingaben zu\n"
+"überprüfen oder \"Abbrechen\", um diesen Dialog zu beenden, ohne die\n"
 "Änderungen zu speichern."
 
 #: src/gnome/glade-gnc-dialogs.c:6887
@@ -3081,19 +3080,16 @@
 msgstr "Willkommen zu GnuCash 1.6"
 
 #: src/gnome/new-user-interface.c:598
-#, fuzzy
 msgid "Create a new set of accounts"
-msgstr "Ein neues Konto eröffnen"
+msgstr "Neue Konten eröffnen"
 
 #: src/gnome/new-user-interface.c:607
-#, fuzzy
 msgid "Import my QIF files"
-msgstr "QIF-Datei importieren"
+msgstr "QIF-Dateien importieren"
 
 #: src/gnome/new-user-interface.c:616
-#, fuzzy
 msgid "Open the new user tutorial"
-msgstr "Das GnuCash-Hilfe-Fenster öffnen"
+msgstr "Die Einführung für neue Benutzer öffnen"
 
 #: src/gnome/print-session.c:86
 msgid "Print GnuCash Document"
@@ -3247,7 +3243,7 @@
 
 #: src/gnome/window-acct-tree.c:862 src/gnome/window-register.c:1442
 msgid "Record a stock split or a stock merger"
-msgstr ""
+msgstr "Buchen einer Aktienteilung oder eines Aktienzusammenschlusses"
 
 #: src/gnome/window-acct-tree.c:870 src/gnome/window-register.c:1450
 msgid "_New Account..."
@@ -3345,11 +3341,8 @@
 msgstr ""
 
 #: src/gnome/window-main.c:795
-#, fuzzy
 msgid "There was an error saving the file."
-msgstr ""
-"Es gab einen Fehler beim Öffnen der Datei. \n"
-"Möchten Sie fortfahren?"
+msgstr "Beim Speichern der Datei ist ein Fehler aufgetreten."
 
 #: src/gnome/window-main.c:835
 msgid "Select \"Exit\" to exit GnuCash."
@@ -3372,13 +3365,12 @@
 msgstr "Eine neue Datei anlegen"
 
 #: src/gnome/window-main.c:930
-#, fuzzy
 msgid "Export Accounts..."
-msgstr "Verlorene Konten"
+msgstr "Konten exportieren..."
 
 #: src/gnome/window-main.c:931
 msgid "Export the account hierarchy to a new file"
-msgstr ""
+msgstr "Die Konten-Hierarchie in eine neue Datei exportieren"
 
 #: src/gnome/window-main.c:939
 msgid "Import QIF..."
@@ -3759,7 +3751,7 @@
 #: src/gnome/window-register.c:866 src/gnome/window-register.c:1498
 #: src/gnome/window-register.c:1687
 msgid "Show all splits in the current transaction"
-msgstr "Alle Splits in aktueller Buchung anzeigen"
+msgstr "Alle Teilbuchungen in aktueller Buchung anzeigen"
 
 #: src/gnome/window-register.c:873
 msgid "Blank"
@@ -3825,7 +3817,7 @@
 
 #: src/gnome/window-register.c:1256
 msgid "Auto-Split Ledger"
-msgstr "Auto-Split Register"
+msgstr "Auto-Teilbuchung Register"
 
 #: src/gnome/window-register.c:1257 src/scm/guile-strings.c:256
 msgid ""
@@ -3839,7 +3831,7 @@
 
 #: src/gnome/window-register.c:1261 src/scm/guile-strings.c:258
 msgid "Show expanded transactions with all splits"
-msgstr "Zeige Buchungen ausführlich mit allen Splits"
+msgstr "Zeige Buchungen ausführlich mit allen Teilbuchungen"
 
 #: src/gnome/window-register.c:1271
 msgid "_Double Line"
@@ -3942,7 +3934,7 @@
 
 #: src/gnome/window-register.c:1497 src/gnome/window-register.c:1686
 msgid "_Split"
-msgstr "_Split"
+msgstr "_Teilbuchung"
 
 #: src/gnome/window-register.c:1505 src/gnome/window-register.c:1694
 msgid "_Blank"
@@ -3975,9 +3967,8 @@
 msgstr "Rechnungsbericht für diese Buchung öffnen"
 
 #: src/gnome/window-register.c:1551
-#, fuzzy
 msgid "_Print Check..."
-msgstr "Scheck drucken"
+msgstr "Scheck _drucken..."
 
 #: src/gnome/window-register.c:1552
 msgid "Print a check using a standard format"
@@ -4049,14 +4040,11 @@
 "Warning: Just deleting all the other splits will make your account "
 "unbalanced. You probably shouldn't do this unless you're going to "
 "immediately add another split to bring the transaction back into balance."
-msgstr ""
-"Warnung : Das Löschen aller Splits führt zu einem unausgeglichenen Konto.Sie "
-"sollten das nicht tun, es sei denn, Sie wollen sofort einen anderen Split "
-"hinzufügen, um das Konto wieder auszugleichen."
+msgstr "Warnung : Das Löschen aller Teilbuchungen führt zu einem unausgeglichenen Konto. Sie sollten das nicht tun, es sei denn, Sie fügen sofort eine neue Teilbuchung hinzu, um das Konto wieder auszugleichen."
 
 #: src/gnome/window-register.c:2829
 msgid "You would be deleting reconciled splits!"
-msgstr ""
+msgstr "Sie würden ausgeglichene Teilbuchungen löschen."
 
 #: src/gnome/window-register.c:2837
 msgid "Delete Transaction"
@@ -4068,7 +4056,7 @@
 
 #: src/gnome/window-register.c:2869
 msgid "Delete all the other splits"
-msgstr "Alle Gegen-Splits löschen"
+msgstr "Alle Gegen-Teilbuchungen löschen"
 
 #: src/gnome/window-register.c:2962
 #, c-format
@@ -4305,20 +4293,16 @@
 #: src/register/splitreg.c:735
 msgid ""
 "This transaction has multiple splits; press the Split button to see them all"
-msgstr ""
-"Diese Buchung hat mehrfache Splits. Klicken Sie 'Split', um alle sehen zu "
-"können"
+msgstr "Diese Buchung hat mehrfache Teilbuchungen. Klicken Sie \"Teilbuchung\", um alle sehen zu können"
 
 #: src/register/splitreg.c:743
 msgid ""
 "This transaction is a stock split; press the Split button to see details"
-msgstr ""
-"Diese Buchung hat Splits mit Aktien; klicken Sie 'Split', um alle sehen zu "
-"können"
+msgstr "Diese Buchung ist eine Aktienteilung; klicken Sie 'Teilbuchung', um Einzelheiten sehen zu können"
 
 #: src/register/splitreg.c:755
 msgid "Enter a description of the split"
-msgstr "Geben Sie eine Beschreibung des Splits ein"
+msgstr "Geben Sie eine Beschreibung der Teilbuchung ein"
 
 #: src/register/splitreg.c:759
 msgid "Enter a description of the transaction"
@@ -4462,14 +4446,12 @@
 msgstr "Ende des vorherigen Finanzjahres."
 
 #: src/scm/guile-strings.c:31
-#, fuzzy
 msgid "End Current Financial Year"
-msgstr "Beginn des aktuellen Finanzjahres"
+msgstr "Ende des aktuellen Finanzjahres"
 
 #: src/scm/guile-strings.c:32
-#, fuzzy
 msgid "End of the current Financial year/Accounting Period"
-msgstr "Ende des vorherigen Finanzjahres."
+msgstr "Ende des aktuellen Finanzjahres"
 
 #: src/scm/guile-strings.c:33
 msgid "Start of this month"
@@ -4790,9 +4772,8 @@
 msgstr "Für diesen Bericht müssen Konten ausgewählt werden."
 
 #: src/scm/guile-strings.c:131 src/scm/report/guile-strings.c:330
-#, fuzzy
 msgid "No data"
-msgstr "Keine Summe"
+msgstr "Keine Daten gefunden"
 
 #: src/scm/guile-strings.c:132
 msgid ""
@@ -5237,21 +5218,19 @@
 
 #: src/scm/guile-strings.c:305
 msgid "Split color"
-msgstr "Split Farbe"
+msgstr "Farbe Teilbuchung"
 
 #: src/scm/guile-strings.c:306
 msgid "The default background color for split rows in the register"
-msgstr "Standard Hintergrundfarbe für Zeilen im Mehrfach-Zeilen-Modus"
+msgstr "Normale Hintergrundfarbe für Teilbuchungen im Register"
 
 #: src/scm/guile-strings.c:308
 msgid "Split active color"
-msgstr "Farbe eines aktiven Split"
+msgstr "Farbe einer aktiven Teilbuchung"
 
 #: src/scm/guile-strings.c:309
 msgid "The background color for the current split row in the register"
-msgstr ""
-"Standard Hintergrundfarbe der aktiven Buchung für Zeilen im Doppel-Zeilen-"
-"Modus"
+msgstr "Hintergrundfarbe der aktiven Teilbuchung im Register"
 
 #: src/scm/guile-strings.c:311
 msgid "Double mode colors alternate with transactions"
@@ -5261,9 +5240,7 @@
 msgid ""
 "Alternate the primary and secondary colors with each transaction, not each "
 "row"
-msgstr ""
-"Tausche die Farben jeder ausgeglichenen und Buchung mit Fehlern in jeder "
-"Buchung, nicht in jeder Spalte"
+msgstr "Farben mit jeder Buchung abwechseln, anstatt mit jeder Zeile"
 
 #: src/scm/guile-strings.c:314
 msgid "Automatic credit card payments"
@@ -5513,9 +5490,8 @@
 msgstr "Wieviele Dezimalstellen automatisch ausgefüllt werden."
 
 #: src/scm/guile-strings.c:383
-#, fuzzy
 msgid "No account list setup on new file"
-msgstr "Eine Kontenlisten-Option"
+msgstr "Es wird keine neue Kontostruktur für die neue Datei erstellt."
 
 #: src/scm/guile-strings.c:384
 msgid ""
@@ -5649,9 +5625,8 @@
 msgstr ""
 
 #: src/scm/guile-strings.c:428
-#, fuzzy
 msgid "_Reports"
-msgstr "Berichte"
+msgstr "_Berichte"
 
 #: src/scm/guile-strings.c:429
 msgid "_Assets & Liabilities"
@@ -5742,7 +5717,6 @@
 msgstr "Depots"
 
 #: src/scm/guile-strings.c:456
-#, fuzzy
 msgid "Mutual Funds"
 msgstr "Investmentfonds"
 
@@ -5759,21 +5733,18 @@
 msgstr "Eigenkapital"
 
 #: src/scm/guile-strings.c:461
-#, fuzzy
 msgid "Checking"
-msgstr "Girokonten"
+msgstr "Girokonto"
 
 #: src/scm/guile-strings.c:462
 msgid "Savings"
 msgstr "Sparkonten"
 
 #: src/scm/guile-strings.c:463
-#, fuzzy
 msgid "Money Market"
-msgstr "Geldmarktfonds"
+msgstr "Geldmarktfond"
 
 #: src/scm/guile-strings.c:464
-#, fuzzy
 msgid "Credit Lines"
 msgstr "Kreditrahmen"
 
@@ -5790,15 +5761,16 @@
 "Version der GnuCash 1.4. Serie verwenden."
 
 #: src/scm/guile-strings.c:469
-#, fuzzy
 msgid ""
 "The GnuCash online manual has lots of helpful information.  \n"
 "If you are upgrading from GnuCash 1.4, the section \"What's new in\n"
 "GnuCash 1.6\" is particularly interesting. You can access the manual\n"
 "under the Help menu."
 msgstr ""
-"Das GnuCash Online-Handbuch bietet jede Menge hilfreicher \n"
-"Informationen. Es befindet sich unter dem Hilfe-Menü."
+"Das GnuCash Online-Handbuch bietet jede Menge hilfreicher\n"
+"Informationen. Falls Sie von der GnuCash-Version 1.4 umgestiegen sind,\n"
+"ist der Abschnitt \"Was ist neu in GnuCash 1.6\" besonders interessant\n"
+"für Sie. Das Handbuch befindet sich unter dem Hilfe-Menü."
 
 #: src/scm/guile-strings.c:473
 msgid ""
@@ -5895,16 +5867,16 @@
 msgstr ""
 
 #: src/scm/guile-strings.c:519
-#, fuzzy
 msgid ""
 "To transfer funds between accounts with different currencies,\n"
 "you need an intermediate currency trading account. Click the Transfer\n"
 "button in the register toolbar to let GnuCash create the intermediate\n"
 "transaction. See the GnuCash online manual for details."
 msgstr ""
-"Um Beträge zwischen Konten mit verschiedenen Währungen zu\n"
-"transferieren, benötigen Sie ein Ausgleichs-Devisen-Konto. Siehe dazu\n"
-"auch das GnuCash-Online Manual."
+"Um Beträge zwischen Konten mit verschiedenen Währungen zu bewegen,\n"
+"benötigen Sie ein Devisenkonto als Zwischenschritt. Benutzen Sie den\n"
+"\"Buchen\"-Knopf im Register, um die zusätzliche Buchung von GnuCash\n"
+"erstellen zu lassen. Siehe dazu auch das GnuCash Online-Handbuch."
 
 #: src/scm/guile-strings.c:523
 msgid ""
@@ -6012,7 +5984,6 @@
 msgstr "Tortendiagramm der Aktiva eines Zeitpunkts anzeigen"
 
 #: src/scm/report/guile-strings.c:8
-#, fuzzy
 msgid "Shows a piechart with the Liabilities balance at a given time"
 msgstr "Tortendiagramm der Passiva eines Zeitpunkts anzeigen"
 
@@ -6225,9 +6196,8 @@
 msgstr "Einnahmen"
 
 #: src/scm/report/guile-strings.c:67
-#, fuzzy
 msgid "Profit (Gain minus Loss)"
-msgstr "Einnahmen-/Ausgabenrechnung"
+msgstr "Gewinn (Einnahmen minus Verlust)"
 
 #: src/scm/report/guile-strings.c:68
 msgid "Gain/Loss"
@@ -6246,23 +6216,20 @@
 msgstr "Periodenende"
 
 #: src/scm/report/guile-strings.c:75
-#, fuzzy
 msgid "Maximum"
-msgstr "Maximale Anzahl Segmente"
+msgstr "Maximum"
 
 #: src/scm/report/guile-strings.c:76
 msgid "Minimum"
-msgstr ""
+msgstr "Minimum"
 
 #: src/scm/report/guile-strings.c:77
-#, fuzzy
 msgid "Gain"
-msgstr "Leer"
+msgstr "Gewinn"
 
 #: src/scm/report/guile-strings.c:78
-#, fuzzy
 msgid "Loss"
-msgstr "Gewinn/Verlust"
+msgstr "Verlust"
 
 #: src/scm/report/guile-strings.c:96 src/scm/report/guile-strings.c:270
 msgid "Show Foreign Currencies"
@@ -6314,9 +6281,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:120
-#, fuzzy
 msgid "Shows a barchart with the Liabilities developing over time"
-msgstr "Tortendiagramm der Passiva eines Zeitpunkts anzeigen"
+msgstr "Tortendiagramm der Passiva-Entwicklung pro Zeit anzeigen"
 
 #: src/scm/report/guile-strings.c:121
 msgid "Income Over Time"
@@ -6331,7 +6297,6 @@
 msgstr "Aktiva Entwicklung"
 
 #: src/scm/report/guile-strings.c:124
-#, fuzzy
 msgid "Liabilities Over Time"
 msgstr "Passiva Entwicklung"
 
@@ -6676,9 +6641,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:239 src/scm/report/guile-strings.c:304
-#, fuzzy
 msgid "Show Net Worth bars"
-msgstr "Nettowert anzeigen?"
+msgstr "Nettowert anzeigen"
 
 #: src/scm/report/guile-strings.c:243
 msgid "Show Income and Expenses?"
@@ -6721,9 +6685,8 @@
 msgstr "Ausgaben Diagramm"
 
 #: src/scm/report/guile-strings.c:259
-#, fuzzy
 msgid "Liability Chart"
-msgstr "Passiva Tortendiagramm"
+msgstr "Passiva Diagramm"
 
 #: src/scm/report/guile-strings.c:260
 msgid "Net Worth Barchart"
@@ -6759,50 +6722,44 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:299
-#, fuzzy
 msgid "Price of Commodity"
-msgstr "Sortiere nach Währung/Aktie"
+msgstr "Preis der Währung/Aktie"
 
 #: src/scm/report/guile-strings.c:305
 msgid "Marker"
-msgstr ""
+msgstr "Markierung"
 
 #: src/scm/report/guile-strings.c:306
-#, fuzzy
 msgid "Marker Color"
-msgstr "Überschriften-Farbe"
+msgstr "Markierungsfarbe"
 
 #: src/scm/report/guile-strings.c:309
 msgid "Calculate the price of this commodity."
 msgstr ""
 
 #: src/scm/report/guile-strings.c:313
-#, fuzzy
 msgid "Actual Transactions"
-msgstr "Buchungen"
+msgstr "Tatsächliche Buchungen"
 
 #: src/scm/report/guile-strings.c:314
 msgid "The instantaneous price of actual currency transactions in the past"
-msgstr ""
+msgstr "Der aufgezeichnete Preis von tatsächlichen Buchungen in der Vergangenheit"
 
 #: src/scm/report/guile-strings.c:315
-#, fuzzy
 msgid "Price Database"
-msgstr "Preise"
+msgstr "Preis-Editor"
 
 #: src/scm/report/guile-strings.c:316
-#, fuzzy
 msgid "The recorded prices"
-msgstr "Quelle der Aktien-/Fonds-Kurse:"
+msgstr "Die explizit eingetragenen Preise"
 
 #: src/scm/report/guile-strings.c:317
 msgid "Color of the marker"
-msgstr ""
+msgstr "Farbe der Markierung"
 
 #: src/scm/report/guile-strings.c:321
-#, fuzzy
 msgid "Double-Weeks"
-msgstr "Doppel"
+msgstr "Zweiwöchentlich"
 
 #: src/scm/report/guile-strings.c:324
 msgid "All Prices equal"
@@ -6825,9 +6782,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:328
-#, fuzzy
 msgid "Only one price"
-msgstr "Neuen Preis hinzufügen."
+msgstr "Nur ein Preis gefunden"
 
 #: src/scm/report/guile-strings.c:329
 msgid ""
@@ -6842,9 +6798,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:332
-#, fuzzy
 msgid "Identical commodities"
-msgstr "Handelbare Waren"
+msgstr "Identische Währungen/Aktien"
 
 #: src/scm/report/guile-strings.c:333
 msgid ""
@@ -6853,9 +6808,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:335
-#, fuzzy
 msgid "Price Scatterplot"
-msgstr "Preisberechnungsquelle"
+msgstr "Preisdiagramm"
 
 #: src/scm/report/guile-strings.c:348
 msgid "Make an invoice"
@@ -7058,38 +7012,32 @@
 msgstr "Standard Hintergrundfarbe für Tabellenzellen."
 
 #: src/scm/report/guile-strings.c:433 src/scm/report/guile-strings.c:470
-#, fuzzy
 msgid "Alternate Table Cell Color"
-msgstr "Farbe für Tabellenzelle"
+msgstr "Zweite Farbe für Tabellenzelle"
 
 #: src/scm/report/guile-strings.c:434
-#, fuzzy
 msgid "Default alternate background for table cells."
 msgstr "Standard Hintergrundfarbe für Tabellenzellen."
 
 #: src/scm/report/guile-strings.c:436 src/scm/report/guile-strings.c:472
-#, fuzzy
 msgid "Subheading/Subtotal Cell Color"
-msgstr "Farbe für Tabellenzelle"
+msgstr "Farbe für Zwischenüberschrift/-summe"
 
 #: src/scm/report/guile-strings.c:437
-#, fuzzy
 msgid "Default color for subtotal rows."
-msgstr "Standard Hintergrundfarbe für Tabellenzellen."
+msgstr "Standard Hintergrundfarbe für Zwischensummen."
 
 #: src/scm/report/guile-strings.c:439 src/scm/report/guile-strings.c:474
 msgid "Sub-subheading/total Cell Color"
 msgstr ""
 
 #: src/scm/report/guile-strings.c:440
-#, fuzzy
 msgid "Color for subsubtotals"
-msgstr "Zwischensummen anzeigen"
+msgstr "Farbe für Zwischen-Zwischensummen"
 
 #: src/scm/report/guile-strings.c:442 src/scm/report/guile-strings.c:476
-#, fuzzy
 msgid "Grand Total Cell Color"
-msgstr "Farbe für Tabellenzelle"
+msgstr "Farbe für Gesamtsumme"
 
 #: src/scm/report/guile-strings.c:443
 msgid "Color for grand totals"
@@ -7128,17 +7076,14 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:489
-#, fuzzy
 msgid "Prepared by: "
-msgstr "Erstellt für"
+msgstr "Erstellt von:"
 
 #: src/scm/report/guile-strings.c:490
-#, fuzzy
 msgid "Prepared for: "
-msgstr "Erstellt für"
+msgstr "Erstellt für:"
 
 #: src/scm/report/guile-strings.c:491
-#, fuzzy
 msgid "Date: "
 msgstr "Datum:"
 
@@ -7147,9 +7092,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:493
-#, fuzzy
 msgid "Technicolor"
-msgstr "Zweite Farbe"
+msgstr "Farbenfroh"
 
 #: src/scm/report/guile-strings.c:496
 msgid "Background color for reports."
@@ -7164,16 +7108,14 @@
 msgstr "Hyperlinks in Berichten aktivieren."
 
 #: src/scm/report/guile-strings.c:512
-#, fuzzy
 msgid "Plain"
-msgstr "Leer"
+msgstr "Einfach"
 
 #: src/scm/report/guile-strings.c:516
 msgid "Alternate Period"
 msgstr "Abwechselnde Perioden"
 
 #: src/scm/report/guile-strings.c:517
-#, fuzzy
 msgid "Override or modify From: & To:"
 msgstr "Überschreiben oder modifizieren des Von: & An:"
 
@@ -7284,9 +7226,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:547
-#, fuzzy
 msgid "Sub-"
-msgstr "Aus_buchen"
+msgstr "Zwischen-"
 
 #: src/scm/report/guile-strings.c:548
 msgid "Choose export format"
@@ -7331,9 +7272,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:559
-#, fuzzy
 msgid "Tax Report / TXF Export"
-msgstr "Steuer-Bericht"
+msgstr "Steuer-Bericht / TXF Export"
 
 #: src/scm/report/guile-strings.c:560
 msgid "Taxable Income / Deductible Expenses / Export to .TXF file"
@@ -7344,18 +7284,12 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:562
-#, fuzzy
 msgid "This report shows your Taxable Income and Deductible Expenses."
-msgstr ""
-"Diese Seite zeigt Ihnen zu versteuerndes Einkommen\n"
-"und absetzbare Ausgaben."
+msgstr "Diese Seite zeigt Ihnen zu versteuerndes Einkommen und absetzbare Ausgaben."
 
 #: src/scm/report/guile-strings.c:564
-#, fuzzy
 msgid "This page shows your Taxable Income and Deductible Expenses."
-msgstr ""
-"Diese Seite zeigt Ihnen zu versteuerndes Einkommen\n"
-"und absetzbare Ausgaben."
+msgstr "Diese Seite zeigt Ihnen zu versteuerndes Einkommen und absetzbare Ausgaben."
 
 #: src/scm/report/guile-strings.c:565
 msgid "Sorting"
@@ -7386,9 +7320,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:572
-#, fuzzy
 msgid "Total For "
-msgstr "Gesamt Eingänge"
+msgstr "Gesamtsumme für "
 
 #: src/scm/report/guile-strings.c:573 src/scm/report/guile-strings.c:702
 msgid "Grand Total"
@@ -7451,9 +7384,8 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:627
-#, fuzzy
 msgid "Sort by exact time"
-msgstr "Nach Datum sortieren"
+msgstr "Nach Tageszeit sortieren"
 
 #: src/scm/report/guile-strings.c:628
 msgid "Other Account Name"
@@ -7552,13 +7484,10 @@
 msgstr "Volle Kontenbezeichnung anzeigen"
 
 #: src/scm/report/guile-strings.c:673
-#, fuzzy
 msgid ""
 "Display the other account? (if this is a split transaction, this parameter "
 "is guessed)."
-msgstr ""
-"Das andere Konto anzeigen? (Wenn dies eine Split-Buchung ist, wird dieser "
-"Parameter geraten.)"
+msgstr "Das andere Konto anzeigen? (Wenn dies eine mehrteilige Buchung ist, wird dieser Parameter geraten.)"
 
 #: src/scm/report/guile-strings.c:684
 msgid "No amount display"
@@ -7581,12 +7510,9 @@
 msgstr "Einnahme- und Ausgabenkonten mit umgekehrten Vorzeichen"
 
 #: src/scm/report/guile-strings.c:695
-#, fuzzy
 msgid ""
 "Reverse amount display for Liability, Equity, Credit Card,and Income accounts"
-msgstr ""
-"Kreditkarten-, Passiva-, Ausgleichs- und Einkommenskonten mit\n"
-"umgekehrten Vorzeichen"
+msgstr "Kreditkarten-, Passiva-, Ausgleichs- und Einkommenskonten mit umgekehrten Vorzeichen"
 
 #: src/scm/report/guile-strings.c:698
 msgid "Primary Subtotals/headings"
@@ -7598,15 +7524,15 @@
 
 #: src/scm/report/guile-strings.c:704
 msgid "Split Odd"
-msgstr "Ungerader Split"
+msgstr "Ungerade Teilbuchung"
 
 #: src/scm/report/guile-strings.c:706
 msgid "Split Even"
-msgstr "Gerader Split"
+msgstr "Gerade Teilbuchung"
 
 #: src/scm/report/guile-strings.c:710
 msgid "No matching transactions found"
-msgstr ""
+msgstr "Keine passenden Buchungen gefunden"
 
 #: src/scm/report/guile-strings.c:711
 msgid ""
@@ -7635,147 +7561,5 @@
 msgstr ""
 
 #: src/scm/report/guile-strings.c:721
-#, fuzzy
 msgid "Welcome to GnuCash 1.6"
-msgstr "Mehr über GnuCash"
-
-#~ msgid "Net Gain"
-#~ msgstr "Netto Gewinn"
-
-#~ msgid "Avg Bal"
-#~ msgstr "Durchschnittl. Saldo"
-
-#~ msgid "Max Bal"
-#~ msgstr "Max. Saldo"
-
-#~ msgid "Min Bal"
-#~ msgstr "Min. Saldo"
-
-#~ msgid "Total In"
-#~ msgstr "Gesamt Eingänge"
-
-#~ msgid "Total Out"
-#~ msgstr "Gesamt Ausgänge"
-
-#~ msgid "Net Change"
-#~ msgstr "Netto Änderung"
-
-#~ msgid "New User Account Setup"
-#~ msgstr "Neue Benutzer - Konten erstellen"
-
-#~ msgid "Starting Balance"
-#~ msgstr "Eröffnungssaldo"
-
-#~ msgid "Account: "
-#~ msgstr "Konto:"
-
-#~ msgid "Enter Starting Balance"
-#~ msgstr "Bitte geben Sie den Anfangssaldo ein"
-
-#~ msgid "OK"
-#~ msgstr "Fertig"
-
-#~ msgid "New _Report"
-#~ msgstr "Neuer _Bericht"
-
-#~ msgid "Investment Portfolio Report: %s"
-#~ msgstr "Portfolio Bericht: %s"
-
-#~ msgid "Account:"
-#~ msgstr "Konto:"
-
-#~ msgid "_Print Check... (unfinished!)"
-#~ msgstr "_Scheck drucken (noch nicht fertig!)"
-
-#~ msgid "Account Chart"
-#~ msgstr "Kontendiagramm"
-
-#~ msgid "Mutual-Funds"
-#~ msgstr "Investmentfonds"
-
-#~ msgid "Liabilities/Equity"
-#~ msgstr "Passiva/Eigenkapital"
-
-#~ msgid "Show barchart as stacked barchart?"
-#~ msgstr "Balkendiagram mit gestapelten Balken anzeigen?"
-
-#~ msgid "Show net worth bars"
-#~ msgstr "Nettowert-Balken anzeigen"
-
-#~ msgid "Liability/Equity Chart"
-#~ msgstr "Passiva Diagramm"
-
-#, fuzzy
-#~ msgid "Net Worth Barchart2"
-#~ msgstr "Netto-Wert Balkendiagramm"
-
-#, fuzzy
-#~ msgid "Income/Expense Chart2"
-#~ msgstr "Einnahmen/Ausgaben Diagramm"
-
-#~ msgid "Background color for total"
-#~ msgstr "Hintergrundfarbe für Gesamtbetrag"
-
-#~ msgid "Date to report on"
-#~ msgstr "Datum des Berichts"
-
-#~ msgid "TAX Report Options"
-#~ msgstr "Optionen für den Steuer-Bericht"
-
-#~ msgid "Account Name(w/subtotal)"
-#~ msgstr "Kontoname (mit Zwischenbilanz)"
-
-#~ msgid "Account Code (w/subtotal)"
-#~ msgstr "Konto-Nummer (mit Zwischenbilanz)"
-
-#~ msgid "Date (subtotal monthly)"
-#~ msgstr "Datum (monatliche Zwischenbilanz)"
-
-#~ msgid "Sort by date & subtotal each month"
-#~ msgstr "Sortiere nach Datum mit monatlicher Zwischenzumme"
-
-#~ msgid "Transfer from/to (w/subtotal)"
-#~ msgstr "Gegenkonto (mit Summe)"
-
-#~ msgid ""
-#~ "Sort and subtotal by account transferred\n"
-#~ " from/to's name"
-#~ msgstr "Sortiere nach Namen des Gegenkontos mit Zwischensummen"
-
-#~ msgid ""
-#~ "You have disabled \"Tip of the Day\"\n"
-#~ "You can re-enable tips from the General\n"
-#~ "section of the Preferences menu"
-#~ msgstr ""
-#~ "Sie haben den \"Tipp des Tages\" abgeschaltet.\n"
-#~ "Sie können ihn wieder im Menü \"Voreinstellungen\"einschalten"
-
-#~ msgid "Choose"
-#~ msgstr "Auswählen"
-
-#~ msgid "Untitled"
-#~ msgstr "Ohne Bezeichnung"
-
-#~ msgid "Import"
-#~ msgstr "QIF Import"
-
-#~ msgid "_Accounts"
-#~ msgstr "_Konten"
-
-#~ msgid "Parameters"
-#~ msgstr "Parameter"
-
-#~ msgid "Open this report in a new window"
-#~ msgstr "Bericht in neuem Fenster öffnen"
-
-#~ msgid "Close this report window"
-#~ msgstr "Bericht schliessen"
-
-#~ msgid "Include Sub-Account balances"
-#~ msgstr "Unterkonten-Saldo einrechnen"
-
-#~ msgid "Income by Account"
-#~ msgstr "Gliederung Einkommen"
-
-#~ msgid "Tax"
-#~ msgstr "Steuer"
+msgstr "Willkommen zu GnuCash 1.6"
Index: gnucash/src/SplitLedger.c
diff -u gnucash/src/SplitLedger.c:1.229 gnucash/src/SplitLedger.c:1.231
--- gnucash/src/SplitLedger.c:1.229	Sun May 13 16:57:16 2001
+++ gnucash/src/SplitLedger.c	Sat Jun  2 04:56:50 2001
@@ -604,7 +604,7 @@
 {
   int denom;
 
-  denom = xaccAccountGetSecuritySCU (xaccSplitGetAccount (split));
+  denom = xaccAccountGetCommoditySCU (xaccSplitGetAccount (split));
   if (denom == 0)
   {
     gnc_commodity *commodity = gnc_locale_default_currency ();
@@ -629,7 +629,7 @@
   if (account)
   {
     xaccSetPriceCellFraction (reg->sharesCell,
-                              xaccAccountGetSecuritySCU (account));
+                              xaccAccountGetCommoditySCU (account));
     xaccSetPriceCellFraction (reg->debitCell,
                               xaccAccountGetCurrencySCU (account));
     xaccSetPriceCellFraction (reg->creditCell,
@@ -3520,7 +3520,7 @@
   if (!account)
     return total;
 
-  total = gnc_numeric_convert (total, xaccAccountGetSecuritySCU (account),
+  total = gnc_numeric_convert (total, xaccAccountGetCommoditySCU (account),
                                GNC_RND_ROUND);
 
   for (node = xaccTransGetSplitList (trans); node; node = node->next)
@@ -3971,6 +3971,9 @@
   if (!reg)
     return NULL;
 
+  if (reg->debit_str)
+    return reg->debit_str;
+
   reg->debit_str = gnc_get_debit_string (sr_type_to_account_type (reg->type));
 
   if (reg->debit_str)
@@ -3984,6 +3987,9 @@
 const char *
 xaccSRGetCreditString (SplitRegister *reg)
 {
+  if (!reg)
+    return NULL;
+
   if (reg->credit_str)
     return reg->credit_str;
 
Index: gnucash/src/gnc-ui-util.c
diff -u gnucash/src/gnc-ui-util.c:1.29 gnucash/src/gnc-ui-util.c:1.31
--- gnucash/src/gnc-ui-util.c:1.29	Thu May 10 11:11:16 2001
+++ gnucash/src/gnc-ui-util.c	Fri Jun  1 23:40:23 2001
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include "Account.h"
 #include "EuroUtils.h"
 #include "FileDialog.h"
 #include "Group.h"
@@ -888,8 +889,8 @@
 gnc_account_quantity_print_info (Account *account, gboolean use_symbol)
 {
     return gnc_account_print_info_helper(account, use_symbol,
-                                         xaccAccountGetEffectiveSecurity,
-                                         xaccAccountGetSecuritySCU);
+                                         xaccAccountGetCommodity,
+                                         xaccAccountGetCommoditySCU);
 }
 
 GNCPrintAmountInfo
@@ -1678,7 +1679,7 @@
     {
       *out = '\0';
 
-      if (*out_str != '\0' && sscanf(out_str, "%lld", &numer) < 1)
+      if (*out_str != '\0' && sscanf(out_str, GNC_SCANF_LLD, &numer) < 1)
       {
         next_state = NO_NUM_ST;
       }
@@ -1774,7 +1775,7 @@
       len = 8;
     }
 
-    if (sscanf (out_str, "%lld", &fraction) < 1)
+    if (sscanf (out_str, GNC_SCANF_LLD, &fraction) < 1)
     {
       g_free(out_str);
       return FALSE;
Index: gnucash/src/engine/Account.c
diff -u gnucash/src/engine/Account.c:1.152 gnucash/src/engine/Account.c:1.153
--- gnucash/src/engine/Account.c:1.152	Sun May 27 02:35:08 2001
+++ gnucash/src/engine/Account.c	Fri Jun  1 17:45:53 2001
@@ -654,7 +654,7 @@
   /* if the denominator can't be exactly converted, it's an error */
   /* FIXME : need to enforce ordering of insertion/value */
   split->damount = gnc_numeric_convert(split->damount, 
-                                       xaccAccountGetSecuritySCU(acc),
+                                       xaccAccountGetCommoditySCU(acc),
                                        GNC_RND_ROUND);
 
   split->value   = gnc_numeric_convert(split->value, 
@@ -1159,7 +1159,7 @@
                                    xaccAccountGetCurrencySCU(acc),
                                    GNC_RND_ROUND);
     s->damount = gnc_numeric_convert(s->damount,
-                                     xaccAccountGetSecuritySCU(acc),
+                                     xaccAccountGetCommoditySCU(acc),
 				     GNC_RND_ROUND);
   }
   xaccAccountCommitEdit(acc);
@@ -1260,7 +1260,7 @@
 }
 
 void
-xaccAccountSetSecuritySCU (Account *acc, int scu) {
+xaccAccountSetCommoditySCU (Account *acc, int scu) {
 
   if (!acc) return;
 
@@ -1280,7 +1280,7 @@
 }
 
 int
-xaccAccountGetSecuritySCU (Account * acc) {
+xaccAccountGetCommoditySCU (Account * acc) {
   if (!acc) return 0;
 
   if (acc->security == NULL)
@@ -1419,7 +1419,7 @@
 }
 
 gnc_commodity * 
-xaccAccountGetEffectiveSecurity (Account *acc)
+xaccAccountGetCommodity (Account *acc)
 {
   if (!acc) return NULL;
 
Index: gnucash/src/engine/Account.h
diff -u gnucash/src/engine/Account.h:1.72 gnucash/src/engine/Account.h:1.73
--- gnucash/src/engine/Account.h:1.72	Thu May 17 05:18:48 2001
+++ gnucash/src/engine/Account.h	Fri Jun  1 17:45:56 2001
@@ -213,8 +213,10 @@
  * split is a translation of the Split's 'damount' (which is the
  * amount of the Account's commodity involved) into the Transaction's
  * balancing currency.  */
-#define xaccAccountGetCommodity xaccAccountGetEffectiveSecurity
 void xaccAccountSetCommodity (Account *account, gnc_commodity *comm);
+gnc_commodity * xaccAccountGetCommodity (Account *account);
+int  xaccAccountGetCommoditySCU (Account *account);
+void xaccAccountSetCommoditySCU (Account *account, int frac);
 
 /* Soon-to-be-deprecated currency/security access routines.
  * The future API will associate only one thing with an account:
@@ -223,14 +225,10 @@
 /* these two funcs take control of their gnc_commodity args. Don't free */
 void xaccAccountSetCurrency (Account *account, gnc_commodity *currency);
 void xaccAccountSetSecurity (Account *account, gnc_commodity *security);
-void xaccAccountSetCurrencySCU (Account *account, int frac);
-void xaccAccountSetSecuritySCU (Account *account, int frac);
-int  xaccAccountGetCurrencySCU (Account *account);
-int  xaccAccountGetSecuritySCU (Account *account);
-
 gnc_commodity * xaccAccountGetCurrency (Account *account);
 gnc_commodity * xaccAccountGetSecurity (Account *account);
-gnc_commodity * xaccAccountGetEffectiveSecurity (Account *account);
+void xaccAccountSetCurrencySCU (Account *account, int frac);
+int  xaccAccountGetCurrencySCU (Account *account);
 
 AccountGroup * xaccAccountGetChildren (Account *account);
 AccountGroup * xaccAccountGetParent (Account *account);
Index: gnucash/src/engine/Query.c
diff -u gnucash/src/engine/Query.c:1.79 gnucash/src/engine/Query.c:1.81
--- gnucash/src/engine/Query.c:1.79	Thu May 31 12:44:58 2001
+++ gnucash/src/engine/Query.c	Fri Jun  1 23:28:16 2001
@@ -146,7 +146,8 @@
           break;
         }
         case PR_ACTION:
-          printf ("action\n");
+          printf ("action sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
+          printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_AMOUNT:
           printf ("amount\n");
@@ -157,24 +158,37 @@
         case PR_CLEARED:
           printf ("cleared\n");
           break;
-        case PR_DATE:
+        case PR_DATE: {
+          char buff[40];
           printf ("date sense=%d use_start=%d use_end=%d\n", 
                   qt->data.base.sense,
                   qt->data.date.use_start,
                   qt->data.date.use_end
                   );
+          if (qt->data.date.use_start) {
+             gnc_timespec_to_iso8601_buff (qt->data.date.start, buff);
+             printf ("\tstart date=%s\n", buff);
+          }
+          if (qt->data.date.use_end) {
+             gnc_timespec_to_iso8601_buff (qt->data.date.end, buff);
+             printf ("\tend date=%s\n", buff);
+          }
           break;
+        }
         case PR_DESC:
-          printf ("desc\n");
+          printf ("desc sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
+          printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_MEMO:
-          printf ("memo\n");
+          printf ("memo sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
+          printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_MISC:
           printf ("misc\n");
           break;
         case PR_NUM:
-          printf ("num\n");
+          printf ("num sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
+          printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_PRICE:
           printf ("price\n");
Index: gnucash/src/engine/Scrub.c
diff -u gnucash/src/engine/Scrub.c:1.28 gnucash/src/engine/Scrub.c:1.30
--- gnucash/src/engine/Scrub.c:1.28	Tue Apr 17 04:32:02 2001
+++ gnucash/src/engine/Scrub.c	Fri Jun  1 17:45:56 2001
@@ -212,11 +212,11 @@
   }
 
   if (!gnc_commodity_equiv (xaccAccountGetCurrency (account),
-                            xaccAccountGetEffectiveSecurity (account)))
+                            xaccAccountGetCommodity (account)))
     return;
 
   scu = MIN (xaccAccountGetCurrencySCU (account),
-             xaccAccountGetSecuritySCU (account));
+             xaccAccountGetCommoditySCU (account));
 
   value = xaccSplitGetValue (split);
 
@@ -343,7 +343,7 @@
     if (!trans_was_open)
       xaccTransBeginEdit (trans);
 
-    common_currency = xaccTransFindCommonCurrency (trans);
+    common_currency = xaccTransGetCurrency (trans);
     account = xaccSplitGetAccount (balance_split);
 
     commodity = xaccAccountGetCurrency (account);
@@ -402,7 +402,7 @@
   Account * acc;
 
   /* build the account name */
-  currency = xaccTransFindCommonCurrency (trans);
+  currency = xaccTransGetCurrency (trans);
 
   accname = g_strconcat (name_root, "-",
                          gnc_commodity_get_mnemonic(currency), NULL);
Index: gnucash/src/engine/Transaction.c
diff -u gnucash/src/engine/Transaction.c:1.174 gnucash/src/engine/Transaction.c:1.176
--- gnucash/src/engine/Transaction.c:1.174	Tue Apr 17 04:32:02 2001
+++ gnucash/src/engine/Transaction.c	Fri Jun  1 17:45:57 2001
@@ -442,7 +442,7 @@
 static int
 get_security_denom(Split * s) 
 {
-    return get_denom_internal(s, xaccAccountGetSecuritySCU);
+    return get_denom_internal(s, xaccAccountGetCommoditySCU);
 }
 
 /********************************************************************\
@@ -944,10 +944,10 @@
   }
 
   currency = xaccAccountGetCurrency (xaccSplitGetAccount(s));
-  security = xaccAccountGetEffectiveSecurity (xaccSplitGetAccount(s));
+  security = xaccAccountGetCommodity (xaccSplitGetAccount(s));
 
   /* if the base_currency is the account currency, set the 
-   * value.  If it's the account security, set the damount. 
+   * value.  If it's the account commodity, set the damount. 
    * If both, set both. */
   if (gnc_commodity_equiv(currency, base_currency)) {
     if(gnc_commodity_equiv(security, base_currency)) {
@@ -1120,7 +1120,7 @@
   if (!trans)
     return gnc_numeric_zero ();
 
-  currency = xaccTransFindCommonCurrency (trans);
+  currency = xaccTransGetCurrency (trans);
   return xaccSplitsComputeValue (trans->splits, NULL, currency);
 }
 
Index: gnucash/src/engine/gnc-account-xml-v2.c
diff -u gnucash/src/engine/gnc-account-xml-v2.c:1.20 gnucash/src/engine/gnc-account-xml-v2.c:1.21
--- gnucash/src/engine/gnc-account-xml-v2.c:1.20	Sat May 26 15:18:54 2001
+++ gnucash/src/engine/gnc-account-xml-v2.c	Fri Jun  1 17:45:59 2001
@@ -101,7 +101,7 @@
         xmlAddChild(ret, commodity_ref_to_dom_tree(act_security_string,
                                                 xaccAccountGetSecurity(act)));
         xmlAddChild(ret, int_to_dom_tree(act_security_scu_string,
-                                         xaccAccountGetSecuritySCU(act)));
+                                         xaccAccountGetCommoditySCU(act)));
     }
 
     if(xaccAccountGetSlots(act))
@@ -205,7 +205,7 @@
 {
     gint64 val;
     dom_tree_to_integer(node, &val);
-    xaccAccountSetSecuritySCU((Account*)act, val);
+    xaccAccountSetCommoditySCU((Account*)act, val);
 
     return TRUE;
 }
Index: gnucash/src/engine/gnc-engine-util.h
diff -u gnucash/src/engine/gnc-engine-util.h:1.8 gnucash/src/engine/gnc-engine-util.h:1.9
--- gnucash/src/engine/gnc-engine-util.h:1.8	Sun Apr  8 06:19:24 2001
+++ gnucash/src/engine/gnc-engine-util.h	Fri Jun  1 23:40:25 2001
@@ -169,6 +169,13 @@
   }					\
 }
 
+/* Define the long long int conversion for scanf */
+#if HAVE_SCANF_LLD
+# define GNC_SCANF_LLD "%lld"
+#else
+# define GNC_SCANF_LLD "%qd"
+#endif
+
 
 /** Prototypes *************************************************/
 
Index: gnucash/src/engine/gnc-numeric.c
diff -u gnucash/src/engine/gnc-numeric.c:1.14 gnucash/src/engine/gnc-numeric.c:1.15
--- gnucash/src/engine/gnc-numeric.c:1.14	Sun Apr 15 18:07:27 2001
+++ gnucash/src/engine/gnc-numeric.c	Fri Jun  1 23:40:25 2001
@@ -1062,7 +1062,8 @@
   if(!str) return NULL;
 
   /* must use "<" here because %n's effects aren't well defined */
-  if(sscanf(str, " %lld/%lld%n", &tmpnum, &tmpdenom, &num_read) < 2) {
+  if(sscanf(str, " " GNC_SCANF_LLD "/" GNC_SCANF_LLD "%n",
+            &tmpnum, &tmpdenom, &num_read) < 2) {
     return(NULL);
   }
   n->num = tmpnum;
Index: gnucash/src/engine/sixtp-dom-parsers.c
diff -u gnucash/src/engine/sixtp-dom-parsers.c:1.20 gnucash/src/engine/sixtp-dom-parsers.c:1.21
--- gnucash/src/engine/sixtp-dom-parsers.c:1.20	Fri Jun  1 02:37:03 2001
+++ gnucash/src/engine/sixtp-dom-parsers.c	Fri Jun  1 23:40:26 2001
@@ -742,7 +742,7 @@
 {
     long long int to_in;
 
-    if(sscanf(content, "%lld", &to_in) == 1)
+    if(sscanf(content, GNC_SCANF_LLD, &to_in) == 1)
     {
         if (to)
           *to = to_in;
Index: gnucash/src/engine/sixtp-utils.c
diff -u gnucash/src/engine/sixtp-utils.c:1.14 gnucash/src/engine/sixtp-utils.c:1.15
--- gnucash/src/engine/sixtp-utils.c:1.14	Thu May 31 15:00:43 2001
+++ gnucash/src/engine/sixtp-utils.c	Fri Jun  1 23:40:26 2001
@@ -39,7 +39,9 @@
 #include "date.h"
 #include "guid.h"
 #include "gnc-numeric.h"
+#include "gnc-engine-util.h"
 
+
 gboolean
 isspace_str(const gchar *str, int nomorethan) {
   const gchar *cursor = str;
@@ -197,7 +199,7 @@
   int num_read;
 
   /* must use "<" here because %n's effects aren't well defined */
-  if(sscanf(str, " %lld %n", &v_in, &num_read) < 1) {
+  if(sscanf(str, " " GNC_SCANF_LLD " %n", &v_in, &num_read) < 1) {
     return(FALSE);
   }
 
Index: gnucash/src/engine/rpc/RpcUtils.c
diff -u gnucash/src/engine/rpc/RpcUtils.c:1.5 gnucash/src/engine/rpc/RpcUtils.c:1.6
--- gnucash/src/engine/rpc/RpcUtils.c:1.5	Thu May 10 11:13:13 2001
+++ gnucash/src/engine/rpc/RpcUtils.c	Fri Jun  1 16:53:17 2001
@@ -377,7 +377,7 @@
   if (!rpctxn || !txn)
     return;
 
-  c = xaccTransFindCommonCurrency (txn);
+  c = xaccTransGetCurrency (txn);
   ENTER ("%p, com=%p", txn, c);
 
   /* Copy the Transaction information */
Index: gnucash/src/engine/sql/Makefile.am
diff -u gnucash/src/engine/sql/Makefile.am:1.12 gnucash/src/engine/sql/Makefile.am:1.13
--- gnucash/src/engine/sql/Makefile.am:1.12	Tue May 22 01:27:11 2001
+++ gnucash/src/engine/sql/Makefile.am	Fri Jun  1 23:21:59 2001
@@ -2,19 +2,21 @@
 # Build the postgres backend as its own loadable shared object.
 
 lib_LTLIBRARIES = libgnc_postgres.la
-libgnc_postgres_la_LDFLAGS = -version-info 6:2:6
+libgnc_postgres_la_LDFLAGS = -version-info 6:3:6
 
 
 libgnc_postgres_la_SOURCES = \
   PostgresBackend.c \
   builder.c \
   checkpoint.c \
+  escape.c \
   gncquery.c \
   kvp-sql.c
 
 noinst_HEADERS = \
   PostgresBackend.h \
   builder.h \
+  escape.h \
   gncquery.h \
   kvp-sql.h \
   putil.h
Index: gnucash/src/engine/sql/PostgresBackend.c
diff -u gnucash/src/engine/sql/PostgresBackend.c:1.52 gnucash/src/engine/sql/PostgresBackend.c:1.53
--- gnucash/src/engine/sql/PostgresBackend.c:1.52	Thu May 31 15:06:42 2001
+++ gnucash/src/engine/sql/PostgresBackend.c	Sat Jun  2 00:40:15 2001
@@ -41,6 +41,7 @@
 
 #include <ctype.h>
 #include <glib.h>
+#include <netdb.h>
 #include <pwd.h>
 #include <stdio.h>  
 #include <string.h>  
@@ -102,10 +103,25 @@
    *p = 0;
    if (0 == gethostname (p, QBUFSIZE/3)) 
    {
-      p += strlen (p);
-      p = stpcpy (p, ".");
+      extern int h_errno;
+      struct hostent *hent;
+
+      hent = gethostbyname (be->buff);
+      if (hent) 
+      {
+         strcpy (be->buff, hent->h_name);
+      }
+      else
+      {
+         PERR ("can't get domainname: %s", hstrerror(h_errno));
+      }
+   } 
+   else
+   {
+      *p = 0;
+      PERR ("can't get hostname");
    }
-   getdomainname (p, QBUFSIZE/3);
+
    return be->buff;
 }
 
Index: gnucash/src/engine/sql/builder.c
diff -u gnucash/src/engine/sql/builder.c:1.11 gnucash/src/engine/sql/builder.c:1.12
--- gnucash/src/engine/sql/builder.c:1.11	Sun Apr 15 18:07:28 2001
+++ gnucash/src/engine/sql/builder.c	Fri Jun  1 23:12:52 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * builder.c : compile SQL queries from C language data             *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
  * FILE:
  * builder.c
@@ -19,6 +41,7 @@
 #include <string.h>
 
 #include "date.h"
+#include "escape.h"
 #include "builder.h"
 #include "gnc-engine-util.h"
 
@@ -44,73 +67,10 @@
    size_t buflen;
 
    /* pointer to temp memory used for escaping arguments */
-   char * escape;
-   size_t esc_buflen;
+   sqlEscape *escape;
 };
 
 /* ================================================ */
-/* escape single-quote marks and backslashes so that the 
- * database SQL parser doesn't puke on the query string 
- */
-
-static const char *
-sqlBuilder_escape (sqlBuilder *b, const char *str)
-{
-   const char *p, *src_head;
-   char *dst_tail;
-   size_t len, slen;
-   
-   /* if nothing to escape, just return */
-   len = strlen (str);
-   slen = strcspn (str, "\\\'");
-   if (len == slen) return str;
-
-   /* count to see how much space we'll need */
-   p = str + slen + 1;
-   while (*p)
-   {
-      len ++;
-      p += 1 + strcspn (p, "\\\'");
-   }
-
-   /* get more space, if needed */
-   if (len >= b->esc_buflen)
-   {
-      b->escape = g_realloc(b->escape, len+100);
-      b->esc_buflen = len+100;
-   }
-
-   /* copy and escape */
-   src_head = (char *) str;
-   dst_tail = b->escape;
-   p = src_head + strcspn (src_head, "\\\'");
-   while (*p)
-   {
-      size_t cp_len = p - src_head;
-
-      strncpy (dst_tail, src_head, cp_len);
-      dst_tail += cp_len;
-      *dst_tail = '\\';
-      dst_tail ++;
-      *dst_tail = *p;
-      dst_tail ++;
-
-      src_head = p+1;
-      p = src_head + strcspn (src_head, "\\\'");
-   }
-   if (p != src_head)
-   {
-      size_t cp_len = p - src_head;
-
-      strncpy (dst_tail, src_head, cp_len);
-      dst_tail += cp_len;
-   }
-   *dst_tail = 0;
-
-   return b->escape;
-}
-
-/* ================================================ */
 
 #define INITIAL_BUFSZ 16300
 
@@ -137,20 +97,19 @@
    b->where_need_and = 0;
 
    /* the escape area */
-   b->escape = g_malloc (INITIAL_BUFSZ);
-   b->esc_buflen = INITIAL_BUFSZ;
+   b->escape = sqlEscape_new ();
    return (b);
 }
 
 /* ================================================ */
 
 void
-sqlBuilder_destroy (sqlBuilder*b)
+sqlBuilder_destroy (sqlBuilder *b)
 {
    if (!b) return;
    g_free (b->tag_base);   b->tag_base = NULL;
    g_free (b->val_base);   b->val_base = NULL;
-   g_free (b->escape);     b->escape = NULL;
+   sqlEscape_destroy (b->escape);     b->escape = NULL;
    g_free (b);
 }
 
@@ -211,7 +170,7 @@
    if (!b || !tag) return;
    if (!val) val= "";
 
-   val = sqlBuilder_escape (b, val);
+   val = sqlEscapeString (b->escape, val);
 
    if (b->tag_need_comma) b->ptag = stpcpy(b->ptag, ", ");
    b->tag_need_comma = 1;
@@ -343,7 +302,7 @@
 {
    if (!b || !tag || !val) return;
 
-   val = sqlBuilder_escape (b, val);
+   val = sqlEscapeString (b->escape, val);
    switch (b->qtype) 
    {
       case SQL_INSERT:
Index: gnucash/src/engine/sql/builder.h
diff -u gnucash/src/engine/sql/builder.h:1.5 gnucash/src/engine/sql/builder.h:1.7
--- gnucash/src/engine/sql/builder.h:1.5	Mon Feb 12 00:59:38 2001
+++ gnucash/src/engine/sql/builder.h	Fri Jun  1 23:25:46 2001
@@ -1,10 +1,35 @@
+/********************************************************************\
+ * builder.h : Compile SQL queries from C language values           *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
- * FIEL:
+ * FILE:
  * builder.h
  *
  * FUNCTION:
  * Generic SQL backend query builder
  * Compiles typed tag-value pairs into sql queries
+ *
+ * The code here is/should be general enought to work with 
+ * any SQL implementation.
  *
  * HISTORY:
  * Linas Vepstas January 2001
Index: gnucash/src/engine/sql/checkpoint.c
diff -u gnucash/src/engine/sql/checkpoint.c:1.9 gnucash/src/engine/sql/checkpoint.c:1.10
--- gnucash/src/engine/sql/checkpoint.c:1.9	Thu May 31 15:06:43 2001
+++ gnucash/src/engine/sql/checkpoint.c	Fri Jun  1 23:23:45 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * checkpoint.c : computes account balance checkpoints              *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /* 
  * FILE:
  * checkpoint.c
Index: gnucash/src/engine/sql/escape.c
diff -u /dev/null gnucash/src/engine/sql/escape.c:1.2
--- /dev/null	Sat Jun  2 08:03:57 2001
+++ gnucash/src/engine/sql/escape.c	Fri Jun  1 23:48:31 2001
@@ -0,0 +1,131 @@
+/********************************************************************\
+ * escape.c : escape SQL reserved characters                        *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
+/*
+ * FILE:
+ * esacpe.c
+ *
+ * FUNCTION:
+ * Escapes the ' and \ characters in a string
+ */
+
+#define _GNU_SOURCE
+#include <glib.h>
+#include <string.h>
+
+#include "escape.h"
+
+/* ================================================ */
+
+struct _escape {
+   /* pointer to memory used for escaping arguments */
+   char * escape;
+   size_t esc_buflen;
+};
+
+/* ================================================ */
+/* escape single-quote marks and backslashes so that the 
+ * database SQL parser doesn't puke on the query string 
+ */
+
+const char *
+sqlEscapeString (sqlEscape *b, const char *str)
+{
+   const char *p, *src_head;
+   char *dst_tail;
+   size_t len, slen;
+   
+   /* if nothing to escape, just return */
+   len = strlen (str);
+   slen = strcspn (str, "\\\'");
+   if (len == slen) return str;
+
+   /* count to see how much space we'll need */
+   p = str + slen + 1;
+   while (*p)
+   {
+      len ++;
+      p += 1 + strcspn (p, "\\\'");
+   }
+
+   /* get more space, if needed */
+   if (len >= b->esc_buflen)
+   {
+      b->escape = g_realloc(b->escape, len+100);
+      b->esc_buflen = len+100;
+   }
+
+   /* copy and escape */
+   src_head = (char *) str;
+   dst_tail = b->escape;
+   p = src_head + strcspn (src_head, "\\\'");
+   while (*p)
+   {
+      size_t cp_len = p - src_head;
+
+      strncpy (dst_tail, src_head, cp_len);
+      dst_tail += cp_len;
+      *dst_tail = '\\';
+      dst_tail ++;
+      *dst_tail = *p;
+      dst_tail ++;
+
+      src_head = p+1;
+      p = src_head + strcspn (src_head, "\\\'");
+   }
+   if (p != src_head)
+   {
+      size_t cp_len = p - src_head;
+
+      strncpy (dst_tail, src_head, cp_len);
+      dst_tail += cp_len;
+   }
+   *dst_tail = 0;
+
+   return b->escape;
+}
+
+/* ================================================ */
+
+#define INITIAL_BUFSZ 2000
+
+sqlEscape *
+sqlEscape_new (void)
+{
+   sqlEscape *b = g_new (sqlEscape, 1);
+
+   b->escape = g_malloc (INITIAL_BUFSZ);
+   b->esc_buflen = INITIAL_BUFSZ;
+   return (b);
+}
+
+/* ================================================ */
+
+void
+sqlEscape_destroy (sqlEscape *b)
+{
+   if (!b) return;
+   g_free (b->escape);     b->escape = NULL;
+   g_free (b);
+}
+
+/* ================ END OF FILE ==================== */
Index: gnucash/src/engine/sql/escape.h
diff -u /dev/null gnucash/src/engine/sql/escape.h:1.1
--- /dev/null	Sat Jun  2 08:03:57 2001
+++ gnucash/src/engine/sql/escape.h	Fri Jun  1 23:09:28 2001
@@ -0,0 +1,45 @@
+/********************************************************************\
+ * escape.h : Escape SQL reserved characters in strings             *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
+/*
+ * FILE:
+ * escape.h
+ *
+ * FUNCTION:
+ * Escape SQL reserved cahracters \ and ' from strings
+ *
+ * HISTORY:
+ * Linas Vepstas January 2001
+ */
+
+#ifndef __SQL_ESCAPE_H__
+#define __SQL_ESCAPE_H__
+
+typedef struct _escape sqlEscape;
+
+sqlEscape * sqlEscape_new(void);
+void sqlEscape_destroy (sqlEscape *);
+
+const char * sqlEscapeString (sqlEscape *, const char *orig_string);
+
+#endif /* __SQL_ESCAPE_H__ */
+
Index: gnucash/src/engine/sql/gncquery.c
diff -u gnucash/src/engine/sql/gncquery.c:1.3 gnucash/src/engine/sql/gncquery.c:1.5
--- gnucash/src/engine/sql/gncquery.c:1.3	Sun Feb 25 22:30:33 2001
+++ gnucash/src/engine/sql/gncquery.c	Sat Jun  2 00:39:39 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * gncquery.c : Convert gnucash engine Query into an SQL Query      *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
  * FILE:
  * gncquery.c
@@ -17,6 +39,7 @@
 #include <glib.h>
 #include <string.h>
 
+#include "escape.h"
 #include "gnc-engine-util.h"
 #include "gncquery.h"
 
@@ -27,6 +50,7 @@
    char * q_base;
    char * pq;
    size_t buflen;
+   sqlEscape *escape;
 };
 
 
@@ -43,6 +67,7 @@
    sq->buflen = INITIAL_BUFSZ;
 
    sq->pq = sq->q_base;
+   sq->escape = sqlEscape_new ();
    return sq;
 }
 
@@ -51,10 +76,39 @@
 {
    if (!sq) return;
    g_free(sq->q_base);
+   sqlEscape_destroy (sq->escape);
    g_free(sq);
 }
 
 /* =========================================================== */
+/* Note that postgres supports both case-sensitive and 
+ * case-insensitve string searches, and it also supports 
+ * regex!  yahooo! 
+ */
+
+#define STRING_TERM(fieldname)				\
+{							\
+   const char *tmp;					\
+							\
+   if (0 == pd->str.sense)				\
+   {							\
+      sq->pq = stpcpy (sq->pq, "NOT (");		\
+   }							\
+   sq->pq = stpcpy(sq->pq, fieldname " ~");		\
+   if (0 == pd->str.case_sens) {			\
+      sq->pq = stpcpy(sq->pq, "*");			\
+   }							\
+   sq->pq = stpcpy(sq->pq, " '");			\
+   tmp = sqlEscapeString (sq->escape, pd->str.matchstring); \
+   sq->pq = stpcpy(sq->pq, tmp);			\
+   sq->pq = stpcpy(sq->pq, "'");			\
+   if (0 == pd->str.sense)				\
+   {							\
+      sq->pq = stpcpy (sq->pq, ") ");			\
+   }							\
+}
+
+/* =========================================================== */
 
 const char *
 sqlQuery_build (sqlQuery*sq, Query *q)
@@ -70,7 +124,9 @@
 
    /* reset the buffer pointers */
    sq->pq = sq->q_base;
-   sq->pq = stpcpy(sq->pq, "SELECT transGuid FROM gncEntry WHERE ");
+   sq->pq = stpcpy(sq->pq, 
+               "SELECT gncEntry.transGuid FROM gncEntry, gncTransaction "
+               "  WHERE gncEntry.transGuid = gncTransaction.transGuid AND ( ");
 
    qterms = xaccQueryGetTerms (q);
 
@@ -111,52 +167,108 @@
 
                PINFO("term is PR_ACCOUNT");
 
-               /* hack alert --  the following code is ignoring 
-                * both the 'how' and the 'sense' fields */
                for (acct = pd->acct.account_guids; acct; acct=acct->next)
                {
                   if (got_more) sq->pq = stpcpy(sq->pq, " AND ");
                   got_more = 1;
 
-                  sq->pq = stpcpy(sq->pq, "accountguid='");
+                  if ((0 == pd->acct.sense && ACCT_MATCH_NONE != pd->acct.how) ||
+                      (1 == pd->acct.sense && ACCT_MATCH_NONE == pd->acct.how))
+                  {
+                     sq->pq = stpcpy (sq->pq, "NOT ");
+                  }
+                  sq->pq = stpcpy(sq->pq, "gncEntry.accountGuid='");
                   sq->pq = guid_to_string_buff ((GUID*) acct->data, sq->pq);
                   sq->pq = stpcpy(sq->pq, "'");
                }
                break;
             }
+
             case PR_ACTION:
                PINFO("term is PR_ACTION");
+               STRING_TERM ("gncEntry.action");
                break;
+
             case PR_AMOUNT:
+            {
                PINFO("term is PR_AMOUNT");
+               PERR ("not implemented");
                break;
+            }
+
             case PR_BALANCE:
                PINFO("term is PR_BALANCE");
+               PERR ("not implemented");
                break;
             case PR_CLEARED:
                PINFO("term is PR_CLEARED");
+               PERR ("not implemented");
                break;
+
             case PR_DATE:
+            {
                PINFO("term is PR_DATE");
+               if (0 == pd->acct.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, "NOT (");
+               }
+               if (pd->date.use_start)
+               {
+                  sq->pq = stpcpy(sq->pq, "gncTransaction.date_posted >= '");
+                  sq->pq = gnc_timespec_to_iso8601_buff (pd->date.start, sq->pq);
+                  sq->pq = stpcpy(sq->pq, "' ");
+               }
+               if (pd->date.use_end)
+               {
+                  if (pd->date.use_start) 
+                  {
+                     sq->pq = stpcpy(sq->pq, "AND ");
+                  }
+                  sq->pq = stpcpy(sq->pq, "gncTransaction.date_posted <= '");
+                  sq->pq = gnc_timespec_to_iso8601_buff (pd->date.end, sq->pq);
+                  sq->pq = stpcpy(sq->pq, "' ");
+               }
+               if (!pd->date.use_start && !pd->date.use_end) 
+               {
+                  sq->pq = stpcpy(sq->pq, "TRUE ");
+               }
+               if (0 == pd->acct.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, ") ");
+               }
                break;
+            }
+
             case PR_DESC:
                PINFO("term is PR_DESC");
+               STRING_TERM ("gncTransaction.description");
                break;
+
             case PR_MEMO:
                PINFO("term is PR_MEMO");
+               STRING_TERM ("gncEntry.memo");
                break;
+
             case PR_MISC:
                PINFO("term is PR_MISC");
+               PERR ("not implemented");
                break;
+
             case PR_NUM:
                PINFO("term is PR_NUM");
+               STRING_TERM ("gncTransaction.num");
                break;
+
             case PR_PRICE:
                PINFO("term is PR_PRICE");
+               PERR ("not implemented");
                break;
+
             case PR_SHRS:
                PINFO("term is PR_SHRS");
+               PERR ("not implemented");
                break;
+
             default:
                PERR ("unkown query term type");
          }
@@ -166,6 +278,7 @@
       if (il->data) sq->pq = stpcpy(sq->pq, ")");
    }
 
+   sq->pq = stpcpy(sq->pq, ")");
 
    /* limit the query result to a finite numbe of rows */
    max_rows = xaccQueryGetMaxSplits (q);
Index: gnucash/src/engine/sql/gncquery.h
diff -u gnucash/src/engine/sql/gncquery.h:1.1 gnucash/src/engine/sql/gncquery.h:1.2
--- gnucash/src/engine/sql/gncquery.h:1.1	Sat Jan 20 01:00:11 2001
+++ gnucash/src/engine/sql/gncquery.h	Fri Jun  1 23:48:53 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * gncquery.h : Convert gnucash engine Query into an SQL Query      *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
  * FILE:
  * gncquery.h
Index: gnucash/src/engine/sql/kvp-sql.c
diff -u gnucash/src/engine/sql/kvp-sql.c:1.4 gnucash/src/engine/sql/kvp-sql.c:1.5
--- gnucash/src/engine/sql/kvp-sql.c:1.4	Thu May 31 15:06:10 2001
+++ gnucash/src/engine/sql/kvp-sql.c	Fri Jun  1 23:25:07 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * kvp-sql.c : store KVP frames in SQL db                           *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
  * FILE:
  * kvp-sql.c
Index: gnucash/src/engine/sql/kvp-sql.h
diff -u gnucash/src/engine/sql/kvp-sql.h:1.2 gnucash/src/engine/sql/kvp-sql.h:1.3
--- gnucash/src/engine/sql/kvp-sql.h:1.2	Sat May 26 23:55:35 2001
+++ gnucash/src/engine/sql/kvp-sql.h	Fri Jun  1 23:25:07 2001
@@ -1,3 +1,25 @@
+/********************************************************************\
+ * kvp-sql.h : store KVP frames in SQL db                           *
+ * Copyright (C) 2001 Linas Vepstas <linas@linas.org>               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /*
  * FILE:
  * kvp-sql.h
Index: gnucash/src/gnome/druid-stock-split.c
diff -u gnucash/src/gnome/druid-stock-split.c:1.14 gnucash/src/gnome/druid-stock-split.c:1.15
--- gnucash/src/gnome/druid-stock-split.c:1.14	Sun May 27 02:35:24 2001
+++ gnucash/src/gnome/druid-stock-split.c	Fri Jun  1 17:46:02 2001
@@ -183,7 +183,7 @@
   gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (info->distribution_edit),
                                   print_info);
   gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (info->distribution_edit),
-                                xaccAccountGetSecuritySCU (account));
+                                xaccAccountGetCommoditySCU (account));
 
   gnc_currency_edit_set_currency
     (GNC_CURRENCY_EDIT (info->price_currency_edit),
Index: gnucash/src/gnome/top-level.c
diff -u gnucash/src/gnome/top-level.c:1.84 gnucash/src/gnome/top-level.c:1.85
--- gnucash/src/gnome/top-level.c:1.84	Thu May 10 17:55:02 2001
+++ gnucash/src/gnome/top-level.c	Sat Jun  2 04:56:54 2001
@@ -32,6 +32,8 @@
 #include <gconf/gconf.h>
 #endif
 
+#include <X11/Xlib.h>
+
 #include "AccWindow.h"
 #include "FileBox.h"
 #include "FileDialog.h"
@@ -435,6 +437,28 @@
   return TRUE;
 }
 
+static int
+gnc_x_error (Display	 *display,
+	     XErrorEvent *error)
+{
+  if (error->error_code)
+  {
+    char buf[64];
+
+    XGetErrorText (display, error->error_code, buf, 63);
+
+    g_warning ("X-ERROR **: %s\n  serial %ld error_code %d "
+               "request_code %d minor_code %d\n", 
+               buf, 
+               error->serial, 
+               error->error_code, 
+               error->request_code,
+               error->minor_code);
+  }
+
+  return 0;
+}
+
 int
 gnc_ui_start_event_loop (void)
 {
@@ -442,8 +466,10 @@
 
   gnome_is_running = TRUE;
 
-  id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
+  id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 1, // 0000, /* 10 secs */
                            gnc_ui_check_events, NULL, NULL);
+
+  XSetErrorHandler (gnc_x_error);
 
   /* Enter gnome event loop */
   gtk_main ();
Index: gnucash/src/gnome/window-reconcile.c
diff -u gnucash/src/gnome/window-reconcile.c:1.70 gnucash/src/gnome/window-reconcile.c:1.71
--- gnucash/src/gnome/window-reconcile.c:1.70	Wed May 23 04:42:34 2001
+++ gnucash/src/gnome/window-reconcile.c	Fri Jun  1 17:46:02 2001
@@ -454,7 +454,7 @@
     if ((account_type == STOCK) || (account_type == MUTUAL) ||
         (account_type == CURRENCY))
       gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (end_value),
-                                    xaccAccountGetSecuritySCU (account));
+                                    xaccAccountGetCommoditySCU (account));
     else
       gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (end_value),
                                     xaccAccountGetCurrencySCU (account));
Index: gnucash/src/register/gnome/gnucash-date-picker.c
diff -u gnucash/src/register/gnome/gnucash-date-picker.c:1.3 gnucash/src/register/gnome/gnucash-date-picker.c:1.4
--- gnucash/src/register/gnome/gnucash-date-picker.c:1.3	Wed Dec 13 16:29:40 2000
+++ gnucash/src/register/gnome/gnucash-date-picker.c	Sat Jun  2 06:31:47 2001
@@ -217,6 +217,8 @@
 
   {
     GtkWidget *hbox;
+    GtkAllocation allocation;
+    GtkRequisition requisition;
 
     hbox = gtk_hbox_new (FALSE, 0);
 
@@ -228,6 +230,17 @@
                                   "x", -10000.0,
                                   "y", -10000.0,
                                   NULL);
+
+    gtk_widget_realize (calendar);
+
+    gtk_widget_size_request (calendar, &requisition);
+
+    allocation.x = 0;
+    allocation.y = 0;
+    allocation.width = requisition.width;
+    allocation.height = requisition.height;
+
+    gtk_widget_size_allocate (calendar, &allocation);
   }
 
   date_picker = GNC_DATE_PICKER (item);
Index: gnucash/src/test/test-xml-account.c
diff -u gnucash/src/test/test-xml-account.c:1.15 gnucash/src/test/test-xml-account.c:1.16
--- gnucash/src/test/test-xml-account.c:1.15	Tue May 15 10:53:14 2001
+++ gnucash/src/test/test-xml-account.c	Fri Jun  1 17:46:07 2001
@@ -133,9 +133,9 @@
         }
         else if(safe_strcmp(mark->name, "act:security-scu") == 0)
         {
-            if(!equals_node_val_vs_int(mark, xaccAccountGetSecuritySCU(act)))
+            if(!equals_node_val_vs_int(mark, xaccAccountGetCommoditySCU(act)))
             {
-                return g_strdup("security scus differ");
+                return g_strdup("commodity scus differ");
             }
         }
         else