From: <ai...@us...> - 2010-12-26 08:26:56
|
Revision: 11386 http://plplot.svn.sourceforge.net/plplot/?rev=11386&view=rev Author: airwin Date: 2010-12-26 08:26:49 +0000 (Sun, 26 Dec 2010) Log Message: ----------- Add placeholders for all the needed typemaps. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2010-12-23 23:36:07 UTC (rev 11385) +++ trunk/bindings/octave/plplot_octave.i 2010-12-26 08:26:49 UTC (rev 11386) @@ -68,10 +68,137 @@ /* typemaps */ %include <typemaps.i> -// No special typemaps for now just for proof of concept that attempts -// to get simple examples without PLplot arrays such as example 10 to -// work. +/********************************************************************************** + PLINT arrays +**********************************************************************************/ +/* With preceding count */ +%typemap(in) (PLINT n, PLINT *Array) {} +%typemap(freearg) (PLINT n, PLINT *Array) {} + + +/* Trailing count and check consistency with previous */ +%typemap(in) (PLINT *ArrayCk, PLINT n) (int temp) {} +%typemap(freearg) (PLINT *ArrayCk, PLINT n) {} + + +/* No count but check consistency with previous */ +%typemap(in) PLINT *ArrayCk (int temp) {} +%typemap(freearg) PLINT *ArrayCk {} + + +/* Weird case to allow argument to be one shorter than others */ +%typemap(in) PLINT *ArrayCkMinus1 (int temp) {} +%typemap(freearg) PLINT *ArrayCkMinus1 {} + +%typemap(in) PLINT *ArrayCkMinus1Null (int temp) {} +%typemap(freearg) PLINT *ArrayCkMinus1Null {} +%typemap(default) PLINT *ArrayCkMinus1Null {} + + +/* No length but remember size to check others */ +%typemap(in) PLINT *Array (int temp) {} +%typemap(freearg) (PLINT *Array) {} + + +/****************************************************************************** + PLFLT Arrays +******************************************************************************/ + +/* with preceding count */ +%typemap(in) (PLINT n, PLFLT *Array) {} +%typemap(freearg) (PLINT n, PLFLT *Array) {} + + +/* Trailing count and check consistency with previous */ +%typemap(in) (PLFLT *ArrayCk, PLINT n) {} +%typemap(freearg) (PLFLT *ArrayCk, PLINT n) {} + + +/* no count, but check consistency with previous */ +%typemap(in) PLFLT *ArrayCk (int temp) {} +%typemap(freearg) PLFLT *ArrayCk {} + + +/* No length but remember size to check others */ +%typemap(in) PLFLT *Array {} +%typemap(freearg) (PLFLT *Array) {} + + +/* with trailing count */ +%typemap(in) (PLFLT *Array, PLINT n) {} +%typemap(freearg) (PLFLT *Array, PLINT n) {} + + +/* check consistency with X dimension of previous */ +%typemap(in) PLFLT *ArrayCkX {} +%typemap(freearg) PLFLT *ArrayCkX {} + + +/* check consistency with Y dimension of previous */ +%typemap(in) PLFLT *ArrayCkY {} +%typemap(freearg) PLFLT *ArrayCkY {} + + +/* set X length for later consistency checking, with trailing count */ +%typemap(in) (PLFLT *ArrayX, PLINT nx) {} +%typemap(freearg) (PLFLT *ArrayX, PLINT nx) {} + + +/* set X length for later consistency checking */ +%typemap(in) PLFLT *ArrayX {} +%typemap(freearg) PLFLT *ArrayX {} + + +/* Set Y length for later consistency checking, with trailing count */ +%typemap(in) (PLFLT *ArrayY, PLINT ny) {} +%typemap(freearg) (PLFLT *ArrayY, PLINT ny) {} + + +/* set Y length for later consistency checking */ +%typemap(in) PLFLT *ArrayY {} +%typemap(freearg) (PLFLT *ArrayY) {} + +/* 2D array with trailing dimensions, check consistency with previous */ +%typemap(in) (PLFLT **MatrixCk, PLINT nx, PLINT ny) (int ii) {} +%typemap(freearg) (PLFLT **MatrixCk, PLINT nx, PLINT ny) {} + + +/* 2D array with trailing dimensions, set the X, Y size for later checking */ +%typemap(in) (PLFLT **Matrix, PLINT nx, PLINT ny) (int ii) {} +%typemap(freearg) (PLFLT **Matrix, PLINT nx, PLINT ny) {} + + +/* 2D array with no dimensions, set the X, Y size for later checking */ +%typemap(in) PLFLT **Matrix (int ii) {} +%typemap(freearg) PLFLT **Matrix {} + + +/* 2D array, check for consistency */ +%typemap(in) PLFLT **MatrixCk (int ii) {} +%typemap(freearg) PLFLT **MatrixCk {} + + +/* Set Y length for later consistency checking, with trailing count */ +/* and 2D array, check for consistency input / output version */ +%typemap(in) (PLFLT *ArrayY, PLINT ny, PLFLT **OutMatrixCk) {} +%typemap(argout) (PLFLT *ArrayY, PLINT ny, PLFLT **OutMatrixCk) {} +%typemap(freearg) (PLFLT *ArrayY, PLINT ny, PLFLT **OutMatrixCk) {} + +/****************************************************************************** + String returning functions +******************************************************************************/ + +/* This currently just used for plgdev, plgfnam, and plgver which apparently + * have a limit of 80 bytes. But to (hopefully) be safe for any future use + * have a 1000 byte limit here. */ +%typemap(in, numinputs=0) char *OUTPUT ( char buff[1000] ) {} +%typemap(argout) char *OUTPUT {} + +%typemap(in, checkfn="lua_isstring") const char *message {} + + + typedef PLINT (*defined_func)(PLFLT, PLFLT); typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*); typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2010-12-31 22:04:48
|
Revision: 11406 http://plplot.svn.sourceforge.net/plplot/?rev=11406&view=rev Author: airwin Date: 2010-12-31 22:04:42 +0000 (Fri, 31 Dec 2010) Log Message: ----------- Improve typemap for string *OUTPUT so that it no longer relies on internal swig details. Special octave form of plGetCursor, plTranslateCursor, and plstripc. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2010-12-30 08:41:03 UTC (rev 11405) +++ trunk/bindings/octave/plplot_octave.i 2010-12-31 22:04:42 UTC (rev 11406) @@ -369,18 +369,17 @@ // String returning functions //----------------------------------------------------------------------------- -// This currently just used for plgdev, plgfnam, and plgver which -// apparently have a limit of 80 bytes. N.B. This works, but it -// copies what was done by Rafael for matwrap with no deep knowledge -// of octave and uses swig internals (note the use of retval1 as the -// return value). Thus, it needs to be redone by somebody who knows -// what they are doing. +// This currently used for character string output of less than 80 +// bytes (e.g., plgdev, plgfnam, and plgver). N.B. This works, but it +// was inspired by what was done by Rafael for matwrap with no deep +// knowledge of octave, i.e., no knowledge of exactly what is meant by +// charMatrix, etc. %typemap(in, numinputs=0) char *OUTPUT (octave_value_list retval){ retval(0) = octave_value(charMatrix(80, 1), true); $1 = (char *)retval(0).char_matrix_value().data(); } %typemap(argout) char *OUTPUT { - return retval1; + $result = SWIG_Octave_AppendOutput($result, retval$argnum(0)) ; } typedef PLINT (*defined_func)(PLFLT, PLFLT); @@ -398,9 +397,92 @@ typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer); typedef void (*label_func)(PLINT, PLFLT, char*, PLINT, PLPointer); %} -// For historical reasons our octave bindings use the name plSetOpt for -// the PLplot function, plsetopt, and use the plsetopt name for a different -// purpose (plsetopt.m). We implement that here using the rename directive. +// The octave bindings started out as an independent project with a +// historical API that does not match up that well with the PLplot API +// function names and numbers and types of arguments. So there are a +// lot of swig contortions here to preserve that historical octave +// bindings API. At some point we may want to change to +// an Octave bindings API that is a better match with the normal PLplot API. +// This change would require less special documentation for the Octave case +// and would require fewer swig contortions, but it has the obvious downside +// of a massive octave bindings API breakage. + +// Our octave bindings use the name plSetOpt for the PLplot function, +// plsetopt, and use the plsetopt name for a different purpose +// (plsetopt.m). We implement that here using the rename directive. %rename(plSetOpt) plsetopt; -/* swig compatible PLplot API definitions from here on. */ + +// Special octave form of plGetCursor. +%ignore plGetCursor; +%rename(plGetCursor) my_plGetCursor; +%{ +static int my_plGetCursor( int *state, int *keysym, int *button, char *string, int *pX, int *pY, PLFLT *dX, PLFLT *dY, PLFLT *wX, PLFLT *wY, int *subwin ) +{ + PLGraphicsIn gin; + int status; status = plGetCursor( &gin ); + *subwin = gin.subwindow; *state = gin.state; *keysym = gin.keysym; *button = gin.button; + strncpy( string, gin.string, PL_MAXKEY-1); + string[PL_MAXKEY-1] = '\0'; + + *pX = gin.pX; *pY = gin.pY; *dX = gin.dX; *dY = gin.dY; *wX = gin.wX; *wY = gin.wY; + return status; +} +%} + +int my_plGetCursor( int *OUTPUT, int *OUTPUT, int *OUTPUT, char *OUTPUT, int *OUTPUT, int *OUTPUT, PLFLT *OUTPUT, PLFLT *OUTPUT, PLFLT *OUTPUT, PLFLT *OUTPUT, int *OUTPUT ); + +// Special octave form of plTranslateCursor. +// Untested by any of our octave examples but should work. +%ignore plTranslateCursor; +%rename(plTranslateCursor) my_plTranslateCursor; + +%{ +// Translates relative device coordinates to world coordinates. +static int my_plTranslateCursor( PLFLT *x, PLFLT *y, PLFLT x_in, PLFLT y_in ) +{ + PLGraphicsIn gin; + int st; + gin.dX = x_in; gin.dY = y_in; + st = plTranslateCursor( &gin ); + *x = gin.wX; *y = gin.wY; + return st; +} +%} + +int my_plTranslateCursor( PLFLT *OUTPUT, PLFLT *OUTPUT, PLFLT x_in, PLFLT y_in ); + +// Special octave form of plstripc. +%ignore plstripc; +%rename(plstripc) my_plstripc; +%{ +// Create 1d stripchart + +void my_plstripc( PLINT *id, const char *xspec, const char *yspec, + PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, + PLFLT xlpos, PLFLT ylpos, + PLBOOL y_ascl, PLBOOL acc, + PLINT colbox, PLINT collab, + PLINT *colline, PLINT *styline, + const char *legline1, const char *legline2, const char *legline3, const char *legline4, + const char *labx, const char *laby, const char *labtop ) +{ + const char *legline[4]; + legline[0] = legline1; legline[1] = legline2; + legline[2] = legline3; legline[3] = legline4; + c_plstripc( id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, + xlpos, ylpos, y_ascl, acc, colbox, collab, colline, styline, legline, + labx, laby, labtop ); +} +%} + +void my_plstripc( PLINT *OUTPUT, const char *xspec, const char *yspec, + PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, + PLFLT xlpos, PLFLT ylpos, + PLBOOL y_ascl, PLBOOL acc, + PLINT colbox, PLINT collab, + PLINT *Array, PLINT *ArrayCk, + const char *legline1, const char *legline2, const char *legline3, const char *legline4, + const char *labx, const char *laby, const char *labtop ); + + // swig-compatible common PLplot API definitions from here on. %include plplotcapi.i This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-01-05 01:36:38
|
Revision: 11437 http://plplot.svn.sourceforge.net/plplot/?rev=11437&view=rev Author: airwin Date: 2011-01-05 01:36:31 +0000 (Wed, 05 Jan 2011) Log Message: ----------- Implement proof of concept (with a test function, testppchar) of how to deal with Octave character arrays as arguments. This should prove useful for bindings of pllegend and plstripc (currently handled in a clumsy way by wrapping with a function that takes four character string arguments rather than one argument of a characer array containing four strings). Currently the char **ArrayCk typemap only handles the charMatrix case (an ordinary Octave matrix filled with strings that have been extended with blanks so they all have the same length). Additional logic to detect the cell matrix case and deal separately with it should be implemented as well. Also, logic to handle other error conditions should be implemented. But the current typemap should be good enough to get all the pllegend-using examples to work for now using the non-cell character matrix case. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2011-01-04 06:26:41 UTC (rev 11436) +++ trunk/bindings/octave/plplot_octave.i 2011-01-05 01:36:31 UTC (rev 11437) @@ -1130,9 +1130,55 @@ PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, PLFLT *Matrix, PLFLT *Matrix ); +// This test function should be removed when we are confident of our +// dealings with all types of octave string arrays. +%{ +void testppchar(PLINT nlegend, const PLINT *opt_array, const char ** text) { + PLINT i; + printf("nlegend = %d\n", nlegend); + for(i=0;i<nlegend;i++) { + printf("opt_array[%d] = %d\n", i, opt_array[i]); + printf("text[%d] = %s\n", i, text[i]); + } +} +%} + +// No count but check consistency with previous +%typemap(in) char **ArrayCk (charMatrix temp) { + int i; + int max_length; + if ( _n_dims($input) > 2 ) + { error("argument must be a scalar or vector or matrix"); SWIG_fail; } + if ( _dim($input, 0) != Alen ) + { error("first dimension must be same length as previous vector"); SWIG_fail; } + // Allow one extra space for null termination. + max_length= _dim($input, 1) + 1; + $1 = new char*[Alen]; + temp = $input.char_matrix_value(); + for(i=0; i<Alen; i++) { + // Must copy string to "permanent" location because the string + // location corresponding to tmp.c_str() gets + // overwritten for each iteration of loop. + std::string tmp_cxxstring = temp.row_as_string(i); + $1[i] = new char[max_length]; + strncpy( $1[i], tmp_cxxstring.c_str(), max_length-1 ); + $1[i][max_length] = '\0'; + } +} +%typemap(freearg) char **ArrayCk { + int i; + for(i=0; i<Alen; i++) { + delete[] $1[i]; + } + delete[] $1; +} + +// This test function should be removed when we are confident of our +// dealings with all types of octave string arrays. +void testppchar(PLINT n, const PLINT *Array, const char **ArrayCk); + // Deal with these later. %ignore pllegend; -%ignore plgriddata; // Probably never deal with this one. %ignore plMinMax2dGrid; // swig-compatible common PLplot API definitions from here on. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-01-05 08:12:49
|
Revision: 11438 http://plplot.svn.sourceforge.net/plplot/?rev=11438&view=rev Author: airwin Date: 2011-01-05 08:12:42 +0000 (Wed, 05 Jan 2011) Log Message: ----------- Kill trailing blanks in strings that are padded out to the longest length in the matrix by the charMatrix class. This, of course, gets rid of legitimate trailing blanks (if those ever occur), but this is a constraint imposed by the charMatrix class, and this seems the best compromise for dealing with it. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2011-01-05 01:36:31 UTC (rev 11437) +++ trunk/bindings/octave/plplot_octave.i 2011-01-05 08:12:42 UTC (rev 11438) @@ -1138,6 +1138,7 @@ printf("nlegend = %d\n", nlegend); for(i=0;i<nlegend;i++) { printf("opt_array[%d] = %d\n", i, opt_array[i]); + printf("strlen(text[%d]) = %d\n", i, strlen(text[i])); printf("text[%d] = %s\n", i, text[i]); } } @@ -1145,8 +1146,7 @@ // No count but check consistency with previous %typemap(in) char **ArrayCk (charMatrix temp) { - int i; - int max_length; + int i, max_length, non_blank_length; if ( _n_dims($input) > 2 ) { error("argument must be a scalar or vector or matrix"); SWIG_fail; } if ( _dim($input, 0) != Alen ) @@ -1157,13 +1157,28 @@ temp = $input.char_matrix_value(); for(i=0; i<Alen; i++) { // Must copy string to "permanent" location because the string - // location corresponding to tmp.c_str() gets + // location corresponding to tmp_cstring gets // overwritten for each iteration of loop. - std::string tmp_cxxstring = temp.row_as_string(i); + const char *tmp_cstring = temp.row_as_string(i).c_str(); $1[i] = new char[max_length]; - strncpy( $1[i], tmp_cxxstring.c_str(), max_length-1 ); - $1[i][max_length] = '\0'; + strncpy( $1[i], tmp_cstring, max_length-1 ); + $1[i][max_length-1] = '\0'; + // remove trailing-blank padding that is used by the + // charMatrix class to insure all strings in a given + // charMatrix instance have the same length. + // This transformation also removes legitimate trailing + // blanks but there is nothing we can do about that + // for the charMatrix class. + + // Look for trailing nulls first (just in case, although that + // shouldn't happen if charMatrix implemented as documented) + // before looking for trailing blanks. + non_blank_length = max_length-2; + while(non_blank_length >= 0 && $1[i][non_blank_length--] == '\0') {} + while(non_blank_length >= 0 && $1[i][non_blank_length--] == ' ') {} + $1[i][non_blank_length+1] = '\0'; } + } %typemap(freearg) char **ArrayCk { int i; @@ -1177,8 +1192,6 @@ // dealings with all types of octave string arrays. void testppchar(PLINT n, const PLINT *Array, const char **ArrayCk); -// Deal with these later. -%ignore pllegend; // Probably never deal with this one. %ignore plMinMax2dGrid; // swig-compatible common PLplot API definitions from here on. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-01-07 19:00:26
|
Revision: 11448 http://plplot.svn.sourceforge.net/plplot/?rev=11448&view=rev Author: airwin Date: 2011-01-07 19:00:19 +0000 (Fri, 07 Jan 2011) Log Message: ----------- Fix off-by-one errors in getting rid of trailing blanks. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2011-01-07 07:46:45 UTC (rev 11447) +++ trunk/bindings/octave/plplot_octave.i 2011-01-07 19:00:19 UTC (rev 11448) @@ -1174,8 +1174,8 @@ // shouldn't happen if charMatrix implemented as documented) // before looking for trailing blanks. non_blank_length = max_length-2; - while(non_blank_length >= 0 && $1[i][non_blank_length--] == '\0') {} - while(non_blank_length >= 0 && $1[i][non_blank_length--] == ' ') {} + while(non_blank_length >= 0 && $1[i][non_blank_length] == '\0') {non_blank_length--;} + while(non_blank_length >= 0 && $1[i][non_blank_length] == ' ') {non_blank_length--;} $1[i][non_blank_length+1] = '\0'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-02-19 16:58:43
|
Revision: 11568 http://plplot.svn.sourceforge.net/plplot/?rev=11568&view=rev Author: airwin Date: 2011-02-19 16:58:37 +0000 (Sat, 19 Feb 2011) Log Message: ----------- Remove two unnecessary typemaps. I thought at one point these would be needed to give global access to the #defined values in bindings/swig-support/plplotcapi.i, but I can no longer reproduce this issue in simple tests, and, indeed, the octave bindings and examples work perfectly fine without these typemaps. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2011-02-18 19:31:03 UTC (rev 11567) +++ trunk/bindings/octave/plplot_octave.i 2011-02-19 16:58:37 UTC (rev 11568) @@ -1274,23 +1274,6 @@ } } -// typemaps required to set integer and floating-point global values -// correctly for swig-1.3.40. Follows suggestion made by William S -// Fulton on 2011-02-04 in post to swig-user mailing list. - -%typemap(constcode,noblock=1,fragment="SWIG_" "From" "_" {int}) int { - -SWIG_Octave_SetConstant(module_ns,"$symname",SWIG_From_int((int)($value))); - set_global_value("$symname",SWIG_From_int((int)($value))); -} - -%typemap(constcode,noblock=1,fragment="SWIG_" "From" "_" {double}) double { - -SWIG_Octave_SetConstant(module_ns,"$symname",octave_value($value)); - set_global_value("$symname",octave_value($value)); -} - - // This test function should be removed when we are confident of our // dealings with all types of octave string arrays. void testppchar(PLINT n, const PLINT *Array, const char **ArrayCk); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-11-02 12:18:56
|
Revision: 12267 http://plplot.svn.sourceforge.net/plplot/?rev=12267&view=rev Author: andrewross Date: 2012-11-02 12:18:44 +0000 (Fri, 02 Nov 2012) Log Message: ----------- Fix warnings with octave bindings from API changes in octave 3.4 upwards. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2012-11-02 10:00:45 UTC (rev 12266) +++ trunk/bindings/octave/plplot_octave.i 2012-11-02 12:18:44 UTC (rev 12267) @@ -34,6 +34,11 @@ %module plplot_octave %{ + +// #undef PACKAGE and VERSION macros which are leaked out by the octave headers +#undef PACKAGE +#undef VERSION + #include "plplotP.h" // Temporary fix for problems with -fvisibility=hidden and octave headers. @@ -665,7 +670,12 @@ // charMatrix, etc. %typemap( in, numinputs = 0 ) char *OUTPUT( octave_value_list retval ) { +// Check if version >= 3.4.0 +%#if OCTAVE_API_VERSION_NUMBER < 45 retval( 0 ) = octave_value( charMatrix( 80, 1 ), true ); +%#else + retval( 0 ) = octave_value( charMatrix( 80, 1 ) ); +%#endif $1 = (char *) retval( 0 ).char_matrix_value().data(); } %typemap( argout ) char *OUTPUT { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-05 14:21:42
|
Revision: 12655 http://sourceforge.net/p/plplot/code/12655 Author: andrewross Date: 2013-11-05 14:21:38 +0000 (Tue, 05 Nov 2013) Log Message: ----------- Initialize variables to zero to suppress spurious compiler warning about uninitialized variables. Modified Paths: -------------- trunk/bindings/octave/plplot_octave.i Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2013-11-05 14:10:28 UTC (rev 12654) +++ trunk/bindings/octave/plplot_octave.i 2013-11-05 14:21:38 UTC (rev 12655) @@ -923,7 +923,7 @@ Cell temp_cell; char *tmp_cstring; std::string str; - size_t max_length, non_blank_length; + size_t max_length = 0, non_blank_length; int i, ifcell; if ( _n_dims( $input ) > 2 ) { @@ -1031,7 +1031,7 @@ Cell temp_cell; char *tmp_cstring; std::string str; - size_t max_length, non_blank_length; + size_t max_length = 0, non_blank_length; int i, ifcell; if ( _n_dims( $input ) > 2 ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |