2 |
* * |
* * |
3 |
* libgig - C++ cross-platform Gigasampler format file access library * |
* libgig - C++ cross-platform Gigasampler format file access library * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003-2017 by Christian Schoenebeck * |
* Copyright (C) 2003-2018 by Christian Schoenebeck * |
6 |
* <cuse@users.sourceforge.net> * |
* <cuse@users.sourceforge.net> * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
1812 |
#if POSIX |
#if POSIX |
1813 |
if (hFileRead) close(hFileRead); |
if (hFileRead) close(hFileRead); |
1814 |
if (hFileWrite) close(hFileWrite); |
if (hFileWrite) close(hFileWrite); |
1815 |
|
hFileRead = hFileWrite = 0; |
1816 |
#elif defined(WIN32) |
#elif defined(WIN32) |
1817 |
if (hFileRead != INVALID_HANDLE_VALUE) CloseHandle(hFileRead); |
if (hFileRead != INVALID_HANDLE_VALUE) CloseHandle(hFileRead); |
1818 |
if (hFileWrite != INVALID_HANDLE_VALUE) CloseHandle(hFileWrite); |
if (hFileWrite != INVALID_HANDLE_VALUE) CloseHandle(hFileWrite); |
1819 |
|
hFileRead = hFileWrite = INVALID_HANDLE_VALUE; |
1820 |
#else |
#else |
1821 |
if (hFileRead) fclose(hFileRead); |
if (hFileRead) fclose(hFileRead); |
1822 |
if (hFileWrite) fclose(hFileWrite); |
if (hFileWrite) fclose(hFileWrite); |
1823 |
|
hFileRead = hFileWrite = NULL; |
1824 |
#endif |
#endif |
|
hFileRead = hFileWrite = 0; |
|
1825 |
break; |
break; |
1826 |
default: |
default: |
1827 |
throw Exception("Unknown file access mode"); |
throw Exception("Unknown file access mode"); |