Commit Graph

10 Commits

Author SHA1 Message Date
Dave Peticolas
a14bf2bfab James LewisMoss's patch.
* src/test/test-stuff.c (failure): don't print num if == -1.
	(success): same.
	(get_random_account): move here from test-xml-account.c
	(get_random_split): move here from test-xml-transaction.c
	(get_random_transaction): same.
	(success_args): New func.
	(success): Simplified version
	(failure_args): new func.
	(failure): Simplified version.

	* src/engine/io-gncbin-r.c: same as below.

	* src/engine/TransLog.c (xaccTransWriteLog): same as below.

	* src/engine/Group.c (xaccGroupMergeAccounts): same as below.

	* src/engine/Backend.c (xaccTransactionGetBackend): Convert to not
	use the split's acc part directly, but only to access through
	funcs

	* src/engine/sixtp-dom-parsers.c (dom_tree_generic_parse): Add
	generic parser.

	* src/engine/gnc-account-xml-v2.c (gnc_account_end_handler): use
	generic parser extracted from here and used here and
	gnc-transaction-iml-v2.c

	* src/engine/Transaction.c (xaccInitSplit): Add a split->acc_guid
	field that is set to the account's guid.  This way an Account is
	not required to exist yet when loading the split.  Later when
	xaccSplitGetAccount is called the account is looked up, cached and
	returned.  Make sure everything accesses ->acc through the helper
	function.

	* src/engine/AccountP.h: same as below.

	* src/engine/Account.c (xaccAccountSetGUID): mark guid argument
	const since it doesn't keep a pointer to it.

	* src/doc/xml/transactions-v2.dtd: change guid -> id.
	* src/engine/Transaction.c (get_denom_internal): New helper func.
	(get_currency_denom): use func.
	(get_security_denom): use func.

	* src/engine/sixtp.c: (sixtp_sax_end_handler,
	sixtp_sax_characters_handler, sixtp_sax_start_handler): don't use
	g_return_if_fail to test pdata->parsing_ok so we don't see the
	million CRITICAL warnings.  We'll print an error at the end
	anyway.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3762 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-03-09 07:46:13 +00:00
Dave Peticolas
f335a5b722 James LewisMoss's patch.
* src/test/test-date-converting.c (Repository): Tests to make sure
	date <-> string converting strings work.

	* src/test/test-dom-converters1.c (Repository): Add tests for rest
	of converters.

	* src/test/Makefile.am (Repository): add new test.  Make "make
	check" work here.

	* src/engine/sixtp-xml-write-utils.c (Repository): use date format
	strings from sixtp-utils.h

	* src/engine/sixtp-utils.h (Repository): add date format strings.
	#include sixtp.h

	* src/engine/sixtp-utils.c (Repository): Use define as timespec
	date format string.

	* src/engine/sixtp-dom-parsers.c (Repository): Add funcs from
	Rob.  make consistent.  Fix a few bugs.  Make
	dom_tree_to_commodity_ref testable by adding new func
	"associate_commodity_ref_with_engine_commodity" to do final
	association with engine commodity table.

	* src/engine/sixtp-dom-generators.c (Repository): Fix to_guid to
	be generic.  Oops.  Add rest of funcs to to foo_to_dom_tree to
	match funcs in sixtp_dom_parsers.

	* src/engine/gnc-numeric.c (Repository): Comment out unused var.

	* src/engine/gnc-account-xml-v2.c (Repository): change to use
	dom_tree_to_commodity_ref.

	* src/doc/xml/types.dtd: Change cmd: to cmdty: and add ts: to the
	timespec tags.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3659 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-15 00:17:57 +00:00
Dave Peticolas
e995035450 James LewisMoss's refactoring of the XML code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3520 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-01-24 07:18:17 +00:00
Dave Peticolas
a74241ef87 James LewisMoss's patch adding a new-user gui.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3443 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-01-11 22:32:22 +00:00
Dave Peticolas
a1f818d47f James LewisMoss's patch.
Build info updates, .cvsignore update, check for popt
in configure.in, more stuff for make-gnucash-patch, and
a dtd for the xml save format.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3355 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-27 23:37:52 +00:00
Dave Peticolas
6290fdae4a James LewisMoss's patch with:
1) More meta data updates (.cvsignore updates, debian/* updates,
   gnucash.lsm)
2) Changes to make-gnucash-patch.in.  I like the changes, but I don't
   know whether they would be universally liked, so pay attention to
   this one.  Changes include:
   a) check out compared source from cvs
   b) use .cvsignore files to get a large part of the --exclude list.
   c) Keep track of past patches by not automatically overwriting old
      patches and put the patches in a directory to keep things neat.
3) Refactoring in src/engine/Transaction.c to remove the redundant
   code setting dates in transactions.
4) remove all the #if 0 blocks in src/engine/io-gnc{bin,xml}* (helped
   my see things more clearly when looking at the code.  Again ignore
   it if this is inappropriate.)
5) append emacs local variable settings stuff to save file so it's
   known as an xml file.
6) Patch to cleanup startup some more.
   a) src/gnome/top-level.c: don't run load-account-file, split up
      startup into a couple of functions.
   b) src/gnome/window-main.h; src/gulie/gnc.gwp: add the new functions
   c) src/scm/main.scm: do the new startup sequence.
   d) All this so in a batch environment you can start up the gui
      system without bringing up the default window.
7) src/scm/report/budget-report.scm: some refactoring/cleanup done
   while looking at the code.  Nothing functional different (at least
   there shouldn't be.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3320 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-19 07:59:44 +00:00
Dave Peticolas
a50ed7498a James LewisMoss's build system patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3283 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-11 21:26:58 +00:00
Dave Peticolas
eef1afd0bf John Goerzen's debian patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2407 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-06-04 21:40:15 +00:00
Dave Peticolas
727a2e1ab5 Tomas Pospisek's debian patches.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2268 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-07 01:00:26 +00:00
Linas Vepstas
bd3679b372 merge in stuff from the 1.0 branch
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@566 57a11ea4-9604-0410-9ed3-97b8803252fd
1998-03-01 17:02:13 +00:00