Add tty and listing devices that use VT100 (and xterm) line-drawing
[pspp-builds.git] / src / libpspp / getl.c
index 180258fced3feb85404c2c0a3031637c90bc32b1..b4617122677840ecd65a9670a3d424e3f03964d6 100644 (file)
@@ -94,7 +94,7 @@ getl_append_source (struct source_stream *ss, struct getl_interface *i)
 
   s->interface = i ;
 
-  ll_push_head (&ss->sources, &s->ll);
+  ll_push_tail (&ss->sources, &s->ll);
 }
 
 /* Nests source S within the current source file. */
@@ -210,6 +210,7 @@ bool
 getl_read_line (struct source_stream *ss, struct string *line,
                enum getl_syntax *syntax)
 {
+  assert (ss != NULL);
   while (!ll_is_empty (&ss->sources))
     {
       struct getl_source *s = current_source (ss);