diff src/variables.cc @ 5004:efa1ba94dab5

[project @ 2004-09-16 19:04:20 by jwe]
author jwe
date Thu, 16 Sep 2004 19:04:20 +0000
parents 352d228d409b
children da607e9daf12
line wrap: on
line diff
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -772,19 +772,28 @@
 		{
 		  time_t tp = tmp->time_parsed ();
 
-		  std::string fname;
-
-		  if (tmp->is_dld_function ())
-		    fname = ff;
+		  std::string nm = tmp->name ();
+
+		  string_vector names (2);
+
+		  names[0] = nm + ".oct";
+		  names[1] = nm + ".m";
+
+		  std::string file = octave_env::make_absolute
+		    (Vload_path_dir_path.find_first_of (names),
+		     octave_env::getcwd ());
+
+		  if (file != ff)
+		    retval = true;
 		  else
-		    fname = fcn_file_in_path (ff);
-
-		  tmp->mark_fcn_file_up_to_date (octave_time ());
-
-		  file_stat fs (fname);
-
-		  if (fs && fs.is_newer (tp))
-		    retval = true;
+		    {
+		      tmp->mark_fcn_file_up_to_date (octave_time ());
+
+		      file_stat fs (ff);
+
+		      if (fs && fs.is_newer (tp))
+			retval = true;
+		    }
 		}
 	    }
 	}