diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-08-06 18:30:19 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-08-06 18:30:19 (GMT) |
commit | c60743a4b63f71f2cced85b729cc0d32b66e0500 (patch) | |
tree | 33a1b18dfdc6a1a21a166b912fd111530aa5f828 /addon/doxyparse | |
parent | 533c5cadfad41763f294c49f8cb7a19fbc5a19d8 (diff) | |
download | Doxygen-c60743a4b63f71f2cced85b729cc0d32b66e0500.zip Doxygen-c60743a4b63f71f2cced85b729cc0d32b66e0500.tar.gz Doxygen-c60743a4b63f71f2cced85b729cc0d32b66e0500.tar.bz2 |
Some fixes and restructuring
- moved unescapeCharsInString to util.cpp
- restructured flow keyword counting
- make flow keyword counting work for python and fortran code as well
Diffstat (limited to 'addon/doxyparse')
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index babf3d7..2f6e32d 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -125,25 +125,6 @@ static bool ignoreStaticExternalCall(MemberDef *context, MemberDef *md) { } } -// that undo some replacing by src/util.cpp escapeCharsInString(...) -// * https://github.com/doxygen/doxygen/pull/577 -std::string unescapeCharsInString(std::string name) { - QCString module = QCString(name.c_str()); - bool replaced = false; - if (module.find('.') == -1) { - module.replace(QRegExp("_8"), "."); - replaced = true; - } - if (module.find('/') == -1) { - module.replace(QRegExp("_2"), "/"); - replaced = true; - } - if (replaced) { - module.replace(QRegExp("__"), "_"); - } - return module.data(); -} - static void startYamlDocument() { printf("---\n"); } @@ -151,7 +132,7 @@ static void printFile(std::string file) { printf("%s:\n", file.c_str()); } static void printModule(std::string module) { - printf(" \"%s\":\n", unescapeCharsInString(module).c_str()); + printf(" \"%s\":\n", unescapeCharsInString(module.c_str()).data()); } static void printClassInformation(std::string information) { printf(" information: %s\n", information.c_str()); @@ -185,7 +166,7 @@ static void printUses() { static void printReferenceTo(std::string type, std::string signature, std::string defined_in) { printf(" - \"%s\":\n", signature.substr(0, 1022).c_str()); printf(" type: %s\n", type.c_str()); - printf(" defined_in: \"%s\"\n", unescapeCharsInString(defined_in).c_str()); + printf(" defined_in: \"%s\"\n", unescapeCharsInString(defined_in.c_str()).data()); } static void printNumberOfConditionalPaths(MemberDef* md) { printf(" conditional_paths: %d\n", md->numberOfFlowKeyWords()); @@ -451,7 +432,7 @@ int main(int argc,char **argv) { } if (qstrcmp(&argv[1][2], "version") == 0) { QCString versionString = getVersion(); - printf("%s\n", versionString); + printf("%s\n", versionString.data()); exit(0); } |