From 084cc89a410e322a548af42e5fd5d6844e6dbf31 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 28 Nov 2000 14:18:13 +0000 Subject: [PATCH] Clarified some comments. committer: mfx 975421093 +0000 --- src/c_screen.cpp | 2 +- src/file.cpp | 6 +++--- src/mem.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/c_screen.cpp b/src/c_screen.cpp index 5438dfc7..67399945 100644 --- a/src/c_screen.cpp +++ b/src/c_screen.cpp @@ -196,7 +196,7 @@ static void print0(FILE *f, const char *ss) // Note: // We use 2 passes to avoid unnecessary system calls because - // scrollUp() under Win32 is *extremely* slow. + // scrollUp() under Win95/98 is *extremely* slow. UNUSED(f); screen->getCursor(screen,&old_cx,&old_cy); diff --git a/src/file.cpp b/src/file.cpp index 2ba9cca4..abc03b90 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -66,7 +66,7 @@ void File::unlink(const char *name) **************************************************************************/ FileBase::FileBase() : - _fd(-1), _flags(0), _shflags(0), _mode(0), _name(0) + _fd(-1), _flags(0), _shflags(0), _mode(0), _name(NULL) { memset(&st,0,sizeof(st)); } @@ -94,7 +94,7 @@ bool FileBase::close() _fd = -1; _flags = 0; _mode = 0; - _name = 0; + _name = NULL; return ok; } @@ -290,7 +290,7 @@ void OutputFile::sopen(const char *name, int flags, int shflags, int mode) if (!isOpen()) { #if 0 - // don't throw FileNotFound here - confusing + // don't throw FileNotFound here -- this is confusing if (errno == ENOENT) throw FileNotFoundException(_name,errno); else diff --git a/src/mem.cpp b/src/mem.cpp index 23edf38e..72f138d9 100644 --- a/src/mem.cpp +++ b/src/mem.cpp @@ -70,8 +70,9 @@ unsigned MemBuffer::getSize() const void MemBuffer::alloc(unsigned size, unsigned base_offset) { #if 0 - // don't automaticlly free a used buffer this->free(); +#else + // don't automaticlly free a used buffer #endif assert(alloc_ptr == NULL); assert((int)size > 0); @@ -109,8 +110,8 @@ void MemBuffer::allocForCompression(unsigned uncompressed_size) void MemBuffer::allocForUncompression(unsigned uncompressed_size) { - //alloc(uncompressed_size + 512, 0); // 512 safety bytes - alloc(uncompressed_size + 3, 0); // 3 safety bytes for asm_fast + //alloc(uncompressed_size + 3 + 512, 0); // 512 safety bytes + alloc(uncompressed_size + 3, 0); // 3 bytes for asm_fast decompresion }