Fix bug #17329 in REREAD parsing, reported by John Darrington.
[pspp] / src / language / line-buffer.c
index 96ef8559a0e63dbe47f449270a02629fff87d587..146ca00a92847e93d5179a85a8180fa53f1946c2 100644 (file)
@@ -31,6 +31,7 @@
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
@@ -377,6 +378,7 @@ getl_location (const char **fn, int *ln)
 
 /* File locator stack. */
 static const struct msg_locator **file_loc;
+
 static int nfile_loc, mfile_loc;
 \f
 /* Close getl. */
@@ -423,10 +425,10 @@ msg_pop_msg_locator (const struct msg_locator *loc)
   nfile_loc--;
 }
 
-/* Puts the current file and line number in F, or NULL and -1 if
+/* Puts the current file and line number into LOC, or NULL and -1 if
    none. */
 void
-msg_location (struct msg_locator *loc)
+get_msg_location (struct msg_locator *loc)
 {
   if (nfile_loc)
     *loc = *file_loc[nfile_loc - 1];
@@ -492,7 +494,7 @@ read_line_from_source (struct string *line, struct getl_source *s)
       return s->u.interactive (line, get_prompt_style ());
     }
 
-  abort ();
+  NOT_REACHED ();
 }
 
 /* Reads a single line into LINE.