From 8c4ce72f66f5d2b8b01689d1282ae3491b714130 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 13 Jul 2003 02:12:38 +0000 Subject: Small fixes --- include/generic.h | 5 ++--- lib/Handle.cc | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/generic.h b/include/generic.h index 66772b1..46e35ff 100644 --- a/include/generic.h +++ b/include/generic.h @@ -1,6 +1,8 @@ #ifndef __GENERIC_H__ #define __GENERIC_H__ +#include +#include #include #define M_BARE -1 @@ -131,9 +133,6 @@ inline T ABS(T x) { - (((x)>>3)&0x11111111)) #define ISPOT(x) (((x)&(x-1))==0?1:0) -#include -#include - #if defined __linux__ || defined __CYGWIN32__ #define MKDIR(name) mkdir(name, 0777) #else diff --git a/lib/Handle.cc b/lib/Handle.cc index 69f6111..d6fa0fb 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -312,7 +312,7 @@ void Handle::SetZ(int az) throw (GeneralException) { } } } else if (az) { - char format[4]; + char format[5]; int index = 0; if (CanRead()) { format[index++] = 'r'; @@ -321,6 +321,7 @@ void Handle::SetZ(int az) throw (GeneralException) { format[index++] = 'w'; } format[index++] = (char) (az + '0'); + format[index++] = 'b'; format[index] = 0; #ifdef FULLDEBUG printm(M_INFO, String(_("Performing gzdopen on handle ")) + h + _(" with mode \"") + format + "\"\n"); -- cgit v1.2.3