diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2002-12-24 19:52:54 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2002-12-24 19:52:54 (GMT) |
commit | 04dd14e8f14f65481ef7ed7a29e79a30c5fe301d (patch) | |
tree | 74b9c804cdbc689945d204f1c854e9bfa1ec5c01 /src/util.cpp | |
parent | 1a8ff6f0e75b0db2a4ff1f5eb63631c94085b01e (diff) | |
download | Doxygen-04dd14e8f14f65481ef7ed7a29e79a30c5fe301d.zip Doxygen-04dd14e8f14f65481ef7ed7a29e79a30c5fe301d.tar.gz Doxygen-04dd14e8f14f65481ef7ed7a29e79a30c5fe301d.tar.bz2 |
Release-1.3-rc2-20021224
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/util.cpp b/src/util.cpp index 7487af3..f9bfea0 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -317,15 +317,16 @@ QCString generateMarker(int id) */ QCString stripFromPath(const QCString &path) { - const char *s=Config_getList("STRIP_FROM_PATH").first(); + QStrList &l = Config_getList("STRIP_FROM_PATH"); + const char *s=l.first(); while (s) { QCString prefix = s; - if (path.left(prefix.length())==prefix) + if (stricmp(path.left(prefix.length()),prefix)==0) // case insensitive compare { return path.right(path.length()-prefix.length()); } - s = Config_getList("STRIP_FROM_PATH").next(); + s = l.next(); } return path; } @@ -1687,11 +1688,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, return FALSE; // more than a difference in name -> no match } } - else // maybe dst has a name while src has not + else // maybe dst has a name while src has not { dstPos++; while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++; - if (dstPos!=dstAType.length()) + if (dstPos!=dstAType.length() || !srcA->name.isEmpty()) { NOMATCH return FALSE; // nope not a name -> no match @@ -1718,13 +1719,17 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, { srcPos++; while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++; - if (srcPos!=srcAType.length()) + if (srcPos!=srcAType.length() || !dstA->name.isEmpty()) { NOMATCH return FALSE; // nope not a name -> no match } } } + else + { + printf("something else!\n"); + } } MATCH return TRUE; @@ -2574,8 +2579,6 @@ bool resolveLink(/* in */ const char *scName, /* out */ QCString &resAnchor ) { - //printf("resolveLink clName=`%s' lr=`%s'\n",scName,lr); - *resContext=0; *resPageInfo=0; @@ -2583,6 +2586,8 @@ bool resolveLink(/* in */ const char *scName, FileDef *fd; GroupDef *gd; PageInfo *pi; + ClassDef *cd; + NamespaceDef *nd; bool ambig; if (linkRef.isEmpty()) // no reference name! { @@ -2620,7 +2625,17 @@ bool resolveLink(/* in */ const char *scName, *resContext=fd; return TRUE; } - else // probably a class or member reference + else if ((cd=getClass(linkRef))) + { + *resContext=cd; + return TRUE; + } + else if ((nd=Doxygen::namespaceSDict.find(linkRef))) + { + *resContext=nd; + return TRUE; + } + else // probably a member reference { MemberDef *md; bool res = resolveRef(scName,lr,inSeeBlock,resContext,&md); |