Error message needs a period at end of sentence.
[pspp] / src / language / data-io / inpt-pgm.c
index fbf1d3422d940c0667dda3f295cd3d6d690ef895..c5d6cfe7d4862a07d128f3178ae3124905204a54 100644 (file)
@@ -28,6 +28,7 @@
 #include <data/case.h>
 #include <data/case-source.h>
 #include <data/dictionary.h>
+#include <data/procedure.h>
 #include <data/transformations.h>
 #include <data/variable.h>
 #include <language/command.h>
 #include <language/expressions/public.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
-#include <procedure.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -119,9 +120,7 @@ cmd_input_program (void)
   inside_input_program = true;
   for (;;) 
     {
-      enum cmd_result result;
-      lex_get ();
-      result = cmd_parse (CMD_STATE_INPUT_PROGRAM);
+      enum cmd_result result = cmd_parse (CMD_STATE_INPUT_PROGRAM);
       if (result == CMD_END_INPUT_PROGRAM)
         break;
       else if (result == CMD_END_CASE) 
@@ -207,7 +206,7 @@ init_case (const struct input_program_pgm *inp, struct ccase *c)
         memset (case_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->s);
         break;
       default:
-        assert (0);
+        NOT_REACHED ();
       }
 }
 
@@ -231,7 +230,7 @@ clear_case (const struct input_program_pgm *inp, struct ccase *c)
         memset (case_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->s);
         break;
       default:
-        assert (0);
+        NOT_REACHED ();
       }
 }
 
@@ -353,7 +352,6 @@ cmd_reread (void)
              expr_free (e);
              return CMD_CASCADING_FAILURE;
            }
-         lex_get ();
        }
       else
        {