comparison libinterp/corefcn/load-save.cc @ 17787:175b392e91fe

Use GNU style coding conventions for code in libinterp/ * libinterp/corefcn/Cell.h, libinterp/corefcn/__contourc__.cc, libinterp/corefcn/__dispatch__.cc, libinterp/corefcn/__lin_interpn__.cc, libinterp/corefcn/__pchip_deriv__.cc, libinterp/corefcn/__qp__.cc, libinterp/corefcn/balance.cc, libinterp/corefcn/besselj.cc, libinterp/corefcn/betainc.cc, libinterp/corefcn/bitfcns.cc, libinterp/corefcn/bsxfun.cc, libinterp/corefcn/c-file-ptr-stream.cc, libinterp/corefcn/c-file-ptr-stream.h, libinterp/corefcn/cellfun.cc, libinterp/corefcn/colloc.cc, libinterp/corefcn/comment-list.h, libinterp/corefcn/conv2.cc, libinterp/corefcn/daspk.cc, libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc, libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc, libinterp/corefcn/defaults.cc, libinterp/corefcn/defaults.in.h, libinterp/corefcn/defun-int.h, libinterp/corefcn/defun.cc, libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc, libinterp/corefcn/display.cc, libinterp/corefcn/dlmread.cc, libinterp/corefcn/dot.cc, libinterp/corefcn/dynamic-ld.cc, libinterp/corefcn/dynamic-ld.h, libinterp/corefcn/eig.cc, libinterp/corefcn/ellipj.cc, libinterp/corefcn/error.cc, libinterp/corefcn/error.h, libinterp/corefcn/event-queue.h, libinterp/corefcn/fft.cc, libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc, libinterp/corefcn/file-io.cc, libinterp/corefcn/filter.cc, libinterp/corefcn/find.cc, libinterp/corefcn/gammainc.cc, libinterp/corefcn/gcd.cc, libinterp/corefcn/getgrent.cc, libinterp/corefcn/getpwent.cc, libinterp/corefcn/getrusage.cc, libinterp/corefcn/givens.cc, libinterp/corefcn/gl-render.cc, libinterp/corefcn/gl2ps-renderer.cc, libinterp/corefcn/gl2ps-renderer.h, libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h, libinterp/corefcn/gripes.cc, libinterp/corefcn/gripes.h, libinterp/corefcn/help.cc, libinterp/corefcn/hess.cc, libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc, libinterp/corefcn/input.h, libinterp/corefcn/inv.cc, libinterp/corefcn/jit-ir.h, libinterp/corefcn/jit-typeinfo.cc, libinterp/corefcn/jit-typeinfo.h, libinterp/corefcn/jit-util.h, libinterp/corefcn/kron.cc, libinterp/corefcn/load-path.cc, libinterp/corefcn/load-path.h, libinterp/corefcn/load-save.cc, libinterp/corefcn/load-save.h, libinterp/corefcn/lookup.cc, libinterp/corefcn/ls-ascii-helper.cc, libinterp/corefcn/ls-hdf5.cc, libinterp/corefcn/ls-hdf5.h, libinterp/corefcn/ls-mat-ascii.cc, libinterp/corefcn/ls-mat-ascii.h, libinterp/corefcn/ls-mat4.cc, libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/ls-mat5.h, libinterp/corefcn/ls-oct-ascii.cc, libinterp/corefcn/lsode.cc, libinterp/corefcn/lu.cc, libinterp/corefcn/luinc.cc, libinterp/corefcn/mappers.cc, libinterp/corefcn/matrix_type.cc, libinterp/corefcn/max.cc, libinterp/corefcn/md5sum.cc, libinterp/corefcn/mex.cc, libinterp/corefcn/mexproto.h, libinterp/corefcn/mgorth.cc, libinterp/corefcn/mxarray.in.h, libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc, libinterp/corefcn/oct-lvalue.h, libinterp/corefcn/oct-map.cc, libinterp/corefcn/oct-map.h, libinterp/corefcn/oct-obj.h, libinterp/corefcn/oct-prcstrm.h, libinterp/corefcn/oct-stdstrm.h, libinterp/corefcn/oct-stream.cc, libinterp/corefcn/oct-stream.h, libinterp/corefcn/octave-link.cc, libinterp/corefcn/octave-link.h, libinterp/corefcn/pager.cc, libinterp/corefcn/pinv.cc, libinterp/corefcn/pr-output.cc, libinterp/corefcn/procstream.h, libinterp/corefcn/profiler.cc, libinterp/corefcn/pt-jit.cc, libinterp/corefcn/pt-jit.h, libinterp/corefcn/quad.cc, libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc, libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc, libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc, libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sighandlers.h, libinterp/corefcn/sparse-xdiv.cc, libinterp/corefcn/sparse-xdiv.h, libinterp/corefcn/sparse-xpow.cc, libinterp/corefcn/sparse.cc, libinterp/corefcn/spparms.cc, libinterp/corefcn/sqrtm.cc, libinterp/corefcn/str2double.cc, libinterp/corefcn/strfind.cc, libinterp/corefcn/strfns.cc, libinterp/corefcn/sub2ind.cc, libinterp/corefcn/svd.cc, libinterp/corefcn/syl.cc, libinterp/corefcn/symtab.cc, libinterp/corefcn/symtab.h, libinterp/corefcn/syscalls.cc, libinterp/corefcn/sysdep.cc, libinterp/corefcn/sysdep.h, libinterp/corefcn/time.cc, libinterp/corefcn/toplev.cc, libinterp/corefcn/toplev.h, libinterp/corefcn/tril.cc, libinterp/corefcn/txt-eng-ft.cc, libinterp/corefcn/txt-eng-ft.h, libinterp/corefcn/txt-eng.h, libinterp/corefcn/typecast.cc, libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc, libinterp/corefcn/variables.h, libinterp/corefcn/xdiv.cc, libinterp/corefcn/xdiv.h, libinterp/corefcn/xnorm.h, libinterp/corefcn/xpow.cc, libinterp/corefcn/xpow.h, libinterp/corefcn/zfstream.cc, libinterp/corefcn/zfstream.h, libinterp/dldfcn/__delaunayn__.cc, libinterp/dldfcn/__dsearchn__.cc, libinterp/dldfcn/__eigs__.cc, libinterp/dldfcn/__fltk_uigetfile__.cc, libinterp/dldfcn/__glpk__.cc, libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/__init_gnuplot__.cc, libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/__voronoi__.cc, libinterp/dldfcn/amd.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc, libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc, libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/qr.cc, libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc, libinterp/dldfcn/tsearch.cc, libinterp/octave-value/ov-base-diag.cc, libinterp/octave-value/ov-base-diag.h, libinterp/octave-value/ov-base-int.cc, libinterp/octave-value/ov-base-int.h, libinterp/octave-value/ov-base-mat.h, libinterp/octave-value/ov-base-scalar.cc, libinterp/octave-value/ov-base-scalar.h, libinterp/octave-value/ov-base-sparse.cc, libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.cc, libinterp/octave-value/ov-base.h, libinterp/octave-value/ov-bool-mat.cc, libinterp/octave-value/ov-bool-mat.h, libinterp/octave-value/ov-bool-sparse.cc, libinterp/octave-value/ov-bool-sparse.h, libinterp/octave-value/ov-bool.cc, libinterp/octave-value/ov-bool.h, libinterp/octave-value/ov-builtin.cc, libinterp/octave-value/ov-builtin.h, libinterp/octave-value/ov-cell.cc, libinterp/octave-value/ov-cell.h, libinterp/octave-value/ov-ch-mat.cc, libinterp/octave-value/ov-ch-mat.h, libinterp/octave-value/ov-class.cc, libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-colon.h, libinterp/octave-value/ov-complex.cc, libinterp/octave-value/ov-complex.h, libinterp/octave-value/ov-cx-diag.cc, libinterp/octave-value/ov-cx-diag.h, libinterp/octave-value/ov-cx-mat.cc, libinterp/octave-value/ov-cx-mat.h, libinterp/octave-value/ov-cx-sparse.cc, libinterp/octave-value/ov-cx-sparse.h, libinterp/octave-value/ov-dld-fcn.h, libinterp/octave-value/ov-fcn-handle.cc, libinterp/octave-value/ov-fcn-handle.h, libinterp/octave-value/ov-fcn-inline.cc, libinterp/octave-value/ov-fcn-inline.h, libinterp/octave-value/ov-fcn.h, libinterp/octave-value/ov-float.cc, libinterp/octave-value/ov-float.h, libinterp/octave-value/ov-flt-complex.cc, libinterp/octave-value/ov-flt-complex.h, libinterp/octave-value/ov-flt-cx-diag.cc, libinterp/octave-value/ov-flt-cx-diag.h, libinterp/octave-value/ov-flt-cx-mat.cc, libinterp/octave-value/ov-flt-cx-mat.h, libinterp/octave-value/ov-flt-re-diag.cc, libinterp/octave-value/ov-flt-re-diag.h, libinterp/octave-value/ov-flt-re-mat.cc, libinterp/octave-value/ov-flt-re-mat.h, libinterp/octave-value/ov-int16.cc, libinterp/octave-value/ov-int32.cc, libinterp/octave-value/ov-int64.cc, libinterp/octave-value/ov-int8.cc, libinterp/octave-value/ov-intx.h, libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-lazy-idx.h, libinterp/octave-value/ov-mex-fcn.cc, libinterp/octave-value/ov-mex-fcn.h, libinterp/octave-value/ov-null-mat.cc, libinterp/octave-value/ov-null-mat.h, libinterp/octave-value/ov-oncleanup.cc, libinterp/octave-value/ov-perm.cc, libinterp/octave-value/ov-perm.h, libinterp/octave-value/ov-range.cc, libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-diag.cc, libinterp/octave-value/ov-re-diag.h, libinterp/octave-value/ov-re-mat.cc, libinterp/octave-value/ov-re-mat.h, libinterp/octave-value/ov-re-sparse.cc, libinterp/octave-value/ov-re-sparse.h, libinterp/octave-value/ov-scalar.cc, libinterp/octave-value/ov-scalar.h, libinterp/octave-value/ov-str-mat.cc, libinterp/octave-value/ov-str-mat.h, libinterp/octave-value/ov-struct.cc, libinterp/octave-value/ov-struct.h, libinterp/octave-value/ov-type-conv.h, libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov-typeinfo.h, libinterp/octave-value/ov-uint16.cc, libinterp/octave-value/ov-uint32.cc, libinterp/octave-value/ov-uint64.cc, libinterp/octave-value/ov-uint8.cc, libinterp/octave-value/ov-usr-fcn.cc, libinterp/octave-value/ov-usr-fcn.h, libinterp/octave-value/ov.cc, libinterp/octave-value/ov.h, libinterp/octave.cc, libinterp/operators/op-b-bm.cc, libinterp/operators/op-b-sbm.cc, libinterp/operators/op-bm-b.cc, libinterp/operators/op-bm-bm.cc, libinterp/operators/op-cdm-cdm.cc, libinterp/operators/op-chm.cc, libinterp/operators/op-class.cc, libinterp/operators/op-cm-cm.cc, libinterp/operators/op-cm-cs.cc, libinterp/operators/op-cm-s.cc, libinterp/operators/op-cm-scm.cc, libinterp/operators/op-cm-sm.cc, libinterp/operators/op-cs-cm.cc, libinterp/operators/op-cs-cs.cc, libinterp/operators/op-cs-scm.cc, libinterp/operators/op-cs-sm.cc, libinterp/operators/op-dm-dm.cc, libinterp/operators/op-dm-scm.cc, libinterp/operators/op-double-conv.cc, libinterp/operators/op-fcdm-fcdm.cc, libinterp/operators/op-fcm-fcm.cc, libinterp/operators/op-fcm-fcs.cc, libinterp/operators/op-fcm-fm.cc, libinterp/operators/op-fcm-fs.cc, libinterp/operators/op-fcs-fcm.cc, libinterp/operators/op-fcs-fcs.cc, libinterp/operators/op-fcs-fm.cc, libinterp/operators/op-fcs-fs.cc, libinterp/operators/op-fdm-fdm.cc, libinterp/operators/op-float-conv.cc, libinterp/operators/op-fm-fcm.cc, libinterp/operators/op-fm-fcs.cc, libinterp/operators/op-fm-fm.cc, libinterp/operators/op-fm-fs.cc, libinterp/operators/op-fs-fcm.cc, libinterp/operators/op-fs-fcs.cc, libinterp/operators/op-fs-fm.cc, libinterp/operators/op-fs-fs.cc, libinterp/operators/op-m-cm.cc, libinterp/operators/op-m-cs.cc, libinterp/operators/op-m-m.cc, libinterp/operators/op-m-s.cc, libinterp/operators/op-m-scm.cc, libinterp/operators/op-m-sm.cc, libinterp/operators/op-pm-scm.cc, libinterp/operators/op-range.cc, libinterp/operators/op-s-cm.cc, libinterp/operators/op-s-cs.cc, libinterp/operators/op-s-scm.cc, libinterp/operators/op-sbm-b.cc, libinterp/operators/op-sbm-bm.cc, libinterp/operators/op-sbm-sbm.cc, libinterp/operators/op-scm-cm.cc, libinterp/operators/op-scm-cs.cc, libinterp/operators/op-scm-m.cc, libinterp/operators/op-scm-s.cc, libinterp/operators/op-scm-scm.cc, libinterp/operators/op-scm-sm.cc, libinterp/operators/op-sm-cm.cc, libinterp/operators/op-sm-m.cc, libinterp/operators/op-sm-s.cc, libinterp/operators/op-sm-scm.cc, libinterp/operators/op-sm-sm.cc, libinterp/operators/op-str-m.cc, libinterp/operators/op-str-s.cc, libinterp/operators/op-str-str.cc, libinterp/operators/ops.h, libinterp/parse-tree/lex.h, libinterp/parse-tree/parse.h, libinterp/parse-tree/pt-arg-list.cc, libinterp/parse-tree/pt-arg-list.h, libinterp/parse-tree/pt-assign.cc, libinterp/parse-tree/pt-assign.h, libinterp/parse-tree/pt-binop.cc, libinterp/parse-tree/pt-binop.h, libinterp/parse-tree/pt-bp.h, libinterp/parse-tree/pt-cbinop.cc, libinterp/parse-tree/pt-check.cc, libinterp/parse-tree/pt-colon.cc, libinterp/parse-tree/pt-colon.h, libinterp/parse-tree/pt-const.cc, libinterp/parse-tree/pt-decl.cc, libinterp/parse-tree/pt-decl.h, libinterp/parse-tree/pt-eval.cc, libinterp/parse-tree/pt-except.h, libinterp/parse-tree/pt-exp.h, libinterp/parse-tree/pt-fcn-handle.cc, libinterp/parse-tree/pt-id.cc, libinterp/parse-tree/pt-id.h, libinterp/parse-tree/pt-idx.cc, libinterp/parse-tree/pt-idx.h, libinterp/parse-tree/pt-loop.h, libinterp/parse-tree/pt-mat.cc, libinterp/parse-tree/pt-misc.cc, libinterp/parse-tree/pt-misc.h, libinterp/parse-tree/pt-pr-code.cc, libinterp/parse-tree/pt-select.h, libinterp/parse-tree/pt-stmt.h, libinterp/parse-tree/token.h, libinterp/version.cc: Use GNU style coding conventions for code in libinterp/
author Rik <rik@octave.org>
date Mon, 28 Oct 2013 19:51:46 -0700
parents 9c03b071fd7b
children 870f3e12e163
comparison
equal deleted inserted replaced
17786:34d9812a943b 17787:175b392e91fe
272 else 272 else
273 { 273 {
274 file.clear (); 274 file.clear ();
275 file.seekg (0, std::ios::beg); 275 file.seekg (0, std::ios::beg);
276 276
277 // FIXME -- looks_like_mat_ascii_file does not check to see 277 // FIXME: looks_like_mat_ascii_file does not check to see
278 // whether the file contains numbers. It just skips comments and 278 // whether the file contains numbers. It just skips comments
279 // checks for the same number of words on each line. We may need 279 // and checks for the same number of words on each line. We
280 // a better check here. The best way to do that might be just 280 // may need a better check here. The best way to do that
281 // to try to read the file and see if it works. 281 // might be just to try to read the file and see if it works.
282 282
283 if (looks_like_mat_ascii_file (file, filename)) 283 if (looks_like_mat_ascii_file (file, filename))
284 retval = LS_MAT_ASCII; 284 retval = LS_MAT_ASCII;
285 } 285 }
286 } 286 }
553 bool use_zlib = false; 553 bool use_zlib = false;
554 return get_file_format (fname, fname, use_zlib, true) != LS_UNKNOWN; 554 return get_file_format (fname, fname, use_zlib, true) != LS_UNKNOWN;
555 } 555 }
556 556
557 DEFUN (load, args, nargout, 557 DEFUN (load, args, nargout,
558 "-*- texinfo -*-\n\ 558 "-*- texinfo -*-\n\
559 @deftypefn {Command} {} load file\n\ 559 @deftypefn {Command} {} load file\n\
560 @deftypefnx {Command} {} load options file\n\ 560 @deftypefnx {Command} {} load options file\n\
561 @deftypefnx {Command} {} load options file v1 v2 @dots{}\n\ 561 @deftypefnx {Command} {} load options file v1 v2 @dots{}\n\
562 @deftypefnx {Command} {S =} load (\"options\", \"file\", \"v1\", \"v2\", @dots{})\n\ 562 @deftypefnx {Command} {S =} load (\"options\", \"file\", \"v1\", \"v2\", @dots{})\n\
563 @deftypefnx {Command} {} load file options\n\ 563 @deftypefnx {Command} {} load file options\n\
838 } 838 }
839 } 839 }
840 else if (format == LS_MAT5_BINARY 840 else if (format == LS_MAT5_BINARY
841 || format == LS_MAT7_BINARY) 841 || format == LS_MAT7_BINARY)
842 { 842 {
843 if (read_mat5_binary_file_header (file, swap, false, orig_fname) < 0) 843 if (read_mat5_binary_file_header (file, swap, false,
844 orig_fname) < 0)
844 { 845 {
845 if (file) file.close (); 846 if (file) file.close ();
846 return retval; 847 return retval;
847 } 848 }
848 } 849 }
872 } 873 }
873 } 874 }
874 else if (format == LS_MAT5_BINARY 875 else if (format == LS_MAT5_BINARY
875 || format == LS_MAT7_BINARY) 876 || format == LS_MAT7_BINARY)
876 { 877 {
877 if (read_mat5_binary_file_header (file, swap, false, orig_fname) < 0) 878 if (read_mat5_binary_file_header (file, swap, false,
879 orig_fname) < 0)
878 { 880 {
879 if (file) file.close (); 881 if (file) file.close ();
880 return retval; 882 return retval;
881 } 883 }
882 } 884 }
1037 { 1039 {
1038 std::list<symbol_table::symbol_record> vars = symbol_table::glob (pattern); 1040 std::list<symbol_table::symbol_record> vars = symbol_table::glob (pattern);
1039 1041
1040 size_t saved = 0; 1042 size_t saved = 0;
1041 1043
1042 typedef std::list<symbol_table::symbol_record>::const_iterator const_vars_iterator; 1044 typedef std::list<symbol_table::symbol_record>::const_iterator
1045 const_vars_iterator;
1043 1046
1044 for (const_vars_iterator p = vars.begin (); p != vars.end (); p++) 1047 for (const_vars_iterator p = vars.begin (); p != vars.end (); p++)
1045 { 1048 {
1046 do_save (os, *p, fmt, save_as_floats); 1049 do_save (os, *p, fmt, save_as_floats);
1047 1050
1259 else 1262 else
1260 #endif /* HAVE_HDF5 */ 1263 #endif /* HAVE_HDF5 */
1261 os << comment_string << "\n"; 1264 os << comment_string << "\n";
1262 } 1265 }
1263 } 1266 }
1264 break; 1267 break;
1265 1268
1266 default: 1269 default:
1267 break; 1270 break;
1268 } 1271 }
1269 } 1272 }
1360 std::list<symbol_table::symbol_record> vars 1363 std::list<symbol_table::symbol_record> vars
1361 = symbol_table::all_variables (symbol_table::top_scope (), 0); 1364 = symbol_table::all_variables (symbol_table::top_scope (), 0);
1362 1365
1363 double save_mem_size = 0; 1366 double save_mem_size = 0;
1364 1367
1365 typedef std::list<symbol_table::symbol_record>::const_iterator const_vars_iterator; 1368 typedef std::list<symbol_table::symbol_record>::const_iterator
1369 const_vars_iterator;
1366 1370
1367 for (const_vars_iterator p = vars.begin (); p != vars.end (); p++) 1371 for (const_vars_iterator p = vars.begin (); p != vars.end (); p++)
1368 { 1372 {
1369 octave_value val = p->varval (); 1373 octave_value val = p->varval ();
1370 1374
1374 std::string help; 1378 std::string help;
1375 bool global = p->is_global (); 1379 bool global = p->is_global ();
1376 1380
1377 double val_size = val.byte_size () / 1024; 1381 double val_size = val.byte_size () / 1024;
1378 1382
1379 // FIXME -- maybe we should try to throw out the largest first... 1383 // FIXME: maybe we should try to throw out the largest first...
1380 1384
1381 if (Voctave_core_file_limit < 0 1385 if (Voctave_core_file_limit < 0
1382 || save_mem_size + val_size < Voctave_core_file_limit) 1386 || save_mem_size + val_size < Voctave_core_file_limit)
1383 { 1387 {
1384 save_mem_size += val_size; 1388 save_mem_size += val_size;
1397 void 1401 void
1398 dump_octave_core (void) 1402 dump_octave_core (void)
1399 { 1403 {
1400 if (Vcrash_dumps_octave_core) 1404 if (Vcrash_dumps_octave_core)
1401 { 1405 {
1402 // FIXME -- should choose better file name? 1406 // FIXME: should choose better file name?
1403 1407
1404 const char *fname = Voctave_core_file_name.c_str (); 1408 const char *fname = Voctave_core_file_name.c_str ();
1405 1409
1406 message (0, "attempting to save variables to '%s'...", fname); 1410 message (0, "attempting to save variables to '%s'...", fname);
1407 1411
1483 } 1487 }
1484 } 1488 }
1485 } 1489 }
1486 1490
1487 DEFUN (save, args, , 1491 DEFUN (save, args, ,
1488 "-*- texinfo -*-\n\ 1492 "-*- texinfo -*-\n\
1489 @deftypefn {Command} {} save file\n\ 1493 @deftypefn {Command} {} save file\n\
1490 @deftypefnx {Command} {} save options file\n\ 1494 @deftypefnx {Command} {} save options file\n\
1491 @deftypefnx {Command} {} save options file @var{v1} @var{v2} @dots{}\n\ 1495 @deftypefnx {Command} {} save options file @var{v1} @var{v2} @dots{}\n\
1492 @deftypefnx {Command} {} save options file -struct @var{STRUCT} @var{f1} @var{f2} @dots{}\n\ 1496 @deftypefnx {Command} {} save options file -struct @var{STRUCT} @var{f1} @var{f2} @dots{}\n\
1493 Save the named variables @var{v1}, @var{v2}, @dots{}, in the file\n\ 1497 Save the named variables @var{v1}, @var{v2}, @dots{}, in the file\n\
1667 // with the "else" above! 1671 // with the "else" above!
1668 { 1672 {
1669 if (append) 1673 if (append)
1670 warning ("save: ignoring -append option for output to stdout"); 1674 warning ("save: ignoring -append option for output to stdout");
1671 1675
1672 // FIXME -- should things intended for the screen end up 1676 // FIXME: should things intended for the screen
1673 // in a octave_value (string)? 1677 // end up in an octave_value (string)?
1674 1678
1675 save_vars (argv, i, argc, octave_stdout, format, 1679 save_vars (argv, i, argc, octave_stdout, format,
1676 save_as_floats, true); 1680 save_as_floats, true);
1677 } 1681 }
1678 } 1682 }
1725 { 1729 {
1726 save_vars (argv, i, argc, hdf5_file, format, 1730 save_vars (argv, i, argc, hdf5_file, format,
1727 save_as_floats, write_header_info); 1731 save_as_floats, write_header_info);
1728 1732
1729 hdf5_file.close (); 1733 hdf5_file.close ();
1730 } 1734 }
1731 else 1735 else
1732 { 1736 {
1733 gripe_file_open ("save", fname); 1737 gripe_file_open ("save", fname);
1734 return retval; 1738 return retval;
1735 } 1739 }
1736 } 1740 }
1737 else 1741 else
1738 #endif /* HAVE_HDF5 */ 1742 #endif /* HAVE_HDF5 */
1739 // don't insert any statements here! The brace below must go 1743 // don't insert any statements here! The brace below must go
1740 // with the "else" above! 1744 // with the "else" above!
1784 1788
1785 return retval; 1789 return retval;
1786 } 1790 }
1787 1791
1788 DEFUN (crash_dumps_octave_core, args, nargout, 1792 DEFUN (crash_dumps_octave_core, args, nargout,
1789 "-*- texinfo -*-\n\ 1793 "-*- texinfo -*-\n\
1790 @deftypefn {Built-in Function} {@var{val} =} crash_dumps_octave_core ()\n\ 1794 @deftypefn {Built-in Function} {@var{val} =} crash_dumps_octave_core ()\n\
1791 @deftypefnx {Built-in Function} {@var{old_val} =} crash_dumps_octave_core (@var{new_val})\n\ 1795 @deftypefnx {Built-in Function} {@var{old_val} =} crash_dumps_octave_core (@var{new_val})\n\
1792 @deftypefnx {Built-in Function} {} crash_dumps_octave_core (@var{new_val}, \"local\")\n\ 1796 @deftypefnx {Built-in Function} {} crash_dumps_octave_core (@var{new_val}, \"local\")\n\
1793 Query or set the internal variable that controls whether Octave tries\n\ 1797 Query or set the internal variable that controls whether Octave tries\n\
1794 to save all current variables to the file @file{octave-workspace} if it\n\ 1798 to save all current variables to the file @file{octave-workspace} if it\n\
1802 { 1806 {
1803 return SET_INTERNAL_VARIABLE (crash_dumps_octave_core); 1807 return SET_INTERNAL_VARIABLE (crash_dumps_octave_core);
1804 } 1808 }
1805 1809
1806 DEFUN (save_default_options, args, nargout, 1810 DEFUN (save_default_options, args, nargout,
1807 "-*- texinfo -*-\n\ 1811 "-*- texinfo -*-\n\
1808 @deftypefn {Built-in Function} {@var{val} =} save_default_options ()\n\ 1812 @deftypefn {Built-in Function} {@var{val} =} save_default_options ()\n\
1809 @deftypefnx {Built-in Function} {@var{old_val} =} save_default_options (@var{new_val})\n\ 1813 @deftypefnx {Built-in Function} {@var{old_val} =} save_default_options (@var{new_val})\n\
1810 @deftypefnx {Built-in Function} {} save_default_options (@var{new_val}, \"local\")\n\ 1814 @deftypefnx {Built-in Function} {} save_default_options (@var{new_val}, \"local\")\n\
1811 Query or set the internal variable that specifies the default options\n\ 1815 Query or set the internal variable that specifies the default options\n\
1812 for the @code{save} command, and defines the default format.\n\ 1816 for the @code{save} command, and defines the default format.\n\
1821 { 1825 {
1822 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (save_default_options); 1826 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (save_default_options);
1823 } 1827 }
1824 1828
1825 DEFUN (octave_core_file_limit, args, nargout, 1829 DEFUN (octave_core_file_limit, args, nargout,
1826 "-*- texinfo -*-\n\ 1830 "-*- texinfo -*-\n\
1827 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_limit ()\n\ 1831 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_limit ()\n\
1828 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_limit (@var{new_val})\n\ 1832 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_limit (@var{new_val})\n\
1829 @deftypefnx {Built-in Function} {} octave_core_file_limit (@var{new_val}, \"local\")\n\ 1833 @deftypefnx {Built-in Function} {} octave_core_file_limit (@var{new_val}, \"local\")\n\
1830 Query or set the internal variable that specifies the maximum amount\n\ 1834 Query or set the internal variable that specifies the maximum amount\n\
1831 of memory (in kilobytes) of the top-level workspace that Octave will\n\ 1835 of memory (in kilobytes) of the top-level workspace that Octave will\n\
1844 { 1848 {
1845 return SET_INTERNAL_VARIABLE (octave_core_file_limit); 1849 return SET_INTERNAL_VARIABLE (octave_core_file_limit);
1846 } 1850 }
1847 1851
1848 DEFUN (octave_core_file_name, args, nargout, 1852 DEFUN (octave_core_file_name, args, nargout,
1849 "-*- texinfo -*-\n\ 1853 "-*- texinfo -*-\n\
1850 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_name ()\n\ 1854 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_name ()\n\
1851 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_name (@var{new_val})\n\ 1855 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_name (@var{new_val})\n\
1852 @deftypefnx {Built-in Function} {} octave_core_file_name (@var{new_val}, \"local\")\n\ 1856 @deftypefnx {Built-in Function} {} octave_core_file_name (@var{new_val}, \"local\")\n\
1853 Query or set the internal variable that specifies the name of the file\n\ 1857 Query or set the internal variable that specifies the name of the file\n\
1854 used for saving data from the top-level workspace if Octave aborts.\n\ 1858 used for saving data from the top-level workspace if Octave aborts.\n\
1862 { 1866 {
1863 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (octave_core_file_name); 1867 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (octave_core_file_name);
1864 } 1868 }
1865 1869
1866 DEFUN (octave_core_file_options, args, nargout, 1870 DEFUN (octave_core_file_options, args, nargout,
1867 "-*- texinfo -*-\n\ 1871 "-*- texinfo -*-\n\
1868 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_options ()\n\ 1872 @deftypefn {Built-in Function} {@var{val} =} octave_core_file_options ()\n\
1869 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_options (@var{new_val})\n\ 1873 @deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_options (@var{new_val})\n\
1870 @deftypefnx {Built-in Function} {} octave_core_file_options (@var{new_val}, \"local\")\n\ 1874 @deftypefnx {Built-in Function} {} octave_core_file_options (@var{new_val}, \"local\")\n\
1871 Query or set the internal variable that specifies the options used for\n\ 1875 Query or set the internal variable that specifies the options used for\n\
1872 saving the workspace data if Octave aborts. The value of\n\ 1876 saving the workspace data if Octave aborts. The value of\n\
1882 { 1886 {
1883 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (octave_core_file_options); 1887 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (octave_core_file_options);
1884 } 1888 }
1885 1889
1886 DEFUN (save_header_format_string, args, nargout, 1890 DEFUN (save_header_format_string, args, nargout,
1887 "-*- texinfo -*-\n\ 1891 "-*- texinfo -*-\n\
1888 @deftypefn {Built-in Function} {@var{val} =} save_header_format_string ()\n\ 1892 @deftypefn {Built-in Function} {@var{val} =} save_header_format_string ()\n\
1889 @deftypefnx {Built-in Function} {@var{old_val} =} save_header_format_string (@var{new_val})\n\ 1893 @deftypefnx {Built-in Function} {@var{old_val} =} save_header_format_string (@var{new_val})\n\
1890 @deftypefnx {Built-in Function} {} save_header_format_string (@var{new_val}, \"local\")\n\ 1894 @deftypefnx {Built-in Function} {} save_header_format_string (@var{new_val}, \"local\")\n\
1891 Query or set the internal variable that specifies the format\n\ 1895 Query or set the internal variable that specifies the format\n\
1892 string used for the comment line written at the beginning of\n\ 1896 string used for the comment line written at the beginning of\n\