Mercurial > octave
diff libinterp/dldfcn/xzip.cc @ 22188:1344509a480c
style fixes
* ButtonGroup.cc, marker.h, xzip.cc, randmtzig.cc: Don't comment
#else or #endif. Prefer #if defined.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 27 Jul 2016 18:25:31 -0400 |
parents | 2aae8894885b |
children | b1ebad209360 |
line wrap: on
line diff
--- a/libinterp/dldfcn/xzip.cc Wed Jul 27 14:52:09 2016 +0100 +++ b/libinterp/dldfcn/xzip.cc Wed Jul 27 18:25:31 2016 -0400 @@ -52,11 +52,11 @@ #include <iostream> #include <fstream> -#ifdef HAVE_BZLIB_H +#if defined (HAVE_BZLIB_H) # include <bzlib.h> #endif -#ifdef HAVE_ZLIB_H +#if defined (HAVE_ZLIB_H) # include <zlib.h> #endif @@ -107,7 +107,8 @@ } }; -#ifdef HAVE_BZ2 +#if defined (HAVE_BZ2) + class bz2 { private: @@ -179,7 +180,8 @@ } }; -#endif // HAVE_BZL2 + +#endif // Note about zlib and gzip // @@ -208,7 +210,8 @@ // GZIP file format specification version 4.3 -#ifdef HAVE_Z +#if defined (HAVE_Z) + class gz { private: @@ -293,10 +296,12 @@ // destination file. #if defined (__WIN32__) - os = 0; // or should it be 11? + // Or should it be 11? + os = 0; #elif defined (__APPLE__) os = 7; -#else // unix by default? +#else + // Unix by default? os = 3; #endif } @@ -403,7 +408,8 @@ z.close (); } }; -#endif // HAVE_Z + +#endif template<typename X> @@ -546,7 +552,7 @@ @seealso{gunzip, unpack, bzip2, zip, tar} @end deftypefn */) { -#ifndef HAVE_Z +#if ! defined (HAVE_Z) err_disabled_feature ("gzip", "gzip"); #else return xzip<gz> ("gzip", args); @@ -583,7 +589,7 @@ @seealso{bunzip2, unpack, gzip, zip, tar} @end deftypefn */) { -#ifndef HAVE_BZ2 +#if ! defined (HAVE_BZ2) err_disabled_feature ("bzip2", "bzip2"); #else return xzip<bz2> ("bzip2", args);