gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
docs/config/doxygen_1.9.2_readable_link_names_patch.diff
1 diff --git a/src/config.xml.dist b/src/config.xml
2 index cd19d72..e2c51a5 100644
3 --- a/src/config.xml.dist
4 +++ b/src/config.xml
5 @@ -3877,20 +3877,28 @@ UML notation for the relationships.
6 ]]>
7 </docs>
8 </option>
9 <option type='bool' id='DOT_CLEANUP' defval='1'>
10 <docs>
11 <![CDATA[
12 If the \c DOT_CLEANUP tag is set to \c YES, doxygen will
13 remove the intermediate files that are used to generate the various graphs.
14 <br>Note:
15 This setting is not only used for dot files but also for msc temporary files.
16 +]]>
17 + </docs>
18 + </option>
19 + <option type='bool' id='USE_READABLE_ANCHORS' defval='0'>
20 + <docs>
21 +<![CDATA[
22 + If the \c USE_READABLE_ANCHORS tag is set to \c YES then anchor links (#)
23 + will incorporate the method name instead of only the md5 hash.
24 ]]>
25 </docs>
26 </option>
27 <option type='obsolete' id='USE_WINDOWS_ENCODING'/>
28 <option type='obsolete' id='DETAILS_AT_TOP'/>
29 <option type='obsolete' id='QTHELP_FILE'/>
30 <option type='obsolete' id='QTHELP_CONFIG'/>
31 <option type='obsolete' id='DOXYGEN2QTHELP_LOC'/>
32 <option type='obsolete' id='MAX_DOT_GRAPH_WIDTH'/>
33 <option type='obsolete' id='MAX_DOT_GRAPH_HEIGHT'/>
34 diff --git a/src/memberdef.cpp.dist b/src/memberdef.cpp
35 index d0cb7da..a5d1924 100644
36 --- a/src/memberdef.cpp.dist
37 +++ b/src/memberdef.cpp
38 @@ -1619,20 +1619,24 @@ QCString MemberDefImpl::getReference() const
39 return "";
40 }
41
42 QCString MemberDefImpl::anchor() const
43 {
44 QCString result=m_impl->anc;
45 if (m_impl->groupAlias) return m_impl->groupAlias->anchor();
46 if (m_impl->templateMaster) return m_impl->templateMaster->anchor();
47 if (m_impl->enumScope && m_impl->enumScope!=this) // avoid recursion for C#'s public enum E { E, F }
48 {
49 + if (Config_getBool(USE_READABLE_ANCHORS))
50 + {
51 + result.replace(0, 3, ":");
52 + }
53 result.prepend(m_impl->enumScope->anchor());
54 }
55 if (getGroupDef())
56 {
57 if (m_impl->groupMember)
58 {
59 result=m_impl->groupMember->anchor();
60 }
61 else if (getReference().isEmpty())
62 {
63 @@ -4135,22 +4139,37 @@ void MemberDefImpl::setAnchor()
64 }
65 if (!m_impl->requiresClause.isEmpty())
66 {
67 memAnchor+=" "+m_impl->requiresClause;
68 }
69
70 // convert to md5 hash
71 uchar md5_sig[16];
72 char sigStr[33];
73 MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
74 - MD5SigToString(md5_sig,sigStr);
75 - m_impl->anc = QCString("a")+sigStr;
76 +
77 + if (Config_getBool(USE_READABLE_ANCHORS))
78 + {
79 + // Copy function name into buffer, replace any non alpha with underscores
80 + qsnprintf(sigStr,sizeof(sigStr),"%s",name().data());
81 + char * pSigStr = sigStr;
82 + size_t len = sizeof(sigStr) - 1;
83 + while (pSigStr && (len-- > 0)) {
84 + if (!isalnum(*pSigStr)) *pSigStr = '_';
85 + }
86 + m_impl->anc = sigStr;
87 + }
88 + else
89 + {
90 + MD5SigToString(md5_sig,sigStr);
91 + m_impl->anc = QCString("a")+sigStr;
92 + }
93 }
94
95 void MemberDefImpl::setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
96 const QCString &fileName,int startLine,
97 bool hasDocs,MemberDef *member)
98 {
99 //printf("%s MemberDefImpl::setGroupDef(%s)\n",qPrint(name()),qPrint(gd->name()));
100 m_impl->group=gd;
101 m_impl->grouppri=pri;
102 m_impl->groupFileName=fileName;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.