Mercurial > octave
comparison libinterp/corefcn/load-save.cc @ 21102:dfcb9d74b253
Rename local gripe_XXX functions to err_XXX or warn_XXX.
* graphics.cc (err_set_invalid): Add OCTAVE_NORETURN attribute.
* graphisc.cc: Rename gripe_set_invalid to err_set_invalid.
* jit-typeinfo.cc (err_bad_result): Rename from gripe_bad_result.
* load-save.cc (err_file_open): Rename from gripe_file_open.
* ls-mat5.cc (warn_dim_too_large): Rename from gripe_dim_too_large.
* oct-stream.cc (err_invalid_file_id): Rename from gripe_invalid_file_id.
* txt-eng-ft.cc (warn_missing_glyph, warn_glyph_render): Rename from
gripe_missing_glyph, gripe_glyph_render.
* xpow.cc: Add FIXME about strange gripe_failed_diagonalization function.
* ov-base-int.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-bool.cc, ov-cell.cc,
ov-class.cc, ov-complex.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-mat.cc,
ov-flt-re-mat.cc, ov-range.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.cc,
ov-str-mat.cc, ov-struct.cc
(warn_load, warn_save):
ov-base.cc (warn_load, warn_save, err_indexed_assignment,
err_assign_conversion_failed, err_no_conversion): Rename from gripe_XXX
version.
* ov-base.h (warn_load, warn_save): Rename from gripe_load, gripe_save.
* ov-classdef.cc (err_method_access, err_property_access): Rename from
gripe_method_access, gripe_property_access.
* ov-classdef.h (err_invalid_object): Rename from gripe_invalid_object.
* ov-oncleanup.h (gripe_internal): Delete function. Place single calling
instance directly in code.
* ov.cc (err_binary_op, err_binary_op_conv, err_unary_op, err_unary_op_conv,
err_unary_op_conversion_failed): Add OCTAVE_NORETURN attribute. Rename from
gripe_XXX.
* ov.cc (err_cat_op, err_cat_op_conv, ): Rename from gripe_XXX.
* lex.h (warn_single_quote_string, warn_language_extension,
maybe_warn_language_extension_comment, warn_language_extension_continuation,
warn_language_extension_operator): Rename from gripe_XXX.
* lex.ll (warn_single_quote_string, warn_language_extension,
maybe_warn_language_extension_comment, warn_language_extension_continuation,
warn_language_extension_operator): Rename from gripe_XXX.
* pt-check.cc (errmsg): Rename from gripe.
* pt-check.h (errmsg): Add OCTAVE_NORETURN attribute. Rename from gripe.
* PermMatrix.cc (err_invalid_permutation): Add OCTAVE_NORETURN attribute.
Rename from gripe_invalid_permutation.
* idx-vector.cc (err_invalid_range): Add OCTAVE_NORETURN attribute.
Rename from gripe_invalid_range.
liboctave/numeric/lo-specfun.cc (err_betainc_nonconformant): Add
OCTAVE_NORETURN attribute. Rename from gripe_betainc_nonconformant.
* oct-group.cc (err_invalid): New static function.
* oct-group.h (gripe_invalid): Delete private function.
* oct-passwd.cc (err_invalid): New static function.
* oct-passwd.h (gripe_invalid): Delete private function.
* data-conv.cc (err_unrecognized_float_fmt): Add OCTAVE_NORETURN attribute.
Rename from gripe_unrecognized_float_fmt.
* lo-cutils.c (warn_missing_wait_macro): Rename from gripe_missing_wait_macro.
* unwind-prot.cc (err_unhandled_exception): Rename from gripe_exception.
* unwind-prot.h (err_unhandled_exception): Rename from gripe_exception.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 18 Jan 2016 21:06:26 -0800 |
parents | e39e05d90788 |
children | bd1752782e56 |
comparison
equal
deleted
inserted
replaced
21101:2e8aea678f2a | 21102:dfcb9d74b253 |
---|---|
126 // no newline characters. | 126 // no newline characters. |
127 static std::string Vsave_header_format_string = default_save_header_format (); | 127 static std::string Vsave_header_format_string = default_save_header_format (); |
128 | 128 |
129 OCTAVE_NORETURN static | 129 OCTAVE_NORETURN static |
130 void | 130 void |
131 gripe_file_open (const std::string& fcn, const std::string& file) | 131 err_file_open (const std::string& fcn, const std::string& file) |
132 { | 132 { |
133 if (fcn == "load") | 133 if (fcn == "load") |
134 error ("%s: unable to open input file '%s'", fcn.c_str (), file.c_str ()); | 134 error ("%s: unable to open input file '%s'", fcn.c_str (), file.c_str ()); |
135 else if (fcn == "save") | 135 else if (fcn == "save") |
136 error ("%s: unable to open output file '%s'", fcn.c_str (), file.c_str ()); | 136 error ("%s: unable to open output file '%s'", fcn.c_str (), file.c_str ()); |
319 { | 319 { |
320 retval = get_file_format (file, orig_fname); | 320 retval = get_file_format (file, orig_fname); |
321 file.close (); | 321 file.close (); |
322 } | 322 } |
323 else if (! quiet) | 323 else if (! quiet) |
324 gripe_file_open ("load", orig_fname); | 324 err_file_open ("load", orig_fname); |
325 } | 325 } |
326 #ifdef HAVE_ZLIB | 326 #ifdef HAVE_ZLIB |
327 else | 327 else |
328 { | 328 { |
329 gzifstream gzfile (fname.c_str ()); | 329 gzifstream gzfile (fname.c_str ()); |
331 { | 331 { |
332 retval = get_file_format (gzfile, orig_fname); | 332 retval = get_file_format (gzfile, orig_fname); |
333 gzfile.close (); | 333 gzfile.close (); |
334 } | 334 } |
335 else if (! quiet) | 335 else if (! quiet) |
336 gripe_file_open ("load", orig_fname); | 336 err_file_open ("load", orig_fname); |
337 } | 337 } |
338 #endif | 338 #endif |
339 | 339 |
340 return retval; | 340 return retval; |
341 } | 341 } |
772 argv, i, argc, nargout); | 772 argv, i, argc, nargout); |
773 | 773 |
774 hdf5_file.close (); | 774 hdf5_file.close (); |
775 } | 775 } |
776 else | 776 else |
777 gripe_file_open ("load", orig_fname); | 777 err_file_open ("load", orig_fname); |
778 } | 778 } |
779 else | 779 else |
780 #endif | 780 #endif |
781 // don't insert any statements here; the "else" above has to | 781 // don't insert any statements here; the "else" above has to |
782 // go with the "if" below!!!!! | 782 // go with the "if" below!!!!! |
819 argv, i, argc, nargout); | 819 argv, i, argc, nargout); |
820 | 820 |
821 file.close (); | 821 file.close (); |
822 } | 822 } |
823 else | 823 else |
824 gripe_file_open ("load", orig_fname); | 824 err_file_open ("load", orig_fname); |
825 } | 825 } |
826 else | 826 else |
827 #endif | 827 #endif |
828 { | 828 { |
829 std::ifstream file (fname.c_str (), mode); | 829 std::ifstream file (fname.c_str (), mode); |
1672 save_as_floats, write_header_info); | 1672 save_as_floats, write_header_info); |
1673 | 1673 |
1674 hdf5_file.close (); | 1674 hdf5_file.close (); |
1675 } | 1675 } |
1676 else | 1676 else |
1677 gripe_file_open ("save", fname); | 1677 err_file_open ("save", fname); |
1678 } | 1678 } |
1679 else | 1679 else |
1680 #endif | 1680 #endif |
1681 // don't insert any statements here! The brace below must go | 1681 // don't insert any statements here! The brace below must go |
1682 // with the "else" above! | 1682 // with the "else" above! |
1694 save_as_floats, write_header_info); | 1694 save_as_floats, write_header_info); |
1695 | 1695 |
1696 file.close (); | 1696 file.close (); |
1697 } | 1697 } |
1698 else | 1698 else |
1699 gripe_file_open ("save", fname); | 1699 err_file_open ("save", fname); |
1700 } | 1700 } |
1701 else | 1701 else |
1702 #endif | 1702 #endif |
1703 { | 1703 { |
1704 std::ofstream file (fname.c_str (), mode); | 1704 std::ofstream file (fname.c_str (), mode); |
1711 save_as_floats, write_header_info); | 1711 save_as_floats, write_header_info); |
1712 | 1712 |
1713 file.close (); | 1713 file.close (); |
1714 } | 1714 } |
1715 else | 1715 else |
1716 gripe_file_open ("save", fname); | 1716 err_file_open ("save", fname); |
1717 } | 1717 } |
1718 } | 1718 } |
1719 } | 1719 } |
1720 | 1720 |
1721 return retval; | 1721 return retval; |