More stuff and tests integrated
This commit is contained in:
parent
ccd7cc30ef
commit
b9d77922ed
16 changed files with 92 additions and 119 deletions
29
src/Files.cc
29
src/Files.cc
|
@ -3,8 +3,8 @@
|
|||
/******************************************************************************/
|
||||
|
||||
|
||||
#include <lw/lib/Files.hh>
|
||||
using namespace lw;
|
||||
#include <ebcl/Files.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= T_File ==================================================================*/
|
||||
|
@ -41,20 +41,17 @@ void T_File::open( )
|
|||
const T_Buffer< char > path( path_.toOSString( ) );
|
||||
|
||||
// Select the right mode
|
||||
char const* mode;
|
||||
switch ( mode_ ) {
|
||||
case E_FileMode::READ_ONLY:
|
||||
mode = "rb";
|
||||
break;
|
||||
|
||||
case E_FileMode::READ_WRITE:
|
||||
mode = "rb+";
|
||||
break;
|
||||
|
||||
case E_FileMode::OVERWRITE:
|
||||
mode = "wb+";
|
||||
break;
|
||||
}
|
||||
char const* const mode( ([this]() {
|
||||
switch ( mode_ ) {
|
||||
case E_FileMode::READ_ONLY:
|
||||
return "rb";
|
||||
case E_FileMode::READ_WRITE:
|
||||
return "rb+";
|
||||
case E_FileMode::OVERWRITE:
|
||||
return "wb+";
|
||||
}
|
||||
std::abort( );
|
||||
})( ) );
|
||||
|
||||
// Open the file
|
||||
#ifdef WIN32_
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
/* MEMORY STREAMS *************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#include <lw/lib/MemoryStreams.hh>
|
||||
using namespace lw;
|
||||
#include <ebcl/MemoryStreams.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= T_MemoryInputStream ======================================================*/
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LIB_SOURCES = \
|
||||
src/Files.cc \
|
||||
src/HashIndex.cc \
|
||||
src/MemoryStreams.cc \
|
||||
src/Pointers.cc \
|
||||
src/Streams.cc \
|
||||
src/Strings.cc \
|
||||
|
@ -8,8 +10,6 @@ LIB_SOURCES = \
|
|||
# END
|
||||
|
||||
#
|
||||
# src/Files.cc \
|
||||
# src/MemoryStreams.cc \
|
||||
# src/SRDBinary.cc \
|
||||
# src/SRDData.cc \
|
||||
# src/SRDDefinitions.cc \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue