From: <par...@us...> - 2011-12-20 12:45:41
|
Revision: 9435 http://octave.svn.sourceforge.net/octave/?rev=9435&view=rev Author: paramaniac Date: 2011-12-20 12:45:30 +0000 (Tue, 20 Dec 2011) Log Message: ----------- control-devel: handle special warning case Modified Paths: -------------- trunk/octave-forge/extra/control-devel/src/common.cc trunk/octave-forge/extra/control-devel/src/slab09id.cc Modified: trunk/octave-forge/extra/control-devel/src/common.cc =================================================================== --- trunk/octave-forge/extra/control-devel/src/common.cc 2011-12-18 20:42:24 UTC (rev 9434) +++ trunk/octave-forge/extra/control-devel/src/common.cc 2011-12-20 12:45:30 UTC (rev 9435) @@ -80,3 +80,16 @@ else warning ("%s: unknown warning, iwarn = %d", name, index); } + +void warning_msg (const char name[], int index, int max, const char* msg[], int offset) +{ + if (index == 0) + return; + + if (index > 0 && index <= max) + warning ("%s: %s", name, msg[index]); + else if (index > offset) + warning ("%s: %d+%d: %d %s", name, offset, index-offset, index-offset, msg[max+1]); + else + warning ("%s: unknown warning, iwarn = %d", name, index); +} Modified: trunk/octave-forge/extra/control-devel/src/slab09id.cc =================================================================== --- trunk/octave-forge/extra/control-devel/src/slab09id.cc 2011-12-18 20:42:24 UTC (rev 9434) +++ trunk/octave-forge/extra/control-devel/src/slab09id.cc 2011-12-20 12:45:30 UTC (rev 9435) @@ -367,14 +367,13 @@ "than the order of the ALPHA-unstable part of the " "given system; in this case NR is set equal to the " "order of the ALPHA-unstable part.", - "10+%d: %d violations of the numerical stability condition " +/* 10+%d: %d */ "violations of the numerical stability condition " "occured during the assignment of eigenvalues in the " - "SLICOT Library routines SB08CD and/or SB08DD."};//, info, info); + "SLICOT Library routines SB08CD and/or SB08DD."}; - // TODO: handle case 10+info error_msg ("modred", info, 10, err_msg); - warning_msg ("modred", iwarn, 4, warn_msg); + warning_msg ("modred", iwarn, 3, warn_msg, 10); // resize a.resize (nr, nr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |