Mercurial > octave
changeset 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 | 829e0aafebdc |
files | libgui/graphics/ButtonGroup.cc libgui/src/m-editor/marker.h libinterp/dldfcn/xzip.cc liboctave/numeric/randmtzig.cc |
diffstat | 4 files changed, 21 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/ButtonGroup.cc Wed Jul 27 14:52:09 2016 +0100 +++ b/libgui/graphics/ButtonGroup.cc Wed Jul 27 18:25:31 2016 -0400 @@ -20,7 +20,7 @@ */ -#ifdef HAVE_CONFIG_H +#if defined (HAVE_CONFIG_H) # include "config.h" #endif
--- a/libgui/src/m-editor/marker.h Wed Jul 27 14:52:09 2016 +0100 +++ b/libgui/src/m-editor/marker.h Wed Jul 27 18:25:31 2016 -0400 @@ -94,4 +94,5 @@ QString _condition; }; -#endif // MARKER_H +#endif +
--- 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);
--- a/liboctave/numeric/randmtzig.cc Wed Jul 27 14:52:09 2016 +0100 +++ b/liboctave/numeric/randmtzig.cc Wed Jul 27 18:25:31 2016 -0400 @@ -587,13 +587,13 @@ p[0] = lo; p[1] = hi & 0x1FFFFF; x = ( si ? -rabs : rabs ) * wi[idx]; -# else /* ! HAVE_X86_32 */ +# else /* arbitrary mantissa (selected by NRANDI, with 1 bit for sign) */ const uint64_t r = NRANDI; const int64_t rabs = r >> 1; const int idx = static_cast<int> (rabs & 0xFF); const double x = ( (r & 1) ? -rabs : rabs) * wi[idx]; -# endif /* ! HAVE_X86_32 */ +# endif if (rabs < static_cast<int64_t> (ki[idx])) return x; /* 99.3% of the time we return here 1st try */ else if (idx == 0)