Mercurial > hg > octave-nkf
changeset 1180:0a9c94ee69e8
[project @ 1995-03-24 06:20:14 by jwe]
author | jwe |
---|---|
date | Fri, 24 Mar 1995 06:20:14 +0000 |
parents | f070efd56c3d |
children | b2b7c5264ac2 |
files | src/load-save.cc |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -1943,19 +1943,22 @@ file.seekg (0, ios::beg); FOUR_BYTE_INT mopt, nr, nc, imag, len; - int swap; - - if (read_mat_file_header (file, swap, mopt, nr, nc, imag, len, 1) == 0) + + int err = read_mat_file_header (file, swap, mopt, nr, nc, imag, len, 1); + + if (! err) retval = LS_MAT_BINARY; else { file.seekg (0, ios::beg); char *tmp = extract_keyword (file, "name"); + if (tmp) - retval = LS_ASCII; - - delete [] tmp; + { + retval = LS_ASCII; + delete [] tmp; + } } }