Fixed blank-line replacement
[pspp] / src / inpt-pgm.c
index 004fe2c4820b3b7e74b01118e161e8d9070ac02f..eb2503c79e7ce616a5bc6780a8837326a124bf42 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "error.h"
@@ -36,6 +36,9 @@
 #include "var.h"
 #include "vfm.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
 #include "debug-print.h"
 
 /* Indicates how a `union value' should be initialized. */
@@ -65,8 +68,7 @@ cmd_input_program (void)
 
   /* FIXME: we shouldn't do this here, but I'm afraid that other
      code will check the class of vfm_source. */
-  vfm_source = create_case_source (&input_program_source_class,
-                                   default_dict, NULL);
+  vfm_source = create_case_source (&input_program_source_class, NULL);
 
   return lex_end_of_command ();
 }
@@ -94,7 +96,7 @@ cmd_end_input_program (void)
   /* Figure out how to initialize each input case. */
   inp = xmalloc (sizeof *inp);
   inp->init_cnt = dict_get_next_value_idx (default_dict);
-  inp->init = xmalloc (inp->init_cnt * sizeof *inp->init);
+  inp->init = xnmalloc (inp->init_cnt, sizeof *inp->init);
   for (i = 0; i < inp->init_cnt; i++)
     inp->init[i] = -1;
   for (i = 0; i < dict_get_var_cnt (default_dict); i++)
@@ -116,9 +118,6 @@ cmd_end_input_program (void)
   /* Put inp into vfm_source for later use. */
   vfm_source->aux = inp;
 
-  /* FIXME: we should use create_case_source() here. */
-  vfm_source->value_cnt = dict_get_next_value_idx (default_dict);
-
   return lex_end_of_command ();
 }