Mercurial > hg > octave-terminal
changeset 10127:f21fdff5c906
Change signature of mexPrintf.
author | David Grundberg <davidg@cs.umu.se> |
---|---|
date | Mon, 18 Jan 2010 11:52:38 +0100 |
parents | 8687ce1c56da |
children | e68431e60e3d |
files | src/ChangeLog src/mex.cc src/mexproto.h |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-18 David Grundberg <davidg@cs.umu.se> + + * mex.cc (mexPrintf): Change signature. + * mexproto.h (mexPrintf): Dito. + 2010-01-18 David Grundberg <davidg@cs.umu.se> * mexproto.h (mxSetDimensions): Change signature.
--- a/src/mex.cc +++ b/src/mex.cc @@ -3250,13 +3250,15 @@ } } -void +int mexPrintf (const char *fmt, ...) { + int retval; va_list args; va_start (args, fmt); - octave_vformat (octave_stdout, fmt, args); + retval = octave_vformat (octave_stdout, fmt, args); va_end (args); + return retval; } mxArray *
--- a/src/mexproto.h +++ b/src/mexproto.h @@ -82,7 +82,7 @@ extern OCTINTERP_API void mexErrMsgIdAndTxt (const char *id, const char *s, ...); extern OCTINTERP_API void mexWarnMsgTxt (const char *s); extern OCTINTERP_API void mexWarnMsgIdAndTxt (const char *id, const char *s, ...); -extern OCTINTERP_API void mexPrintf (const char *fmt, ...); +extern OCTINTERP_API int mexPrintf (const char *fmt, ...); extern OCTINTERP_API mxArray *mexGetVariable (const char *space, const char *name); extern OCTINTERP_API const mxArray *mexGetVariablePtr (const char *space, const char *name);