a couple more date fixes

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1463 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/xacc-12-patch
Linas Vepstas 28 years ago
parent de92dc7ef0
commit 93ef506272

@ -80,6 +80,7 @@ xaccMallocQuery (void)
static int Sort_DATE_NUM_AMOUNT (Split **, Split **);
#define LONG_LONG_MAX 0x7fffffffffffffffLL
#define LONG_LONG_MIN (- (0x7fffffffffffffffLL) -1)
void
xaccInitQuery (Query *q)
@ -91,7 +92,7 @@ xaccInitQuery (Query *q)
q->changed = 0;
q->max_num_splits = INT_MAX ;
q->earliest.tv_sec = - (LONG_LONG_MAX) - 1;
q->earliest.tv_sec = LONG_LONG_MIN;
q->earliest.tv_nsec = 0;
/* Its a signed, 64-bit int */
@ -101,7 +102,7 @@ xaccInitQuery (Query *q)
q->earliest_found.tv_sec = LONG_LONG_MAX;
q->earliest_found.tv_nsec = 0;
q->latest_found.tv_sec = - (LONG_LONG_MAX) - 1;
q->latest_found.tv_sec = LONG_LONG_MIN;
q->latest_found.tv_nsec = 0;
q->sort_func = (int (*)(const void*, const void *)) Sort_DATE_NUM_AMOUNT;
@ -203,7 +204,7 @@ xaccQuerySetMaxSplits (Query *q, int max)
/* ================================================== */
void
xaccQuerySetDateRange (Query *q, time_t early, time_t late)
xaccQuerySetDateRange (Query *q, long long early, long long late)
{
if (!q) return;
q->changed = 1;

@ -61,10 +61,11 @@ void xaccQueryAddAccount (Query *, Account *acc);
void xaccQuerySetMaxSplits (Query *, int);
/* The xaccQuerySetDateRange() method sets the date range
* for the query. Thje query will return only those splits
* that are within this date range.
* for the query. The query will return only those splits
* that are within this date range. The arguments "earliest"
* and "latest" are seconds before or since 00:00:00 Jan 1 1970.
*/
void xaccQuerySetDateRange (Query *, time_t earliest, time_t latest);
void xaccQuerySetDateRange (Query *, long long earliest, long long latest);
/* The xaccQuerySetSortOrder() method sets the sort order that
* should be used on the splits. The three arguments should

@ -1511,7 +1511,7 @@ xaccTransSetDateEnteredTS (Transaction *trans, Timespec *ts)
trans->date_entered.tv_nsec = ts->tv_nsec;
}
#define THIRTY_TWO_YEARS 0x3c30fc00L
#define THIRTY_TWO_YEARS 0x3c30fc00LL
void
xaccTransSetDate (Transaction *trans, int day, int mon, int year)

Loading…
Cancel
Save