-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,380 additions
and
928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ghidra
updated
7367 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-FileCopyrightText: 2023 Florian Märkl <info@florianmaerkl.de> | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
#include "PrettyXmlEncode.h" | ||
|
||
void PrettyXmlEncode::indent() | ||
{ | ||
for(int i = 0; i < depth; i++) | ||
outStream << " "; | ||
} | ||
|
||
void PrettyXmlEncode::openElement(const ElementId &elemId) | ||
{ | ||
if(elementTagIsOpen) | ||
outStream << ">\n"; | ||
else | ||
elementTagIsOpen = true; | ||
indent(); | ||
depth++; | ||
outStream << '<' << elemId.getName(); | ||
} | ||
|
||
void PrettyXmlEncode::closeElement(const ElementId &elemId) | ||
{ | ||
depth--; | ||
if(elementTagIsOpen) | ||
{ | ||
outStream << "/>\n"; | ||
elementTagIsOpen = false; | ||
} | ||
else | ||
{ | ||
indent(); | ||
outStream << "</" << elemId.getName() << ">\n"; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-FileCopyrightText: 2023 Florian Märkl <info@florianmaerkl.de> | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
#ifndef PRETTY_XML_ENCODE_H | ||
#define PRETTY_XML_ENCODE_H | ||
|
||
#include <marshal.hh> | ||
|
||
class PrettyXmlEncode: public XmlEncode | ||
{ | ||
private: | ||
int depth = 0; | ||
void indent(); | ||
|
||
public: | ||
PrettyXmlEncode(std::ostream &s) : XmlEncode(s) {} | ||
void openElement(const ElementId &elemId) override; | ||
void closeElement(const ElementId &elemId) override; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.