diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-08 03:45:45 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-08 03:45:45 +0000 |
commit | 66faa415436f0487100845487f10267633d41535 (patch) | |
tree | 3a5a4f9b309bb882f3862f24e2afb3a528c1547b /math/gnumeric | |
parent | 7141a7fcf29d1b1aa2203c226be9c6315a87c489 (diff) | |
download | ports-66faa415436f0487100845487f10267633d41535.tar.gz ports-66faa415436f0487100845487f10267633d41535.zip |
Fix build on 4.x
PR: ports/92878
Submitted by: Tod McQuillin <devin@spamcop.net>
Notes
Notes:
svn path=/head/; revision=155476
Diffstat (limited to 'math/gnumeric')
-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)); |