QOF
0.7.5
|
transitional header from libqof1 to libqof2 More...
#include "qof.h"
Go to the source code of this file.
transitional header from libqof1 to libqof2
Definition in file deprecated.h.
#define ENUM_LIST_DEP | ( | _ | ) |
Definition at line 731 of file deprecated.h.
#define GNC_DENOM_AUTO QOF_DENOM_AUTO |
Definition at line 558 of file deprecated.h.
#define GNC_DENOM_EXACT QOF_HOW_DENOM_EXACT |
Definition at line 711 of file deprecated.h.
#define GNC_DENOM_FIXED QOF_HOW_DENOM_FIXED |
Definition at line 717 of file deprecated.h.
#define GNC_DENOM_LCD QOF_HOW_DENOM_LCD |
Definition at line 715 of file deprecated.h.
Definition at line 560 of file deprecated.h.
#define GNC_DENOM_REDUCE QOF_HOW_DENOM_REDUCE |
Definition at line 713 of file deprecated.h.
#define GNC_DENOM_SIGFIG QOF_HOW_DENOM_SIGFIG |
Definition at line 719 of file deprecated.h.
#define GNC_DENOM_SIGFIGS | ( | X | ) | QOF_HOW_DENOM_SIGFIGS(X) |
Definition at line 721 of file deprecated.h.
#define GNC_ERROR_ARG QOF_ERROR_ARG |
Definition at line 548 of file deprecated.h.
Definition at line 552 of file deprecated.h.
#define GNC_ERROR_OK QOF_ERROR_OK |
Definition at line 546 of file deprecated.h.
#define GNC_ERROR_OVERFLOW QOF_ERROR_OVERFLOW |
Definition at line 550 of file deprecated.h.
Definition at line 554 of file deprecated.h.
#define GNC_EVENT_ADD QOF_EVENT_ADD |
Definition at line 102 of file deprecated.h.
#define GNC_EVENT_ALL QOF_EVENT_ALL |
Definition at line 106 of file deprecated.h.
#define GNC_EVENT_CREATE QOF_EVENT_CREATE |
Definition at line 96 of file deprecated.h.
#define GNC_EVENT_DESTROY QOF_EVENT_DESTROY |
Definition at line 100 of file deprecated.h.
#define GNC_EVENT_MODIFY QOF_EVENT_MODIFY |
Definition at line 98 of file deprecated.h.
#define GNC_EVENT_NONE QOF_EVENT_NONE |
Definition at line 94 of file deprecated.h.
#define GNC_EVENT_REMOVE QOF_EVENT_REMOVE |
Definition at line 104 of file deprecated.h.
Definition at line 532 of file deprecated.h.
Definition at line 538 of file deprecated.h.
#define GNC_HOW_DENOM_LCD QOF_HOW_DENOM_LCD |
Definition at line 536 of file deprecated.h.
Definition at line 534 of file deprecated.h.
Definition at line 540 of file deprecated.h.
Definition at line 542 of file deprecated.h.
#define GNC_HOW_GET_SIGFIGS QOF_HOW_GET_SIGFIGS |
Definition at line 544 of file deprecated.h.
#define GNC_HOW_RND_CEIL QOF_HOW_RND_CEIL |
Definition at line 518 of file deprecated.h.
#define GNC_HOW_RND_FLOOR QOF_HOW_RND_FLOOR |
Definition at line 516 of file deprecated.h.
#define GNC_HOW_RND_NEVER QOF_HOW_RND_NEVER |
Definition at line 530 of file deprecated.h.
Definition at line 522 of file deprecated.h.
#define GNC_HOW_RND_ROUND QOF_HOW_RND_ROUND |
Definition at line 528 of file deprecated.h.
Definition at line 524 of file deprecated.h.
Definition at line 526 of file deprecated.h.
#define GNC_HOW_RND_TRUNC QOF_HOW_RND_TRUNC |
Definition at line 520 of file deprecated.h.
#define GNC_LOG_DEBUG QOF_LOG_DEBUG |
Definition at line 77 of file deprecated.h.
#define GNC_LOG_DETAIL QOF_LOG_DETAIL |
Definition at line 79 of file deprecated.h.
#define GNC_LOG_ERROR QOF_LOG_ERROR |
Definition at line 71 of file deprecated.h.
#define GNC_LOG_FATAL QOF_LOG_FATAL |
Definition at line 69 of file deprecated.h.
#define GNC_LOG_INFO QOF_LOG_INFO |
Definition at line 75 of file deprecated.h.
#define GNC_LOG_TRACE QOF_LOG_TRACE |
Definition at line 81 of file deprecated.h.
#define GNC_LOG_WARNING QOF_LOG_WARNING |
Definition at line 73 of file deprecated.h.
#define GNC_NUMERIC_DENOM_MASK QOF_NUMERIC_DENOM_MASK |
Definition at line 512 of file deprecated.h.
#define GNC_NUMERIC_GET_SIGFIGS | ( | X | ) | QOF_HOW_GET_SIGFIGS(X) |
Definition at line 723 of file deprecated.h.
Definition at line 510 of file deprecated.h.
#define GNC_NUMERIC_SIGFIGS_MASK QOF_NUMERIC_SIGFIGS_MASK |
Definition at line 514 of file deprecated.h.
#define GNC_RND_CEIL QOF_HOW_RND_CEIL |
Definition at line 697 of file deprecated.h.
#define GNC_RND_FLOOR QOF_HOW_RND_FLOOR |
Definition at line 695 of file deprecated.h.
#define GNC_RND_NEVER QOF_HOW_RND_NEVER |
Definition at line 709 of file deprecated.h.
#define GNC_RND_PROMOTE QOF_HOW_RND_PROMOTE |
Definition at line 701 of file deprecated.h.
#define GNC_RND_ROUND QOF_HOW_RND_ROUND |
Definition at line 707 of file deprecated.h.
Definition at line 703 of file deprecated.h.
Definition at line 705 of file deprecated.h.
#define GNC_RND_TRUNC QOF_HOW_RND_TRUNC |
Definition at line 699 of file deprecated.h.
#define GNC_SCANF_LLD QOF_SCANF_LLD |
Definition at line 177 of file deprecated.h.
#define GNCEngineEventType QofEventId |
Definition at line 108 of file deprecated.h.
#define gncLogLevel QofLogLevel |
Definition at line 34 of file deprecated.h.
Definition at line 556 of file deprecated.h.
Definition at line 826 of file deprecated.h.
Definition at line 836 of file deprecated.h.
Definition at line 838 of file deprecated.h.
Definition at line 832 of file deprecated.h.
Definition at line 834 of file deprecated.h.
Definition at line 828 of file deprecated.h.
#define kvp_value_new_gnc_numeric kvp_value_new_numeric |
Definition at line 840 of file deprecated.h.
#define kvp_value_t KvpValueType |
Definition at line 830 of file deprecated.h.
#define QOF_BEGIN_EDIT | ( | inst | ) | qof_begin_edit (inst) |
Definition at line 445 of file deprecated.h.
#define qof_book_get_guid | ( | X | ) | qof_entity_get_guid (QOF_ENTITY(X)) |
Definition at line 353 of file deprecated.h.
#define qof_book_mergeData QofBookMergeData |
Definition at line 137 of file deprecated.h.
Definition at line 133 of file deprecated.h.
#define qof_book_mergeRule QofBookMergeRule |
Definition at line 135 of file deprecated.h.
#define qof_book_set_guid | ( | book, | |
guid | |||
) | qof_entity_set_guid(QOF_ENTITY(book), guid) |
Definition at line 333 of file deprecated.h.
#define QOF_COMMIT_EDIT_PART1 | ( | inst | ) | qof_commit_edit (inst) |
Definition at line 460 of file deprecated.h.
#define QOF_COMMIT_EDIT_PART2 | ( | inst, | |
on_error, | |||
on_done, | |||
on_free | |||
) |
{ \ QofBackend * be; \ \ be = qof_book_get_backend ((inst)->book); \ if (be) \ { \ QofBackendError errcode; \ \ errcode = qof_backend_get_error (be); \ if (ERR_BACKEND_NO_ERR != errcode) \ { \ (inst)->do_free = FALSE; \ qof_backend_set_error (be, errcode); \ (on_error)((inst), errcode); \ } \ (inst)->dirty = FALSE; \ } \ (on_done)(inst); \ \ if ((inst)->do_free) { \ (on_free)(inst); \ return; \ } \ }
Definition at line 479 of file deprecated.h.
#define QOF_TYPE_DATE "date" |
Definition at line 336 of file deprecated.h.
#define REPORT_CLOCK | ( | clockno, | |
format, | |||
args... | |||
) |
do { \ if (qof_log_check (log_module, QOF_LOG_INFO)) \ qof_report_clock (clockno, log_module, QOF_LOG_INFO, \ __FUNCTION__, format , ## args); \ } while (0)
Definition at line 377 of file deprecated.h.
#define REPORT_CLOCK_TOTAL | ( | clockno, | |
format, | |||
args... | |||
) |
do { \ if (qof_log_check (log_module, QOF_LOG_INFO)) \ qof_report_clock_total (clockno, log_module, QOF_LOG_INFO, \ __FUNCTION__, format , ## args); \ } while (0)
Definition at line 383 of file deprecated.h.
#define SAFE_STRCASECMP | ( | da, | |
db | |||
) | SAFE_STRCMP_REAL(strcasecmp,(da),(db)) |
Definition at line 173 of file deprecated.h.
#define SAFE_STRCMP | ( | da, | |
db | |||
) | SAFE_STRCMP_REAL(strcmp,(da),(db)) |
Definition at line 171 of file deprecated.h.
#define SAFE_STRCMP_REAL | ( | fcn, | |
da, | |||
db | |||
) |
{ \
if ((da) && (db)) { \
if ((da) != (db)) { \
gint retval = fcn ((da), (db)); \
/* if strings differ, return */ \
if (retval) return retval; \
} \
} else \
if ((!(da)) && (db)) { \
return -1; \
} else \
if ((da) && (!(db))) { \
return +1; \
} \
}
Definition at line 155 of file deprecated.h.
#define START_CLOCK | ( | clockno, | |
format, | |||
args... | |||
) |
do { \ if (qof_log_check (log_module, QOF_LOG_INFO)) \ qof_start_clock (clockno, log_module, QOF_LOG_INFO, \ __FUNCTION__, format , ## args); \ } while (0)
Definition at line 371 of file deprecated.h.
typedef struct _QofNumeric gnc_numeric |
Definition at line 508 of file deprecated.h.
typedef void(* GNCEngineEventHandler)(GUID *entity, QofIdType type, QofEventId event_type, gpointer user_data) |
Definition at line 110 of file deprecated.h.
typedef void(* qof_book_mergeRuleForeachCB)(QofBookMergeData *, QofBookMergeRule *, guint) |
Definition at line 142 of file deprecated.h.
enum GNCDateMonthFormat |
GNCDATE_MONTH_NUMBER |
|
GNCDATE_MONTH_ABBREV |
|
GNCDATE_MONTH_NAME |
|
Definition at line 191 of file deprecated.h.
void date_add_months | ( | struct tm * | tm, |
gint | months, | ||
gboolean | track_last_day | ||
) |
int date_get_last_mday | ( | struct tm * | tm | ) |
Definition at line 633 of file deprecated.c.
{
return g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900);
}
gboolean date_is_last_mday | ( | struct tm * | tm | ) |
Definition at line 639 of file deprecated.c.
{
return (tm->tm_mday ==
g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900));
}
char dateSeparator | ( | void | ) |
Definition at line 1309 of file deprecated.c.
{ return qof_date_format_get_date_separator (qof_date_format_get_current()); }
gint double_compare | ( | gdouble | d1, |
gdouble | d2 | ||
) |
gnc_numeric double_to_gnc_numeric | ( | double | in, |
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1788 of file deprecated.c.
{ return qof_numeric_from_double (in, denom, how); }
const gchar* gnc_date_dateformat_to_string | ( | QofDateFormat | format | ) |
Definition at line 1315 of file deprecated.c.
{ switch (format) { case QOF_DATE_FORMAT_US: return "us"; case QOF_DATE_FORMAT_UK: return "uk"; case QOF_DATE_FORMAT_CE: return "ce"; case QOF_DATE_FORMAT_ISO: return "iso"; case QOF_DATE_FORMAT_UTC: return "utc"; case QOF_DATE_FORMAT_LOCALE: return "locale"; case QOF_DATE_FORMAT_CUSTOM: return "custom"; default: return NULL; } }
const gchar* gnc_date_monthformat_to_string | ( | GNCDateMonthFormat | format | ) |
Definition at line 1337 of file deprecated.c.
{ switch (format) { case GNCDATE_MONTH_NUMBER: return "number"; case GNCDATE_MONTH_ABBREV: return "abbrev"; case GNCDATE_MONTH_NAME: return "name"; default: return NULL; } }
int gnc_date_my_last_mday | ( | int | month, |
int | year | ||
) |
Definition at line 627 of file deprecated.c.
{
return g_date_get_days_in_month (month, year);
}
gboolean gnc_date_string_to_dateformat | ( | const gchar * | format_string, |
QofDateFormat * | format | ||
) |
QofDateFormat qof_date_format_from_name ( const gchar * name )
Definition at line 216 of file deprecated.c.
{ QofDateFormat df; df = qof_date_format_from_name (format_string); if (df < 0) return TRUE; *format = df; return FALSE; }
gboolean gnc_date_string_to_monthformat | ( | const gchar * | format_string, |
GNCDateMonthFormat * | format | ||
) |
Definition at line 229 of file deprecated.c.
{ if (!format_string) return TRUE; if (!strcmp (format_string, "number")) *format = GNCDATE_MONTH_NUMBER; else if (!strcmp (format_string, "abbrev")) *format = GNCDATE_MONTH_ABBREV; else if (!strcmp (format_string, "name")) *format = GNCDATE_MONTH_NAME; else return TRUE; return FALSE; }
Timespec gnc_dmy2timespec | ( | gint | day, |
gint | month, | ||
gint | year | ||
) |
Definition at line 989 of file deprecated.c.
{ Timespec ts; QofTime *qt; QofDate *qd; if (!g_date_valid_dmy (day, month, year)) return null_timespec (); qd = qof_date_new (); qd->qd_mday = day; qd->qd_mon = month; qd->qd_year = year; qof_date_valid (qd); qt = qof_date_to_qtime (qd); ts = qof_time_to_Timespec (qt); qof_time_free (qt); qof_date_free (qd); return ts; }
Timespec gnc_dmy2timespec_end | ( | gint | day, |
gint | month, | ||
gint | year | ||
) |
Definition at line 1010 of file deprecated.c.
{ Timespec ts; QofTime *qt; QofDate *qd; if (!g_date_valid_dmy (day, month, year)) return null_timespec (); qd = qof_date_new (); qd->qd_mday = day; qd->qd_mon = month; qd->qd_year = year; qof_date_set_day_end (qd); qt = qof_date_to_qtime (qd); ts = qof_time_to_Timespec (qt); qof_time_free (qt); qof_date_free (qd); return ts; }
void gnc_engine_gen_event | ( | QofEntity * | entity, |
QofEventId | event_type | ||
) |
Definition at line 154 of file deprecated.c.
{ qof_event_gen (entity, event_type, NULL); }
void gnc_engine_generate_event | ( | const GUID * | guid, |
QofIdType | e_type, | ||
QofEventId | event_type | ||
) |
GCache* gnc_engine_get_string_cache | ( | void | ) |
Definition at line 198 of file deprecated.c.
{ return qof_util_get_string_cache (); }
gint gnc_engine_register_event_handler | ( | GNCEngineEventHandler | handler, |
gpointer | user_data | ||
) |
Definition at line 129 of file deprecated.c.
{ return qof_event_register_old_handler (handler, user_data); }
void gnc_engine_resume_events | ( | void | ) |
Definition at line 148 of file deprecated.c.
{ qof_event_resume (); }
void gnc_engine_string_cache_destroy | ( | void | ) |
Definition at line 204 of file deprecated.c.
{ qof_util_string_cache_destroy (); }
void gnc_engine_suspend_events | ( | void | ) |
Definition at line 142 of file deprecated.c.
{ qof_event_suspend (); }
void gnc_engine_unregister_event_handler | ( | gint | handler_id | ) |
Definition at line 136 of file deprecated.c.
{ qof_event_unregister_handler (handler_id); }
Timespec gnc_iso8601_to_timespec_gmt | ( | const gchar * | ) |
Definition at line 1031 of file deprecated.c.
{ gchar buf[4]; gchar *dupe; Timespec ts; struct tm stm; glong nsec = 0; ts.tv_sec = 0; ts.tv_nsec = 0; if (!str) return ts; dupe = g_strdup (str); stm.tm_year = atoi (str) - 1900; str = strchr (str, '-'); if (str) { str++; } else { return ts; } stm.tm_mon = atoi (str) - 1; str = strchr (str, '-'); if (str) { str++; } else { return ts; } stm.tm_mday = atoi (str); str = strchr (str, ' '); if (str) { str++; } else { return ts; } stm.tm_hour = atoi (str); str = strchr (str, ':'); if (str) { str++; } else { return ts; } stm.tm_min = atoi (str); str = strchr (str, ':'); if (str) { str++; } else { return ts; } stm.tm_sec = atoi (str); if (strchr (str, '.')) { gint decimals, i, multiplier = 1000000000; str = strchr (str, '.') + 1; decimals = strcspn (str, "+- "); for (i = 0; i < decimals; i++) multiplier /= 10; nsec = atoi (str) * multiplier; } stm.tm_isdst = -1; str += strcspn (str, "+-"); if (str) { buf[0] = str[0]; buf[1] = str[1]; buf[2] = str[2]; buf[3] = 0; stm.tm_hour -= atoi (buf); str += 3; if ('.' == *str) str++; if (isdigit ((guchar) * str) && isdigit ((guchar) * (str + 1))) { gint cyn; if ('+' == buf[0]) { cyn = -1; } else { cyn = +1; } buf[0] = str[0]; buf[1] = str[1]; buf[2] = str[2]; buf[3] = 0; stm.tm_min += cyn * atoi (buf); } } { struct tm tmp_tm; struct tm tm; glong tz; gint tz_hour; time_t secs; tmp_tm = stm; tmp_tm.tm_isdst = -1; secs = mktime (&tmp_tm); if (secs < 0) { PWARN (" mktime failed to handle daylight saving: " "tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d for string=%s", stm.tm_hour, stm.tm_year, stm.tm_min, stm.tm_sec, stm.tm_isdst, dupe); tmp_tm.tm_hour++; secs = mktime (&tmp_tm); if (secs < 0) { tmp_tm.tm_hour -= 2; secs = mktime (&tmp_tm); } if (secs < 0) { PERR (" unable to recover from buggy mktime "); g_free (dupe); return ts; } } tm = *localtime_r (&secs, &tm); tz = gnc_timezone (&tmp_tm); tz_hour = tz / 3600; stm.tm_hour -= tz_hour; stm.tm_min -= (tz % 3600) / 60; stm.tm_isdst = tmp_tm.tm_isdst; ts.tv_sec = mktime (&stm); /* unreachable code */ /* if (ts.tv_sec < 0) { PWARN (" mktime failed to adjust calculated time:" " tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d", stm.tm_hour, stm.tm_year, stm.tm_min, stm.tm_sec, stm.tm_isdst); ts.tv_sec = secs - tz; }*/ ts.tv_nsec = nsec; } g_free (dupe); return ts; }
KvpFrame* gnc_kvp_bag_add | ( | KvpFrame * | pwd, |
const char * | path, | ||
time_t | secs, | ||
const char * | first_name, | ||
... | |||
) |
Definition at line 1664 of file deprecated.c.
{ QofTime *qt; KvpFrame *cwd; va_list ap; qt = qof_time_from_time_t (secs, 0); va_start (ap, first_name); cwd = qof_kvp_bag_add(pwd, path, qt, first_name, ap); va_end (ap); return cwd; }
KvpFrame* gnc_kvp_bag_find_by_guid | ( | KvpFrame * | root, |
const char * | path, | ||
const char * | guid_name, | ||
GUID * | desired_guid | ||
) |
void gnc_kvp_bag_merge | ( | KvpFrame * | kvp_into, |
const char * | intopath, | ||
KvpFrame * | kvp_from, | ||
const char * | frompath | ||
) |
Definition at line 1694 of file deprecated.c.
{ qof_kvp_bag_merge (kvp_into, intopath, kvp_from, frompath); }
void gnc_kvp_bag_remove_frame | ( | KvpFrame * | root, |
const char * | path, | ||
KvpFrame * | fr | ||
) |
Definition at line 1687 of file deprecated.c.
{ qof_kvp_bag_remove_frame (root, path, fr); }
void gnc_log_init | ( | void | ) |
const char* gnc_log_prettify | ( | const char * | name | ) |
Definition at line 92 of file deprecated.c.
{ return qof_log_prettify (name); }
gchar* gnc_num_dbg_to_string | ( | gnc_numeric | n | ) |
Definition at line 1813 of file deprecated.c.
{ return qof_numeric_dbg_to_string (n); }
Definition at line 1886 of file deprecated.c.
{ return qof_numeric_abs (a); }
gnc_numeric gnc_numeric_add | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1859 of file deprecated.c.
{ return qof_numeric_add (a, b, denom, how); }
static gnc_numeric gnc_numeric_add_fixed | ( | gnc_numeric | a, |
gnc_numeric | b | ||
) | [inline, static] |
Definition at line 653 of file deprecated.h.
{ return qof_numeric_add (a, b, QOF_DENOM_AUTO, QOF_HOW_DENOM_FIXED | QOF_HOW_RND_NEVER); }
gnc_numeric gnc_numeric_add_with_error | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how, | ||
gnc_numeric * | error | ||
) |
Definition at line 1891 of file deprecated.c.
{ return qof_numeric_add_with_error (a, b, denom, how, error); }
Definition at line 1818 of file deprecated.c.
{ return qof_numeric_check (a); }
gint gnc_numeric_compare | ( | gnc_numeric | a, |
gnc_numeric | b | ||
) |
Definition at line 1823 of file deprecated.c.
{ return qof_numeric_compare (a, b); }
gnc_numeric gnc_numeric_convert | ( | gnc_numeric | in, |
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1920 of file deprecated.c.
{ return qof_numeric_convert (in, denom, how); }
gnc_numeric gnc_numeric_convert_with_error | ( | gnc_numeric | in, |
gint64 | denom, | ||
gint | how, | ||
gnc_numeric * | error | ||
) |
static gnc_numeric gnc_numeric_create | ( | gint64 | num, |
gint64 | denom | ||
) | [inline, static] |
Definition at line 563 of file deprecated.h.
{ QofNumeric out; out.num = num; out.denom = denom; return out; }
static gint64 gnc_numeric_denom | ( | gnc_numeric | a | ) | [inline, static] |
gnc_numeric gnc_numeric_div | ( | gnc_numeric | x, |
gnc_numeric | y, | ||
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1877 of file deprecated.c.
{ return qof_numeric_div (x, y, denom, how); }
gnc_numeric gnc_numeric_div_with_error | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how, | ||
gnc_numeric * | error | ||
) |
Definition at line 1912 of file deprecated.c.
{ return qof_numeric_div_with_error (a, b, denom, how, error); }
gboolean gnc_numeric_eq | ( | gnc_numeric | a, |
gnc_numeric | b | ||
) |
Definition at line 1843 of file deprecated.c.
{ return qof_numeric_eq (a, b); }
gboolean gnc_numeric_equal | ( | gnc_numeric | a, |
gnc_numeric | b | ||
) |
Definition at line 1848 of file deprecated.c.
{ return qof_numeric_equal (a, b); }
gnc_numeric gnc_numeric_error | ( | QofNumericErrorCode | error_code | ) |
Definition at line 1798 of file deprecated.c.
{ return qof_numeric_error (error_code); }
gnc_numeric gnc_numeric_mul | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1871 of file deprecated.c.
{ return qof_numeric_mul (a, b, denom, how); }
gnc_numeric gnc_numeric_mul_with_error | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how, | ||
gnc_numeric * | error | ||
) |
Definition at line 1905 of file deprecated.c.
{ return qof_numeric_mul_with_error (a, b, denom, how, error); }
Definition at line 1882 of file deprecated.c.
{ return qof_numeric_neg (a); }
gboolean gnc_numeric_negative_p | ( | gnc_numeric | a | ) |
Definition at line 1833 of file deprecated.c.
{ return qof_numeric_negative_p (a); }
static gint64 gnc_numeric_num | ( | gnc_numeric | a | ) | [inline, static] |
gboolean gnc_numeric_positive_p | ( | gnc_numeric | a | ) |
Definition at line 1838 of file deprecated.c.
{ return qof_numeric_positive_p (a); }
Definition at line 1925 of file deprecated.c.
{ return qof_numeric_reduce (in); }
gint gnc_numeric_same | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1853 of file deprecated.c.
{ return qof_numeric_same (a, b, denom, how); }
gnc_numeric gnc_numeric_sub | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how | ||
) |
Definition at line 1865 of file deprecated.c.
{ return qof_numeric_sub (a, b, denom, how); }
static gnc_numeric gnc_numeric_sub_fixed | ( | gnc_numeric | a, |
gnc_numeric | b | ||
) | [inline, static] |
Definition at line 660 of file deprecated.h.
{ return gnc_numeric_sub (a, b, QOF_DENOM_AUTO, QOF_HOW_DENOM_FIXED | QOF_HOW_RND_NEVER); }
gnc_numeric gnc_numeric_sub_with_error | ( | gnc_numeric | a, |
gnc_numeric | b, | ||
gint64 | denom, | ||
gint | how, | ||
gnc_numeric * | error | ||
) |
Definition at line 1898 of file deprecated.c.
{ return qof_numeric_sub_with_error (a, b, denom, how, error); }
gdouble gnc_numeric_to_double | ( | gnc_numeric | in | ) |
Definition at line 1803 of file deprecated.c.
{ return qof_numeric_to_double (in); }
gchar* gnc_numeric_to_string | ( | gnc_numeric | n | ) |
Definition at line 1808 of file deprecated.c.
{ return qof_numeric_to_string (n); }
static gnc_numeric gnc_numeric_zero | ( | void | ) | [inline, static] |
Definition at line 572 of file deprecated.h.
{ return qof_numeric_create (0, 1); }
gboolean gnc_numeric_zero_p | ( | gnc_numeric | a | ) |
Definition at line 1828 of file deprecated.c.
{ return qof_numeric_zero_p (a); }
const char* gnc_print_date | ( | Timespec | ts | ) |
Definition at line 780 of file deprecated.c.
{ static gchar buff[MAX_DATE_LENGTH]; QofDateFormat df; QofTime *time; gchar *str; df = qof_date_format_get_current (); ENTER (" using date format %d", df); time = timespecToQofTime (ts); str = qof_date_print (qof_date_from_qtime (time), df); qof_time_free (time); g_stpcpy (buff, str); g_free (str); LEAVE (" printing %s", buff); return buff; }
void gnc_report_clock | ( | int | , |
QofLogModule | , | ||
QofLogLevel | , | ||
const char * | , | ||
const char * | , | ||
... | |||
) |
void gnc_report_clock_total | ( | int | , |
QofLogModule | , | ||
QofLogLevel | , | ||
const char * | , | ||
const char * | , | ||
... | |||
) |
void gnc_set_log_level | ( | QofLogModule | module, |
QofLogLevel | level | ||
) |
Definition at line 69 of file deprecated.c.
{ qof_log_set_level (log_module, (QofLogLevel) level); }
void gnc_set_log_level_global | ( | QofLogLevel | level | ) |
Definition at line 75 of file deprecated.c.
{ qof_log_set_level_registered ((QofLogLevel) level); }
void gnc_set_logfile | ( | FILE * | outfile | ) |
Definition at line 87 of file deprecated.c.
{ qof_log_set_file (outfile); }
gboolean gnc_should_log | ( | QofLogModule | log_module, |
QofLogLevel | log_level | ||
) |
Definition at line 123 of file deprecated.c.
{ return qof_log_check (log_module, log_level); }
void gnc_start_clock | ( | int | , |
QofLogModule | , | ||
QofLogLevel | , | ||
const char * | , | ||
const char * | , | ||
... | |||
) |
gchar* gnc_stpcpy | ( | gchar * | dest, |
const gchar * | src | ||
) |
Definition at line 192 of file deprecated.c.
{
return g_stpcpy (dest, src);
}
gpointer gnc_string_cache_insert | ( | gconstpointer | key | ) |
Definition at line 186 of file deprecated.c.
{ return qof_util_string_cache_insert (key); }
void gnc_string_cache_remove | ( | gconstpointer | key | ) |
Definition at line 210 of file deprecated.c.
{ qof_util_string_cache_remove (key); }
gboolean gnc_strisnum | ( | const guchar * | s | ) |
Definition at line 1658 of file deprecated.c.
{ return qof_util_string_isnum (s); }
void gnc_timespec2dmy | ( | Timespec | ts, |
gint * | day, | ||
gint * | month, | ||
gint * | year | ||
) |
Definition at line 1232 of file deprecated.c.
{ QofTime *time; QofDate *qd; time = timespecToQofTime (ts); qd = qof_date_from_qtime (time); qof_time_free (time); if (day) *day = qd->qd_mday; if (month) *month = qd->qd_mon; if ((year) && (qd->qd_year < 0) && (qd->qd_year > G_MAXINT)) *year = (gint)qd->qd_year; }
int gnc_timespec_last_mday | ( | Timespec | ts | ) |
Definition at line 646 of file deprecated.c.
{ /* Replacement code should not use localtime */ struct tm *result; time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS); result = localtime (&t_secs); return date_get_last_mday (result); }
gchar* gnc_timespec_to_iso8601_buff | ( | Timespec | ts, |
gchar * | buff | ||
) |
Definition at line 1197 of file deprecated.c.
{ gint len, tz_hour, tz_min; glong secs; gchar cyn; time_t tmp; struct tm parsed; tmp = ts.tv_sec; localtime_r (&tmp, &parsed); secs = gnc_timezone (&parsed); tz_hour = secs / 3600; tz_min = (secs % 3600) / 60; cyn = '-'; if (0 > tz_hour) { cyn = '+'; tz_hour = -tz_hour; } len = sprintf (buff, "%4d-%02d-%02d %02d:%02d:%02d.%06ld %c%02d%02d", parsed.tm_year + 1900, parsed.tm_mon + 1, parsed.tm_mday, parsed.tm_hour, parsed.tm_min, parsed.tm_sec, ts.tv_nsec / 1000, cyn, tz_hour, tz_min); buff += len; return buff; }
time_t gnc_timet_get_day_end | ( | time_t | time_val | ) |
Definition at line 589 of file deprecated.c.
{ struct tm tm; gnc_tm_get_day_end (&tm, time_val); return mktime (&tm); }
time_t gnc_timet_get_day_end_gdate | ( | GDate * | date | ) |
Definition at line 613 of file deprecated.c.
{ struct tm stm; time_t secs; stm.tm_year = g_date_get_year (date) - 1900; stm.tm_mon = g_date_get_month (date) - 1; stm.tm_mday = g_date_get_day (date); gnc_tm_set_day_end (&stm); secs = mktime (&stm); return secs; }
time_t gnc_timet_get_day_start | ( | time_t | time_val | ) |
Definition at line 580 of file deprecated.c.
{ struct tm tm; gnc_tm_get_day_start (&tm, time_val); return mktime (&tm); }
time_t gnc_timet_get_day_start_gdate | ( | GDate * | date | ) |
Definition at line 599 of file deprecated.c.
{ struct tm stm; time_t secs; stm.tm_year = g_date_get_year (date) - 1900; stm.tm_mon = g_date_get_month (date) - 1; stm.tm_mday = g_date_get_day (date); gnc_tm_set_day_start (&stm); secs = mktime (&stm); return secs; }
time_t gnc_timet_get_today_end | ( | void | ) |
Definition at line 677 of file deprecated.c.
{ struct tm tm; gnc_tm_get_day_end (&tm, time (NULL)); return mktime (&tm); }
time_t gnc_timet_get_today_start | ( | void | ) |
Definition at line 668 of file deprecated.c.
{ struct tm tm; gnc_tm_get_day_start (&tm, time (NULL)); return mktime (&tm); }
glong gnc_timezone | ( | struct tm * | tm | ) |
Definition at line 1249 of file deprecated.c.
{
g_return_val_if_fail (tm != NULL, 0);
return -(tm->tm_gmtoff);
}
void gnc_tm_get_day_end | ( | struct tm * | tm, |
time_t | time_val | ||
) |
Definition at line 573 of file deprecated.c.
{ tm = localtime_r (&time_val, tm); gnc_tm_set_day_end (tm); }
void gnc_tm_get_day_start | ( | struct tm * | tm, |
time_t | time_val | ||
) |
Definition at line 548 of file deprecated.c.
{ tm = localtime_r (&time_val, tm); gnc_tm_set_day_start (tm); }
void gnc_tm_get_today_end | ( | struct tm * | tm | ) |
Definition at line 662 of file deprecated.c.
{ gnc_tm_get_day_end (tm, time (NULL)); }
void gnc_tm_get_today_start | ( | struct tm * | tm | ) |
Definition at line 656 of file deprecated.c.
{ gnc_tm_get_day_start (tm, time (NULL)); }
void gnc_tm_set_day_end | ( | struct tm * | tm | ) |
Definition at line 564 of file deprecated.c.
{ tm->tm_hour = 23; tm->tm_min = 59; tm->tm_sec = 59; tm->tm_isdst = -1; }
void gnc_tm_set_day_middle | ( | struct tm * | tm | ) |
Definition at line 555 of file deprecated.c.
{ tm->tm_hour = 12; tm->tm_min = 0; tm->tm_sec = 0; tm->tm_isdst = -1; }
void gnc_tm_set_day_start | ( | struct tm * | tm | ) |
Definition at line 539 of file deprecated.c.
{ tm->tm_hour = 0; tm->tm_min = 0; tm->tm_sec = 0; tm->tm_isdst = -1; }
QofBackend* gncBackendInit_file | ( | const char * | book_id, |
void * | data | ||
) |
void kvp_frame_add_timespec | ( | KvpFrame * | frame, |
const gchar * | path, | ||
Timespec | ts | ||
) |
Timespec kvp_frame_get_timespec | ( | const KvpFrame * | frame, |
const gchar * | path | ||
) |
void kvp_frame_set_timespec | ( | KvpFrame * | frame, |
const gchar * | path, | ||
Timespec | ts | ||
) |
Timespec kvp_value_get_timespec | ( | const KvpValue * | value | ) |
Definition at line 1493 of file deprecated.c.
KvpValue* kvp_value_new_timespec | ( | Timespec | timespec | ) |
Definition at line 1482 of file deprecated.c.
Definition at line 1983 of file deprecated.c.
{ QofErrorId err; if (!be) return ERR_BACKEND_NO_BACKEND; /* use 'stack-pop' semantics */ err = be->last_err; be->last_err = ERR_BACKEND_NO_ERR; return err; }
gchar* qof_backend_get_message | ( | QofBackend * | be | ) |
Definition at line 2020 of file deprecated.c.
{ if (!be) return g_strdup ("ERR_BACKEND_NO_BACKEND"); if (!be->error_msg) return NULL; return g_strdup(qof_error_get_message_be (be)); }
void qof_backend_set_error | ( | QofBackend * | be, |
QofErrorId | err | ||
) |
Definition at line 1976 of file deprecated.c.
{ if (!be) return; qof_error_set_be (be, err); }
void qof_backend_set_message | ( | QofBackend * | be, |
const gchar * | format, | ||
... | |||
) |
Definition at line 1995 of file deprecated.c.
{ va_list args; gchar *buffer; if (!be) return; /* If there's already something here, free it */ if (be->error_msg) g_free (be->error_msg); if (!format) { be->error_msg = NULL; return; } va_start (args, format); buffer = (gchar *) g_strdup_vprintf (format, args); va_end (args); be->error_msg = buffer; }
gboolean qof_begin_edit | ( | QofInstance * | inst | ) |
inst | pointer to the instance to prepare to edit. |
Definition at line 1718 of file deprecated.c.
{ QofIdTypeConst type; QofEntity * ent; param_flag = TRUE; ent = &inst->entity; type = ent->e_type; qof_class_param_foreach (type, param_edit_cb, inst); return param_flag; }
gint qof_book_mergeCommit | ( | QofBookMergeData * | mergeData | ) |
Definition at line 173 of file deprecated.c.
{ return qof_book_merge_commit (mergeData); }
QofBookMergeData* qof_book_mergeInit | ( | QofBook * | importBook, |
QofBook * | targetBook | ||
) |
Definition at line 160 of file deprecated.c.
{ return qof_book_merge_init (importBook, targetBook); }
void qof_book_mergeRuleForeach | ( | QofBookMergeData * | mergeData, |
QofBookMergeRuleForeachCB | callback, | ||
QofBookMergeResult | mergeResult | ||
) |
Definition at line 179 of file deprecated.c.
{ qof_book_merge_rule_foreach (mergeData, cb, mergeResult); }
QofBookMergeData* qof_book_mergeUpdateResult | ( | QofBookMergeData * | mergeData, |
QofBookMergeResult | tag | ||
) |
Definition at line 166 of file deprecated.c.
{ return qof_book_merge_update_result (mergeData, tag); }
void qof_book_set_schedxactions | ( | QofBook * | book, |
GList * | newList | ||
) |
gboolean qof_commit_edit | ( | QofInstance * | inst | ) |
inst | pointer to the instance to commit. |
Definition at line 1730 of file deprecated.c.
{ QofIdTypeConst type; QofEntity * ent; param_flag = TRUE; ent = &inst->entity; type = ent->e_type; qof_class_param_foreach (type, param_commit_cb, inst); return param_flag; }
gboolean qof_commit_edit_part2 | ( | QofInstance * | inst, |
void(*)(QofInstance *, QofBackendError) | on_error, | ||
void(*)(QofInstance *) | on_done, | ||
void(*)(QofInstance *) | on_free | ||
) |
Definition at line 1742 of file deprecated.c.
{ QofBackend *be; ENTER (" "); /* See if there's a backend. If there is, invoke it. */ be = qof_book_get_backend (inst->book); if (be && qof_backend_commit_exists(be)) { QofBackendError errcode; do { errcode = qof_backend_get_error (be); } while (ERR_BACKEND_NO_ERR != errcode); qof_backend_run_commit(be, inst); errcode = qof_backend_get_error (be); if (ERR_BACKEND_NO_ERR != errcode) { inst->do_free = FALSE; qof_backend_set_error (be, errcode); if (on_error) on_error (inst, errcode); LEAVE (" errcode=%d", errcode); return FALSE; } inst->dirty = FALSE; } if (inst->do_free) { LEAVE (" do_free"); if (on_free) on_free(inst); return TRUE; } if (on_done) on_done(inst); LEAVE (" done"); return TRUE; }
gboolean qof_date_add_days | ( | Timespec * | ts, |
gint | days | ||
) |
Definition at line 1351 of file deprecated.c.
{ struct tm tm; time_t tt; g_return_val_if_fail(ts, FALSE); tt = timespecToTime_t(*ts); #ifdef HAVE_GMTIME_R tm = *gmtime_r(&tt, &tm); #else tm = *gmtime(&tt); #endif tm.tm_mday += days; tt = mktime(&tm); if(tt < 0) { return FALSE; } timespecFromTime_t(ts, tt); return TRUE; }
gboolean qof_date_add_months | ( | Timespec * | ts, |
gint | months, | ||
gboolean | track_last_day | ||
) |
Definition at line 1371 of file deprecated.c.
{ struct tm tm; time_t tt; gint new_last_mday; gboolean was_last_day; g_return_val_if_fail(ts, FALSE); tt = timespecToTime_t(*ts); #ifdef HAVE_GMTIME_R tm = *gmtime_r(&tt, &tm); #else tm = *gmtime(&tt); #endif was_last_day = date_is_last_mday(&tm); tm.tm_mon += months; while (tm.tm_mon > 11) { tm.tm_mon -= 12; tm.tm_year++; } if (track_last_day) { new_last_mday = date_get_last_mday(&tm); if (was_last_day || (tm.tm_mday > new_last_mday)) { tm.tm_mday = new_last_mday; } } tt = mktime(&tm); if(tt < 0) { return FALSE; } timespecFromTime_t(ts, tt); return TRUE; }
time_t qof_date_dmy_to_sec | ( | gint | day, |
gint | month, | ||
gint | year | ||
) |
Definition at line 363 of file deprecated.c.
{ QofTime *qt; QofDate *qd; time_t retval; qd = qof_date_new (); qd->qd_mday = day; qd->qd_mon = month; qd->qd_year = year; qt = qof_date_to_qtime (qd); retval = qof_time_get_secs (qt); qof_time_free (qt); qof_date_free (qd); return retval; }
QofDateFormat qof_date_format_get | ( | void | ) |
Definition at line 1403 of file deprecated.c.
{ return qof_date_format_get_current (); }
const gchar* qof_date_format_get_string | ( | QofDateFormat | df | ) |
Definition at line 1408 of file deprecated.c.
{ switch(df) { case QOF_DATE_FORMAT_US: return "%m/%d/%y"; case QOF_DATE_FORMAT_UK: return "%d/%m/%y"; case QOF_DATE_FORMAT_CE: return "%d.%m.%y"; case QOF_DATE_FORMAT_UTC: return "%Y-%m-%dT%H:%M:%SZ"; case QOF_DATE_FORMAT_ISO: return "%y-%m-%d"; case QOF_DATE_FORMAT_LOCALE: default: return QOF_D_FMT; }; }
void qof_date_format_set | ( | QofDateFormat | df | ) |
Definition at line 1427 of file deprecated.c.
{ if(!qof_date_format_set_current (df)) PERR (" unable to set current format, %d", df); }
const gchar* qof_date_text_format_get_string | ( | QofDateFormat | df | ) |
Definition at line 1433 of file deprecated.c.
{ return qof_date_format_get_format (df); }
gint qof_event_register_old_handler | ( | GNCEngineEventHandler | old_handler, |
gpointer | user_data | ||
) |
Definition at line 74 of file qofevent.c.
{ HandlerInfo *hi; gint handler_id; ENTER ("(handler=%p, data=%p)", handler, user_data); /* sanity check */ if (!handler) { PERR ("no handler specified"); return 0; } PINFO (" deprecated handler specified"); handler_id = find_next_handler_id (); /* Found one, add the handler */ hi = g_new0 (HandlerInfo, 1); hi->old_handler = handler; hi->user_data = user_data; hi->handler_id = handler_id; handlers = g_list_prepend (handlers, hi); LEAVE (" (handler=%p, data=%p) handler_id=%d", handler, user_data, handler_id); return handler_id; }
Timespec qof_instance_get_last_update | ( | QofInstance * | inst | ) |
Definition at line 1257 of file deprecated.c.
{ Timespec ts; ts = inst->last_update; inst->update_time = timespecToQofTime (ts); return ts; }
gboolean qof_is_same_day | ( | time_t | , |
time_t | |||
) |
Definition at line 526 of file deprecated.c.
{ struct tm lta, ltb; lta = *localtime (&ta); ltb = *localtime (&tb); if (lta.tm_year == ltb.tm_year) { return (ltb.tm_yday - lta.tm_yday); } return (ltb.tm_year - lta.tm_year)*365; /* very approximate */ }
void qof_log_set_level_global | ( | QofLogLevel | level | ) |
This function has been deprecated because the function name is very misleading. It may, in future, be modified to be truly global (i.e. make changes to log modules where no log_level has been explicitly set) but, despite the name, it only ever modified known (gnucash) modules. Future changes would require that if this function is made truly global it must preserve the effect of qof_log_set_level_registered and the advantages of silent log_modules for those programs that do not use _global. Support could be required for removing log_modules from the hashtable.
Definition at line 81 of file deprecated.c.
{ qof_log_set_level_registered ((QofLogLevel) level); }
char* qof_print_date | ( | time_t | secs | ) |
Definition at line 767 of file deprecated.c.
{ QofDateFormat df; QofTime *time; gchar *str; df = qof_date_format_get_current (); time = qof_time_from_time_t (t, 0); str = qof_date_print (qof_date_from_qtime (time), df); qof_time_free (time); return str; }
size_t qof_print_date_buff | ( | char * | buff, |
size_t | buflen, | ||
time_t | secs | ||
) |
Definition at line 739 of file deprecated.c.
{ struct tm *theTime; if (!buff) return 0; theTime = localtime (&t); return qof_print_date_dmy_buff (buff, len, theTime->tm_mday, theTime->tm_mon + 1, theTime->tm_year + 1900); }
size_t qof_print_date_dmy_buff | ( | gchar * | buff, |
size_t | buflen, | ||
gint | day, | ||
gint | month, | ||
gint | year | ||
) |
size_t qof_print_date_time_buff | ( | char * | buff, |
size_t | len, | ||
time_t | secs | ||
) |
Definition at line 451 of file deprecated.c.
{ int flen; int day, month, year, hour, min, sec; struct tm ltm, gtm; if (!buff) return 0; ltm = *localtime (&secs); day = ltm.tm_mday; month = ltm.tm_mon + 1; year = ltm.tm_year + 1900; hour = ltm.tm_hour; min = ltm.tm_min; sec = ltm.tm_sec; switch (qof_date_format_get_current ()) { case QOF_DATE_FORMAT_UK: flen = g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", day, month, year, hour, min); break; case QOF_DATE_FORMAT_CE: flen = g_snprintf (buff, len, "%2d.%2d.%-4d %2d:%02d", day, month, year, hour, min); break; case QOF_DATE_FORMAT_ISO: flen = g_snprintf (buff, len, "%04d-%02d-%02d %02d:%02d", year, month, day, hour, min); break; case QOF_DATE_FORMAT_UTC: { gtm = *gmtime (&secs); flen = strftime (buff, len, QOF_UTC_DATE_FORMAT, >m); break; } case QOF_DATE_FORMAT_LOCALE: { flen = strftime (buff, len, QOF_D_T_FMT, <m); } break; case QOF_DATE_FORMAT_US: default: flen = g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", month, day, year, hour, min); break; } return flen; }
size_t qof_print_gdate | ( | char * | buf, |
size_t | bufflen, | ||
GDate * | gd | ||
) |
size_t qof_print_hours_elapsed_buff | ( | char * | buff, |
size_t | len, | ||
int | secs, | ||
gboolean | show_secs | ||
) |
Definition at line 381 of file deprecated.c.
{ size_t flen; if (0 <= secs) { if (show_secs) { flen = g_snprintf (buff, len, "%02d:%02d:%02d", (int) (secs / 3600), (int) ((secs % 3600) / 60), (int) (secs % 60)); } else { flen = g_snprintf (buff, len, "%02d:%02d", (int) (secs / 3600), (int) ((secs % 3600) / 60)); } } else { if (show_secs) { flen = g_snprintf (buff, len, "-%02d:%02d:%02d", (int) (-secs / 3600), (int) ((-secs % 3600) / 60), (int) (-secs % 60)); } else { flen = g_snprintf (buff, len, "-%02d:%02d", (int) (-secs / 3600), (int) ((-secs % 3600) / 60)); } } return flen; }
size_t qof_print_minutes_elapsed_buff | ( | char * | buff, |
size_t | len, | ||
int | secs, | ||
gboolean | show_secs | ||
) |
Definition at line 419 of file deprecated.c.
{ size_t flen; if (0 <= secs) { if (show_secs) { flen = g_snprintf (buff, len, "%02d:%02d", (int) (secs / 60), (int) (secs % 60)); } else { flen = g_snprintf (buff, len, "%02d", (int) (secs / 60)); } } else { if (show_secs) { flen = g_snprintf (buff, len, "-%02d:%02d", (int) (-secs / 60), (int) (-secs % 60)); } else { flen = g_snprintf (buff, len, "-%02d", (int) (-secs / 60)); } } return flen; }
size_t qof_print_time_buff | ( | char * | buff, |
size_t | len, | ||
time_t | secs | ||
) |
QofQueryPredData* qof_query_date_predicate | ( | QofQueryCompare | how, |
QofDateMatch | options, | ||
Timespec | date | ||
) |
Definition at line 1848 of file qofquerycore.c.
{ query_date_t pdata; pdata = g_new0 (query_date_def, 1); pdata->pd.type_name = query_date_type; pdata->pd.how = how; pdata->options = options; pdata->date = date; return ((QofQueryPredData*)pdata); }
gboolean qof_query_date_predicate_get_date | ( | QofQueryPredData * | pd, |
Timespec * | date | ||
) |
Definition at line 1862 of file qofquerycore.c.
{ query_date_t pdata = (query_date_t)pd; if (pdata->pd.type_name != query_date_type) return FALSE; *date = pdata->date; return TRUE; }
void qof_query_print | ( | QofQuery * | query | ) |
Definition at line 1577 of file qofquery.c.
{ GList *output; GString *str; QofQuerySort *s[3]; gint maxResults = 0, numSorts = 3; ENTER (" "); if (!query) { LEAVE ("query is (null)"); return; } output = NULL; str = NULL; maxResults = qof_query_get_max_results (query); output = qof_query_printSearchFor (query, output); output = qof_query_printTerms (query, output); qof_query_get_sorts (query, &s[0], &s[1], &s[2]); if (s[0]) { output = qof_query_printSorts (s, numSorts, output); } str = g_string_new (" "); g_string_printf (str, "Maximum number of results: %d", maxResults); output = g_list_append (output, str); qof_query_printOutput (output); LEAVE (" "); }
void qof_report_clock | ( | gint | clockno, |
QofLogModule | log_module, | ||
QofLogLevel | log_level, | ||
const gchar * | function_name, | ||
const gchar * | format, | ||
... | |||
) |
void qof_report_clock_total | ( | gint | clockno, |
QofLogModule | log_module, | ||
QofLogLevel | log_level, | ||
const gchar * | function_name, | ||
const gchar * | format, | ||
... | |||
) |
gboolean qof_scan_date | ( | const char * | buff, |
int * | day, | ||
int * | month, | ||
int * | year | ||
) |
Definition at line 971 of file deprecated.c.
{
return qof_scan_date_internal(buff, day, month, year, dateFormat);
}
gboolean qof_scan_date_secs | ( | const char * | buff, |
time_t * | secs | ||
) |
void qof_session_clear_current_session | ( | void | ) |
Definition at line 1652 of file deprecated.c.
{ current_session = NULL; }
QofSession* qof_session_get_current_session | ( | void | ) |
Definition at line 1633 of file deprecated.c.
{ if (!current_session) { qof_event_suspend (); current_session = qof_session_new (); qof_event_resume (); } return current_session; }
const gchar* qof_session_get_error_message | ( | QofSession * | session | ) |
Definition at line 1938 of file deprecated.c.
{ if (!session) return ""; if (!session->error_message) return ""; return session->error_message; }
QofErrorId qof_session_pop_error | ( | QofSession * | session | ) |
Definition at line 1947 of file deprecated.c.
{ if (!session) return QOF_FATAL; return qof_error_get_id (session); }
void qof_session_push_error | ( | QofSession * | session, |
QofBackendError | err, | ||
const gchar * | message | ||
) |
Definition at line 1930 of file deprecated.c.
{ if (!session) return; qof_error_set (session, qof_error_register (message, FALSE)); }
void qof_session_set_current_session | ( | QofSession * | session | ) |
Definition at line 1646 of file deprecated.c.
{ current_session = session; }
void qof_start_clock | ( | gint | clockno, |
QofLogModule | log_module, | ||
QofLogLevel | log_level, | ||
const gchar * | function_name, | ||
const gchar * | format, | ||
... | |||
) |
GCache* qof_util_get_string_cache | ( | void | ) |
Definition at line 407 of file qofutil.c.
{ if (!qof_string_cache) { qof_string_cache = g_cache_new ((GCacheNewFunc) g_strdup, /* value_new_func */ g_free, /* value_destroy_func */ (GCacheDupFunc) g_strdup, /* key_dup_func */ g_free, /* key_destroy_func */ g_str_hash, /* hash_key_func */ g_str_hash, /* hash_value_func */ g_str_equal); /* key_equal_func */ } return qof_string_cache; }
gchar* qof_util_param_as_string | ( | QofEntity * | ent, |
QofParam * | param | ||
) |
Definition at line 1783 of file deprecated.c.
{ return qof_util_param_to_string (ent, param); }
gboolean string_to_gnc_numeric | ( | const gchar * | str, |
gnc_numeric * | n | ||
) |
Definition at line 1793 of file deprecated.c.
{ return qof_numeric_from_string (str, n); }
Timespec timespec_abs | ( | const Timespec * | t | ) |
Definition at line 337 of file deprecated.c.
{ Timespec ts; QofTime *qt = timespecToQofTime (*t); qof_time_abs (qt); ts = qof_time_to_Timespec (qt); qof_time_free (qt); return ts; }
gint timespec_cmp | ( | const Timespec * | ta, |
const Timespec * | tb | ||
) |
Definition at line 290 of file deprecated.c.
{ QofTime *qta, *qtb; gint retval; qta = timespecToQofTime (*ta); qtb = timespecToQofTime (*tb); retval = qof_time_cmp (qta, qtb); qof_time_free (qta); qof_time_free (qtb); return retval; }
Timespec timespec_diff | ( | const Timespec * | ta, |
const Timespec * | tb | ||
) |
Definition at line 321 of file deprecated.c.
{ Timespec ts; QofTime *qta, *qtb, *qt; qta = timespecToQofTime (*ta); qtb = timespecToQofTime (*tb); qt = qof_time_diff (qta, qtb); ts = qof_time_to_Timespec (qt); qof_time_free (qta); qof_time_free (qtb); qof_time_free (qt); return ts; }
gboolean timespec_equal | ( | const Timespec * | ta, |
const Timespec * | tb | ||
) |
Definition at line 276 of file deprecated.c.
{ QofTime *qta, *qtb; gboolean retval; qta = timespecToQofTime (*ta); qtb = timespecToQofTime (*tb); retval = qof_time_equal (qta, qtb); qof_time_free (qta); qof_time_free (qtb); return retval; }
Definition at line 348 of file deprecated.c.
void timespecFromTime_t | ( | Timespec * | ts, |
time_t | t | ||
) |
Definition at line 304 of file deprecated.c.
{ QofTime *time; time = qof_time_new (); time = qof_time_from_time_t (t, 0); *ts = qof_time_to_Timespec (time); qof_time_free (time); }
time_t timespecToTime_t | ( | Timespec | ts | ) |
Definition at line 315 of file deprecated.c.
{
return ts.tv_sec;
}
char* xaccDateUtilGetStamp | ( | time_t | thyme | ) |
Definition at line 686 of file deprecated.c.
{ struct tm *stm; stm = localtime (&thyme); return g_strdup_printf ("%04d%02d%02d%02d%02d%02d", (stm->tm_year + 1900), (stm->tm_mon + 1), stm->tm_mday, stm->tm_hour, stm->tm_min, stm->tm_sec); }
char* xaccDateUtilGetStampNow | ( | void | ) |
Definition at line 1439 of file deprecated.c.
{ return qof_time_stamp_now (); }
time_t xaccDMYToSec | ( | gint | day, |
gint | month, | ||
gint | year | ||
) |