X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fpor-file-writer.c;h=8a27f6b785ccc548d5a14436cfe221ee7476d3e6;hb=423d3e418a94598b85c82fb83c9796de7712288b;hp=3d62078e6942635d00b83b727b03176f4e4a7096;hpb=707848060e414fe93458834446dd7cdbf800667f;p=pspp-builds.git diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c index 3d62078e..8a27f6b7 100644 --- a/src/data/por-file-writer.c +++ b/src/data/por-file-writer.c @@ -49,6 +49,7 @@ #include "gettext.h" #define _(msgid) gettext (msgid) +#define N_(msgid) (msgid) /* Maximum width of a variable in a portable file. */ #define MAX_POR_WIDTH 255 @@ -76,7 +77,7 @@ struct pfm_var int fv; /* Starting case index. */ }; -static struct casewriter_class por_file_casewriter_class; +static const struct casewriter_class por_file_casewriter_class; static bool close_writer (struct pfm_writer *); static void buf_write (struct pfm_writer *, const void *, size_t); @@ -142,7 +143,9 @@ pfm_open_writer (struct file_handle *fh, struct dictionary *dict, } /* Lock file. */ - w->lock = fh_lock (fh, FH_REF_FILE, "portable file", FH_ACC_WRITE, true); + /* TRANSLATORS: this fragment will be interpolated into + messages in fh_lock() that identify types of files. */ + w->lock = fh_lock (fh, FH_REF_FILE, N_("portable file"), FH_ACC_WRITE, true); if (w->lock == NULL) goto error; @@ -774,7 +777,7 @@ format_trig_double (long double value, int base_10_precision, char output[]) 0...30**6, an invariant of the loop below. */ errno = 0; base_2_sig = frexp (value, &base_2_exp); - if (errno != 0 || !finite (base_2_sig)) + if (errno != 0 || !isfinite (base_2_sig)) goto missing_value; if (base_2_exp == 0 && base_2_sig == 0.) goto zero; @@ -895,7 +898,7 @@ format_trig_double (long double value, int base_10_precision, char output[]) return; } -static struct casewriter_class por_file_casewriter_class = +static const struct casewriter_class por_file_casewriter_class = { por_file_casewriter_write, por_file_casewriter_destroy,