[Gnucash-changes] sync with QOF sourceforge CVS

Linas Vepstas linas at cvs.gnucash.org
Fri Apr 9 09:54:54 EDT 2004


Log Message:
-----------
sync with QOF sourceforge CVS

Modified Files:
--------------
    gnucash/src/engine:
        qof.h
        qofquery.c
        qofquerycore.h

Revision Data
-------------
Index: qofquery.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/engine/qofquery.c -Lsrc/engine/qofquery.c -u -r1.18 -r1.19
--- src/engine/qofquery.c
+++ src/engine/qofquery.c
@@ -1016,7 +1016,8 @@
  * combine 2 Query objects by the logical operation in "op".
  ********************************************************************/
 
-QofQuery * qof_query_merge(QofQuery *q1, QofQuery *q2, QofQueryOp op)
+QofQuery * 
+qof_query_merge(QofQuery *q1, QofQuery *q2, QofQueryOp op)
 {
   
   QofQuery * retval = NULL;
@@ -1025,7 +1026,9 @@
   GList * i, * j;
   QofIdType search_for;
 
-  if(!q1 || !q2 ) return NULL;
+  if(!q1) return q2;
+  if(!q2) return q1;
+
   if (q1->search_for && q2->search_for)
     g_return_val_if_fail (safe_strcmp (q1->search_for, q2->search_for) == 0,
                           NULL);
Index: qofquerycore.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquerycore.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/qofquerycore.h -Lsrc/engine/qofquerycore.h -u -r1.7 -r1.8
--- src/engine/qofquerycore.h
+++ src/engine/qofquerycore.h
@@ -59,10 +59,18 @@
   QOF_STRING_MATCH_CASEINSENSITIVE
 } QofStringMatch;
 
-/* Comparisons for QOF_TYPE_DATE	*/
+/** Comparisons for QOF_TYPE_DATE	
+ * The QOF_DATE_MATCH_DAY comparison rounds the two time
+ *     values to mid-day and then compares these rounded values.
+ * The QOF_DATE_MATCH_TIME comparison matches teh time values,
+ *     down to the second.
+ */
+/* XXX remove these deprecated old names .. */
+#define QOF_DATE_MATCH_ROUNDED QOF_DATE_MATCH_DAY
+#define QOF_DATE_MATCH_NORMAL  QOF_DATE_MATCH_TIME
 typedef enum {
   QOF_DATE_MATCH_NORMAL = 1,
-  QOF_DATE_MATCH_ROUNDED
+  QOF_DATE_MATCH_DAY
 } QofDateMatch;
 
 /* Comparisons for QOF_TYPE_NUMERIC, QOF_TYPE_DEBCRED	*/
Index: qof.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qof.h -Lsrc/engine/qof.h -u -r1.3 -r1.4
--- src/engine/qof.h
+++ src/engine/qof.h
@@ -37,5 +37,6 @@
 #include "qof/qofquery.h"
 #include "qof/qofquerycore.h"
 #include "qof/qofsession.h"
+#include "qof/qofsql.h"
 
 #endif /* QOF_H_ */


More information about the Gnucash-changes mailing list