From d58b347a9949e95443b8efe100a9aba835d68809 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 19 Dec 2016 15:21:59 +0100 Subject: [PATCH] Changed: Display line numbers instead of a pointer --- code/nel/src/georges/form.cpp | 8 ++++---- code/nel/src/georges/form_dfn.cpp | 34 +++++++++++++++---------------- code/nel/src/georges/header.cpp | 8 ++++---- code/nel/src/georges/type.cpp | 20 +++++++++--------- code/nel/src/ligo/ligo_config.cpp | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/code/nel/src/georges/form.cpp b/code/nel/src/georges/form.cpp index 07f4c2adf..22ed15a2e 100644 --- a/code/nel/src/georges/form.cpp +++ b/code/nel/src/georges/form.cpp @@ -188,8 +188,8 @@ void CForm::read (xmlNodePtr node, CFormLoader &loader, CFormDfn *dfn, const std if ( ((const char*)node->name == NULL) || (strcmp ((const char*)node->name, "FORM") != 0) ) { // Make an error message - warning (true, "read", "XML Syntax error in block line %p, node (%s) should be FORM.", - node->content, node->name); + warning (true, "read", "XML Syntax error in block line %d, node (%s) should be FORM.", + (sint)node->line, node->name); } // Get first struct node @@ -197,8 +197,8 @@ void CForm::read (xmlNodePtr node, CFormLoader &loader, CFormDfn *dfn, const std if (child == NULL) { // Throw exception - warning (true, "read", "Syntax error in block line %p, node (%s) should have a STRUCT child node.", - node->content, node->name); + warning (true, "read", "Syntax error in block line %d, node (%s) should have a STRUCT child node.", + (sint)node->line, node->name); } // Read the struct diff --git a/code/nel/src/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index 86733470c..3f271b976 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -130,7 +130,7 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "DFN") != 0) ) { // Throw exception - warning (true, "read", "XML Syntax error in block line %p, node (%s) should be DFN.", root->content, root->name); + warning (true, "read", "XML Syntax error in block line %d, node (%s) should be DFN.", (sint)root->line, root->name); } // Count the parent @@ -162,8 +162,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const else { // Throw exception - warning (true, "read", "XML Syntax error in block (%s) line %p, aguments Name not found.", - parent->name, parent->content); + warning (true, "read", "XML Syntax error in block (%s) line %d, aguments Name not found.", + parent->name, (sint)parent->line); } // Next parent @@ -245,8 +245,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const if ((Entries[childNumber].Type == NULL) && !forceLoad) { // Throw exception - warning (true, "read", "In XML block (%s) line %p, file not found %s.", - child->name, child->content, Entries[childNumber].Filename.c_str ()); + warning (true, "read", "In XML block (%s) line %d, file not found %s.", + child->name, (sint)child->line, Entries[childNumber].Filename.c_str ()); } // Read the default value @@ -262,8 +262,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const else { // Throw exception - warning (true, "read", "XML In block (%s) line %p, no filename found for the .typ file.", - child->name, child->content); + warning (true, "read", "XML In block (%s) line %d, no filename found for the .typ file.", + child->name, (sint)child->line); } } else if (stricmp (typeName, "Dfn") == 0) @@ -279,15 +279,15 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const if ((Entries[childNumber].Dfn == NULL) && !forceLoad) { // Throw exception - warning (true, "read", "XML In block (%s) line %p, file not found %s.", - child->name, child->content, Entries[childNumber].Filename.c_str ()); + warning (true, "read", "XML In block (%s) line %d, file not found %s.", + child->name, (sint)child->line, Entries[childNumber].Filename.c_str ()); } } else { // Throw exception - warning (true, "read", "XML In block (%s) line %p, no filename found for the .typ file.", - child->name, child->content); + warning (true, "read", "XML In block (%s) line %d, no filename found for the .typ file.", + child->name, (sint)child->line); } } else if (stricmp (typeName, "DfnPointer") == 0) @@ -297,8 +297,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const else { // Throw exception - warning (true, "read", "XML Syntax error in block (%s) line %p, element has not a valid type name attribut \"Type = %s\".", - child->name, child->content, typeName); + warning (true, "read", "XML Syntax error in block (%s) line %d, element has not a valid type name attribut \"Type = %s\".", + child->name, (sint)child->line, typeName); } // Delete the value @@ -307,8 +307,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const else { // Throw exception - warning (true, "read", "XML Syntax error in block (%s) line %p, element has no type name attribut \"Type = [Type][Dfn][DfnPointer]\".", - child->name, child->content); + warning (true, "read", "XML Syntax error in block (%s) line %d, element has no type name attribut \"Type = [Type][Dfn][DfnPointer]\".", + child->name, (sint)child->line); } // Get the array attrib @@ -325,8 +325,8 @@ void CFormDfn::read (xmlNodePtr root, CFormLoader &loader, bool forceLoad, const else { // Throw exception - warning (true, "read", "XML Syntax error in block (%s) line %p, aguments Name not found.", - root->name, root->content); + warning (true, "read", "XML Syntax error in block (%s) line %d, aguments Name not found.", + root->name, (sint)root->line); } // Next child diff --git a/code/nel/src/georges/header.cpp b/code/nel/src/georges/header.cpp index fcafd10e4..f814d5802 100644 --- a/code/nel/src/georges/header.cpp +++ b/code/nel/src/georges/header.cpp @@ -112,8 +112,8 @@ void CFileHeader::read (xmlNodePtr root) xmlFree ((void*)value); // Throw exception - warning (true, "read", "XML Syntax error in TYPE block line %p, the Version argument is invalid.", - root->content); + warning (true, "read", "XML Syntax error in TYPE block line %d, the Version argument is invalid.", + (sint)root->line); } // Delete the value @@ -145,8 +145,8 @@ void CFileHeader::read (xmlNodePtr root) xmlFree ((void*)value); // Throw exception - warning (true, "read", "XML Syntax error in TYPE block line %p, the State argument is invalid.", - root->content); + warning (true, "read", "XML Syntax error in TYPE block line %d, the State argument is invalid.", + (sint)root->line); } // Delete the value diff --git a/code/nel/src/georges/type.cpp b/code/nel/src/georges/type.cpp index 951acc3e0..cc3c44d6e 100644 --- a/code/nel/src/georges/type.cpp +++ b/code/nel/src/georges/type.cpp @@ -109,8 +109,8 @@ void CType::read (xmlNodePtr root) if ( ((const char*)root->name == NULL) || (strcmp ((const char*)root->name, "TYPE") != 0) ) { // Throw exception - warning2 (true, "read", "XML Syntax error in block line %p, node (%s) should be TYPE.", - root->content, root->name); + warning2 (true, "read", "XML Syntax error in block line %d, node (%s) should be TYPE.", + (sint)root->line, root->name); } // Read the type @@ -137,8 +137,8 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)value); // Throw exception - warning2 (true, "read", "XML Syntax error in TYPE block line %p, the Type value is unknown (%s).", - root->content, valueStr.c_str ()); + warning2 (true, "read", "XML Syntax error in TYPE block line %d, the Type value is unknown (%s).", + (sint)root->line, valueStr.c_str ()); } // Delete the value @@ -147,8 +147,8 @@ void CType::read (xmlNodePtr root) else { // Throw exception - warning2 (true, "read", "XML Syntax error in TYPE block line %p, the Type argument was not found.", - root->content); + warning2 (true, "read", "XML Syntax error in TYPE block line %d, the Type argument was not found.", + (sint)root->line); } // Read the UI @@ -255,8 +255,8 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)label); // Throw exception - warning2 (true, "read", "XML Syntax error in DEFINITION block line %p, the Value argument was not found.", - childPtr->content); + warning2 (true, "read", "XML Syntax error in DEFINITION block line %d, the Value argument was not found.", + (sint)childPtr->line); } // Delete the value @@ -265,8 +265,8 @@ void CType::read (xmlNodePtr root) else { // Throw exception - warning2 (true, "read", "XML Syntax error in DEFINITION block line %p, the Label argument was not found.", - childPtr->content); + warning2 (true, "read", "XML Syntax error in DEFINITION block line %d, the Label argument was not found.", + (sint)childPtr->line); } // One more diff --git a/code/nel/src/ligo/ligo_config.cpp b/code/nel/src/ligo/ligo_config.cpp index 0025d4290..d898e44ed 100644 --- a/code/nel/src/ligo/ligo_config.cpp +++ b/code/nel/src/ligo/ligo_config.cpp @@ -530,7 +530,7 @@ void CLigoConfig::syntaxError (const std::string &filename, xmlNodePtr xmlNode, vsnprintf( buffer, 1024, format, args ); va_end( args ); - errorMessage ("(%s), node (%s), line (%p) :\n%s", filename.c_str(), xmlNode->name, xmlNode->content, buffer); + errorMessage ("(%s), node (%s), line (%d) :\n%s", filename.c_str(), xmlNode->name, (sint)xmlNode->line, buffer); } // ***************************************************************************