summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 37c5e62..75a86a1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -3702,6 +3702,32 @@ void createSubDirs(const Dir &d)
}
}
+void clearSubDirs(const Dir &d)
+{
+ if (Config_getBool(CREATE_SUBDIRS))
+ {
+ // remove empty subdirectories
+ for (int l1=0;l1<16;l1++)
+ {
+ QCString subdir;
+ subdir.sprintf("d%x",l1);
+ for (int l2=0;l2<256;l2++)
+ {
+ QCString subsubdir;
+ subsubdir.sprintf("d%x/d%02x",l1,l2);
+ if (d.exists(subsubdir.str()) && d.isEmpty(subsubdir.str()))
+ {
+ d.rmdir(subsubdir.str());
+ }
+ }
+ if (d.exists(subdir.str()) && d.isEmpty(subdir.str()))
+ {
+ d.rmdir(subdir.str());
+ }
+ }
+ }
+}
+
/*! Input is a scopeName, output is the scopename split into a
* namespace part (as large as possible) and a classname part.
*/
@@ -5179,6 +5205,12 @@ QCString rtfFormatBmkStr(const QCString &name)
// substitute a short arbitrary string for the name
// supplied, and keep track of the correspondence
// between names and strings.
+ auto it = g_tagMap.find(name.str());
+ if (it!=g_tagMap.end()) // already known
+ {
+ return QCString(it->second);
+ }
+
QCString tag = g_nextTag;
auto result = g_tagMap.insert( std::make_pair(name.str(), g_nextTag.str()) );