w->encoding = xstrdup (dict_get_encoding (dict));
- w->n_csv_vars = dict_get_var_cnt (dict);
+ w->n_csv_vars = dict_get_n_vars (dict);
w->csv_vars = xnmalloc (w->n_csv_vars, sizeof *w->csv_vars);
for (i = 0; i < w->n_csv_vars; i++)
{
w->rf = replace_file_start (fh, "w", 0666, &w->file);
if (w->rf == NULL)
{
- msg (ME, _("Error opening `%s' for writing as a system file: %s."),
+ msg (ME, _("Error opening `%s' for writing as a CSV file: %s."),
fh_get_file_name (fh), strerror (errno));
goto error;
}
csv_output_format (struct csv_writer *w, const struct csv_var *cv,
const union value *value)
{
- char *s = data_out (value, w->encoding, &cv->format);
+ char *s = data_out (value, w->encoding, &cv->format,
+ settings_get_fmt_settings ());
struct substring ss = ss_cstr (s);
if (cv->format.type != FMT_A)
ss_trim (&ss, ss_cstr (" "));
csv_write_var (struct csv_writer *w, const struct csv_var *cv,
const union value *value)
{
- if (mv_is_value_missing (&cv->missing, value, MV_USER))
+ if (mv_is_value_missing (&cv->missing, value) == MV_USER)
{
union value missing;