Started making the library sort-of-buildable
This commit is contained in:
parent
221f0c8ef8
commit
ccd7cc30ef
55 changed files with 461 additions and 304 deletions
|
@ -3,9 +3,9 @@
|
|||
/******************************************************************************/
|
||||
|
||||
|
||||
#include <lw/lib/HashIndex.hh>
|
||||
#include <lw/lib/Utilities.hh>
|
||||
using namespace lw;
|
||||
#include <ebcl/HashIndex.hh>
|
||||
#include <ebcl/Utilities.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= T_HashIndex =============================================================*/
|
||||
|
@ -93,7 +93,7 @@ T_HashIndex& T_HashIndex::operator =( T_HashIndex&& other ) noexcept
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void lw::swap( T_HashIndex& lhs , T_HashIndex& rhs ) noexcept
|
||||
void ebcl::swap( T_HashIndex& lhs , T_HashIndex& rhs ) noexcept
|
||||
{
|
||||
using std::swap;
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
/* POINTERS *******************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#include <lw/lib/Alloc.hh>
|
||||
#include <lw/lib/Config.hh>
|
||||
#include <lw/lib/Pointers.hh>
|
||||
using namespace lw;
|
||||
#include <ebcl/Alloc.hh>
|
||||
#include <ebcl/Config.hh>
|
||||
#include <ebcl/Pointers.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= T_WeakChain_ =============================================================*/
|
||||
|
@ -48,8 +48,8 @@ namespace {
|
|||
|
||||
static T_ThreadedPoolAllocator<
|
||||
sizeof( T_Reference_ ) , alignof( T_Reference_ ) ,
|
||||
LW_CFG_SHAREDPTR_REFPOOL_SIZE ,
|
||||
LW_CFG_SHAREDPTR_REFPOOL_MAXFREE
|
||||
EBCL_CFG_SHAREDPTR_REFPOOL_SIZE ,
|
||||
EBCL_CFG_SHAREDPTR_REFPOOL_MAXFREE
|
||||
> ReferenceAllocator_;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
/* STREAMS ********************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#include <lw/lib/Streams.hh>
|
||||
|
||||
using namespace lw;
|
||||
#include <ebcl/Streams.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= X_StreamError ============================================================*/
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
|
||||
#include <atomic>
|
||||
#include <lw/lib/Strings.hh>
|
||||
#include <lw/lib/HashIndex.hh>
|
||||
#include <lw/lib/Threading.hh>
|
||||
#include <lw/lib/Types.hh>
|
||||
#include <lw/lib/Alloc.hh>
|
||||
#include <ebcl/Strings.hh>
|
||||
#include <ebcl/HashIndex.hh>
|
||||
#include <ebcl/Threading.hh>
|
||||
#include <ebcl/Types.hh>
|
||||
#include <ebcl/Alloc.hh>
|
||||
|
||||
|
||||
using namespace lw;
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
/*= STRING STORAGE AND POOLING CLASSES =======================================*/
|
||||
|
@ -142,12 +142,12 @@ class T_StringPool final
|
|||
|
||||
} // namespace
|
||||
|
||||
namespace lw { M_DECLARE_HASH( A_StringDataInternal ); }
|
||||
namespace ebcl { M_DECLARE_HASH( A_StringDataInternal ); }
|
||||
|
||||
|
||||
/*= UTF-8 UTILITY FUNCTIONS ==================================================*/
|
||||
|
||||
bool lw::UTF8IsValid( char const* string )
|
||||
bool ebcl::UTF8IsValid( char const* string )
|
||||
{
|
||||
assert( string != nullptr );
|
||||
|
||||
|
@ -211,7 +211,7 @@ bool lw::UTF8IsValid( char const* string )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8Length( char const* string )
|
||||
uint32_t ebcl::UTF8Length( char const* string )
|
||||
{
|
||||
assert( string != nullptr );
|
||||
|
||||
|
@ -236,7 +236,7 @@ uint32_t lw::UTF8Length( char const* string )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8Size( char const* string )
|
||||
uint32_t ebcl::UTF8Size( char const* string )
|
||||
{
|
||||
assert( string != nullptr );
|
||||
|
||||
|
@ -259,7 +259,7 @@ uint32_t lw::UTF8Size( char const* string )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
bool lw::UTF8Info( char const* string , uint32_t& size , uint32_t& length )
|
||||
bool ebcl::UTF8Info( char const* string , uint32_t& size , uint32_t& length )
|
||||
{
|
||||
assert( string != nullptr );
|
||||
|
||||
|
@ -314,7 +314,7 @@ bool lw::UTF8Info( char const* string , uint32_t& size , uint32_t& length )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
bool lw::UTF8BufferInfo( char const* data , uint32_t size , uint32_t& length )
|
||||
bool ebcl::UTF8BufferInfo( char const* data , uint32_t size , uint32_t& length )
|
||||
{
|
||||
assert( data != nullptr );
|
||||
|
||||
|
@ -378,7 +378,7 @@ bool lw::UTF8BufferInfo( char const* data , uint32_t size , uint32_t& length )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8GetCodepoint( char const* data , uint32_t& bytes )
|
||||
uint32_t ebcl::UTF8GetCodepoint( char const* data , uint32_t& bytes )
|
||||
{
|
||||
assert( data != nullptr );
|
||||
if ( ( data[ 0 ] & 0xf8 ) == 0xf0 ) {
|
||||
|
@ -407,7 +407,7 @@ uint32_t lw::UTF8GetCodepoint( char const* data , uint32_t& bytes )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8GetCodepoint( char const* data )
|
||||
uint32_t ebcl::UTF8GetCodepoint( char const* data )
|
||||
{
|
||||
assert( data != nullptr );
|
||||
if ( ( data[ 0 ] & 0xf8 ) == 0xf0 ) {
|
||||
|
@ -432,7 +432,7 @@ uint32_t lw::UTF8GetCodepoint( char const* data )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8PutCodepoint( char* output , uint32_t available , uint32_t codepoint )
|
||||
uint32_t ebcl::UTF8PutCodepoint( char* output , uint32_t available , uint32_t codepoint )
|
||||
{
|
||||
if ( codepoint < 0x80 && available >= 1 ) {
|
||||
*output = char( codepoint );
|
||||
|
@ -458,7 +458,7 @@ uint32_t lw::UTF8PutCodepoint( char* output , uint32_t available , uint32_t code
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint32_t lw::UTF8GetMemoryOffset( char const* input , uint32_t index )
|
||||
uint32_t ebcl::UTF8GetMemoryOffset( char const* input , uint32_t index )
|
||||
{
|
||||
assert( input != nullptr );
|
||||
|
||||
|
@ -481,7 +481,7 @@ uint32_t lw::UTF8GetMemoryOffset( char const* input , uint32_t index )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
uint64_t lw::UTF8ToUnsignedInteger( char const* input , uint32_t size , bool * ok ,
|
||||
uint64_t ebcl::UTF8ToUnsignedInteger( char const* input , uint32_t size , bool * ok ,
|
||||
int base , bool useSep , uint32_t separator )
|
||||
{
|
||||
char const* inputPos( input );
|
||||
|
@ -595,7 +595,7 @@ uint64_t lw::UTF8ToUnsignedInteger( char const* input , uint32_t size , bool * o
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
int64_t lw::UTF8ToInteger( char const* input , uint32_t size , bool * ok ,
|
||||
int64_t ebcl::UTF8ToInteger( char const* input , uint32_t size , bool * ok ,
|
||||
int base , bool useSep , uint32_t separator )
|
||||
{
|
||||
char const* inputPos( input );
|
||||
|
@ -717,7 +717,7 @@ int64_t lw::UTF8ToInteger( char const* input , uint32_t size , bool * ok ,
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
double lw::UTF8ToDouble( char const* input , uint32_t size ,
|
||||
double ebcl::UTF8ToDouble( char const* input , uint32_t size ,
|
||||
bool * ok , uint32_t decimalPoint ,
|
||||
bool useSep , uint32_t separator )
|
||||
{
|
||||
|
@ -1187,7 +1187,7 @@ T_StringIterator& T_StringIterator::operator= ( T_StringIterator const& other )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void lw::swap( T_StringIterator& lhs , T_StringIterator& rhs ) noexcept
|
||||
void ebcl::swap( T_StringIterator& lhs , T_StringIterator& rhs ) noexcept
|
||||
{
|
||||
using std::swap;
|
||||
swap( lhs.data_ , rhs.data_ );
|
||||
|
@ -1320,7 +1320,7 @@ T_String& T_String::operator= ( T_StringBuilder const& sb )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void lw::swap( T_String& lhs , T_String& rhs ) noexcept
|
||||
void ebcl::swap( T_String& lhs , T_String& rhs ) noexcept
|
||||
{
|
||||
using std::swap;
|
||||
swap( lhs.data_ , rhs.data_ );
|
||||
|
@ -1745,7 +1745,7 @@ T_StringBuilder::~T_StringBuilder( )
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void lw::swap( T_StringBuilder& lhs , T_StringBuilder& rhs )
|
||||
void ebcl::swap( T_StringBuilder& lhs , T_StringBuilder& rhs )
|
||||
{
|
||||
using std::swap;
|
||||
swap( lhs.data_ , rhs.data_ );
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
/* INSTANTIATION OF VARIOUS TEMPLATE CLASSES **********************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#include <lw/lib/Utilities.hh>
|
||||
#include <lw/lib/Arrays.hh>
|
||||
#include <lw/lib/Strings.hh>
|
||||
#include <lw/lib/SRDData.hh>
|
||||
#include <lw/lib/SRDDefinitions.hh>
|
||||
#include <ebcl/Utilities.hh>
|
||||
#include <ebcl/Arrays.hh>
|
||||
#include <ebcl/Strings.hh>
|
||||
|
||||
namespace lw {
|
||||
namespace ebcl {
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -19,8 +17,6 @@ template struct T_Comparator< uint32_t >;
|
|||
template class T_Array< uint32_t >;
|
||||
template class T_Array< bool >;
|
||||
template class T_Array< T_String >;
|
||||
template class T_Array< T_SRDToken >;
|
||||
template class T_Array< T_SRDInputItem >;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
/******************************************************************************/
|
||||
|
||||
|
||||
#include <lw/lib/Utilities.hh>
|
||||
using namespace lw;
|
||||
#include <ebcl/Utilities.hh>
|
||||
using namespace ebcl;
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -143,7 +143,7 @@ void T_Sorter_::sort( uint8_t* data , uint32_t itemSize , uint32_t items , F_Swa
|
|||
|
||||
/*= HashData( ) ==============================================================*/
|
||||
|
||||
uint32_t lw::HashData( uint8_t const* data , uint32_t size )
|
||||
uint32_t ebcl::HashData( uint8_t const* data , uint32_t size )
|
||||
{
|
||||
uint32_t hash = 111119;
|
||||
while ( size > 0 ) {
|
||||
|
|
68
src/files.mk
68
src/files.mk
|
@ -1,36 +1,34 @@
|
|||
MINLIB_SOURCES = \
|
||||
src/lib/Files.cc \
|
||||
src/lib/HashIndex.cc \
|
||||
src/lib/MemoryStreams.cc \
|
||||
src/lib/Pointers.cc \
|
||||
src/lib/SRDBinary.cc \
|
||||
src/lib/SRDData.cc \
|
||||
src/lib/SRDDefinitions.cc \
|
||||
src/lib/SRDIO.cc \
|
||||
src/lib/SRDParser.cc \
|
||||
src/lib/SRDParserConfig.cc \
|
||||
src/lib/SRDPreproc.cc \
|
||||
src/lib/SRDPPCommands.cc \
|
||||
src/lib/SRDText.cc \
|
||||
src/lib/Streams.cc \
|
||||
src/lib/Strings.cc \
|
||||
src/lib/TemplateInstantiation.cc \
|
||||
src/lib/Utilities.cc \
|
||||
src/lib/VFS.cc \
|
||||
src/lib/VFSDrivers.cc
|
||||
# FIXME: VFSDrivers shouldn't be in the minlib
|
||||
# (but we need it for srdpp at this point)
|
||||
|
||||
LIB_SOURCES = \
|
||||
$(MINLIB_SOURCES) \
|
||||
src/lib/Console.cc \
|
||||
src/lib/ConsoleLogWriter.cc \
|
||||
src/lib/CwdFileLogger.cc \
|
||||
src/lib/DynLib.cc \
|
||||
src/lib/GameLoop.cc \
|
||||
src/lib/LW.cc \
|
||||
src/lib/Log.cc \
|
||||
src/lib/Messages.cc \
|
||||
src/lib/ModInterface.cc \
|
||||
src/lib/Mods.cc \
|
||||
src/lib/TextFileLogger.cc
|
||||
src/HashIndex.cc \
|
||||
src/Pointers.cc \
|
||||
src/Streams.cc \
|
||||
src/Strings.cc \
|
||||
src/TemplateInstantiation.cc \
|
||||
src/Utilities.cc \
|
||||
# END
|
||||
|
||||
#
|
||||
# src/Files.cc \
|
||||
# src/MemoryStreams.cc \
|
||||
# src/SRDBinary.cc \
|
||||
# src/SRDData.cc \
|
||||
# src/SRDDefinitions.cc \
|
||||
# src/SRDIO.cc \
|
||||
# src/SRDParser.cc \
|
||||
# src/SRDParserConfig.cc \
|
||||
# src/SRDPreproc.cc \
|
||||
# src/SRDPPCommands.cc \
|
||||
# src/SRDText.cc \
|
||||
# src/VFS.cc \
|
||||
# src/VFSDrivers.cc \
|
||||
# src/Console.cc \
|
||||
# src/ConsoleLogWriter.cc \
|
||||
# src/CwdFileLogger.cc \
|
||||
# src/DynLib.cc \
|
||||
# src/GameLoop.cc \
|
||||
# src/LW.cc \
|
||||
# src/Log.cc \
|
||||
# src/Messages.cc \
|
||||
# src/ModInterface.cc \
|
||||
# src/Mods.cc \
|
||||
# src/TextFileLogger.cc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue