Merge internal repository.
Delete TODO list, use issue list instead.
This commit is contained in:
@ -3,6 +3,7 @@ ADD_SUBDIRECTORY(poshlib)
|
||||
|
||||
SET(CORE_SRCS
|
||||
nvcore.h
|
||||
Ptr.h
|
||||
BitArray.h
|
||||
Memory.h
|
||||
Memory.cpp
|
||||
|
@ -283,7 +283,7 @@ namespace nv
|
||||
else
|
||||
{
|
||||
m_size = new_size;
|
||||
m_buffer[new_size-1] = val;
|
||||
new(m_buffer+new_size-1) T(val);
|
||||
}
|
||||
}
|
||||
void pushBack( const T & val )
|
||||
|
@ -195,7 +195,7 @@ namespace
|
||||
// Solaris:
|
||||
// ucp->uc_mcontext.gregs[REG_PC]
|
||||
// Linux hppa:
|
||||
// uc->uc_mcontext.sc_iaoq[0] & ~0<EFBFBD>3UL
|
||||
// uc->uc_mcontext.sc_iaoq[0] & ~0x3UL
|
||||
// Linux sparc:
|
||||
// ((struct sigcontext*) secret)->sigc_regs.tpc
|
||||
// Linux sparc64:
|
||||
@ -204,7 +204,7 @@ namespace
|
||||
// potentially correct for other archs:
|
||||
// Linux alpha: ucp->m_context.sc_pc
|
||||
// Linux arm: ucp->m_context.ctx.arm_pc
|
||||
// Linux ia64: ucp->m_context.sc_ip & ~0<EFBFBD>3UL
|
||||
// Linux ia64: ucp->m_context.sc_ip & ~0x3UL
|
||||
// Linux mips: ucp->m_context.sc_pc
|
||||
// Linux s390: ucp->m_context.sregs->regs.psw.addr
|
||||
}
|
||||
@ -257,7 +257,7 @@ namespace
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
HINSTANCE kern_lib = LoadLibraryEx( "kernel32.dll", NULL, 0 );
|
||||
HINSTANCE kern_lib = LoadLibraryExA( "kernel32.dll", NULL, 0 );
|
||||
if( kern_lib ) {
|
||||
FARPROC lIsDebuggerPresent = GetProcAddress( kern_lib, "IsDebuggerPresent" );
|
||||
if( lIsDebuggerPresent && lIsDebuggerPresent() ) {
|
||||
@ -302,7 +302,7 @@ namespace
|
||||
}
|
||||
|
||||
flushMessageQueue();
|
||||
int action = MessageBox(NULL, error_string, "Assertion failed", MB_ABORTRETRYIGNORE|MB_ICONERROR);
|
||||
int action = MessageBoxA(NULL, error_string, "Assertion failed", MB_ABORTRETRYIGNORE|MB_ICONERROR);
|
||||
switch( action ) {
|
||||
case IDRETRY:
|
||||
ret = NV_ABORT_DEBUG;
|
||||
|
@ -73,6 +73,12 @@ public:
|
||||
{
|
||||
return m_fp == NULL || ferror( m_fp ) != 0;
|
||||
}
|
||||
|
||||
virtual void clearError()
|
||||
{
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
clearerr(m_fp);
|
||||
}
|
||||
|
||||
virtual bool isAtEnd() const
|
||||
{
|
||||
@ -210,6 +216,11 @@ public:
|
||||
return m_mem == NULL || m_ptr > m_mem + m_size || m_ptr < m_mem;
|
||||
}
|
||||
|
||||
virtual void clearError()
|
||||
{
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
virtual bool isAtEnd() const
|
||||
{
|
||||
return m_ptr == m_mem + m_size;
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace nv
|
||||
{
|
||||
|
||||
/** Base stream class. */
|
||||
/// Base stream class.
|
||||
class Stream {
|
||||
public:
|
||||
|
||||
@ -41,7 +41,7 @@ public:
|
||||
ByteOrder byteOrder() const { return m_byteOrder; }
|
||||
|
||||
|
||||
/// Serialize the given data.
|
||||
/// Serialize the given data. @@ Should return bytes serialized?
|
||||
virtual void serialize( void * data, int len ) = 0;
|
||||
|
||||
/// Move to the given position in the archive.
|
||||
@ -55,7 +55,10 @@ public:
|
||||
|
||||
/// Determine if there has been any error.
|
||||
virtual bool isError() const = 0;
|
||||
|
||||
|
||||
/// Clear errors.
|
||||
virtual void clearError() = 0;
|
||||
|
||||
/// Return true if the stream is at the end.
|
||||
virtual bool isAtEnd() const = 0;
|
||||
|
||||
|
@ -49,6 +49,10 @@ namespace nv
|
||||
int m_column;
|
||||
};
|
||||
|
||||
// @@ Use enums instead of bools for clarity!
|
||||
//enum SkipEmptyLines { skipEmptyLines, noSkipEmptyLines };
|
||||
//enum SkipEndOfLine { skipEndOfLine, noSkipEndOfLine };
|
||||
|
||||
/// A simple stream tokenizer.
|
||||
class NVCORE_CLASS Tokenizer
|
||||
{
|
||||
|
Reference in New Issue
Block a user