X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Finflate.c;h=0396674b1a8b12ecccd5c2d4c088efaaa7af69d2;hb=71ca6750d4f402feb0f3c630ba8d12eb73ef2216;hp=c4ad1cffc9022afb14ed8749d339dfcb66e909b6;hpb=a70c4580757c19cd5054a470c2c5d497a1e71b4c;p=pspp diff --git a/src/libpspp/inflate.c b/src/libpspp/inflate.c index c4ad1cffc9..0396674b1a 100644 --- a/src/libpspp/inflate.c +++ b/src/libpspp/inflate.c @@ -1,5 +1,5 @@ /* 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 @@ -19,8 +19,6 @@ #include "inflate.h" -#if HAVE_ZLIB_H - #include #include #include @@ -62,8 +60,8 @@ inflate_init (struct zip_member *zm) { 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 */ @@ -86,7 +84,7 @@ inflate_init (struct zip_member *zm) 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; } @@ -118,7 +116,7 @@ inflate_read (struct zip_member *zm, void *buf, size_t n) } bytes_to_read = zm->comp_size - inf->ucomp_bytes_read; - + if (bytes_to_read == 0) return 0; @@ -140,10 +138,8 @@ inflate_read (struct zip_member *zm, void *buf, size_t n) { 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