From a7450de0c72c1cb2251a3b024743a780c51bb935 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 11 Jul 2006 12:58:29 +0000 Subject: Some more patches for 2.0.0. --- finance/gnucash/patches/patch-ab | 87 ++++++++++++++++++++++++++++++++++++++++ finance/gnucash/patches/patch-ac | 20 +++++++++ finance/gnucash/patches/patch-ad | 22 ++++++++++ 3 files changed, 129 insertions(+) create mode 100644 finance/gnucash/patches/patch-ab create mode 100644 finance/gnucash/patches/patch-ac create mode 100644 finance/gnucash/patches/patch-ad (limited to 'finance') diff --git a/finance/gnucash/patches/patch-ab b/finance/gnucash/patches/patch-ab new file mode 100644 index 00000000000..08a55e18366 --- /dev/null +++ b/finance/gnucash/patches/patch-ab @@ -0,0 +1,87 @@ +$NetBSD: patch-ab,v 1.1 2006/07/11 12:58:29 wiz Exp $ + +--- src/app-utils/gnc-ui-util.c.orig 2006-05-15 01:07:33.000000000 +0000 ++++ src/app-utils/gnc-ui-util.c +@@ -100,6 +100,14 @@ gnc_configure_account_separator (void) + free(string); + } + ++#if defined(__DragonFly__) ++#define LC_CAST (char **) ++#define LC_CAST2 (char *) ++#else ++#define LC_CAST ++#define LC_CAST2 ++#endif ++ + + static void + gnc_configure_reverse_balance (void) +@@ -763,15 +771,15 @@ gnc_localeconv (void) + + lc = *localeconv(); + +- gnc_lconv_set_utf8(&lc.decimal_point, "."); +- gnc_lconv_set_utf8(&lc.thousands_sep, ","); +- gnc_lconv_set_utf8(&lc.grouping, "\003"); +- gnc_lconv_set_utf8(&lc.int_curr_symbol, "USD "); +- gnc_lconv_set_utf8(&lc.currency_symbol, "$"); +- gnc_lconv_set_utf8(&lc.mon_decimal_point, "."); +- gnc_lconv_set_utf8(&lc.mon_thousands_sep, ","); +- gnc_lconv_set_utf8(&lc.mon_grouping, "\003"); +- gnc_lconv_set_utf8(&lc.negative_sign, "-"); ++ gnc_lconv_set_utf8(LC_CAST & lc.decimal_point, "."); ++ gnc_lconv_set_utf8(LC_CAST & lc.thousands_sep, ","); ++ gnc_lconv_set_utf8(LC_CAST & lc.grouping, "\003"); ++ gnc_lconv_set_utf8(LC_CAST & lc.int_curr_symbol, "USD "); ++ gnc_lconv_set_utf8(LC_CAST & lc.currency_symbol, "$"); ++ gnc_lconv_set_utf8(LC_CAST & lc.mon_decimal_point, "."); ++ gnc_lconv_set_utf8(LC_CAST & lc.mon_thousands_sep, ","); ++ gnc_lconv_set_utf8(LC_CAST & lc.mon_grouping, "\003"); ++ gnc_lconv_set_utf8(LC_CAST & lc.negative_sign, "-"); + + gnc_lconv_set_char(&lc.frac_digits, 2); + gnc_lconv_set_char(&lc.int_frac_digits, 2); +@@ -1275,13 +1283,13 @@ PrintAmountInternal(char *buf, gnc_numer + + if (info->monetary) + { +- separator = lc->mon_thousands_sep; +- group = lc->mon_grouping; ++ separator = LC_CAST2 lc->mon_thousands_sep; ++ group = LC_CAST2 lc->mon_grouping; + } + else + { +- separator = lc->thousands_sep; +- group = lc->grouping; ++ separator = LC_CAST2 lc->thousands_sep; ++ group = LC_CAST2 lc->grouping; + } + + buf_ptr = buf; +@@ -1349,7 +1357,7 @@ PrintAmountInternal(char *buf, gnc_numer + } + else + { +- char *decimal_point; ++ const char *decimal_point; + guint8 num_decimal_places = 0; + char *temp_ptr = temp_buf; + +@@ -1632,13 +1640,13 @@ xaccParseAmount (const char * in_str, gb + { + group_separator = g_utf8_get_char(lc->mon_thousands_sep); + decimal_point = g_utf8_get_char(lc->mon_decimal_point); +- group = lc->mon_grouping; ++ group = LC_CAST2 lc->mon_grouping; + } + else + { + group_separator = g_utf8_get_char(lc->thousands_sep); + decimal_point = g_utf8_get_char(lc->decimal_point); +- group = lc->grouping; ++ group = LC_CAST2 lc->grouping; + } + + return xaccParseAmountExtended(in_str, monetary, negative_sign, decimal_point, diff --git a/finance/gnucash/patches/patch-ac b/finance/gnucash/patches/patch-ac new file mode 100644 index 00000000000..42288941fbd --- /dev/null +++ b/finance/gnucash/patches/patch-ac @@ -0,0 +1,20 @@ +$NetBSD: patch-ac,v 1.3 2006/07/11 12:58:29 wiz Exp $ + +--- src/app-utils/gnc-exp-parser.c.orig 2006-05-15 01:07:33.000000000 +0000 ++++ src/app-utils/gnc-exp-parser.c +@@ -546,9 +546,15 @@ gnc_exp_parser_parse_separate_vars (cons + + lc = gnc_localeconv (); + ++#if defined(__DragonFly__) ++ pe = init_parser (vars, (char *)lc->mon_decimal_point, (char *)lc->mon_thousands_sep, ++ trans_numeric, numeric_ops, negate_numeric, g_free, ++ func_op); ++#else + pe = init_parser (vars, lc->mon_decimal_point, lc->mon_thousands_sep, + trans_numeric, numeric_ops, negate_numeric, g_free, + func_op); ++#endif + + error_loc = parse_string (&result, expression, pe); + diff --git a/finance/gnucash/patches/patch-ad b/finance/gnucash/patches/patch-ad new file mode 100644 index 00000000000..dc3076ca9ff --- /dev/null +++ b/finance/gnucash/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.7 2006/07/11 12:58:29 wiz Exp $ + +--- src/gnome/druid-acct-period.c.orig 2006-03-06 03:03:15.000000000 +0100 ++++ src/gnome/druid-acct-period.c +@@ -334,7 +334,7 @@ ap_show_menu (GnomeDruidPage *druidpage, + * we may have closed books since last time. */ + info->earliest = get_earliest_in_book (gnc_get_current_book()); + info->earliest_str = qof_print_date(info->earliest); +- PINFO ("date of earliest is %ld %s", info->earliest, ctime (&info->earliest)); ++ PINFO ("date of earliest is %ld %s", (long)info->earliest, ctime (&info->earliest)); + + prepare_remarks (info); + } +@@ -528,7 +528,7 @@ ap_druid_create (AcctPeriodInfo *info) + info->earliest = get_earliest_in_book (gnc_get_current_book()); + info->earliest_str = qof_print_date(info->earliest); + PINFO ("date of earliest transaction is %ld %s", +- info->earliest, ctime (&info->earliest)); ++ (long)info->earliest, ctime (&info->earliest)); + + g_date_clear (&info->closing_date, 1); + g_date_set_time_t (&info->closing_date, info->earliest); -- cgit v1.2.3