mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Corrections to r18610 to permit compiling against older versions of glib
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18612 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c3e2fe3ddc
commit
e13b58646c
@ -104,7 +104,7 @@ ght_gnc_numeric_hash(gconstpointer v1)
|
||||
{
|
||||
gnc_numeric n1 = *(gnc_numeric *)v1;
|
||||
gdouble d1 = gnc_numeric_to_double(n1);
|
||||
return g_double_hash(&d1);
|
||||
return g_str_hash(&d1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -160,14 +160,15 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
gnc_numeric split_value = xaccSplitGetAmount(split);
|
||||
|
||||
GHashTableIter iter;
|
||||
gnc_numeric *key;
|
||||
gnc_numeric *key = NULL;
|
||||
gpointer pkey = (gpointer)key;
|
||||
GList *reachable_list = 0, *node;
|
||||
|
||||
printf(" Split value: %s\n", gnc_numeric_to_string(split_value));
|
||||
|
||||
/* For each value in the sack */
|
||||
g_hash_table_iter_init (&iter, sack);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, NULL))
|
||||
while (g_hash_table_iter_next (&iter, &pkey, NULL))
|
||||
{
|
||||
/* Compute a new reachable value */
|
||||
gnc_numeric reachable_value = gnc_numeric_add_fixed(*key, split_value);
|
||||
@ -203,10 +204,11 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
printf("Rebuilding solution ...\n");
|
||||
while (!gnc_numeric_zero_p(toclear_value))
|
||||
{
|
||||
Split *split;
|
||||
Split *split = NULL;
|
||||
gpointer psplit = (gpointer)split;
|
||||
|
||||
printf(" Left to clear: %s\n", gnc_numeric_to_string(toclear_value));
|
||||
if (g_hash_table_lookup_extended(sack, &toclear_value, NULL, (gpointer *)&split))
|
||||
if (g_hash_table_lookup_extended(sack, &toclear_value, NULL, &psplit))
|
||||
{
|
||||
if (split != NULL)
|
||||
{
|
||||
|
@ -66,6 +66,7 @@
|
||||
(begin (gnc:debug "get-non-split...") (get-non-split type-info)))
|
||||
#f)))
|
||||
|
||||
|
||||
;; Returns a list of files in a directory
|
||||
;;
|
||||
;; Param:
|
||||
@ -73,6 +74,7 @@
|
||||
;;
|
||||
;; Return value:
|
||||
;; list of files in the directory
|
||||
|
||||
(define (directory-files dir)
|
||||
(let ((dir-stream (opendir dir)))
|
||||
(let loop ((new (readdir dir-stream))
|
||||
|
Loading…
Reference in New Issue
Block a user