diff src/parse.y @ 3388:42cb61dd0248

[project @ 1999-12-16 04:51:43 by jwe]
author jwe
date Thu, 16 Dec 1999 04:51:46 +0000
parents 86873384cd10
children e098ebb77023
line wrap: on
line diff
--- a/src/parse.y	Thu Dec 16 00:38:17 1999 +0000
+++ b/src/parse.y	Thu Dec 16 04:51:46 1999 +0000
@@ -3085,16 +3085,27 @@
 
   if (nargin == 1)
     {
-      string file = args(0).string_value ();
+      string file_name = args(0).string_value ();
 
       if (! error_state)
 	{
-	  file = file_ops::tilde_expand (file);
-
-	  parse_fcn_file (file, true, true);
+	  string file_full_name = file_ops::tilde_expand (file_name);
+
+	  unwind_protect::begin_frame ("Fsource");
+
+	  unwind_protect_str (curr_fcn_file_name);
+	  unwind_protect_str (curr_fcn_file_full_name);
+
+	  curr_fcn_file_name = file_name;
+	  curr_fcn_file_full_name = file_full_name;
+
+	  parse_fcn_file (file_full_name, true, true);
 
 	  if (error_state)
-	    error ("source: error sourcing file `%s'", file.c_str ());
+	    error ("source: error sourcing file `%s'",
+		   file_full_name.c_str ());
+
+	  unwind_protect::run_frame ("Fsource");
 	}
       else
 	error ("source: expecting file name as argument");