changeset 218:d981cdce52d9

[project @ 1993-11-13 09:35:19 by jwe]
author jwe
date Sat, 13 Nov 1993 09:35:19 +0000
parents cd2e49fb4f6b
children e3b1b79cc604
files src/file-io.cc
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/file-io.cc	Sat Nov 13 09:30:40 1993 +0000
+++ b/src/file-io.cc	Sat Nov 13 09:35:19 1993 +0000
@@ -600,14 +600,14 @@
     {
       if (fmt_arg_count >= nargin)
 	{
-	  message (type, "not enough arguments");
+	  error ("%s: not enough arguments", type);
 	  return -1;
 	}
 
       if (args[fmt_arg_count].const_type ()
 	  != tree_constant_rep::scalar_constant)
 	{
-	  message (type, "`*' must be replaced by an integer");
+	  error ("%s: `*' must be replaced by an integer", type);
 	  return -1;
 	}
 
@@ -640,14 +640,14 @@
 
       if (fmt_arg_count >= nargin)
 	{
-	  message (type, "not enough arguments");
+	  error ("%s: not enough arguments", type);
 	  return -1;
 	}
 
       if (args[fmt_arg_count].const_type ()
 	  != tree_constant_rep::scalar_constant)
 	{
-	  message (type, "`*' must be replaced by an integer");
+	  error ("%s: `*' must be replaced by an integer", type);
 	  return -1;
 	}
 
@@ -678,7 +678,7 @@
 
   if (fmt_arg_count >= nargin)
     {
-      message (type, "not enough arguments");
+      error ("%s: not enough arguments", type);
       return -1;
     }
 
@@ -759,11 +759,11 @@
    }
 
  invalid_conversion:
-  message (type, "invalid conversion");
+  error ("%s: invalid conversion", type);
   return -1;
 
  invalid_format:
-  message (type, "invalid format");
+  error ("%s: invalid format", type);
   return -1;
 }
 
@@ -875,7 +875,7 @@
       char *msg = output_buf.str ();
       int success = fputs (msg, file.fptr ());
       if (success == EOF)
-	error ("%s: writing to file", type);
+	warning ("%s: unknown failure writing to file", type);
       delete [] msg;
     }
   else if (strcmp (type, "sprintf") == 0)
@@ -939,7 +939,7 @@
 
   if (fmt_arg_count >= nargout && store_value)
     {
-      message (type, "not enough arguments");
+      error ("%s: not enough arguments", type);
       return -1;
     }
 
@@ -1031,20 +1031,20 @@
     return chars_from_fmt_str;
 
   if (success == 0)
-    message (type, "invalid conversion");
+    warning ("%s: invalid conversion", type);
   else if (success == EOF)
     {
       if (strcmp (type, "fscanf") == 0)
-	message (type, "end of file reached before final conversion");
+	warning ("%s: end of file reached before final conversion", type);
       else if (strcmp (type, "sscanf") == 0)
-	message (type, "end of string reached before final conversion");
+	warning ("%s: end of string reached before final conversion", type);
       else if (strcmp (type, "scanf") == 0)
-	message (type, "end of input reached before final conversion");
+	warning ("%s: end of input reached before final conversion", type);
     }
   else
     {
     invalid_format:
-      message (type, "invalid format");
+      warning ("%s: invalid format", type);
     }
 
   return -1;