Definition in file deprecated.h.
#include "qof.h"
Go to the source code of this file.
Data Structures | |
struct | query_date_def |
Defines | |
#define | gncLogLevel QofLogLevel |
#define | GNC_LOG_FATAL QOF_LOG_FATAL |
#define | GNC_LOG_ERROR QOF_LOG_ERROR |
#define | GNC_LOG_WARNING QOF_LOG_WARNING |
#define | GNC_LOG_INFO QOF_LOG_INFO |
#define | GNC_LOG_DEBUG QOF_LOG_DEBUG |
#define | GNC_LOG_DETAIL QOF_LOG_DETAIL |
#define | GNC_LOG_TRACE QOF_LOG_TRACE |
#define | GNC_EVENT_NONE QOF_EVENT_NONE |
#define | GNC_EVENT_CREATE QOF_EVENT_CREATE |
#define | GNC_EVENT_MODIFY QOF_EVENT_MODIFY |
#define | GNC_EVENT_DESTROY QOF_EVENT_DESTROY |
#define | GNC_EVENT_ADD QOF_EVENT_ADD |
#define | GNC_EVENT_REMOVE QOF_EVENT_REMOVE |
#define | GNC_EVENT_ALL QOF_EVENT_ALL |
#define | GNCEngineEventType QofEventId |
#define | qof_book_mergeResult QofBookMergeResult |
#define | qof_book_mergeRule QofBookMergeRule |
#define | qof_book_mergeData QofBookMergeData |
#define | SAFE_STRCMP_REAL(fcn, da, db) |
#define | SAFE_STRCMP(da, db) SAFE_STRCMP_REAL(strcmp,(da),(db)) |
#define | SAFE_STRCASECMP(da, db) SAFE_STRCMP_REAL(strcasecmp,(da),(db)) |
#define | GNC_SCANF_LLD QOF_SCANF_LLD |
#define | qof_book_set_guid(book, guid) qof_entity_set_guid(QOF_ENTITY(book), guid) |
#define | QOF_TYPE_DATE "date" |
#define | qof_book_get_guid(X) qof_entity_get_guid (QOF_ENTITY(X)) |
#define | START_CLOCK(clockno, format, args...) |
#define | REPORT_CLOCK(clockno, format, args...) |
#define | REPORT_CLOCK_TOTAL(clockno, format, args...) |
Typedefs | |
typedef void(* | GNCEngineEventHandler )(GUID *entity, QofIdType type, QofEventId event_type, gpointer user_data) |
typedef void(* | qof_book_mergeRuleForeachCB )(QofBookMergeData *, QofBookMergeRule *, guint) |
typedef struct query_date_def * | query_date_t |
Enumerations | |
enum | GNCDateMonthFormat { GNCDATE_MONTH_NUMBER, GNCDATE_MONTH_ABBREV, GNCDATE_MONTH_NAME } |
Functions | |
void | gnc_log_init (void) |
void | gnc_set_log_level (QofLogModule module, QofLogLevel level) |
void | gnc_set_log_level_global (QofLogLevel level) |
void | qof_log_set_level_global (QofLogLevel level) |
void | gnc_set_logfile (FILE *outfile) |
const char * | gnc_log_prettify (const char *name) |
gboolean | gnc_should_log (QofLogModule log_module, QofLogLevel log_level) |
void | gnc_start_clock (int, QofLogModule, QofLogLevel, const char *, const char *,...) |
void | gnc_report_clock (int, QofLogModule, QofLogLevel, const char *, const char *,...) |
void | gnc_report_clock_total (int, QofLogModule, QofLogLevel, const char *, const char *,...) |
gint | qof_event_register_old_handler (GNCEngineEventHandler old_handler, gpointer user_data) |
gint | gnc_engine_register_event_handler (GNCEngineEventHandler handler, gpointer user_data) |
void | gnc_engine_unregister_event_handler (gint handler_id) |
void | gnc_engine_gen_event (QofEntity *entity, QofEventId event_type) |
void | gnc_engine_suspend_events (void) |
void | gnc_engine_resume_events (void) |
void | gnc_engine_generate_event (const GUID *guid, QofIdType e_type, QofEventId event_type) |
QofBookMergeData * | qof_book_mergeInit (QofBook *importBook, QofBook *targetBook) |
void | qof_book_mergeRuleForeach (QofBookMergeData *mergeData, QofBookMergeRuleForeachCB callback, QofBookMergeResult mergeResult) |
QofBookMergeData * | qof_book_mergeUpdateResult (QofBookMergeData *mergeData, QofBookMergeResult tag) |
gint | qof_book_mergeCommit (QofBookMergeData *mergeData) |
gpointer | gnc_string_cache_insert (gconstpointer key) |
gchar * | gnc_stpcpy (gchar *dest, const gchar *src) |
GCache * | gnc_engine_get_string_cache (void) |
GCache * | qof_util_get_string_cache (void) |
void | gnc_engine_string_cache_destroy (void) |
void | gnc_string_cache_remove (gconstpointer key) |
void | qof_book_set_schedxactions (QofBook *book, GList *newList) |
const gchar * | gnc_date_dateformat_to_string (QofDateFormat format) |
const gchar * | gnc_date_monthformat_to_string (GNCDateMonthFormat format) |
gboolean | gnc_date_string_to_dateformat (const gchar *format_string, QofDateFormat *format) |
gboolean | gnc_date_string_to_monthformat (const gchar *format_string, GNCDateMonthFormat *format) |
gboolean | timespec_equal (const Timespec *ta, const Timespec *tb) |
gint | timespec_cmp (const Timespec *ta, const Timespec *tb) |
Timespec | timespec_diff (const Timespec *ta, const Timespec *tb) |
Timespec | timespec_abs (const Timespec *t) |
Timespec | timespecCanonicalDayTime (Timespec t) |
time_t | timespecToTime_t (Timespec ts) |
void | timespecFromTime_t (Timespec *ts, time_t t) |
Timespec | gnc_dmy2timespec (gint day, gint month, gint year) |
Timespec | gnc_dmy2timespec_end (gint day, gint month, gint year) |
Timespec | gnc_iso8601_to_timespec_gmt (const gchar *) |
gchar * | gnc_timespec_to_iso8601_buff (Timespec ts, gchar *buff) |
void | gnc_timespec2dmy (Timespec ts, gint *day, gint *month, gint *year) |
void | date_add_months (struct tm *tm, gint months, gboolean track_last_day) |
gboolean | qof_date_add_days (Timespec *ts, gint days) |
gboolean | qof_date_add_months (Timespec *ts, gint months, gboolean track_last_day) |
const gchar * | qof_date_format_get_string (QofDateFormat df) |
time_t | xaccDMYToSec (gint day, gint month, gint year) |
glong | gnc_timezone (struct tm *tm) |
QofDateFormat | qof_date_format_get (void) |
void | qof_date_format_set (QofDateFormat df) |
const gchar * | qof_date_text_format_get_string (QofDateFormat df) |
char | dateSeparator (void) |
time_t | qof_date_dmy_to_sec (gint day, gint month, gint year) |
size_t | qof_print_hours_elapsed_buff (char *buff, size_t len, int secs, gboolean show_secs) |
size_t | qof_print_minutes_elapsed_buff (char *buff, size_t len, int secs, gboolean show_secs) |
size_t | qof_print_time_buff (char *buff, size_t len, time_t secs) |
size_t | qof_print_date_time_buff (char *buff, size_t len, time_t secs) |
gboolean | qof_is_same_day (time_t, time_t) |
void | gnc_tm_get_day_start (struct tm *tm, time_t time_val) |
void | gnc_tm_set_day_start (struct tm *tm) |
void | gnc_tm_set_day_middle (struct tm *tm) |
void | gnc_tm_set_day_end (struct tm *tm) |
void | gnc_tm_get_day_end (struct tm *tm, time_t time_val) |
time_t | gnc_timet_get_day_start (time_t time_val) |
time_t | gnc_timet_get_day_end (time_t time_val) |
void | gnc_tm_get_today_start (struct tm *tm) |
void | gnc_tm_get_today_end (struct tm *tm) |
time_t | gnc_timet_get_today_start (void) |
time_t | gnc_timet_get_today_end (void) |
time_t | gnc_timet_get_day_start_gdate (GDate *date) |
time_t | gnc_timet_get_day_end_gdate (GDate *date) |
int | date_get_last_mday (struct tm *tm) |
gboolean | date_is_last_mday (struct tm *tm) |
int | gnc_date_my_last_mday (int month, int year) |
int | gnc_timespec_last_mday (Timespec ts) |
char * | xaccDateUtilGetStampNow (void) |
char * | xaccDateUtilGetStamp (time_t thyme) |
size_t | qof_print_date_dmy_buff (gchar *buff, size_t buflen, gint day, gint month, gint year) |
size_t | qof_print_date_buff (char *buff, size_t buflen, time_t secs) |
size_t | qof_print_gdate (char *buf, size_t bufflen, GDate *gd) |
char * | qof_print_date (time_t secs) |
const char * | gnc_print_date (Timespec ts) |
gboolean | qof_scan_date (const char *buff, int *day, int *month, int *year) |
gboolean | qof_scan_date_secs (const char *buff, time_t *secs) |
Timespec | qof_instance_get_last_update (QofInstance *inst) |
void | qof_instance_set_last_update (QofInstance *inst, Timespec ts) |
void | kvp_frame_set_timespec (KvpFrame *frame, const gchar *path, Timespec ts) |
void | kvp_frame_add_timespec (KvpFrame *frame, const gchar *path, Timespec ts) |
Timespec | kvp_value_get_timespec (const KvpValue *value) |
Timespec | kvp_frame_get_timespec (const KvpFrame *frame, const gchar *path) |
KvpValue * | kvp_value_new_timespec (Timespec timespec) |
void | qof_start_clock (gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...) |
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,...) |
void | qof_query_print (QofQuery *query) |
QofQueryPredData * | qof_query_date_predicate (QofQueryCompare how, QofDateMatch options, Timespec date) |
gboolean | qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date) |
QofSession * | qof_session_get_current_session (void) |
void | qof_session_set_current_session (QofSession *session) |
void | qof_session_clear_current_session (void) |
gboolean | gnc_strisnum (const guchar *s) |
KvpFrame * | gnc_kvp_bag_add (KvpFrame *pwd, const char *path, time_t secs, const char *first_name,...) |
KvpFrame * | gnc_kvp_bag_find_by_guid (KvpFrame *root, const char *path, const char *guid_name, GUID *desired_guid) |
void | gnc_kvp_bag_remove_frame (KvpFrame *root, const char *path, KvpFrame *fr) |
void | gnc_kvp_bag_merge (KvpFrame *kvp_into, const char *intopath, KvpFrame *kvp_from, const char *frompath) |
|
Definition at line 102 of file deprecated.h. |
|
Definition at line 106 of file deprecated.h. |
|
Definition at line 96 of file deprecated.h. |
|
Definition at line 100 of file deprecated.h. |
|
Definition at line 98 of file deprecated.h. |
|
Definition at line 94 of file deprecated.h. |
|
Definition at line 104 of file deprecated.h. |
|
Definition at line 77 of file deprecated.h. |
|
Definition at line 79 of file deprecated.h. |
|
Definition at line 71 of file deprecated.h. |
|
Definition at line 69 of file deprecated.h. |
|
Definition at line 75 of file deprecated.h. |
|
Definition at line 81 of file deprecated.h. |
|
Definition at line 73 of file deprecated.h. |
|
Definition at line 177 of file deprecated.h. |
|
Definition at line 108 of file deprecated.h. |
|
Definition at line 34 of file deprecated.h. |
|
Definition at line 361 of file deprecated.h. |
|
Definition at line 137 of file deprecated.h. |
|
Definition at line 133 of file deprecated.h. |
|
Definition at line 135 of file deprecated.h. |
|
Definition at line 341 of file deprecated.h. |
|
Definition at line 344 of file deprecated.h. |
|
Value: 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 385 of file deprecated.h. |
|
Value: 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 391 of file deprecated.h. |
|
Definition at line 173 of file deprecated.h. |
|
Definition at line 171 of file deprecated.h. |
|
Value: { \ 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. |
|
Value: 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 379 of file deprecated.h. |
|
Definition at line 110 of file deprecated.h. |
|
Definition at line 142 of file deprecated.h. |
|
Definition at line 191 of file deprecated.h. 00192 { 00193 GNCDATE_MONTH_NUMBER, 00195 GNCDATE_MONTH_ABBREV, 00197 GNCDATE_MONTH_NAME 00198 } GNCDateMonthFormat;
|
|
|
|
Definition at line 622 of file deprecated.c.
|
|
Definition at line 628 of file deprecated.c. 00629 { 00630 return (tm->tm_mday == 00631 g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900)); 00632 }
|
|
Definition at line 1300 of file deprecated.c. 01301 { 01302 return qof_date_format_get_date_separator (qof_date_format_get_current()); 01303 }
|
|
Definition at line 1306 of file deprecated.c. 01307 { 01308 switch (format) { 01309 case QOF_DATE_FORMAT_US: 01310 return "us"; 01311 case QOF_DATE_FORMAT_UK: 01312 return "uk"; 01313 case QOF_DATE_FORMAT_CE: 01314 return "ce"; 01315 case QOF_DATE_FORMAT_ISO: 01316 return "iso"; 01317 case QOF_DATE_FORMAT_UTC: 01318 return "utc"; 01319 case QOF_DATE_FORMAT_LOCALE: 01320 return "locale"; 01321 case QOF_DATE_FORMAT_CUSTOM: 01322 return "custom"; 01323 default: 01324 return NULL; 01325 } 01326 }
|
|
Definition at line 1328 of file deprecated.c. 01329 { 01330 switch (format) { 01331 case GNCDATE_MONTH_NUMBER: 01332 return "number"; 01333 case GNCDATE_MONTH_ABBREV: 01334 return "abbrev"; 01335 case GNCDATE_MONTH_NAME: 01336 return "name"; 01337 default: 01338 return NULL; 01339 } 01340 }
|
|
Definition at line 616 of file deprecated.c.
|
|
QofDateFormat qof_date_format_from_name ( const gchar * name )
Definition at line 202 of file deprecated.c. 00204 { 00205 QofDateFormat df; 00206 00207 df = qof_date_format_from_name (format_string); 00208 if (df < 0) 00209 return TRUE; 00210 *format = df; 00211 return FALSE; 00212 }
|
|
Definition at line 215 of file deprecated.c. 00217 { 00218 if (!format_string) 00219 return TRUE; 00220 00221 if (!strcmp (format_string, "number")) 00222 *format = GNCDATE_MONTH_NUMBER; 00223 else if (!strcmp (format_string, "abbrev")) 00224 *format = GNCDATE_MONTH_ABBREV; 00225 else if (!strcmp (format_string, "name")) 00226 *format = GNCDATE_MONTH_NAME; 00227 else 00228 return TRUE; 00229 00230 return FALSE; 00231 }
|
|
Definition at line 977 of file deprecated.c. 00978 { 00979 Timespec ts; 00980 QofTime *qt; 00981 QofDate *qd; 00982 00983 if (!g_date_valid_dmy (day, month, year)) 00984 return null_timespec (); 00985 qd = qof_date_new (); 00986 qd->qd_mday = day; 00987 qd->qd_mon = month; 00988 qd->qd_year = year; 00989 qof_date_valid (qd); 00990 qt = qof_date_to_qtime (qd); 00991 ts = qof_time_to_Timespec (qt); 00992 qof_time_free (qt); 00993 qof_date_free (qd); 00994 return ts; 00995 }
|
|
Definition at line 998 of file deprecated.c. 00999 { 01000 Timespec ts; 01001 QofTime *qt; 01002 QofDate *qd; 01003 01004 if (!g_date_valid_dmy (day, month, year)) 01005 return null_timespec (); 01006 qd = qof_date_new (); 01007 qd->qd_mday = day; 01008 qd->qd_mon = month; 01009 qd->qd_year = year; 01010 qof_date_set_day_end (qd); 01011 qt = qof_date_to_qtime (qd); 01012 ts = qof_time_to_Timespec (qt); 01013 qof_time_free (qt); 01014 qof_date_free (qd); 01015 return ts; 01016 }
|
|
Definition at line 140 of file deprecated.c. 00141 { 00142 qof_event_gen (entity, event_type, NULL); 00143 }
|
|
|
|
Definition at line 184 of file deprecated.c. 00185 { 00186 return qof_util_get_string_cache (); 00187 }
|
|
Definition at line 115 of file deprecated.c. 00117 { 00118 return qof_event_register_old_handler (handler, user_data); 00119 }
|
|
Definition at line 134 of file deprecated.c. 00135 { 00136 qof_event_resume (); 00137 }
|
|
Definition at line 190 of file deprecated.c. 00191 { 00192 qof_util_string_cache_destroy (); 00193 }
|
|
Definition at line 128 of file deprecated.c. 00129 { 00130 qof_event_suspend (); 00131 }
|
|
Definition at line 122 of file deprecated.c. 00123 { 00124 qof_event_unregister_handler (handler_id); 00125 }
|
|
Definition at line 1019 of file deprecated.c. 01020 { 01021 gchar buf[4]; 01022 gchar *dupe; 01023 Timespec ts; 01024 struct tm stm; 01025 glong nsec = 0; 01026 01027 ts.tv_sec = 0; 01028 ts.tv_nsec = 0; 01029 if (!str) 01030 return ts; 01031 dupe = g_strdup (str); 01032 stm.tm_year = atoi (str) - 1900; 01033 str = strchr (str, '-'); 01034 if (str) 01035 { 01036 str++; 01037 } 01038 else 01039 { 01040 return ts; 01041 } 01042 stm.tm_mon = atoi (str) - 1; 01043 str = strchr (str, '-'); 01044 if (str) 01045 { 01046 str++; 01047 } 01048 else 01049 { 01050 return ts; 01051 } 01052 stm.tm_mday = atoi (str); 01053 01054 str = strchr (str, ' '); 01055 if (str) 01056 { 01057 str++; 01058 } 01059 else 01060 { 01061 return ts; 01062 } 01063 stm.tm_hour = atoi (str); 01064 str = strchr (str, ':'); 01065 if (str) 01066 { 01067 str++; 01068 } 01069 else 01070 { 01071 return ts; 01072 } 01073 stm.tm_min = atoi (str); 01074 str = strchr (str, ':'); 01075 if (str) 01076 { 01077 str++; 01078 } 01079 else 01080 { 01081 return ts; 01082 } 01083 stm.tm_sec = atoi (str); 01084 01085 if (strchr (str, '.')) 01086 { 01087 gint decimals, i, multiplier = 1000000000; 01088 str = strchr (str, '.') + 1; 01089 decimals = strcspn (str, "+- "); 01090 for (i = 0; i < decimals; i++) 01091 multiplier /= 10; 01092 nsec = atoi (str) * multiplier; 01093 } 01094 stm.tm_isdst = -1; 01095 01096 str += strcspn (str, "+-"); 01097 if (str) 01098 { 01099 buf[0] = str[0]; 01100 buf[1] = str[1]; 01101 buf[2] = str[2]; 01102 buf[3] = 0; 01103 stm.tm_hour -= atoi (buf); 01104 01105 str += 3; 01106 if ('.' == *str) 01107 str++; 01108 if (isdigit ((guchar) * str) && isdigit ((guchar) * (str + 1))) 01109 { 01110 gint cyn; 01111 if ('+' == buf[0]) 01112 { 01113 cyn = -1; 01114 } 01115 else 01116 { 01117 cyn = +1; 01118 } 01119 buf[0] = str[0]; 01120 buf[1] = str[1]; 01121 buf[2] = str[2]; 01122 buf[3] = 0; 01123 stm.tm_min += cyn * atoi (buf); 01124 } 01125 } 01126 01127 { 01128 struct tm tmp_tm; 01129 struct tm tm; 01130 glong tz; 01131 gint tz_hour; 01132 time_t secs; 01133 01134 tmp_tm = stm; 01135 tmp_tm.tm_isdst = -1; 01136 01137 secs = mktime (&tmp_tm); 01138 01139 if (secs < 0) 01140 { 01141 PWARN (" mktime failed to handle daylight saving: " 01142 "tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d for string=%s", 01143 stm.tm_hour, stm.tm_year, stm.tm_min, 01144 stm.tm_sec, stm.tm_isdst, dupe); 01145 tmp_tm.tm_hour++; 01146 secs = mktime (&tmp_tm); 01147 if (secs < 0) 01148 { 01149 tmp_tm.tm_hour -= 2; 01150 secs = mktime (&tmp_tm); 01151 } 01152 if (secs < 0) 01153 { 01154 PERR (" unable to recover from buggy mktime "); 01155 g_free (dupe); 01156 return ts; 01157 } 01158 } 01159 01160 tm = *localtime_r (&secs, &tm); 01161 01162 tz = gnc_timezone (&tmp_tm); 01163 01164 tz_hour = tz / 3600; 01165 stm.tm_hour -= tz_hour; 01166 stm.tm_min -= (tz % 3600) / 60; 01167 stm.tm_isdst = tmp_tm.tm_isdst; 01168 ts.tv_sec = mktime (&stm); 01169 if (ts.tv_sec < 0) 01170 { 01171 PWARN (" mktime failed to adjust calculated time:" 01172 " tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d", 01173 stm.tm_hour, stm.tm_year, stm.tm_min, 01174 stm.tm_sec, stm.tm_isdst); 01175 ts.tv_sec = secs - tz; 01176 } 01177 ts.tv_nsec = nsec; 01178 } 01179 g_free (dupe); 01180 return ts; 01181 }
|
|
Definition at line 1651 of file deprecated.c. 01653 { 01654 QofTime *qt; 01655 KvpFrame *cwd; 01656 va_list ap; 01657 01658 qt = qof_time_from_time_t (secs, 0); 01659 va_start (ap, first_name); 01660 cwd = qof_kvp_bag_add(pwd, path, qt, first_name, ap); 01661 va_end (ap); 01662 return cwd; 01663 }
|
|
|
|
Definition at line 1681 of file deprecated.c. 01683 { 01684 qof_kvp_bag_merge (kvp_into, intopath, kvp_from, frompath); 01685 }
|
|
Definition at line 1674 of file deprecated.c. 01676 { 01677 qof_kvp_bag_remove_frame (root, path, fr); 01678 }
|
|
|
|
Definition at line 87 of file deprecated.c. 00088 { 00089 return qof_log_prettify (name); 00090 }
|
|
Definition at line 768 of file deprecated.c. 00769 { 00770 static gchar buff[MAX_DATE_LENGTH]; 00771 QofDateFormat df; 00772 QofTime *time; 00773 gchar *str; 00774 00775 df = qof_date_format_get_current (); 00776 ENTER (" using date format %d", df); 00777 time = timespecToQofTime (ts); 00778 str = qof_date_print (qof_date_from_qtime (time), df); 00779 qof_time_free (time); 00780 g_stpcpy (buff, str); 00781 g_free (str); 00782 LEAVE (" printing %s", buff); 00783 return buff; 00784 }
|
|
Definition at line 98 of file deprecated.c.
|
|
Definition at line 103 of file deprecated.c.
|
|
Definition at line 64 of file deprecated.c. 00065 { 00066 qof_log_set_level (log_module, (QofLogLevel) level); 00067 }
|
|
Definition at line 70 of file deprecated.c. 00071 { 00072 qof_log_set_level_registered ((QofLogLevel) level); 00073 }
|
|
Definition at line 82 of file deprecated.c. 00083 { 00084 qof_log_set_file (outfile); 00085 }
|
|
Definition at line 109 of file deprecated.c. 00110 { 00111 return qof_log_check (log_module, log_level); 00112 }
|
|
Definition at line 93 of file deprecated.c.
|
|
Definition at line 178 of file deprecated.c.
|
|
Definition at line 172 of file deprecated.c. 00173 { 00174 return (gpointer) qof_util_string_cache_insert (key); 00175 }
|
|
Definition at line 196 of file deprecated.c. 00197 { 00198 qof_util_string_cache_remove (key); 00199 }
|
|
Definition at line 1645 of file deprecated.c. 01646 { 01647 return qof_util_string_isnum (s); 01648 }
|
|
Definition at line 1219 of file deprecated.c. 01220 { 01221 QofTime *time; 01222 QofDate *qd; 01223 01224 time = timespecToQofTime (ts); 01225 qd = qof_date_from_qtime (time); 01226 qof_time_free (time); 01227 if (day) 01228 *day = qd->qd_mday; 01229 if (month) 01230 *month = qd->qd_mon; 01231 if ((year) && (qd->qd_year < 0) && (qd->qd_year > G_MAXINT)) 01232 *year = (gint)qd->qd_year; 01233 }
|
|
Definition at line 635 of file deprecated.c. 00636 { 00637 /* Replacement code should not use localtime */ 00638 struct tm *result; 00639 time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS); 00640 result = localtime (&t_secs); 00641 return date_get_last_mday (result); 00642 }
|
|
Definition at line 1184 of file deprecated.c. 01185 { 01186 gint len, tz_hour, tz_min; 01187 glong secs; 01188 gchar cyn; 01189 time_t tmp; 01190 struct tm parsed; 01191 01192 tmp = ts.tv_sec; 01193 localtime_r (&tmp, &parsed); 01194 01195 secs = gnc_timezone (&parsed); 01196 tz_hour = secs / 3600; 01197 tz_min = (secs % 3600) / 60; 01198 01199 cyn = '-'; 01200 if (0 > tz_hour) 01201 { 01202 cyn = '+'; 01203 tz_hour = -tz_hour; 01204 } 01205 01206 len = sprintf (buff, "%4d-%02d-%02d %02d:%02d:%02d.%06ld %c%02d%02d", 01207 parsed.tm_year + 1900, 01208 parsed.tm_mon + 1, 01209 parsed.tm_mday, 01210 parsed.tm_hour, 01211 parsed.tm_min, 01212 parsed.tm_sec, ts.tv_nsec / 1000, cyn, tz_hour, tz_min); 01213 01214 buff += len; 01215 return buff; 01216 }
|
|
Definition at line 578 of file deprecated.c. 00579 { 00580 struct tm tm; 00581 00582 gnc_tm_get_day_end (&tm, time_val); 00583 return mktime (&tm); 00584 }
|
|
Definition at line 602 of file deprecated.c. 00603 { 00604 struct tm stm; 00605 time_t secs; 00606 00607 stm.tm_year = g_date_get_year (date) - 1900; 00608 stm.tm_mon = g_date_get_month (date) - 1; 00609 stm.tm_mday = g_date_get_day (date); 00610 gnc_tm_set_day_end (&stm); 00611 secs = mktime (&stm); 00612 return secs; 00613 }
|
|
Definition at line 569 of file deprecated.c. 00570 { 00571 struct tm tm; 00572 00573 gnc_tm_get_day_start (&tm, time_val); 00574 return mktime (&tm); 00575 }
|
|
Definition at line 588 of file deprecated.c. 00589 { 00590 struct tm stm; 00591 time_t secs; 00592 00593 stm.tm_year = g_date_get_year (date) - 1900; 00594 stm.tm_mon = g_date_get_month (date) - 1; 00595 stm.tm_mday = g_date_get_day (date); 00596 gnc_tm_set_day_start (&stm); 00597 secs = mktime (&stm); 00598 return secs; 00599 }
|
|
Definition at line 666 of file deprecated.c. 00667 { 00668 struct tm tm; 00669 00670 gnc_tm_get_day_end (&tm, time (NULL)); 00671 return mktime (&tm); 00672 }
|
|
Definition at line 657 of file deprecated.c. 00658 { 00659 struct tm tm; 00660 00661 gnc_tm_get_day_start (&tm, time (NULL)); 00662 return mktime (&tm); 00663 }
|
|
Definition at line 1236 of file deprecated.c. 01237 { 01238 g_return_val_if_fail (tm != NULL, 0); 01239 01240 #ifdef HAVE_STRUCT_TM_GMTOFF 01241 return -(tm->tm_gmtoff); 01242 #else 01243 return (glong) (timezone - (tm->tm_isdst > 0 ? 3600 : 0)); 01244 #endif 01245 }
|
|
Definition at line 562 of file deprecated.c.
|
|
Definition at line 537 of file deprecated.c.
|
|
Definition at line 651 of file deprecated.c.
|
|
Definition at line 645 of file deprecated.c.
|
|
Definition at line 553 of file deprecated.c. 00554 { 00555 tm->tm_hour = 23; 00556 tm->tm_min = 59; 00557 tm->tm_sec = 59; 00558 tm->tm_isdst = -1; 00559 }
|
|
Definition at line 544 of file deprecated.c. 00545 { 00546 tm->tm_hour = 12; 00547 tm->tm_min = 0; 00548 tm->tm_sec = 0; 00549 tm->tm_isdst = -1; 00550 }
|
|
Definition at line 528 of file deprecated.c. 00529 { 00530 tm->tm_hour = 0; 00531 tm->tm_min = 0; 00532 tm->tm_sec = 0; 00533 tm->tm_isdst = -1; 00534 }
|
|
|
|
|
|
|
|
Definition at line 1483 of file deprecated.c. 01484 { 01485 Timespec ts; 01486 QofTime *qt; 01487 ts.tv_sec = 0; 01488 ts.tv_nsec = 0; 01489 if (!value) 01490 return ts; 01491 qt = kvp_value_get_time (value); 01492 ts = qof_time_to_Timespec (qt); 01493 return ts; 01494 }
|
|
Definition at line 1472 of file deprecated.c. 01473 { 01474 QofTime *qt; 01475 KvpValue *retval; 01476 01477 qt = timespecToQofTime (value); 01478 retval = kvp_value_new_time (qt); 01479 return retval; 01480 }
|
|
Definition at line 159 of file deprecated.c. 00160 { 00161 return qof_book_merge_commit (mergeData); 00162 }
|
|
Definition at line 146 of file deprecated.c. 00147 { 00148 return qof_book_merge_init (importBook, targetBook); 00149 }
|
|
Definition at line 165 of file deprecated.c. 00167 { 00168 qof_book_merge_rule_foreach (mergeData, cb, mergeResult); 00169 }
|
|
Definition at line 152 of file deprecated.c. 00154 { 00155 return qof_book_merge_update_result (mergeData, tag); 00156 }
|
|
|
|
Definition at line 349 of file deprecated.c. 00350 { 00351 QofTime *qt; 00352 QofDate *qd; 00353 time_t retval; 00354 00355 qd = qof_date_new (); 00356 qd->qd_mday = day; 00357 qd->qd_mon = month; 00358 qd->qd_year = year; 00359 qt = qof_date_to_qtime (qd); 00360 retval = qof_time_get_secs (qt); 00361 qof_time_free (qt); 00362 qof_date_free (qd); 00363 return retval; 00364 }
|
|
Definition at line 1394 of file deprecated.c. 01395 { 01396 return qof_date_format_get_current (); 01397 }
|
|
Definition at line 1418 of file deprecated.c. 01419 { 01420 if(!qof_date_format_set_current (df)) 01421 PERR (" unable to set current format, %d", df); 01422 }
|
|
Definition at line 1424 of file deprecated.c. 01425 { 01426 return qof_date_format_get_format (df); 01427 }
|
|
Definition at line 74 of file qofevent.c. 00076 { 00077 HandlerInfo *hi; 00078 gint handler_id; 00079 00080 ENTER ("(handler=%p, data=%p)", handler, user_data); 00081 00082 /* sanity check */ 00083 if (!handler) 00084 { 00085 PERR ("no handler specified"); 00086 return 0; 00087 } 00088 PINFO (" deprecated handler specified"); 00089 00090 handler_id = find_next_handler_id (); 00091 /* Found one, add the handler */ 00092 hi = g_new0 (HandlerInfo, 1); 00093 00094 hi->old_handler = handler; 00095 hi->user_data = user_data; 00096 hi->handler_id = handler_id; 00097 00098 handlers = g_list_prepend (handlers, hi); 00099 00100 LEAVE (" (handler=%p, data=%p) handler_id=%d", handler, user_data, 00101 handler_id); 00102 return handler_id; 00103 00104 }
|
|
Definition at line 1248 of file deprecated.c. 01249 { 01250 Timespec ts; 01251 ts = inst->last_update; 01252 inst->update_time = timespecToQofTime (ts); 01253 return ts; 01254 }
|
|
Definition at line 512 of file deprecated.c. 00513 { 00514 gboolean retval; 00515 GDate *da, *db; 00516 00517 da = g_date_new (); 00518 db = g_date_new (); 00519 g_date_set_time_t (da, ta); 00520 g_date_set_time_t (db, tb); 00521 retval = g_date_compare (da, db); 00522 g_date_free (da); 00523 g_date_free (db); 00524 return retval; 00525 }
|
|
Definition at line 76 of file deprecated.c. 00077 { 00078 qof_log_set_level_registered ((QofLogLevel) level); 00079 }
|
|
Definition at line 755 of file deprecated.c. 00756 { 00757 QofDateFormat df; 00758 QofTime *time; 00759 gchar *str; 00760 00761 df = qof_date_format_get_current (); 00762 time = qof_time_from_time_t (t, 0); 00763 str = qof_date_print (qof_date_from_qtime (time), df); 00764 qof_time_free (time); 00765 return str; 00766 }
|
|
Definition at line 728 of file deprecated.c. 00729 { 00730 struct tm *theTime; 00731 if (!buff) 00732 return 0; 00733 theTime = localtime (&t); 00734 return qof_print_date_dmy_buff (buff, len, 00735 theTime->tm_mday, theTime->tm_mon + 1, theTime->tm_year + 1900); 00736 }
|
|
|
|
Definition at line 437 of file deprecated.c. 00438 { 00439 int flen; 00440 int day, month, year, hour, min, sec; 00441 struct tm ltm, gtm; 00442 00443 if (!buff) 00444 return 0; 00445 ltm = *localtime (&secs); 00446 day = ltm.tm_mday; 00447 month = ltm.tm_mon + 1; 00448 year = ltm.tm_year + 1900; 00449 hour = ltm.tm_hour; 00450 min = ltm.tm_min; 00451 sec = ltm.tm_sec; 00452 switch (qof_date_format_get_current ()) 00453 { 00454 case QOF_DATE_FORMAT_UK: 00455 flen = 00456 g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", day, month, 00457 year, hour, min); 00458 break; 00459 case QOF_DATE_FORMAT_CE: 00460 flen = 00461 g_snprintf (buff, len, "%2d.%2d.%-4d %2d:%02d", day, month, 00462 year, hour, min); 00463 break; 00464 case QOF_DATE_FORMAT_ISO: 00465 flen = 00466 g_snprintf (buff, len, "%04d-%02d-%02d %02d:%02d", year, month, 00467 day, hour, min); 00468 break; 00469 case QOF_DATE_FORMAT_UTC: 00470 { 00471 gtm = *gmtime (&secs); 00472 flen = strftime (buff, len, QOF_UTC_DATE_FORMAT, >m); 00473 break; 00474 } 00475 case QOF_DATE_FORMAT_LOCALE: 00476 { 00477 flen = strftime (buff, len, QOF_D_T_FMT, <m); 00478 } 00479 break; 00480 00481 case QOF_DATE_FORMAT_US: 00482 default: 00483 flen = 00484 g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", month, day, 00485 year, hour, min); 00486 break; 00487 } 00488 return flen; 00489 }
|
|
|
|
Definition at line 367 of file deprecated.c. 00369 { 00370 size_t flen; 00371 if (0 <= secs) 00372 { 00373 if (show_secs) 00374 { 00375 flen = g_snprintf (buff, len, 00376 "%02d:%02d:%02d", (int) (secs / 3600), 00377 (int) ((secs % 3600) / 60), (int) (secs % 60)); 00378 } 00379 else 00380 { 00381 flen = g_snprintf (buff, len, 00382 "%02d:%02d", (int) (secs / 3600), 00383 (int) ((secs % 3600) / 60)); 00384 } 00385 } 00386 else 00387 { 00388 if (show_secs) 00389 { 00390 flen = g_snprintf (buff, len, 00391 "-%02d:%02d:%02d", (int) (-secs / 3600), 00392 (int) ((-secs % 3600) / 60), (int) (-secs % 60)); 00393 } 00394 else 00395 { 00396 flen = g_snprintf (buff, len, 00397 "-%02d:%02d", (int) (-secs / 3600), 00398 (int) ((-secs % 3600) / 60)); 00399 } 00400 } 00401 return flen; 00402 }
|
|
Definition at line 405 of file deprecated.c. 00407 { 00408 size_t flen; 00409 if (0 <= secs) 00410 { 00411 if (show_secs) 00412 { 00413 flen = g_snprintf (buff, len, 00414 "%02d:%02d", (int) (secs / 60), (int) (secs % 60)); 00415 } 00416 else 00417 { 00418 flen = g_snprintf (buff, len, "%02d", (int) (secs / 60)); 00419 } 00420 } 00421 else 00422 { 00423 if (show_secs) 00424 { 00425 flen = g_snprintf (buff, len, 00426 "-%02d:%02d", (int) (-secs / 60), (int) (-secs % 60)); 00427 } 00428 else 00429 { 00430 flen = g_snprintf (buff, len, "-%02d", (int) (-secs / 60)); 00431 } 00432 } 00433 return flen; 00434 }
|
|
|
|
Definition at line 1872 of file qofquerycore.c.
|
|
Definition at line 1575 of file qofquery.c. 01576 { 01577 GList *output; 01578 GString *str; 01579 QofQuerySort *s[3]; 01580 gint maxResults = 0, numSorts = 3; 01581 01582 ENTER (" "); 01583 01584 if (!query) 01585 { 01586 LEAVE ("query is (null)"); 01587 return; 01588 } 01589 01590 output = NULL; 01591 str = NULL; 01592 maxResults = qof_query_get_max_results (query); 01593 01594 output = qof_query_printSearchFor (query, output); 01595 output = qof_query_printTerms (query, output); 01596 01597 qof_query_get_sorts (query, &s[0], &s[1], &s[2]); 01598 01599 if (s[0]) 01600 { 01601 output = qof_query_printSorts (s, numSorts, output); 01602 } 01603 01604 str = g_string_new (" "); 01605 g_string_printf (str, "Maximum number of results: %d", maxResults); 01606 output = g_list_append (output, str); 01607 01608 qof_query_printOutput (output); 01609 LEAVE (" "); 01610 }
|
|
Definition at line 1539 of file deprecated.c. 01542 { 01543 struct timeval now; 01544 va_list ap; 01545 01546 if ((0 > clockno) || (NUM_CLOCKS <= clockno)) 01547 return; 01548 #ifdef HAVE_GETTIMEOFDAY 01549 gettimeofday (&now, NULL); 01550 #else 01551 time (&(now.tv_sec)); 01552 now.tv_usec = 0; 01553 #endif 01554 01555 if (now.tv_usec < qof_clock[clockno].tv_usec) 01556 { 01557 now.tv_sec--; 01558 now.tv_usec += 1000000; 01559 } 01560 now.tv_sec -= qof_clock[clockno].tv_sec; 01561 now.tv_usec -= qof_clock[clockno].tv_usec; 01562 01563 qof_clock_total[clockno].tv_sec += now.tv_sec; 01564 qof_clock_total[clockno].tv_usec += now.tv_usec; 01565 01566 if (!fout) 01567 qof_log_init (); 01568 01569 fprintf (fout, "Clock %d Elapsed: %ld.%06lds %s: ", 01570 clockno, (long int) now.tv_sec, (long int) now.tv_usec, 01571 qof_log_prettify (function_name)); 01572 01573 va_start (ap, format); 01574 01575 vfprintf (fout, format, ap); 01576 01577 va_end (ap); 01578 01579 fprintf (fout, "\n"); 01580 fflush (fout); 01581 }
|
|
Definition at line 1584 of file deprecated.c. 01587 { 01588 va_list ap; 01589 01590 if ((0 > clockno) || (NUM_CLOCKS <= clockno)) 01591 return; 01592 01593 while (qof_clock_total[clockno].tv_usec >= 1000000) 01594 { 01595 qof_clock_total[clockno].tv_sec++; 01596 qof_clock_total[clockno].tv_usec -= 1000000; 01597 } 01598 01599 if (!fout) 01600 qof_log_init (); 01601 01602 fprintf (fout, "Clock %d Total Elapsed: %ld.%06lds %s: ", 01603 clockno, 01604 (long int) qof_clock_total[clockno].tv_sec, 01605 (long int) qof_clock_total[clockno].tv_usec, 01606 qof_log_prettify (function_name)); 01607 01608 va_start (ap, format); 01609 01610 vfprintf (fout, format, ap); 01611 01612 va_end (ap); 01613 01614 fprintf (fout, "\n"); 01615 fflush (fout); 01616 }
|
|
Definition at line 959 of file deprecated.c.
|
|
|
|
Definition at line 1639 of file deprecated.c.
|
|
Definition at line 1620 of file deprecated.c. 01621 { 01622 if (!current_session) 01623 { 01624 qof_event_suspend (); 01625 current_session = qof_session_new (); 01626 qof_event_resume (); 01627 } 01628 01629 return current_session; 01630 }
|
|
Definition at line 1633 of file deprecated.c.
|
|
Definition at line 1507 of file deprecated.c. 01510 { 01511 va_list ap; 01512 01513 if ((0 > clockno) || (NUM_CLOCKS <= clockno)) 01514 return; 01515 #ifdef HAVE_GETTIMEOFDAY 01516 gettimeofday (&qof_clock[clockno], NULL); 01517 #else 01518 time (&(qof_clock[clockno].tv_sec)); 01519 qof_clock[clockno].tv_usec = 0; 01520 #endif 01521 01522 if (!fout) 01523 qof_log_init (); 01524 01525 fprintf (fout, "Clock %d Start: %s: ", 01526 clockno, qof_log_prettify (function_name)); 01527 01528 va_start (ap, format); 01529 01530 vfprintf (fout, format, ap); 01531 01532 va_end (ap); 01533 01534 fprintf (fout, "\n"); 01535 fflush (fout); 01536 }
|
|
Definition at line 403 of file qofutil.c. 00405 { 00406 if (!qof_string_cache) 00407 { 00408 qof_string_cache = g_cache_new ((GCacheNewFunc) g_strdup, /* value_new_func */ 00409 g_free, /* value_destroy_func */ 00410 (GCacheDupFunc) g_strdup, /* key_dup_func */ 00411 g_free, /* key_destroy_func */ 00412 g_str_hash, /* hash_key_func */ 00413 g_str_hash, /* hash_value_func */ 00414 g_str_equal); /* key_equal_func */ 00415 } 00416 return qof_string_cache; 00417 }
|
|
Definition at line 323 of file deprecated.c. 00324 { 00325 Timespec ts; 00326 QofTime *qt = timespecToQofTime (*t); 00327 qof_time_abs (qt); 00328 ts = qof_time_to_Timespec (qt); 00329 qof_time_free (qt); 00330 return ts; 00331 }
|
|
Definition at line 276 of file deprecated.c. 00277 { 00278 QofTime *qta, *qtb; 00279 gint retval; 00280 00281 qta = timespecToQofTime (*ta); 00282 qtb = timespecToQofTime (*tb); 00283 retval = qof_time_cmp (qta, qtb); 00284 qof_time_free (qta); 00285 qof_time_free (qtb); 00286 return retval; 00287 }
|
|
Definition at line 307 of file deprecated.c. 00308 { 00309 Timespec ts; 00310 QofTime *qta, *qtb, *qt; 00311 00312 qta = timespecToQofTime (*ta); 00313 qtb = timespecToQofTime (*tb); 00314 qt = qof_time_diff (qta, qtb); 00315 ts = qof_time_to_Timespec (qt); 00316 qof_time_free (qta); 00317 qof_time_free (qtb); 00318 qof_time_free (qt); 00319 return ts; 00320 }
|
|
Definition at line 262 of file deprecated.c. 00263 { 00264 QofTime *qta, *qtb; 00265 gboolean retval; 00266 00267 qta = timespecToQofTime (*ta); 00268 qtb = timespecToQofTime (*tb); 00269 retval = qof_time_equal (qta, qtb); 00270 qof_time_free (qta); 00271 qof_time_free (qtb); 00272 return retval; 00273 }
|
|
Definition at line 334 of file deprecated.c. 00335 { 00336 struct tm tm, *result; 00337 Timespec retval; 00338 00339 time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS); 00340 result = localtime(&t_secs); 00341 tm = *result; 00342 gnc_tm_set_day_middle(&tm); 00343 retval.tv_sec = mktime(&tm); 00344 retval.tv_nsec = 0; 00345 return retval; 00346 }
|
|
Definition at line 290 of file deprecated.c. 00291 { 00292 QofTime *time; 00293 00294 time = qof_time_new (); 00295 time = qof_time_from_time_t (t, 0); 00296 *ts = qof_time_to_Timespec (time); 00297 qof_time_free (time); 00298 }
|
|
Definition at line 301 of file deprecated.c. 00302 { 00303 return ts.tv_sec; 00304 }
|
|
Definition at line 675 of file deprecated.c. 00676 { 00677 struct tm *stm; 00678 00679 stm = localtime (&thyme); 00680 return g_strdup_printf ("%04d%02d%02d%02d%02d%02d", 00681 (stm->tm_year + 1900), 00682 (stm->tm_mon + 1), 00683 stm->tm_mday, stm->tm_hour, stm->tm_min, stm->tm_sec); 00684 }
|
|
Definition at line 1430 of file deprecated.c. 01431 { 01432 return qof_time_stamp_now (); 01433 }
|
|
|