X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fpor-file-writer.c;h=8de293c5eafb2904d065db08f7779c9980f4e805;hb=9a331fe64eb814ae5c1322e21717a04fb254bf65;hp=1f348f67986f3e613d7633b1107406dff2640dce;hpb=cc6a060446e71cace2d828a864c85702e04aba7c;p=pspp-builds.git diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c index 1f348f67..8de293c5 100644 --- a/src/data/por-file-writer.c +++ b/src/data/por-file-writer.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009 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,8 @@ write_float (struct pfm_writer *w, double d) char buffer[64]; format_trig_double (d, floor (d) == d ? DBL_DIG : w->digits, buffer); buf_write (w, buffer, strlen (buffer)); - buf_write (w, "/", 1); + if (d != SYSMIS) + buf_write (w, "/", 1); } /* Write N to the portable file as an integer field. */ @@ -463,7 +464,7 @@ por_file_casewriter_write (struct casewriter *writer, void *w_, else casewriter_force_error (writer); - case_destroy (c); + case_unref (c); } static void @@ -777,7 +778,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;