changeset 370:58d05e7b5b2d

[project @ 1994-02-17 07:36:11 by jwe]
author jwe
date Thu, 17 Feb 1994 07:37:30 +0000
parents f436b7a5f26a
children 49b0a405c069
files src/file-io.cc
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/file-io.cc	Thu Feb 17 04:49:21 1994 +0000
+++ b/src/file-io.cc	Thu Feb 17 07:37:30 1994 +0000
@@ -201,7 +201,8 @@
 }
 
 static Pix 
-fopen_file_for_user (const tree_constant& arg, const char *mode)
+fopen_file_for_user (const tree_constant& arg, const char *mode,
+		     const char *warn_for)
 {
   char *file_name = arg.string_value ();
 
@@ -223,7 +224,7 @@
 	}
     }
 
-  error ("problems automatically opening file for user");
+  error ("%s: unable to open file `%s'", warn_for, file_name);
 
   return (Pix) NULL;
 }
@@ -246,7 +247,7 @@
 	  if (status == 0)
 	    {
 	      if ((buffer.st_mode & S_IFREG) == S_IFREG)
-		p = fopen_file_for_user (arg, mode);
+		p = fopen_file_for_user (arg, mode, warn_for);
 	      else
 		error ("%s: invalid file type", warn_for);
 	    }
@@ -418,7 +419,7 @@
 
   if (! args[2].is_string_type ())
     {
-      error ("fopen: mode must be a string");
+      error ("fopen: file mode must be a string");
       return retval;
     }
 
@@ -442,7 +443,7 @@
 
   if (file_ptr == (FILE *) NULL)
     {
-      error ("fopen: file does not exist");
+      error ("fopen: unable to open file `%s'", name);
       return retval;
     }