Subcommand to export a model as a C function
[pspp-builds.git] / src / lexer.c
index 77d40cfbb07179ba72cbad4b37753f8a4af32109..cc2f8ca8e54e35407569b3a26bcb62923846fbee 100644 (file)
@@ -92,6 +92,7 @@ static void dump_token (void);
 void
 lex_init (void)
 {
+  ds_init (&tokstr, 64);
   ds_init (&put_tokstr, 64);
   if (!lex_get_line ())
     unexpected_eof ();
@@ -100,7 +101,8 @@ lex_init (void)
 void
 lex_done (void)
 {
-  ds_destroy(&put_tokstr);
+  ds_destroy (&put_tokstr);
+  ds_destroy (&tokstr);
 }
 
 \f
@@ -801,12 +803,12 @@ lex_preprocess_line (void)
       len--;
 
     /* Check for and remove terminal dot. */
-    if (len > 0 && s[len - 1] == get_endcmd() )
+    if (len > 0 && s[len - 1] == get_endcmd ())
       {
        dot = 1;
        len--;
       }
-    else if (len == 0 && get_nullline() )
+    else if (len == 0 && get_nulline ())
       dot = 1;
     else
       dot = 0;