diff libinterp/corefcn/gripes.cc @ 19064:9ef10e6a5987

make "file found in path" warnings consistent * gripes.h, gripes.cc (gripe_data_file_in_path): New function. * utils.h, utils.cc (find_data_file_in_path): New function. Use gripe_data_file_in_path to warn. * file-io.cc (do_stream_open): Call find_data_file_in_path to search path for file. * load-save.cc (find_file_to_load): Likewise. * md5sum.cc (Fmd5sum): Likewise. * octave.cc (maximum_braindamage): Disable new Octave:data-file-in-path warning ID instead of Octave:fopen-file-in-path and Octave:load-file-in-path. * NEWS: Note change.
author John W. Eaton <jwe@octave.org>
date Tue, 19 Aug 2014 06:40:53 -0400
parents 175b392e91fe
children 4197fc428c7d
line wrap: on
line diff
--- a/libinterp/corefcn/gripes.cc	Mon Aug 18 20:46:07 2014 -0700
+++ b/libinterp/corefcn/gripes.cc	Tue Aug 19 06:40:53 2014 -0400
@@ -245,3 +245,11 @@
   error ("%s: support for %s was disabled when %s was built",
          func.c_str (), feature.c_str (), pkg.c_str ());
 }
+
+void
+gripe_data_file_in_path (const std::string& fcn, const std::string& file)
+{
+  warning_with_id ("Octave:data-file-in-path",
+                   "%s: '%s' found by searching load path",
+                   fcn.c_str (), file.c_str ());
+}