Mercurial > hg > octave-jordi
changeset 6806:afa9123c5faa
[project @ 2007-07-30 18:36:01 by jwe]
author | jwe |
---|---|
date | Mon, 30 Jul 2007 18:36:02 +0000 |
parents | 41d8841124b3 |
children | 0089a504fdd6 |
files | configure.in src/ChangeLog src/mex.cc src/mxarray.h.in |
diffstat | 4 files changed, 32 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.569 $) +AC_REVISION($Revision: 1.570 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -582,32 +582,28 @@ with_glpk=$withval, with_glpk=yes) glpk_lib= -glpk_missing=no if test "$with_glpk" = yes; then glpk_lib="glpk" elif test "$with_glpk" != no; then glpk_lib="$with_glpk" -else - glpk_missing=yes fi GLPK_LIBS= if test -n "$glpk_lib"; then - AC_CHECK_LIB($glpk_lib, glp_lpx_simplex, [ - GLPK_LIBS="-l$glpk_lib" - AC_DEFINE(GLPK_PRE_4_14, 1, [Define if GLPK version is less than 4.14.])], [ - AC_CHECK_LIB($glpk_lib, _glp_lpx_simplex, [GLPK_LIBS="-l$glpk_lib"], [])]) - if test -n "$GLPK_LIBS"; then - AC_CHECK_HEADERS([glpk/glpk.h glpk.h], [ - glpk_missing=no + AC_CHECK_HEADERS([glpk/glpk.h glpk.h], [ + AC_CHECK_LIB($glpk_lib, glp_lpx_simplex, [ GLPK_LIBS="-l$glpk_lib" - AC_DEFINE(HAVE_GLPK, 1, [Define if GLPK is available.])], [ - GLPK_LIBS= - glpk_missing=yes]) - fi + AC_DEFINE(GLPK_PRE_4_14, 1, [Define if GLPK version is less than 4.14.])], [ + AC_CHECK_LIB($glpk_lib, _glp_lpx_simplex, [ + GLPK_LIBS="-l$glpk_lib"], [])]) + + if test -n "$GLPK_LIBS"; then + AC_DEFINE(HAVE_GLPK, 1, [Define if GLPK is available.]) + fi + break]) fi AC_SUBST(GLPK_LIBS) -if test "$glpk_missing" = yes; then +if test -z "$GLPK_LIBS"; then warn_glpk="GLPK library not found. The glpk function for solving linear programs will be disabled." fi
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2007-07-30 John W. Eaton <jwe@octave.org> + + * mex.cc (mxArray_number::mxArray_number (int, const char **)): + First arg is now mwSize. + (max_str_len): Return mwSize value, not int. + * mxarray.h.in (mxArray::mxArray (int, const char **)): + First arg is now mwSize. + (mxArray::mxArray (mxClassID, mwSize, mwSize, int, mxComplexity)): + Third arg is now mwSize. + (mxArray::get_string (char *, int)): Second arg is now mwSize. + 2007-07-26 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/__glpk__.cc: Include glpk/glpk.h if
--- a/src/mex.cc +++ b/src/mex.cc @@ -37,14 +37,14 @@ ::free (ptr); } -static int -max_str_len (int m, const char **str) +static mwSize +max_str_len (mwSize m, const char **str) { int max_len = 0; - for (int i = 0; i < m; i++) + for (mwSize i = 0; i < m; i++) { - int tmp = strlen (str[i]); + mwSize tmp = strlen (str[i]); if (tmp > max_len) max_len = tmp; @@ -1107,7 +1107,7 @@ } // FIXME?? - mxArray_number (int m, const char **str) + mxArray_number (mwSize m, const char **str) : mxArray_matlab (mxCHAR_CLASS, m, max_str_len (m, str)), pr (calloc (get_number_of_elements (), get_element_size ())), pi (0)
--- a/src/mxarray.h.in +++ b/src/mxarray.h.in @@ -145,9 +145,10 @@ mxArray (const char *str); - mxArray (int m, const char **str); + mxArray (mwSize m, const char **str); - mxArray (mxClassID id, mwSize m, mwSize n, int nzmax, mxComplexity flag = mxREAL); + mxArray (mxClassID id, mwSize m, mwSize n, mwSize nzmax, + mxComplexity flag = mxREAL); mxArray (mwSize ndims, const mwSize *dims, int num_keys, const char **keys); @@ -280,7 +281,7 @@ virtual int get_field_number (const char *key) const { DO_MUTABLE_METHOD (int, get_field_number (key)); } - virtual int get_string (char *buf, int buflen) const { return rep->get_string (buf, buflen); } + virtual int get_string (char *buf, mwSize buflen) const { return rep->get_string (buf, buflen); } virtual char *array_to_string (void) const { return rep->array_to_string (); }