summaryrefslogtreecommitdiff
path: root/lib/Handle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r--lib/Handle.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc
index d18a2e4..1696a3e 100644
--- a/lib/Handle.cc
+++ b/lib/Handle.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Handle.cc,v 1.64 2003-12-07 05:50:41 pixel Exp $ */
+/* $Id: Handle.cc,v 1.65 2003-12-11 16:53:28 pixel Exp $ */
#include <stdio.h>
#include <string.h>
@@ -581,27 +581,27 @@ void * Handle::mmap(off_t offset, size_t length) throw (GeneralException) {
throw GeneralException(String("Was not able to mmap(): ") + strerror(errno));
}
#else
- hMapObject = CreateFileMapping(
- hFile,
- 0,
- CanWrite() ? PAGE_READWRITE : PAGE_READONLY,
- 0,
- length,
- GetName().to_charp());
- if (hMapObject != NULL) {
- r = MapViewOfFile(
- hMapObject,
- CanWrite() ? FILE_MAP_WRITE : FILE_MAP_READ,
- 0,
- offset,
- length);
- if (!r) {
- CloseHandle(hMapObject);
- throw GeneralException("Was not able to MapViewOfFile()");
- }
- } else {
- throw GeneralException("Was not able to CreateFileMapping()");
- }
+ hMapObject = CreateFileMapping(
+ hFile,
+ 0,
+ CanWrite() ? PAGE_READWRITE : PAGE_READONLY,
+ 0,
+ length,
+ GetName().to_charp());
+ if (hMapObject != NULL) {
+ r = MapViewOfFile(
+ hMapObject,
+ CanWrite() ? FILE_MAP_WRITE : FILE_MAP_READ,
+ 0,
+ offset,
+ length);
+ if (!r) {
+ CloseHandle(hMapObject);
+ throw GeneralException("Was not able to MapViewOfFile()");
+ }
+ } else {
+ throw GeneralException("Was not able to CreateFileMapping()");
+ }
#endif
mappedarea = r;
@@ -621,7 +621,7 @@ void Handle::munmap() throw (GeneralException) {
if (!UnmapViewOfFile(mappedarea)) {
throw GeneralException("Was not able to UnmapViewOfFile()");
}
- CloseHandle(hMapObject);
+ CloseHandle(hMapObject);
#endif
mapped = false;
mappedarea = 0;