projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix root cause of bug worked around by previous check-in, and remove
[pspp]
/
src
/
sfm-write.c
diff --git
a/src/sfm-write.c
b/src/sfm-write.c
index 97028a4966f15440b5de0947e3be1436dff5c165..fd500f45c00b42062240d2eeb7bdf24813e083b7 100644
(file)
--- a/
src/sfm-write.c
+++ b/
src/sfm-write.c
@@
-17,24
+17,7
@@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* AIX requires this to be the first thing in the file. */
#include <config.h>
#include <config.h>
-#if __GNUC__
-#define alloca __builtin_alloca
-#else
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifdef _AIX
-#pragma alloca
-#else
-#ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#endif
-#endif
-#endif
-#endif
-
#include "sfm.h"
#include "sfmP.h"
#include <assert.h>
#include "sfm.h"
#include "sfmP.h"
#include <assert.h>
@@
-46,7
+29,6
@@
char *alloca ();
#include <unistd.h> /* Required by SunOS4. */
#endif
#include "alloc.h"
#include <unistd.h> /* Required by SunOS4. */
#endif
#include "alloc.h"
-#include "approx.h"
#include "error.h"
#include "file-handle.h"
#include "getline.h"
#include "error.h"
#include "file-handle.h"
#include "getline.h"
@@
-693,13
+675,13
@@
sfm_write_case (struct file_handle * h, const flt64 *elem, int n_elem)
*ext->x++ = 255;
continue;
}
*ext->x++ = 255;
continue;
}
- else
+ else
if (*elem > INT_MIN && *elem < INT_MAX)
{
{
- int value = *elem
< 0 ? *elem - EPSILON : *elem + EPSILON
;
+ int value = *elem;
if (value >= 1 - COMPRESSION_BIAS
&& value <= 251 - COMPRESSION_BIAS
if (value >= 1 - COMPRESSION_BIAS
&& value <= 251 - COMPRESSION_BIAS
- &&
approx_eq (value, *elem)
)
+ &&
value == *elem
)
{
*ext->x++ = value + COMPRESSION_BIAS;
continue;
{
*ext->x++ = value + COMPRESSION_BIAS;
continue;