mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-20 06:06:13 +00:00
Changed: Replaced display of pointers using %d or %X by %p
This commit is contained in:
parent
2723c28412
commit
fd2e0977fe
12 changed files with 53 additions and 53 deletions
|
@ -117,7 +117,7 @@ bool CCoarseMeshBuild::buildBitmap (const std::vector<CCoarseMeshDesc>& coarseMe
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Build a name
|
// Build a name
|
||||||
name+=toString ("%d",(ptrdiff_t)texture);
|
name+=toString ("%p", texture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ void CCoarseMeshBuild::remapCoordinates (const std::vector<CCoarseMeshDesc>& coa
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Build a name
|
// Build a name
|
||||||
name+=toString ("%d",(ptrdiff_t)texture);
|
name+=toString ("%p", texture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2305,13 +2305,13 @@ void CParticleSystem::dumpHierarchy()
|
||||||
CPSLocated *loc = dynamic_cast<CPSLocated *>(_ProcessVect[k]);
|
CPSLocated *loc = dynamic_cast<CPSLocated *>(_ProcessVect[k]);
|
||||||
if (loc)
|
if (loc)
|
||||||
{
|
{
|
||||||
nlinfo("Located k : %s @%x", loc->getName().c_str(), (ptrdiff_t) loc);
|
nlinfo("Located k : %s @%p", loc->getName().c_str(), loc);
|
||||||
for(uint l = 0; l < loc->getNbBoundObjects(); ++l)
|
for(uint l = 0; l < loc->getNbBoundObjects(); ++l)
|
||||||
{
|
{
|
||||||
CPSEmitter *emitter = dynamic_cast<CPSEmitter *>(loc->getBoundObject(l));
|
CPSEmitter *emitter = dynamic_cast<CPSEmitter *>(loc->getBoundObject(l));
|
||||||
if (emitter)
|
if (emitter)
|
||||||
{
|
{
|
||||||
nlinfo(" emitter %s : emit %s @%x", emitter->getName().c_str(), emitter->getEmittedType() ? emitter->getEmittedType()->getName().c_str() : "none", (ptrdiff_t) emitter->getEmittedType());
|
nlinfo(" emitter %s : emit %s @%p", emitter->getName().c_str(), emitter->getEmittedType() ? emitter->getEmittedType()->getName().c_str() : "none", emitter->getEmittedType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1300,12 +1300,12 @@ void CRenderTrav::debugWaterModelMemory(const char *tag, bool dumpList)
|
||||||
{
|
{
|
||||||
// Before crash, do some log
|
// Before crash, do some log
|
||||||
nlwarning("******* WaterModelList crash after %s", tag);
|
nlwarning("******* WaterModelList crash after %s", tag);
|
||||||
nlwarning("Current: Ptr:%x. List:%x/%x", (ptrdiff_t)dmp.Address, (ptrdiff_t)dmp.ClippedPolyBegin, (ptrdiff_t)dmp.ClippedPolyEnd);
|
nlwarning("Current: Ptr:%p. List:%p/%p", dmp.Address, dmp.ClippedPolyBegin, dmp.ClippedPolyEnd);
|
||||||
// Log also the list bkuped (to do comparisons)
|
// Log also the list bkuped (to do comparisons)
|
||||||
for(uint i=0;i<_DebugWaterModelList.size();i++)
|
for(uint i=0;i<_DebugWaterModelList.size();i++)
|
||||||
{
|
{
|
||||||
CWaterModelDump &bkup= _DebugWaterModelList[i];
|
CWaterModelDump &bkup= _DebugWaterModelList[i];
|
||||||
nlwarning("List%02d: Ptr:%x. Array:%x/%x", i, (ptrdiff_t)bkup.Address, (ptrdiff_t)bkup.ClippedPolyBegin, (ptrdiff_t)bkup.ClippedPolyEnd);
|
nlwarning("List%02d: Ptr:%p. Array:%p/%p", i, bkup.Address, bkup.ClippedPolyBegin, bkup.ClippedPolyEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// crash (assert not stop for clearness)
|
// crash (assert not stop for clearness)
|
||||||
|
|
|
@ -188,8 +188,8 @@ void CForm::read (xmlNodePtr node, CFormLoader &loader, CFormDfn *dfn, const cha
|
||||||
if ( ((const char*)node->name == NULL) || (strcmp ((const char*)node->name, "FORM") != 0) )
|
if ( ((const char*)node->name == NULL) || (strcmp ((const char*)node->name, "FORM") != 0) )
|
||||||
{
|
{
|
||||||
// Make an error message
|
// Make an error message
|
||||||
warning (true, "read", "XML Syntax error in block line %d, node (%s) should be FORM.",
|
warning (true, "read", "XML Syntax error in block line %p, node (%s) should be FORM.",
|
||||||
(ptrdiff_t)node->content, node->name);
|
node->content, node->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get first struct node
|
// Get first struct node
|
||||||
|
@ -197,8 +197,8 @@ void CForm::read (xmlNodePtr node, CFormLoader &loader, CFormDfn *dfn, const cha
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "Syntax error in block line %d, node (%s) should have a STRUCT child node.",
|
warning (true, "read", "Syntax error in block line %p, node (%s) should have a STRUCT child node.",
|
||||||
(ptrdiff_t)node->content, node->name);
|
node->content, node->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the struct
|
// Read the struct
|
||||||
|
|
|
@ -115,7 +115,7 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "DFN") != 0) )
|
if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "DFN") != 0) )
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block line %d, node (%s) should be DFN.", (ptrdiff_t)root->content, root->name);
|
warning (true, "read", "XML Syntax error in block line %p, node (%s) should be DFN.", root->content, root->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count the parent
|
// Count the parent
|
||||||
|
@ -147,8 +147,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block (%s) line %d, aguments Name not found.",
|
warning (true, "read", "XML Syntax error in block (%s) line %p, aguments Name not found.",
|
||||||
parent->name, (ptrdiff_t)parent->content);
|
parent->name, parent->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next parent
|
// Next parent
|
||||||
|
@ -230,8 +230,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
if ((Entries[childNumber].Type == NULL) && !forceLoad)
|
if ((Entries[childNumber].Type == NULL) && !forceLoad)
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "In XML block (%s) line %d, file not found %s.",
|
warning (true, "read", "In XML block (%s) line %p, file not found %s.",
|
||||||
child->name, (ptrdiff_t)child->content, Entries[childNumber].Filename.c_str ());
|
child->name, child->content, Entries[childNumber].Filename.c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the default value
|
// Read the default value
|
||||||
|
@ -247,8 +247,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML In block (%s) line %d, no filename found for the .typ file.",
|
warning (true, "read", "XML In block (%s) line %p, no filename found for the .typ file.",
|
||||||
child->name, (ptrdiff_t)child->content, Entries[childNumber].Filename.c_str ());
|
child->name, child->content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (stricmp (typeName, "Dfn") == 0)
|
else if (stricmp (typeName, "Dfn") == 0)
|
||||||
|
@ -264,15 +264,15 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
if ((Entries[childNumber].Dfn == NULL) && !forceLoad)
|
if ((Entries[childNumber].Dfn == NULL) && !forceLoad)
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML In block (%s) line %d, file not found %s.",
|
warning (true, "read", "XML In block (%s) line %p, file not found %s.",
|
||||||
child->name, (ptrdiff_t)child->content, Entries[childNumber].Filename.c_str ());
|
child->name, child->content, Entries[childNumber].Filename.c_str ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML In block (%s) line %d, no filename found for the .typ file.",
|
warning (true, "read", "XML In block (%s) line %p, no filename found for the .typ file.",
|
||||||
child->name, (ptrdiff_t)child->content, Entries[childNumber].Filename.c_str ());
|
child->name, child->content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (stricmp (typeName, "DfnPointer") == 0)
|
else if (stricmp (typeName, "DfnPointer") == 0)
|
||||||
|
@ -282,8 +282,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block (%s) line %d, element has not a valid type name attribut \"Type = %s\".",
|
warning (true, "read", "XML Syntax error in block (%s) line %p, element has not a valid type name attribut \"Type = %s\".",
|
||||||
child->name, (ptrdiff_t)child->content, typeName);
|
child->name, child->content, typeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the value
|
// Delete the value
|
||||||
|
@ -292,8 +292,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block (%s) line %d, element has no type name attribut \"Type = [Type][Dfn][DfnPointer]\".",
|
warning (true, "read", "XML Syntax error in block (%s) line %p, element has no type name attribut \"Type = [Type][Dfn][DfnPointer]\".",
|
||||||
child->name, (ptrdiff_t)child->content);
|
child->name, child->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the array attrib
|
// Get the array attrib
|
||||||
|
@ -310,8 +310,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block (%s) line %d, aguments Name not found.",
|
warning (true, "read", "XML Syntax error in block (%s) line %p, aguments Name not found.",
|
||||||
root->name, (ptrdiff_t)root->content);
|
root->name, root->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next child
|
// Next child
|
||||||
|
|
|
@ -1904,8 +1904,8 @@ void CFormElmStruct::read (xmlNodePtr node, CFormLoader &loader, const CFormDfn
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Make a warning message
|
// Make a warning message
|
||||||
warning (false, "read", "In block line %d, node (%s) type in DFN have changed.",
|
warning (false, "read", "In block line %p, node (%s) type in DFN have changed.",
|
||||||
(ptrdiff_t)child->content, child->name);
|
child->content, child->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1917,8 +1917,8 @@ void CFormElmStruct::read (xmlNodePtr node, CFormLoader &loader, const CFormDfn
|
||||||
}
|
}
|
||||||
|
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in block line %d, node (%s) name should be STRUCT, ATOM or ARRAY.",
|
warning (true, "read", "XML Syntax error in block line %p, node (%s) name should be STRUCT, ATOM or ARRAY.",
|
||||||
(ptrdiff_t)child->content, child->name);
|
child->content, child->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2199,8 +2199,8 @@ void CFormElmVirtualStruct::read (xmlNodePtr node, CFormLoader &loader, CForm *f
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in virtual struct in block line %d, should have a DfnName property.",
|
warning (true, "read", "XML Syntax error in virtual struct in block line %p, should have a DfnName property.",
|
||||||
(ptrdiff_t)node->content, node->name);
|
node->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the parent
|
// Read the parent
|
||||||
|
|
|
@ -123,8 +123,8 @@ void CFileHeader::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
|
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in TYPE block line %d, the Version argument is invalid.",
|
warning (true, "read", "XML Syntax error in TYPE block line %p, the Version argument is invalid.",
|
||||||
(ptrdiff_t)root->content);
|
root->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the value
|
// Delete the value
|
||||||
|
@ -173,8 +173,8 @@ void CFileHeader::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
|
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning (true, "read", "XML Syntax error in TYPE block line %d, the State argument is invalid.",
|
warning (true, "read", "XML Syntax error in TYPE block line %p, the State argument is invalid.",
|
||||||
(ptrdiff_t)root->content);
|
root->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the value
|
// Delete the value
|
||||||
|
|
|
@ -110,8 +110,8 @@ void CType::read (xmlNodePtr root)
|
||||||
if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "TYPE") != 0) )
|
if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "TYPE") != 0) )
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning2 (true, "read", "XML Syntax error in block line %d, node (%s) should be TYPE.",
|
warning2 (true, "read", "XML Syntax error in block line %p, node (%s) should be TYPE.",
|
||||||
(ptrdiff_t)root->content, root->name);
|
root->content, root->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the type
|
// Read the type
|
||||||
|
@ -138,8 +138,8 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
|
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning2 (true, "read", "XML Syntax error in TYPE block line %d, the Type value is unknown (%s).",
|
warning2 (true, "read", "XML Syntax error in TYPE block line %p, the Type value is unknown (%s).",
|
||||||
(ptrdiff_t)root->content, valueStr.c_str ());
|
root->content, valueStr.c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the value
|
// Delete the value
|
||||||
|
@ -148,8 +148,8 @@ void CType::read (xmlNodePtr root)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning2 (true, "read", "XML Syntax error in TYPE block line %d, the Type argument was not found.",
|
warning2 (true, "read", "XML Syntax error in TYPE block line %p, the Type argument was not found.",
|
||||||
(ptrdiff_t)root->content);
|
root->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the UI
|
// Read the UI
|
||||||
|
@ -256,8 +256,8 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)label);
|
xmlFree ((void*)label);
|
||||||
|
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning2 (true, "read", "XML Syntax error in DEFINITION block line %d, the Value argument was not found.",
|
warning2 (true, "read", "XML Syntax error in DEFINITION block line %p, the Value argument was not found.",
|
||||||
(ptrdiff_t)childPtr->content);
|
childPtr->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the value
|
// Delete the value
|
||||||
|
@ -266,8 +266,8 @@ void CType::read (xmlNodePtr root)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Throw exception
|
// Throw exception
|
||||||
warning2 (true, "read", "XML Syntax error in DEFINITION block line %d, the Label argument was not found.",
|
warning2 (true, "read", "XML Syntax error in DEFINITION block line %p, the Label argument was not found.",
|
||||||
(ptrdiff_t)childPtr->content);
|
childPtr->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// One more
|
// One more
|
||||||
|
|
|
@ -530,7 +530,7 @@ void CLigoConfig::syntaxError (const char *filename, xmlNodePtr xmlNode, const c
|
||||||
vsnprintf( buffer, 1024, format, args );
|
vsnprintf( buffer, 1024, format, args );
|
||||||
va_end( args );
|
va_end( args );
|
||||||
|
|
||||||
errorMessage ("(%s), node (%s), line (%d) :\n%s", filename, xmlNode->name, (ptrdiff_t)xmlNode->content, buffer);
|
errorMessage ("(%s), node (%s), line (%p) :\n%s", filename, xmlNode->name, xmlNode->content, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -59,7 +59,7 @@ void XMLError (xmlNodePtr xmlNode, const char *filename, const char *format, ...
|
||||||
vsnprintf( buffer, 1024, format, args );
|
vsnprintf( buffer, 1024, format, args );
|
||||||
va_end( args );
|
va_end( args );
|
||||||
|
|
||||||
Error (filename, "node (%s), line (%d) : %s", xmlNode->name, (ptrdiff_t)xmlNode->content, buffer);
|
Error (filename, "node (%s), line (%p) : %s", xmlNode->name, xmlNode->content, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -734,10 +734,10 @@ public:
|
||||||
str = "<NoModule>";
|
str = "<NoModule>";
|
||||||
}
|
}
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
sprintf (tmp, "!0x%X", addr);
|
sprintf (tmp, "!0x%p", addr);
|
||||||
str += tmp;
|
str += tmp;
|
||||||
//}
|
//}
|
||||||
str +=" DEBUG:"+toString("0x%08X", addr);
|
str +=" DEBUG:"+toString("0x%p", addr);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -925,7 +925,7 @@ public:
|
||||||
if(*addr == NULL)
|
if(*addr == NULL)
|
||||||
sprintf (tmp, "<NULL>");
|
sprintf (tmp, "<NULL>");
|
||||||
else
|
else
|
||||||
sprintf (tmp, "0x%X", *addr);
|
sprintf (tmp, "0x%p", *addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr)
|
||||||
if (stop==0 && (parse[i] == ',' || parse[i] == ')'))
|
if (stop==0 && (parse[i] == ',' || parse[i] == ')'))
|
||||||
{
|
{
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
sprintf (tmp, "=0x%X", *((ULONG*)(stackAddr) + 2 + pos++));
|
sprintf (tmp, "=0x%p", *((ULONG*)(stackAddr) + 2 + pos++));
|
||||||
str += tmp;
|
str += tmp;
|
||||||
}
|
}
|
||||||
str += parse[i];
|
str += parse[i];
|
||||||
|
|
Loading…
Reference in a new issue