(scm_input_error): new function: give meaningful error
authorHan-Wen Nienhuys <hanwen@lilypond.org>
Mon, 5 Aug 2002 23:11:59 +0000 (23:11 +0000)
committerHan-Wen Nienhuys <hanwen@lilypond.org>
Mon, 5 Aug 2002 23:11:59 +0000 (23:11 +0000)
messages, and throw read-error

libguile/read.c

index 8b0b0b2..6046023 100644 (file)
@@ -191,12 +191,10 @@ scm_flush_ws (SCM port, const char *eoferr)
       goteof:
        if (eoferr)
          {
-           if (!SCM_FALSEP (SCM_FILENAME (port)))
-             scm_misc_error (eoferr,
-                             "end of file in ~A",
-                             scm_list_1 (SCM_FILENAME (port)));
-           else
-             scm_misc_error (eoferr, "end of file", SCM_EOL);
+           scm_input_error (eoferr,
+                            port,
+                            "end of file",
+                            SCM_EOL);
          }
        return c;
       case ';':