Mercurial > hg > octave-nkf
changeset 18193:d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
* mex.m: Return status if called with an output argument (bug #40984).
author | Rik <rik@octave.org> |
---|---|
date | Thu, 02 Jan 2014 11:31:43 -0800 |
parents | 31d8e19a745d |
children | 1461b9cfac4e |
files | scripts/miscellaneous/mex.m |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/mex.m +++ b/scripts/miscellaneous/mex.m @@ -23,8 +23,16 @@ ## @seealso{mkoctfile} ## @end deftypefn -function mex (varargin) - args = {"--mex", varargin{:}}; - mkoctfile (args{:}); +function retval = mex (varargin) + + [output, status] = mkoctfile ("--mex", varargin{:}); + + if (! isempty (output)) + disp (output); + endif + if (nargout > 0) + retval = status; + endif + endfunction