Commit Graph

142 Commits

Author SHA1 Message Date
Geert Janssens
7f40be5302 Fix some static warnings and errors as a result of Eclipse's static code
analysis.
As a result, some unused functions and function prototypes are removed.

It did expose one real bug in Transaction.c so far.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21687 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-12-08 17:11:21 +00:00
Christian Stimming
d398e99593 Another error message somewhat more verbose.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20282 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-02-12 15:53:51 +00:00
Christian Stimming
88cb0b1b20 Replace more obsolete #define'd function names by their current names.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19939 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-14 20:22:48 +00:00
Christian Stimming
67c6a3d0cf Replace some renamed functions by their real new names, removing the annoying #defines.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19652 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-13 16:16:04 +00:00
Christian Stimming
a322015eb8 Rename the type GUID into GncGUID because on Windows, the system headers have a type GUID which clashes with ours.
Note that only the type was renamed, but not any enums or function names.
Hence, the scheme wrappers should be unchanged completely (hopefully).

Discussed at http://lists.gnucash.org/pipermail/gnucash-devel/2010-March/027679.html

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18969 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 21:01:21 +00:00
Christian Stimming
763e4c3d15 Re-indentation of source code, next batch: src/engine/*
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18788 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-02 21:40:28 +00:00
Christian Stimming
82b8b99c9d More minor MSVC code fixes.
However, this code doesn't compile with MSVC9.0 for a few reasons:

1. libguile.h comes with its own scmconfig.h which contains HAVE_STDINT_H
whereas MSVC doesn't have that. This is stupid guile which doesn't accept
the fact that the user uses a different compiler than how they compiled guile.

2. Some initializations are not supported: Account.c:3312 etc.

3. The C99 "designated initializers" of e.g. Account.c:4661 ff. (r17724,
bug#539957) are not supported by MSVC9.0 - this is the hardest problem
of these all.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18738 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-25 17:42:43 +00:00
Phil Longstaff
2bc336a874 Replace some calls to (deprecated) xaccAccountGetGUID() with calls to qof_entity_get_guid()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18306 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-09-10 01:52:42 +00:00
Chris Shoemaker
31e926c486 Merge swig-redo branch back into trunk.
g-wrap is gone.  I, for one, welcome our new swig overlords.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15024 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-10-15 19:02:05 +00:00
Derek Atkins
8bf369217a Revert r14892 in order to try a different approach.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14902 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-09-27 13:30:05 +00:00
Derek Atkins
2bb357def4 Add a new QOF_TYPE_NUMSTRING to add numeric sorts. (#150799).
This new type is like QOF_TYPE_STRING but it sorts numerically
	  (first) and then sorts alphanumerically (by the tail of the
	  number).  Added the QOF Type, the gnome-search support, and
	  modified TRANS_NUM to use the new type.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14892 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-09-26 00:36:30 +00:00
David Hampton
0b8a944f30 Update FSF street address.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11964 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-17 05:35:02 +00:00
David Hampton
f28d033d74 Collapse the gnome2 branch back into HEAD.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11565 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-02 03:32:36 +00:00
David Hampton
22357f89d3 Todd T. Fries patch for compilation on OpenBSD 64bit architectures.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11267 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-08-16 01:55:25 +00:00
Linas Vepstas
ce63311484 -- Rename QOF_QUERY_PARAM_XX to QOF_PARAM_XX
-- Add 'new' callback to QofObject.  This allows QofObject to act
   as an 'object factory', creating a new instance of something,
   given only the type name.  Plan to use this in the new SQL
   backend, when restoring objects from SQL tables.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9965 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-05-23 17:31:40 +00:00
Linas Vepstas
dff9fa3b3b -- Change gnc-trace.h to use the glib g_log() routine for all error
printing and tracing.
-- ongoing cap-gains work


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9290 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-12 13:17:26 +00:00
Linas Vepstas
3c92f24d57 remove dead code
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8862 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-07-13 04:15:45 +00:00
Linas Vepstas
367a8b5f69 rename kvp_frame to KvpFrame to more closely follow gnome naming conventions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8782 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 23:33:00 +00:00
Linas Vepstas
88c88039dc rename the entity functions from xaccEntity to qof_entity
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8749 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 07:30:48 +00:00
Linas Vepstas
aaa6e14fe1 convert QueryObject to QofQueryObject
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8731 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 04:30:43 +00:00
Linas Vepstas
8118b2fd69 rename QueryNew to QofQuery
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8721 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 07:38:15 +00:00
Linas Vepstas
c30b78e183 glurg must be getting late; fix more mistakes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8708 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 05:41:38 +00:00
Linas Vepstas
edfa2f1151 rename gncQueryCore to QofQueryCore
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8701 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 05:14:10 +00:00
Linas Vepstas
50906151db rename GNCBook to QofBook
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8681 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 00:52:46 +00:00
David Hampton
1d98fa5497 Remove redundant routines and place a single copy in a common location.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7687 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-15 23:25:01 +00:00
Derek Atkins
a56e6be18b * created the backend-api document
* removed the old Query code (bug #94318)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7290 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-10-08 04:01:54 +00:00
Derek Atkins
8f63db0411 create xaccQueryAddGUIDMatchGL() and wrap it. This is a special function
that takes a GUID (instead of a const GUID *) and a GList (instead of
a GSList) and performs an gncQueryAddGUIDMatch().

Add Lots to the query infrastructure, so we can add Lot-based lookups
and queries.

Add SPLIT_LOT parameter and wrap it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7041 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-28 04:20:46 +00:00
Derek Atkins
b4e4b08957 Implement xaccQueryGetLots() which is just like xaccQueryGetTransactions()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7034 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-27 14:10:40 +00:00
Derek Atkins
0f0080c964 Integration of the new Query subsystem, to replace the old Query
infrastructure.  This also replaces the old "Find Transaction"
	dialog with the new gnome-search dialog.  Registers, Reports, SXs,
	etc. all test out fine.  Integration with SQL has been "done"
	(i.e. it compiles cleanly) but not "tested."  Lots of the old code
	is still there, but #ifdef'ed out.  That code will go away
	shortly.

	There is only one known loss-of-functionality: the query->xml-v1
	converter was not re-implemented.  The current intention is, if
	this functionality is required, to use the query->scm converter
	and then convert the scm->string and insert that into an XML
	document.

	Fix a Transaction Void bug.

	Fix a few bugs in test code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6951 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-05 21:59:35 +00:00
Joshua Sled
7de7b944f8 2002-04-16 Joshua Sled <jsled@asynchronous.org>
* src/register/ledger-core/gnc-ledger-display.c: Some template-GL
	cleanup [debugging printf's removed].  Removed never-used
	LD_TEMPLATE type.

	* src/gnome/glade/sched-xact.glade: Removed unused start page.

	* src/gnome/dialog-sxsincelast.c: Added support for using the
	gnc-regWidget to display created transactions for review. Added
	'Cancel' support. Didn't remove enough dead code, but started to.

	* src/gnome/dialog-scheduledxaction.c: Added support for using the
	gncRegWidget in the SX editor.  Formatting changes.

	* src/register/ledger-core/gnc-regWidget.{h,c}: Added; a
	macro-widget roughly duplicating the src/gnome/window-register.c
	look-and-feel-and-behavior.

	* src/engine/SchedXaction.c: Added support for saving a "temporal
	snapshot" of a scheduled transaction. Rewrote "sequence state"
	manipulations in terms of temporal snapshots.

	* src/engine/Query.c: Add support for Querying the template
	AccountGroup.

	* src/doc/TODO-schedxactions: Updates.

	* src/engine/Makefile.am: Prepend-to instead of unconditionally
	setting GUILE_LOAD_PATH when creating iso-4217-currencies.c, for
	those of us that need to set it for whatever reason we need to do
	so.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6795 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-04-16 07:09:16 +00:00
Dave Peticolas
fae07ec3f1 fix mem leaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6531 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-08 01:37:10 +00:00
Linas Vepstas
875a439abc cut over to multiple-book query
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6500 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-03 06:11:04 +00:00
Linas Vepstas
d4ff335f23 move Query private data structures to private file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6498 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-03 02:34:52 +00:00
Linas Vepstas
e0b61ebb58 more reorg in preparation for switch to books
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6496 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-03 01:57:04 +00:00
Linas Vepstas
68e191f02d start adding book-matching predicates
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6492 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 21:29:00 +00:00
Linas Vepstas
8819597b9d cosmetic renaming of PR_AMOUNT->PR_VALUE
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6486 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 20:20:37 +00:00
Linas Vepstas
df716532e9 purely cosmetic re-arrangement of parenthesis
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6485 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 19:56:02 +00:00
Linas Vepstas
fcabb48530 remove un-needed include
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6445 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-12-31 18:16:41 +00:00
Dave Peticolas
f8a37f7126 Remove use of xaccTransGetSplit.
Fix bug in account query optimization.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6140 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-29 11:10:20 +00:00
Linas Vepstas
8c2d2d4cf0 further backend->book simplification
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6050 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 08:31:26 +00:00
Derek Atkins
788d998d6b convert GNCIdType from an enum to a char*
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6035 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 02:20:34 +00:00
Linas Vepstas
aa232f2fcf add utilities for accounting periods, clean up backend handling
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6034 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 01:38:58 +00:00
Linas Vepstas
7f8b1e824e type-safety tweaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6027 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-24 22:12:08 +00:00
Dave Peticolas
9ab5664185 Add explicit types to GUID queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5862 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-14 09:07:49 +00:00
Dave Peticolas
86c55a3e22 Fix query<->scm for new kvp queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5772 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-06 00:49:46 +00:00
Dave Peticolas
2176d53e99 Work on adding kvp queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5770 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-05 09:18:07 +00:00
Dave Peticolas
2efd973550 2001-10-11 Dave Peticolas <dave@krondo.com>
* src/register/register-core/table-allgui.c
	(gnc_table_traverse_update): remove assert

	* src/import-export/binary-import/druid-commodity.c: use g_assert

	* src/guile/gnucash.c.in (gnc_main): use g_assert

	* src/gnome-utils/gnc-account-tree.c: remove asserts

	* src/gnome/dialog-fincalc.c (normalize_period): remove asserts

	* src/gnome/dialog-find-transactions.c: remove asserts

	* src/gnome/dialog-scheduledxaction.c: remove asserts

	* src/gnome/reconcile-list.c: remove asserts

	* src/gnome/window-register.c: remove asserts

	* src/engine/Account.c: remove asserts

	* src/engine/Group.c: remove asserts

	* src/engine/Query.c:remove asserts

	* src/engine/TransLog.c: remove asserts

	* src/engine/Transaction.c: remove asserts

	* src/engine/gnc-engine-util.h: don't include assert.h

	* src/engine/gnc-engine.c: remove asserts

	* src/engine/gnc-numeric.c: remove asserts

	* src/engine/gnc-pricedb.c (gnc_price_unref): remove asserts

	* src/engine/messages.c: remove asserts

	* src/backend/file/test/test-xml-account.c: fix text handling

	* src/backend/file/test/test-xml-commodity.c: fix text handling

	* src/backend/file/test/test-xml-transaction.c: fix text handling

	* src/backend/file/gnc-freqspec-xml-v2.c: fix text handling

	* src/backend/file/gnc-pricedb-xml-v2.c: fix text handling

	* src/backend/file/gnc-schedxaction-xml-v2.c: fix text handling

	* src/backend/file/gnc-transaction-xml-v2.c: fix text handling

	* src/backend/file/io-gncxml-v1.c: fix text handling

	* src/backend/file/sixtp-dom-parsers.c: fix text handling

	* src/backend/file/sixtp-to-dom-parser.c (dom_chars_handler): don't
	ignore whitespace. This fixes text handling for strings like "< <"

	* src/app-utils/gnc-ui-util.c: remove asserts

	* src/app-utils/option-util.c: remove asserts


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5576 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-11 11:35:50 +00:00
Dave Peticolas
ba19fb2327 Work on moving entity tables into sessions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5482 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-09 22:27:58 +00:00
Dave Peticolas
d384066697 Work on moving entity tables into sessions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5473 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-08 22:48:37 +00:00
Dave Peticolas
b8d2150e4b Work on moving entity table into sessions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5472 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-08 07:14:58 +00:00