[Gnucash-changes] CashUtil sync
Neil Williams
codehelp at cvs.gnucash.org
Mon Aug 22 16:02:11 EDT 2005
Log Message:
-----------
CashUtil sync
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash/src/engine:
.cvsignore
FreqSpec.c
Makefile.am
Transaction.c
gnc-engine-util.c
gnc-engine-util.h
gnc-numeric.c
kvp-util-p.h
kvp-util.h
kvp_frame.h
qof.h
qofbook.c
qofsession.c
qofsession.h
qofsql.c
Added Files:
-----------
gnucash/src/engine:
cashobjects.c
cashobjects.h
qofla-dir.h.in
Revision Data
-------------
Index: qofsql.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsql.c,v
retrieving revision 1.5.2.6
retrieving revision 1.5.2.7
diff -Lsrc/engine/qofsql.c -Lsrc/engine/qofsql.c -u -r1.5.2.6 -r1.5.2.7
--- src/engine/qofsql.c
+++ src/engine/qofsql.c
@@ -31,7 +31,12 @@
#include <stdlib.h> /* for working atoll */
#include <errno.h>
#include "glib.h"
-#include <sql_parser.h>
+#include "config.h"
+#ifdef HAVE_GDA
+#include <sql/sql_parser.h>
+#else
+#include "sql_parser.h"
+#endif
#include <time.h>
#include "kvp_frame.h"
#include "gnc-date.h"
Index: qof.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof.h,v
retrieving revision 1.2.4.5
retrieving revision 1.2.4.6
diff -Lsrc/engine/qof.h -Lsrc/engine/qof.h -u -r1.2.4.5 -r1.2.4.6
--- src/engine/qof.h
+++ src/engine/qof.h
@@ -70,11 +70,11 @@
#include "gnc-engine-util.h"
#include "gnc-numeric.h"
#include "gnc-event.h"
-#include "gnc-trace.h"
#include "guid.h"
#include "kvp_frame.h"
#include "qofbackend.h"
-#include "qofid.h"
+#include "qofid-p.h"
+#include "qofinstance-p.h"
#include "qofbook.h"
#include "qofclass.h"
#include "qofobject.h"
@@ -83,5 +83,7 @@
#include "qofsession.h"
#include "qofsql.h"
#include "qofchoice.h"
+#include "qof_book_merge.h"
+#include "qof-be-utils.h"
#endif /* QOF_H_ */
Index: gnc-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-numeric.c,v
retrieving revision 1.26.4.9
retrieving revision 1.26.4.10
diff -Lsrc/engine/gnc-numeric.c -Lsrc/engine/gnc-numeric.c -u -r1.26.4.9 -r1.26.4.10
--- src/engine/gnc-numeric.c
+++ src/engine/gnc-numeric.c
@@ -33,7 +33,7 @@
#include <string.h>
#include "gnc-numeric.h"
-#include "qofmath128.h"
+#include "qofmath128.c"
/* static short module = MOD_ENGINE; */
Index: kvp-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp-util.h,v
retrieving revision 1.2.20.1
retrieving revision 1.2.20.2
diff -Lsrc/engine/kvp-util.h -Lsrc/engine/kvp-util.h -u -r1.2.20.1 -r1.2.20.2
--- src/engine/kvp-util.h
+++ src/engine/kvp-util.h
@@ -21,12 +21,14 @@
\********************************************************************/
/** @addtogroup KVP
- @{ */
+ @{
+*/
/** @file kvp-util.h
@brief GnuCash KVP utility functions
*/
-/** @name Hash Utilities */
-/* @{ */
+/** @name Hash Utilities
+ @{
+*/
#ifndef GNC_KVP_UTIL_H
#define GNC_KVP_UTIL_H
@@ -57,6 +59,6 @@
/***********************************************************************/
-/* @} */
-/* @} */
+/** @} */
+/** @} */
#endif /* GNC_KVP_UTIL_H */
Index: gnc-engine-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine-util.h,v
retrieving revision 1.32.4.8
retrieving revision 1.32.4.9
diff -Lsrc/engine/gnc-engine-util.h -Lsrc/engine/gnc-engine-util.h -u -r1.32.4.8 -r1.32.4.9
--- src/engine/gnc-engine-util.h
+++ src/engine/gnc-engine-util.h
@@ -146,6 +146,17 @@
# define GNC_SCANF_LLD "%qd"
#endif
+/** @name Convenience wrappers
+ @{
+*/
+
+/** \brief Initialise the Query Object Framework */
+void qof_init (void);
+
+/** \brief Safely close down the Query Object Framework */
+void qof_close (void);
+
+/** @} */
/** Prototypes *************************************************/
Index: qofbook.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook.c,v
retrieving revision 1.10.2.6
retrieving revision 1.10.2.7
diff -Lsrc/engine/qofbook.c -Lsrc/engine/qofbook.c -u -r1.10.2.6 -r1.10.2.7
--- src/engine/qofbook.c
+++ src/engine/qofbook.c
@@ -55,14 +55,14 @@
static short module = MOD_ENGINE;
+/* ====================================================================== */
+/* constructor / destructor */
+
static void coll_destroy(gpointer col)
{
qof_collection_destroy((QofCollection *) col);
}
-/* ====================================================================== */
-/* constructor / destructor */
-
static void
qof_book_init (QofBook *book)
{
--- /dev/null
+++ src/engine/qofla-dir.h.in
@@ -0,0 +1,26 @@
+/***************************************************************************
+ * qofla-dir.h.in
+ *
+ * Mon Dec 20 20:27:48 2004
+ * Copyright 2004 Neil Williams
+ * linux at codehelp.co.uk
+ ****************************************************************************/
+
+/*
+ * 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#define QOF_LIB_DIR "@-libdir-@"
+
Index: gnc-engine-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine-util.c,v
retrieving revision 1.29.4.4
retrieving revision 1.29.4.5
diff -Lsrc/engine/gnc-engine-util.c -Lsrc/engine/gnc-engine-util.c -u -r1.29.4.4 -r1.29.4.5
--- src/engine/gnc-engine-util.c
+++ src/engine/gnc-engine-util.c
@@ -1,5 +1,5 @@
/********************************************************************\
- * gnc-engine-util.c -- GnuCash engine utility functions *
+ * gnc-engine-util.c -- QOF utility functions *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997-2001,2004 Linas Vepstas <linas at linas.org> *
* *
@@ -30,7 +30,7 @@
#include <glib.h>
#include <stdlib.h>
#include <string.h>
-
+#include <qof.h>
#include "gnc-engine-util.h"
@@ -252,5 +252,25 @@
return g_cache_insert(gnc_engine_get_string_cache(), key);
}
+void
+qof_init (void)
+{
+ gnc_engine_get_string_cache ();
+ guid_init ();
+ qof_object_initialize ();
+ qof_query_init ();
+ qof_book_register ();
+}
+
+void
+qof_close(void)
+{
+ qof_query_shutdown ();
+ qof_object_shutdown ();
+ guid_shutdown ();
+ gnc_engine_string_cache_destroy ();
+}
+
+
/************************* END OF FILE ******************************\
\********************************************************************/
Index: kvp_frame.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp_frame.h,v
retrieving revision 1.22.4.11
retrieving revision 1.22.4.12
diff -Lsrc/engine/kvp_frame.h -Lsrc/engine/kvp_frame.h -u -r1.22.4.11 -r1.22.4.12
--- src/engine/kvp_frame.h
+++ src/engine/kvp_frame.h
@@ -105,8 +105,6 @@
#define kvp_value KvpValue
#define kvp_value_t KvpValueType
-
-/* -------------------------------------------------------- */
/** @name KvpFrame Constructors
@{
*/
@@ -130,7 +128,6 @@
/** @} */
-/* -------------------------------------------------------- */
/** @name KvpFrame Basic Value Storing
@{
*/
@@ -317,7 +314,6 @@
/** @} */
-/* -------------------------------------------------------- */
/** @name KvpFrame Value Fetching
Value accessors. These all take a unix-style slash-separated
@@ -414,7 +410,6 @@
const char *path);
/** @} */
-/* -------------------------------------------------------- */
/** @name KvpFrame KvpValue low-level storing routines.
You probably shouldn't be using these low-level routines
@@ -479,7 +474,6 @@
/** @} */
-
/** @name KvpFrame KvpValue Low-Level Retrieval Routines
You probably shouldn't be using these low-level routines
@@ -510,13 +504,11 @@
/**
* Similar returns as strcmp.
- **/
+ */
gint kvp_frame_compare(const KvpFrame *fa, const KvpFrame *fb);
-/** @} */
-
gint double_compare(double v1, double v2);
-
+/** @} */
/** @name KvpValue List Convenience Functions
You probably shouldn't be using these low-level routines
@@ -696,5 +688,5 @@
gchar* kvp_value_glist_to_string(const GList *list);
GHashTable* kvp_frame_get_hash(const KvpFrame *frame);
-#endif
/** @} */
+#endif
Index: qofsession.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsession.h,v
retrieving revision 1.2.4.8
retrieving revision 1.2.4.9
diff -Lsrc/engine/qofsession.h -Lsrc/engine/qofsession.h -u -r1.2.4.8 -r1.2.4.9
--- src/engine/qofsession.h
+++ src/engine/qofsession.h
@@ -99,7 +99,15 @@
QofSession * qof_session_new (void);
void qof_session_destroy (QofSession *session);
+
+/** \deprecated Use a local context, not this static!
+
+Applications must not use 'current_session' in new code.
+
+Use a local context and store your session data there.
+*/
QofSession * qof_session_get_current_session (void);
+/** \deprecated do not use! */
void qof_session_set_current_session (QofSession *session);
/** The qof_session_swap_data () method swaps the book of
@@ -196,11 +204,12 @@
QofBook * qof_session_get_book (QofSession *session);
-/** The qof_session_get_file_path() routine returns the fully-qualified file
+/**
+ * The qof_session_get_file_path() routine returns the fully-qualified file
* path for the session. That is, if a relative or partial filename
* was for the session, then it had to have been fully resolved to
* open the session. This routine returns the result of this resolution.
- * The path is always guarenteed to reside in the local file system,
+ * The path is always guaranteed to reside in the local file system,
* even if the session itself was opened as a URL. (currently, the
* filepath is derived from the url by substituting commas for
* slashes).
@@ -210,6 +219,7 @@
* file:/some/where/some/file.gml
*/
const char * qof_session_get_file_path (QofSession *session);
+
const char * qof_session_get_url (QofSession *session);
/**
Index: Transaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Transaction.c,v
retrieving revision 1.261.4.13
retrieving revision 1.261.4.14
diff -Lsrc/engine/Transaction.c -Lsrc/engine/Transaction.c -u -r1.261.4.13 -r1.261.4.14
--- src/engine/Transaction.c
+++ src/engine/Transaction.c
@@ -1466,7 +1466,8 @@
void
xaccTransBeginEdit (Transaction *trans)
{
- QOF_BEGIN_EDIT(&trans->inst)
+ if(!trans) { return; }
+ qof_begin_edit(&trans->inst);
if (qof_book_shutting_down(trans->inst.book))
return;
Index: FreqSpec.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/FreqSpec.c,v
retrieving revision 1.28.4.9
retrieving revision 1.28.4.10
diff -Lsrc/engine/FreqSpec.c -Lsrc/engine/FreqSpec.c -u -r1.28.4.9 -r1.28.4.10
--- src/engine/FreqSpec.c
+++ src/engine/FreqSpec.c
@@ -688,7 +688,7 @@
if(dom > 31)
{
/* This is displayed instead of the number of the day of month. */
- g_string_sprintf(str, (char*)_( "last day"));
+ g_string_sprintf(str, _( "last day"));
}
else
{
@@ -726,7 +726,7 @@
switch( xaccFreqSpecGetUIType( fs ) ) {
case UIFREQ_NONE:
- snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("None") );
+ snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, _("None") );
break;
case UIFREQ_ONCE:
@@ -736,7 +736,7 @@
GNC_D_FMT,
&fs->s.once.date );
/* %s is the strftime-string of the one-time date. */
- snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("Once: %s"), tmpStr );
+ snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, _("Once: %s"), tmpStr );
g_free( tmpStr );
break;
@@ -745,12 +745,12 @@
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals */
- (char*)_("Daily (x%u)"),
+ _("Daily (x%u)"),
fs->s.daily.interval_days );
}
else
{
- snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("Daily") );
+ snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, _("Daily") );
}
break;
@@ -760,7 +760,7 @@
if ( g_list_length( fs->s.composites.subSpecs ) != 5 ) {
PERR( "Invalid Daily[M-F] structure." );
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
- (char*)"Daily[M-F]: error" );
+ "Daily[M-F]: error" );
return;
}
/* We assume that all of the weekly FreqSpecs that make up
@@ -770,12 +770,12 @@
if ( subFS->s.weekly.interval_weeks > 1 ) {
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals */
- (char*)_("Weekdays: (x%u)"),
+ _("Weekdays: (x%u)"),
subFS->s.weekly.interval_weeks );
}
else
{
- snprintf(freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("Weekdays"));
+ snprintf(freqStrBuf, MAX_FREQ_STR_SIZE, _("Weekdays"));
}
}
@@ -797,7 +797,7 @@
tmpFS = (FreqSpec*)list->data;
if ( xaccFreqSpecGetType(tmpFS) != WEEKLY ) {
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
- (char*)"error: UIFREQ_WEEKLY doesn't contain weekly children" );
+ "error: UIFREQ_WEEKLY doesn't contain weekly children" );
g_free( tmpStr );
return;
}
@@ -814,20 +814,20 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %d are the number of intervals; %s is
the name of the weekday */
- (char*)_( "Weekly (x%d): %s"), tmpInt, tmpStr );
+ _( "Weekly (x%d): %s"), tmpInt, tmpStr );
}
else
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* Translators: %s is the name of the weekday */
- (char*)_( "Weekly: %s"), tmpStr );
+ _( "Weekly: %s"), tmpStr );
}
g_free( tmpStr );
break;
case UIFREQ_BI_WEEKLY:
/* %s is the name of the weekday */
- snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("Bi-Weekly, %ss"),
+ snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, _("Bi-Weekly, %ss"),
get_wday_name(fs->s.weekly.offset_from_epoch % 7) );
break;
@@ -850,7 +850,7 @@
%s is the day of month of the starting month
(or the string "last day"); %s is the day of
month of the ending month */
- (char*)_("Semi-monthly (x%u): %s, %s"),
+ _("Semi-monthly (x%u): %s, %s"),
tmpFS->s.monthly.interval_months,
first_dom->str,
second_dom->str);
@@ -861,7 +861,7 @@
/* Translators: %s is the day of month of the
starting month (or the string "last day"); %s
is the day of month of the ending month */
- (char*)_("Semi-monthly: %s, %s"),
+ _("Semi-monthly: %s, %s"),
first_dom->str,
second_dom->str);
}
@@ -877,7 +877,7 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals; %u is
the day of month */
- (char*)_("Monthly (x%u): %u"),
+ _("Monthly (x%u): %u"),
fs->s.monthly.interval_months,
fs->s.monthly.day_of_month);
}
@@ -885,7 +885,7 @@
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the day of month */
- (char*)_("Monthly: %u"),
+ _("Monthly: %u"),
fs->s.monthly.day_of_month );
}
break;
@@ -895,7 +895,7 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals; %u is
the day of month */
- (char*)_("Quarterly (x%u): %u"),
+ _("Quarterly (x%u): %u"),
fs->s.monthly.interval_months/3,
fs->s.monthly.day_of_month);
}
@@ -903,7 +903,7 @@
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the day of month */
- (char*)_("Quarterly: %u"),
+ _("Quarterly: %u"),
fs->s.monthly.day_of_month );
}
break;
@@ -914,7 +914,7 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals; %u is
the day of month */
- (char*)_("Tri-Yearly (x%u): %u"),
+ _("Tri-Yearly (x%u): %u"),
fs->s.monthly.interval_months/4,
fs->s.monthly.day_of_month);
}
@@ -922,7 +922,7 @@
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the day of month */
- (char*)_("Tri-Yearly: %u"),
+ _("Tri-Yearly: %u"),
fs->s.monthly.day_of_month );
}
break;
@@ -937,7 +937,7 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the number of intervals; %u
is the day of month */
- (char*)_("Semi-Yearly (x%u): %u"),
+ _("Semi-Yearly (x%u): %u"),
fs->s.monthly.interval_months/6,
fs->s.monthly.day_of_month);
}
@@ -945,7 +945,7 @@
{
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %u is the day of month */
- (char*)_("Semi-Yearly: %u"),
+ _("Semi-Yearly: %u"),
fs->s.monthly.day_of_month );
}
break;
@@ -968,7 +968,7 @@
%u is the number of intervals; %s is the
abbreviated name of the month; %u is the
day of month. */
- (char*)_("Yearly (x%u): %s/%u"),
+ _("Yearly (x%u): %s/%u"),
fs->s.monthly.interval_months/12,
get_abbrev_month_name(fs->s.monthly.offset_from_epoch),
fs->s.monthly.day_of_month);
@@ -978,14 +978,14 @@
snprintf( freqStrBuf, MAX_FREQ_STR_SIZE,
/* %s is the abbreviated name of the
month; %u is the day of month */
- (char*)_("Yearly: %s/%u"),
+ _("Yearly: %s/%u"),
get_abbrev_month_name(fs->s.monthly.offset_from_epoch),
fs->s.monthly.day_of_month );
}
break;
default:
- snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, (char*)_("Unknown") );
+ snprintf( freqStrBuf, MAX_FREQ_STR_SIZE, _("Unknown") );
break;
}
g_string_sprintf( str, "%s", freqStrBuf );
Index: qofsession.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsession.c,v
retrieving revision 1.2.4.21
retrieving revision 1.2.4.22
diff -Lsrc/engine/qofsession.c -Lsrc/engine/qofsession.c -u -r1.2.4.21 -r1.2.4.22
--- src/engine/qofsession.c
+++ src/engine/qofsession.c
@@ -50,7 +50,7 @@
#include <unistd.h>
#include <glib.h>
-
+#include "qofla-dir.h"
#include "gnc-engine-util.h"
#include "gnc-event.h"
#include "gnc-trace.h"
@@ -67,7 +67,9 @@
#include "gnc-module.h"
#endif /* GNUCASH */
+/** \deprecated current_session should not be static */
static QofSession * current_session = NULL;
+
static GHookList * session_closed_hooks = NULL;
static short module = MOD_BACKEND;
static GSList *provider_list = NULL;
@@ -226,6 +228,8 @@
return session;
}
+/** \deprecated Use a local context to store
+your current session, NOT a static in the library. */
QofSession *
qof_session_get_current_session (void)
{
@@ -239,6 +243,7 @@
return current_session;
}
+/** \deprecated */
void
qof_session_set_current_session (QofSession *session)
{
@@ -333,7 +338,6 @@
partial =
(gboolean)GPOINTER_TO_INT(qof_book_get_data(book, PARTIAL_QOFBOOK));
-
if(!partial) {
qof_book_set_data(book, PARTIAL_QOFBOOK, (gboolean*)TRUE);
}
@@ -1250,6 +1254,8 @@
#else
load_backend_library ("libqof-backend-qsf.so", "qsf_provider_init" );
#endif
+ qof_load_backend_library (QOF_LIB_DIR "libqof-backend-qsf.la",
+ "qsf_provider_init");
}
p = g_slist_copy(provider_list);
while(p != NULL)
--- /dev/null
+++ src/engine/cashobjects.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * cashobjects.h
+ *
+ * Fri Aug 19 21:43:02 2005
+ * Copyright 2005 Neil Williams
+ * linux at codehelp.co.uk
+ ****************************************************************************/
+
+/*
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+ /* a convenience header for anyone working with the libcashobjects.la library. */
+
+#ifndef _CASHOBJECTS_H
+#define _CASHOBJECTS_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <glib.h>
+
+gboolean cashobjects_register(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CASHOBJECTS_H */
Index: kvp-util-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp-util-p.h,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -Lsrc/engine/kvp-util-p.h -Lsrc/engine/kvp-util-p.h -u -r1.1.4.4 -r1.1.4.5
--- src/engine/kvp-util-p.h
+++ src/engine/kvp-util-p.h
@@ -29,19 +29,15 @@
#include "kvp_frame.h"
/** @addtogroup KVP
- @{ */
-/** @addtogroup KVP_Private
- Private interfaces, not meant to be used by applications.
- @{ */
-/* @file kvp-util-p.h
+ @{
+*/
+/** @file kvp-util-p.h
* @brief misc odd-job kvp utils engine-private routines
* @author Copyright (C) 2001, 2003 Linas Vepstas <linas at linas.org> *
- * @note PRIVATE FILE
- * -- these routines are private to the engine. The should not be used
- * outside of the engine.
- */
-/** @name KvpBag Bags of GUID Pointers */
-/* @{ */
+*/
+/** @name KvpBag Bags of GUID Pointers
+ @{
+*/
/** The gnc_kvp_bag_add() routine is used to maintain a collection
* of pointers in a kvp tree.
@@ -107,7 +103,6 @@
void gnc_kvp_bag_remove_frame (KvpFrame *root, const char *path,
KvpFrame *fr);
-/* @} */
-/* @} */
-/* @} */
+/** @} */
+/** @} */
#endif /* XACC_KVP_UTIL_P_H */
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/.cvsignore,v
retrieving revision 1.10.4.2
retrieving revision 1.10.4.3
diff -Lsrc/engine/.cvsignore -Lsrc/engine/.cvsignore -u -r1.10.4.2 -r1.10.4.3
--- src/engine/.cvsignore
+++ src/engine/.cvsignore
@@ -20,4 +20,5 @@
iso-4217-currencies.c
test-link
.DS_Store
+qofla-dir.h
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Makefile.am,v
retrieving revision 1.94.2.13
retrieving revision 1.94.2.14
diff -Lsrc/engine/Makefile.am -Lsrc/engine/Makefile.am -u -r1.94.2.13 -r1.94.2.14
--- src/engine/Makefile.am
+++ src/engine/Makefile.am
@@ -7,6 +7,7 @@
-I${top_srcdir}/lib/libc \
-I${top_srcdir}/src \
-I${top_srcdir}/src/gnc-module \
+ -I${top_srcdir}/src/business/business-core/ \
${GNUCASH_ENGINE_CFLAGS}
libgncmod_engine_la_SOURCES = \
@@ -24,6 +25,7 @@
TransLog.c \
Transaction.c \
cap-gains.c \
+ cashobjects.c \
gnc-associate-account.c \
gnc-budget-book.c \
gnc-budget-cat.c \
@@ -56,7 +58,6 @@
qofclass.c \
qofid.c \
qofinstance.c \
- qofmath128.c \
qofobject.c \
qofquery.c \
qofquerycore.c \
@@ -203,11 +204,22 @@
extensions.txt \
iso-4217-currencies.scm \
iso-currencies-to-c \
+ qofla-dir.h.in \
kvp_doc.txt \
${gncmod_DATA} \
${gncscm_DATA} \
${gwmod_DATA}
+QOFLIBdir = $(libdir)
+
+CONFIG_CLEAN_FILES = qofla-dir.h
+
+qofla-dir.h: qofla-dir.h.in
+ rm -f $@.tmp
+ sed < $< > $@.tmp \
+ -e 's:@-libdir-@:${QOFLIBdir}:g'
+ mv $@.tmp $@
+
if GNUCASH_SEPARATE_BUILDDIR
#For compiling
SCM_FILE_LINKS = gw-engine-spec.scm gw-kvp-spec.scm iso-4217-currencies.scm
@@ -248,6 +260,7 @@
(gw:generate-wrapset \"gw-kvp\")"
BUILT_SOURCES = \
+ qofla-dir.h \
iso-4217-currencies.c \
gw-engine.scm gw-engine.c gw-engine.h \
gw-kvp.scm gw-kvp.c gw-kvp.h
--- /dev/null
+++ src/engine/cashobjects.c
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * cashobjects.c
+ *
+ * Mon Aug 22 09:49:52 2005
+ * Copyright 2005 Neil Williams
+ * linux at codehelp.co.uk
+ ****************************************************************************/
+
+/*
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "cashobjects.h"
+#include "gnc-engine.h"
+#include "gncAddressP.h"
+#include "gncBillTermP.h"
+#include "gncCustomerP.h"
+#include "gncEmployeeP.h"
+#include "gncEntryP.h"
+#include "gncInvoiceP.h"
+#include "gncJobP.h"
+#include "gncVendorP.h"
+#include "gncTaxTableP.h"
+#include "gncOrderP.h"
+#include "AccountP.h"
+#include "TransactionP.h"
+
+gboolean
+cashobjects_register(void)
+{
+#ifndef GNUCASH_MAJOR_VERSION
+ g_return_val_if_fail(gncInvoiceRegister(), FALSE);
+ g_return_val_if_fail ( gncJobRegister (), FALSE);
+ g_return_val_if_fail(gncBillTermRegister(), FALSE);
+ g_return_val_if_fail(gncCustomerRegister(), FALSE);
+ g_return_val_if_fail(gncAddressRegister(), FALSE);
+ g_return_val_if_fail(gncEmployeeRegister(), FALSE);
+ g_return_val_if_fail ( gncEntryRegister (), FALSE);
+ g_return_val_if_fail (gncVendorRegister (), FALSE);
+ g_return_val_if_fail(gncTaxTableRegister(), FALSE);
+ g_return_val_if_fail ( gncOrderRegister (), FALSE);
+#endif
+ g_return_val_if_fail(xaccAccountRegister(), FALSE);
+ g_return_val_if_fail ( xaccTransRegister(), FALSE);
+ g_return_val_if_fail ( xaccSplitRegister(), FALSE);
+ return TRUE;
+}
More information about the gnucash-changes
mailing list