diff options
| author | Tor Aamodt <[email protected]> | 2025-02-10 17:35:31 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-02-10 17:35:31 -0800 |
| commit | 0e39753a623978eb37bf044b21fde1a5909bff03 (patch) | |
| tree | 13416ab3a165dde580fe847b06bde7c966482088 /src/accelwattch/xmlParser.cc | |
| parent | 6b244a5d3be7811f16c312905c1c7fee137ac7a4 (diff) | |
| parent | 48af0c94ca6d7b05f800f535b3de4cefafcfa655 (diff) | |
Merge pull request #313 from accel-sim/dev
Purdue Updates Merging
Diffstat (limited to 'src/accelwattch/xmlParser.cc')
| -rw-r--r-- | src/accelwattch/xmlParser.cc | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/accelwattch/xmlParser.cc b/src/accelwattch/xmlParser.cc index 8f49b39..780d2ad 100644 --- a/src/accelwattch/xmlParser.cc +++ b/src/accelwattch/xmlParser.cc @@ -1236,12 +1236,10 @@ static NextToken GetNextToken(XML *pXML, int *pcbToken, // Indicate we are dealing with text *pType = eTokenText; while ((ch = getNextChar(pXML))) { - if - XML_isSPACECHAR(ch) { - indexStart++; - break; - } - else if (ch == _CXML('/')) { + if XML_isSPACECHAR (ch) { + indexStart++; + break; + } else if (ch == _CXML('/')) { // If we find a slash then this maybe text or a short hand end tag // Peek at the next character to see it we have short hand end tag ch = pXML->lpXML[pXML->nIndex]; @@ -2193,15 +2191,15 @@ int XMLNode::CreateXMLStringR(XMLNodeData *pEntry, XMLSTR lpszMarker, nResult++; } } else - // If there are child nodes we need to terminate the start tag - if (nElementI) { - if (lpszMarker) lpszMarker[nResult - 1] = _CXML('>'); - if (nFormat >= 0) { - if (lpszMarker) lpszMarker[nResult] = _CXML('\n'); - nResult++; - } - } else - nResult--; + // If there are child nodes we need to terminate the start tag + if (nElementI) { + if (lpszMarker) lpszMarker[nResult - 1] = _CXML('>'); + if (nFormat >= 0) { + if (lpszMarker) lpszMarker[nResult] = _CXML('\n'); + nResult++; + } + } else + nResult--; } // Calculate the child format for when we recurse. This is used to |
