X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-writer.c;h=1a65e3c067efc5688d912c0184d3e73be1fa59ed;hb=50f245ab3b7e42ae79ea4076ad7a2bbb97841cc6;hp=ac5f4c903ed0266a4e50bc87a43c9b29e177cf9e;hpb=d4135192829ae81ec367c3e42289822e2629aeef;p=pspp-builds.git diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index ac5f4c90..1a65e3c0 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -215,7 +215,7 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d, &w->file, NULL); 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 system file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } @@ -572,10 +572,10 @@ put_attrset (struct string *string, const struct attrset *attrs) size_t j; ds_put_cstr (string, attribute_get_name (attr)); - ds_put_char (string, '('); + ds_put_byte (string, '('); for (j = 0; j < n_values; j++) ds_put_format (string, "'%s'\n", attribute_get_value (attr, j)); - ds_put_char (string, ')'); + ds_put_byte (string, ')'); } } @@ -615,7 +615,7 @@ write_variable_attributes (struct sfm_writer *w, const struct dictionary *d) if (attrset_count (attrs)) { if (n_attrsets++) - ds_put_char (&s, '/'); + ds_put_byte (&s, '/'); ds_put_format (&s, "%s:", var_get_short_name (v, 0)); put_attrset (&s, attrs); } @@ -658,7 +658,7 @@ write_mrsets (struct sfm_writer *w, const struct dictionary *dict, if (mrset->cat_source == MRSET_COUNTEDVALUES) ds_put_format (&s, "E %d ", mrset->label_from_var_label ? 11 : 1); else - ds_put_char (&s, 'D'); + ds_put_byte (&s, 'D'); if (mrset->width == 0) counted = xasprintf ("%.0f", mrset->counted.f); @@ -669,17 +669,17 @@ write_mrsets (struct sfm_writer *w, const struct dictionary *dict, free (counted); } else - ds_put_char (&s, 'C'); - ds_put_char (&s, ' '); + ds_put_byte (&s, 'C'); + ds_put_byte (&s, ' '); label = mrset->label && !mrset->label_from_var_label ? mrset->label : ""; ds_put_format (&s, "%zu %s", strlen (label), label); for (j = 0; j < mrset->n_vars; j++) ds_put_format (&s, " %s", var_get_short_name (mrset->vars[j], 0)); - ds_put_char (&s, '\n'); + ds_put_byte (&s, '\n'); } - write_attribute_record (w, &s, 7); + write_attribute_record (w, &s, pre_v14 ? 7 : 19); ds_destroy (&s); } @@ -843,7 +843,7 @@ write_longvar_table (struct sfm_writer *w, const struct dictionary *dict) char *longname = recode_string (dict_get_encoding (dict), UTF8, var_get_name (v), -1); if (i) - ds_put_char (&map, '\t'); + ds_put_byte (&map, '\t'); ds_put_format (&map, "%s=%s", var_get_short_name (v, 0), longname); free (longname); @@ -982,7 +982,7 @@ close_writer (struct sfm_writer *w) ok = false; if (!ok) - msg (ME, _("An I/O error occurred writing system file \"%s\"."), + msg (ME, _("An I/O error occurred writing system file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf))