mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
James LewisMoss's patch.
* src/test/test-xml-account.c (delete_random_account): new func to cleanup commodities not generally freed at xaccAccountDestroy. (node_and_account_equal): complete func to compare account and the dom tree created. Looks good except for some warnings from dom_tree_to_text. * src/test/test-stuff.c (equals_node_val_vs_commodity): new func. (equals_node_val_vs_guid): New func. (equals_node_val_vs_string): new func. * src/engine/gnc-account-xml-v2.c (account_code_handler): Add func. (account_description_handler): Add func. Oops forgot a couple. (gnc_account_dom_tree_create): Move all string tags in file to const gchar*s. (account_slots_handler): Complete func. * make-gnucash-patch.in: Test to see if makepatch exists. * src/engine/sixtp-dom-parsers.c (dom_tree_to_text): same as below. Add NULL tests for arguments. Affected many functions in this file. * src/engine/gnc-pricedb-xml-v1.c (price_parse_xml_sub_node): Same as below. * src/engine/gnc-commodity-xml-v2.c (set_commodity_value): Convert dom_tree_to_text to act as rest looking at children on it's own. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3718 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -54,6 +54,28 @@ if($ENV{'GNC_MAKEPATCH_HOME_DIR'}) {
|
||||
$gnc_home = $ENV{'GNC_MAKEPATCH_HOME_DIR'};
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# Make sure makepatch exists before going on #
|
||||
###########################################################
|
||||
|
||||
open(OLDOUT, ">&STDOUT");
|
||||
open(OLDERR, ">&STDERR");
|
||||
open(STDOUT, "> /dev/null") || die "Can't redirect stdout";
|
||||
open(STDERR, "> /dev/null") || die "Can't redirect stderr";
|
||||
my $test = system('makepatch', "-help");
|
||||
close(STDOUT);
|
||||
close(STDERR);
|
||||
open(STDOUT, ">&OLDOUT");
|
||||
open(STDERR, ">&OLDERR");
|
||||
close(OLDOUT);
|
||||
close(OLDERR);
|
||||
|
||||
if($test == -1) {
|
||||
print "No makepatch installed. Exiting\n";
|
||||
exit(10);
|
||||
}
|
||||
|
||||
|
||||
###########################################################
|
||||
# Now, check if anything specified on command line #
|
||||
###########################################################
|
||||
@@ -179,6 +201,7 @@ open(STDOUT, "> diffs/$outfilename") || die "Can't redirect stdout";
|
||||
system('makepatch', @args);
|
||||
close(STDOUT);
|
||||
open(STDOUT, ">&OLDOUT");
|
||||
close(OLDOUT);
|
||||
print "makepatch done\n";
|
||||
|
||||
# Compress the patch if required
|
||||
|
||||
Reference in New Issue
Block a user