openbsd-ports/math/mcl/patches/patch-src_mcl_proc_c
naddy c50278f38b Update to 05-118.
Major changes includes speed improvements when reading large matrices
from file and the addition of the clmorder tool.

From: maintainer Andreas Kahari <andreas.kahari@gmail.com>
2005-07-26 18:50:43 +00:00

44 lines
1.3 KiB
Plaintext

$OpenBSD: patch-src_mcl_proc_c,v 1.1 2005/07/26 18:50:43 naddy Exp $
--- src/mcl/proc.c.orig Sat Jul 23 15:13:51 2005
+++ src/mcl/proc.c Sat Jul 23 15:14:53 2005
@@ -297,8 +297,8 @@ int doIteration
; }
if (mpp->printMatrix)
- { sprintf
- ( msg, "%d%s%s%s"
+ { snprintf
+ ( msg, sizeof msg, "%d%s%s%s"
, (int) 2*n_ite+1, " After expansion (", when, ")"
)
; if (XPNVB(mxp,XPNVB_VPROGRESS))
@@ -367,8 +367,8 @@ int doIteration
mclxInflate(*mxout, inflation)
; if (mpp->printMatrix)
- { sprintf
- ( msg, "%d%s%s%s"
+ { snprintf
+ ( msg, sizeof msg, "%d%s%s%s"
, (int) 2*n_ite+2, " After inflation (", when, ")"
)
; if (XPNVB(mxp, XPNVB_VPROGRESS))
@@ -428,7 +428,7 @@ void mclDumpMatrix
; fname = mcxTingNew(mpp->dump_stem->str)
; mcxTingAppend(fname, affix)
- ; sprintf(snum, "%d", (int) n)
+ ; snprintf(snum, sizeof snum, "%d", (int) n)
; mcxTingAppend(fname, snum)
; mcxTingAppend(fname, postfix)
@@ -472,7 +472,7 @@ void mclDumpVector
; fname = mcxTingNew(mpp->dump_stem->str)
; mcxTingAppend(fname, affix)
- ; sprintf(snum, "%d", (int) n)
+ ; snprintf(snum, sizeof snum, "%d", (int) n)
; mcxTingAppend(fname, snum)
; mcxTingAppend(fname, postfix)