diff options
author | jylefort <jylefort@FreeBSD.org> | 2006-02-08 11:45:45 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2006-02-08 11:45:45 +0800 |
commit | 5a6b9503111f2aed4015bbe9a251bd79cc18fd4f (patch) | |
tree | b1d61b164cd7b8a6213b7dfc46d02eb97c232a0c /math | |
parent | 1e1da84c30b705eca4b70b9682d7bb26e027b146 (diff) | |
download | freebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.tar.gz freebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.tar.zst freebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.zip |
Fix build on 4.x
PR: ports/92878
Submitted by: Tod McQuillin <devin@spamcop.net>
Diffstat (limited to 'math')
-rw-r--r-- | math/gnumeric/files/patch-plugins_fn-financial_functions.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/math/gnumeric/files/patch-plugins_fn-financial_functions.c b/math/gnumeric/files/patch-plugins_fn-financial_functions.c new file mode 100644 index 000000000000..06a43b84db72 --- /dev/null +++ b/math/gnumeric/files/patch-plugins_fn-financial_functions.c @@ -0,0 +1,35 @@ +--- plugins/fn-financial/functions.c- Mon Feb 6 13:36:33 2006 ++++ plugins/fn-financial/functions.c Mon Feb 6 13:38:17 2006 +@@ -1736,13 +1736,14 @@ + gnm_float pmt = value_get_as_float (argv[2]); + gnm_float fv = argv[3] ? value_get_as_float (argv[3]) : 0; + int type = value_get_paytype (argv[4]); ++ gnm_float pvif, fvifa; + + if (!is_valid_paytype (type)) + return value_new_error_VALUE (ei->pos); + + /* Calculate the PVIF and FVIFA */ +- gnm_float pvif = calculate_pvif (rate, nper); +- gnm_float fvifa = calculate_fvifa (rate, nper); ++ pvif = calculate_pvif (rate, nper); ++ fvifa = calculate_fvifa (rate, nper); + + if (pvif == 0) + return value_new_error_DIV0 (ei->pos); +@@ -2007,12 +2008,13 @@ + gnm_float pmt = value_get_as_float (argv[2]); + gnm_float pv = argv[3] ? value_get_as_float (argv[3]) : 0.; + int type = value_get_paytype (argv[4]); ++ gnm_float pvif, fvifa; + + if (!is_valid_paytype (type)) + return value_new_error_VALUE (ei->pos); + +- gnm_float pvif = calculate_pvif (rate, nper); +- gnm_float fvifa = calculate_fvifa (rate, nper); ++ pvif = calculate_pvif (rate, nper); ++ fvifa = calculate_fvifa (rate, nper); + + return value_new_float (-((pv * pvif) + pmt * + (1.0 + rate * type) * fvifa)); |