Adopt use of gnulib for portability.
[pspp-builds.git] / src / sfm-write.c
index 0c8ebf01d110ef5034135d95eaa8d3d72cb91eea..e1e103e5005c247dd9477c6dbd3c280a7f7bcef8 100644 (file)
@@ -33,7 +33,7 @@
 #include "dictionary.h"
 #include "error.h"
 #include "file-handle.h"
-#include "getline.h"
+#include "getl.h"
 #include "hash.h"
 #include "magic.h"
 #include "misc.h"
@@ -42,6 +42,9 @@
 #include "var.h"
 #include "version.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
 #include "debug-print.h"
 
 /* Compression bias used by PSPP.  Values between (1 -
@@ -333,7 +336,7 @@ write_header (struct sfm_writer *w, const struct dictionary *d)
     if (label == NULL)
       label = "";
 
-    st_bare_pad_copy (hdr.file_label, label, sizeof hdr.file_label); 
+    buf_copy_str_rpad (hdr.file_label, sizeof hdr.file_label, label); 
   }
   
   memset (hdr.padding, 0, sizeof hdr.padding);
@@ -418,7 +421,7 @@ write_variable (struct sfm_writer *w, struct variable *v)
   sv.n_missing_values = nm;
   write_format_spec (&v->print, &sv.print);
   write_format_spec (&v->write, &sv.write);
-  st_bare_pad_copy (sv.name, v->short_name, sizeof sv.name);
+  buf_copy_str_rpad (sv.name, sizeof sv.name, v->short_name);
   if (!buf_write (w, &sv, sizeof sv))
     return 0;