summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-05-14 19:55:59 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-05-14 19:55:59 (GMT)
commit64200b5e975b19f38f9a68569b98c6f53e6fe4d9 (patch)
treed211455e0cef95445694e7630c63dd0e90d3f3a5 /src/util.cpp
parenta9f41d99f3651cd66850e9020bc3af7cb559306e (diff)
downloadDoxygen-64200b5e975b19f38f9a68569b98c6f53e6fe4d9.zip
Doxygen-64200b5e975b19f38f9a68569b98c6f53e6fe4d9.tar.gz
Doxygen-64200b5e975b19f38f9a68569b98c6f53e6fe4d9.tar.bz2
Release-1.3-20030514
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index d51c449..910a682 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -823,11 +823,12 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
do // for each scope (starting with full scope and going to empty scope)
{
QCString fullName = word;
+ QCString prefix;
replaceNamespaceAliases(fullName,fullName.length());
if (scopeOffset>0)
{
- QCString prefix = scopeName.left(scopeOffset);
+ prefix = scopeName.left(scopeOffset);
replaceNamespaceAliases(prefix,scopeOffset);
fullName.prepend(prefix+"::");
}
@@ -2518,7 +2519,7 @@ bool resolveRef(/* in */ const char *scName,
GroupDef *gd = 0;
// check if nameStr is a member or global.
- //printf("getDefs(scope=%s,name=%s,args=%s\n",scopeStr.data(),nameStr.data(),argsStr.data());
+ //printf("getDefs(scope=%s,name=%s,args=%s)\n",scopeStr.data(),nameStr.data(),argsStr.data());
if (getDefs(scopeStr,nameStr,argsStr,
md,cd,fd,nd,gd,
scopePos==0 && !memberScopeFirst,
@@ -3192,6 +3193,12 @@ QCString stripScope(const char *name)
}
+/*! Convert nibble (range 0..15) to hex char */
+static char nibbleToHex(int n)
+{
+ return (n < 10) ? ('0'+n) : ('a'+n-10);
+}
+
/*! Converts a string to an XML-encoded string */
QCString convertToXML(const char *s)
{
@@ -3208,7 +3215,18 @@ QCString convertToXML(const char *s)
case '&': result+="&amp;"; break;
case '\'': result+="&apos;"; break;
case '"': result+="&quot;"; break;
- default: result+=c; break;
+ default:
+ if (c<0)
+ {
+ result+=(QCString)"&#x" +
+ nibbleToHex((((uchar)c)>>4)&0xf)+
+ nibbleToHex(c&0xf)+";";
+ }
+ else
+ {
+ result+=c;
+ }
+ break;
}
}
return result;