Revise.
[pspp] / src / matrix-data.c
index 73d473d177c2f90f8597f2fa73896a5cdf2695f3..e90b2ac68e8ea818ca2f4d4c9384a9c1fc44f83b 100644 (file)
@@ -38,6 +38,9 @@
 #include "var.h"
 #include "vfm.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
 #include "debug-print.h"
 
 /* FIXME: /N subcommand not implemented.  It should be pretty simple,
@@ -884,9 +887,7 @@ static int
          di.e = token->string + token->length;
          di.v = (union value *) &token->number;
          di.f1 = first_column;
-         di.format.type = FMT_F;
-         di.format.w = token->length;
-         di.format.d = 0;
+         di.format = make_output_format (FMT_F, token->length, 0);
 
          if (!data_in (&di))
            return 0;
@@ -1347,8 +1348,8 @@ dump_cell_content (struct matrix_data_pgm *mx, int content, double *cp,
   int type = content_type[content];
 
   {
-    st_bare_pad_copy (case_data_rw (c, mx->rowtype_->fv)->s,
-                     content_names[content], 8);
+    buf_copy_str_rpad (case_data_rw (c, mx->rowtype_->fv)->s, 8,
+                       content_names[content]);
     
     if (type != 1)
       memset (case_data_rw (c, mx->varname_->fv)->s, ' ', 8);
@@ -1369,10 +1370,9 @@ dump_cell_content (struct matrix_data_pgm *mx, int content, double *cp,
            cp++;
          }
        if (type == 1)
-         st_bare_pad_copy (case_data_rw (c, mx->varname_->fv)->s,
-                            dict_get_var (default_dict,
-                                          mx->first_continuous + i)->name,
-                           8);
+         buf_copy_str_rpad (case_data_rw (c, mx->varname_->fv)->s, 8,
+                             dict_get_var (default_dict,
+                                           mx->first_continuous + i)->name);
        write_case (wc_data);
       }
   }