/* PSPP - a program for statistical analysis.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011, 2013 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
#include "inflate.h"
-#if HAVE_ZLIB_H
-
#include <xalloc.h>
#include <zlib.h>
#include <stdio.h>
{
int r;
struct inflator *inf = xzalloc (sizeof *inf);
-
- uint16_t flg = 0 ;
+
+ uint16_t flg = 0 ;
uint16_t cmf = 0x8; /* Always 8 for inflate */
const uint16_t cinfo = 7; /* log_2(Window size) - 8 */
if ( Z_OK != r)
{
- ds_put_format (zm->errs, _("Cannot initialize inflator: %s"), zError (r));
+ ds_put_format (zm->errmsgs, _("Cannot initialize inflator: %s"), zError (r));
return false;
}
}
bytes_to_read = zm->comp_size - inf->ucomp_bytes_read;
-
+
if (bytes_to_read == 0)
return 0;
{
return n - inf->zss.avail_out;
}
-
- ds_put_format (zm->errs, _("Error inflating: %s"), zError (r));
+
+ ds_put_format (zm->errmsgs, _("Error inflating: %s"), zError (r));
return -1;
}
-
-#endif