summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/code.l38
-rw-r--r--src/compound.xsd4
-rw-r--r--src/compound_xsd.h4
-rw-r--r--src/config.l64
-rw-r--r--src/doxygen.cpp26
-rw-r--r--src/doxytag.l3
-rw-r--r--src/htmlhelp.cpp41
-rw-r--r--src/lang_cfg.h1
-rw-r--r--src/language.cpp9
-rw-r--r--src/latexgen.cpp3
-rw-r--r--src/libdoxygen.pro.in1
-rw-r--r--src/memberdef.cpp38
-rw-r--r--src/scanner.l2
-rw-r--r--src/translator_es.h49
-rw-r--r--src/translator_je.h67
-rw-r--r--src/translator_jp.h142
-rw-r--r--src/util.cpp50
-rw-r--r--src/util.h12
-rw-r--r--src/xmlgen.cpp24
19 files changed, 362 insertions, 216 deletions
diff --git a/src/code.l b/src/code.l
index 37a87d9..9680192 100644
--- a/src/code.l
+++ b/src/code.l
@@ -648,19 +648,17 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
QCString className=clName;
if (className.isEmpty()) return;
ClassDef *cd=0;
+ MemberDef *md=0;
if (!g_theVarContext.findVariable(className)) // not a local variable
{
Definition *d = g_currentDefinition;
- cd = getResolvedClass(d,g_sourceFileDef,className);
- if (cd==0 && (i=className.find('<'))!=-1)
+ cd = getResolvedClass(d,g_sourceFileDef,className,&md);
+ if (cd==0 && md==0 && (i=className.find('<'))!=-1)
{
- cd=getResolvedClass(d,g_sourceFileDef,className.left(i));
+ cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md);
}
}
- else
- {
- }
if (cd && cd->isLinkable()) // is it a linkable class
{
//printf("is linkable class %s\n",clName);
@@ -677,17 +675,33 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
}
}
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,className);
+ if (md)
+ {
+ Definition *d = md->getOuterScope()==Doxygen::globalScope ?
+ md->getBodyDef() : md->getOuterScope();
+ if (md->getGroupDef()) d = md->getGroupDef();
+ if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef)
+ {
+ addDocCrossReference(g_currentMemberDef,md);
+ }
+ }
}
else
{
- //printf("class %s not linkable! cd=%p\n",clName,cd);
- //printf("typeOnly=%d\n",typeOnly);
- if (cd==0 && !typeOnly) // not a class, see if it is a global enum/variable/typedef.
+ //printf("class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly);
+ if (md!=0 || (cd==0 && !typeOnly)) // not a class, see if it is a global enum/variable/typedef.
{
- MemberDef *md = setCallContextForVar(clName);
- //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");
- if (md && (g_currentDefinition==0 || isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)!=-1))
+ if (md==0) // not found as a typedef
+ {
+ md = setCallContextForVar(clName);
+ if (md && g_currentDefinition!=0 && !isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)==-1)
+ {
+ md=0; // variable not accessible
+ }
+ }
+ if (md)
{
+ //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
//printf("definition %s\n",d?d->name().data():"<none>");
diff --git a/src/compound.xsd b/src/compound.xsd
index 5844f07..4937ff0 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -120,7 +120,7 @@
<xsd:attribute name="mutable" type="DoxBool" />
</xsd:complexType>
- <xsd:complexType name="descriptionType">
+ <xsd:complexType name="descriptionType" mixed="true">
<xsd:sequence>
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
@@ -244,7 +244,7 @@
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalS2Type" minOccurs="0" />
- </xsd:sequencee
+ </xsd:sequence>
<xsd:attribute name="id" />
</xsd:complexType>
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index d84816b..6ec95e1 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -120,7 +120,7 @@
" <xsd:attribute name=\"mutable\" type=\"DoxBool\" />\n"
" </xsd:complexType>\n"
"\n"
-" <xsd:complexType name=\"descriptionType\">\n"
+" <xsd:complexType name=\"descriptionType\" mixed=\"true\">\n"
" <xsd:sequence>\n"
" <xsd:element name=\"para\" type=\"docParaType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"sect1\" type=\"docSect1Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
@@ -244,7 +244,7 @@
" <xsd:element name=\"para\" type=\"docParaType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"sect3\" type=\"docSect3Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalS2Type\" minOccurs=\"0\" />\n"
-" </xsd:sequencee\n"
+" </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n"
" </xsd:complexType>\n"
"\n"
diff --git a/src/config.l b/src/config.l
index f07ba8a..b42f20d 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1175,38 +1175,38 @@ void Config::check()
// }
//
// }
- // check perl path
- bool found=FALSE;
- QCString &perlPath = Config_getString("PERL_PATH");
- if (perlPath.isEmpty())
- {
- QFileInfo fi;
- fi.setFile("/usr/bin/perl");
- if (fi.exists())
- {
- perlPath="/usr/bin/perl";
- found=TRUE;
- }
- else
- {
- fi.setFile("/usr/local/bin/perl");
- if (fi.exists())
- {
- perlPath="/usr/local/bin/perl";
- found=TRUE;
- }
- }
- }
- if (!found)
- {
- QFileInfo fi(perlPath);
- if (!fi.exists())
- {
- config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
- "user specified (%s) location\n",
- perlPath.data());
- }
- }
+// // check perl path
+// bool found=FALSE;
+// QCString &perlPath = Config_getString("PERL_PATH");
+// if (perlPath.isEmpty())
+// {
+// QFileInfo fi;
+// fi.setFile("/usr/bin/perl");
+// if (fi.exists())
+// {
+// perlPath="/usr/bin/perl";
+// found=TRUE;
+// }
+// else
+// {
+// fi.setFile("/usr/local/bin/perl");
+// if (fi.exists())
+// {
+// perlPath="/usr/local/bin/perl";
+// found=TRUE;
+// }
+// }
+// }
+// if (!found)
+// {
+// QFileInfo fi(perlPath);
+// if (!fi.exists())
+// {
+// config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
+// "user specified (%s) location\n",
+// perlPath.data());
+// }
+// }
#undef PUTENV
#undef SEP
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 76ab5de..b380d07 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2257,6 +2257,11 @@ static void buildFunctionList(Entry *root)
matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,unl,ucl)
)
{
+ GroupDef *gd=0;
+ if (root->groups->first()!=0)
+ {
+ gd = Doxygen::groupSDict[root->groups->first()->groupname.data()];
+ }
//printf("match!\n");
// see if we need to create a new member
found=(nd && rnd && nsName==rnsName) || // members are in the same namespace
@@ -2265,6 +2270,11 @@ static void buildFunctionList(Entry *root)
)
);
// otherwise, allow a duplicate global member with the same argument list
+ if (!found && gd && gd==md->getGroupDef())
+ {
+ // member is already in the group, so we don't want to add it again.
+ found=TRUE;
+ }
//printf("combining function with prototype found=%d in namespace %s\n",
// found,nsName.data());
@@ -2325,12 +2335,13 @@ static void buildFunctionList(Entry *root)
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
// merge ingroup specifiers
- if (md->getGroupDef()==0 && root->groups->first())
+ if (md->getGroupDef()==0 && root->groups->first()!=0)
{
+ //printf("new member is grouped, existing member not\n");
// if we do addMemberToGroups here an undocumented declaration may prevent
// the documented implementation below it from being added
//addMemberToGroups(root,md);
- GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
+ //GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
if (gd)
{
bool success = gd->insertMember(md);
@@ -2342,8 +2353,13 @@ static void buildFunctionList(Entry *root)
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
{
+ //printf("existing member is grouped, new member not\n");
root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri()));
}
+ else if (md->getGroupDef()!=0 && root->groups->first()!=0)
+ {
+ //printf("both members are grouped\n");
+ }
}
}
}
@@ -3338,12 +3354,12 @@ static bool findClassRelation(
}
baseClassName=stripTemplateSpecifiersFromScope
(removeRedundantWhiteSpace(baseClassName));
- bool baseClassIsTypeDef;
+ MemberDef *baseClassTypeDef;
QCString templSpec;
ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? 0 : cd,
cd->getFileDef(), // todo: is this ok?
baseClassName,
- &baseClassIsTypeDef,
+ &baseClassTypeDef,
&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
//printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
@@ -3444,7 +3460,7 @@ static bool findClassRelation(
else if (mode==DocumentedOnly)
{
QCString usedName;
- if (baseClassIsTypeDef) usedName=biName;
+ if (baseClassTypeDef) usedName=biName;
cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec);
diff --git a/src/doxytag.l b/src/doxytag.l
index 91dfac5..b63ad19 100644
--- a/src/doxytag.l
+++ b/src/doxytag.l
@@ -507,10 +507,9 @@ void usage(const char *name)
fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2003\n\n",
versionString);
fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n");
- fprintf(stderr,"Usage: %s [-t tag_file] [-s index_file] [ html_file [html_file...] ]\n",name);
+ fprintf(stderr,"Usage: %s [-t tag_file] [ html_file [html_file...] ]\n",name);
fprintf(stderr,"Options:\n");
fprintf(stderr," -t <tag_file> Generate tag file <tag_file>.\n");
- fprintf(stderr," -s <index_file> Generate search index <index_file>.\n\n");
fprintf(stderr,"If no HTML files are given all files in the current dir that\n"
"have a .html extension are parsed.\n\n");
exit(1);
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 2036fab..f95725f 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -332,26 +332,27 @@ void HtmlHelp::initialize()
*/
s_languageDict.setAutoDelete(TRUE);
s_languageDict.clear();
- s_languageDict.insert("czech", new QCString("0x405 Czech"));
- s_languageDict.insert("danish", new QCString("0x406 Danish"));
- s_languageDict.insert("dutch", new QCString("0x413 Dutch"));
- s_languageDict.insert("finnish", new QCString("0x40B Finnish"));
- s_languageDict.insert("french", new QCString("0x40C French"));
- s_languageDict.insert("german", new QCString("0x407 German"));
- s_languageDict.insert("greece", new QCString("0x408 Greece"));
- s_languageDict.insert("hungarian",new QCString("0x40E Hungarian"));
- s_languageDict.insert("italian", new QCString("0x410 Italian"));
- s_languageDict.insert("norwegian",new QCString("0x814 Norwegian"));
- s_languageDict.insert("polish", new QCString("0x415 Polish"));
- s_languageDict.insert("portugese",new QCString("0x816 Portuguese(Portugal)"));
- s_languageDict.insert("brazil", new QCString("0x416 Portuguese(Brazil)"));
- s_languageDict.insert("russian", new QCString("0x419 Russian"));
- s_languageDict.insert("spanish", new QCString("0x40A Spannish(Traditional Sort)"));
- s_languageDict.insert("swedish", new QCString("0x41D Swedish"));
- s_languageDict.insert("turkey", new QCString("0x41F Turkey"));
- s_languageDict.insert("japanese", new QCString("0x411 Japanese"));
- s_languageDict.insert("korean", new QCString("0x412 Korean"));
- s_languageDict.insert("chinese", new QCString("0x804 Chinese (PRC)"));
+ s_languageDict.insert("czech", new QCString("0x405 Czech"));
+ s_languageDict.insert("danish", new QCString("0x406 Danish"));
+ s_languageDict.insert("dutch", new QCString("0x413 Dutch"));
+ s_languageDict.insert("finnish", new QCString("0x40B Finnish"));
+ s_languageDict.insert("french", new QCString("0x40C French"));
+ s_languageDict.insert("german", new QCString("0x407 German"));
+ s_languageDict.insert("greece", new QCString("0x408 Greece"));
+ s_languageDict.insert("hungarian", new QCString("0x40E Hungarian"));
+ s_languageDict.insert("italian", new QCString("0x410 Italian"));
+ s_languageDict.insert("norwegian", new QCString("0x814 Norwegian"));
+ s_languageDict.insert("polish", new QCString("0x415 Polish"));
+ s_languageDict.insert("portugese", new QCString("0x816 Portuguese(Portugal)"));
+ s_languageDict.insert("brazil", new QCString("0x416 Portuguese(Brazil)"));
+ s_languageDict.insert("russian", new QCString("0x419 Russian"));
+ s_languageDict.insert("spanish", new QCString("0x40A Spannish(Traditional Sort)"));
+ s_languageDict.insert("swedish", new QCString("0x41D Swedish"));
+ s_languageDict.insert("turkey", new QCString("0x41F Turkey"));
+ s_languageDict.insert("japanese", new QCString("0x411 Japanese"));
+ s_languageDict.insert("japanese-en", new QCString("0x411 Japanese"));
+ s_languageDict.insert("korean", new QCString("0x412 Korean"));
+ s_languageDict.insert("chinese", new QCString("0x804 Chinese (PRC)"));
}
diff --git a/src/lang_cfg.h b/src/lang_cfg.h
index 4e7adfe..bfd0556 100644
--- a/src/lang_cfg.h
+++ b/src/lang_cfg.h
@@ -5,6 +5,7 @@
#define LANG_IT
#define LANG_DE
#define LANG_JP
+#define LANG_JE
#define LANG_ES
#define LANG_FI
#define LANG_RU
diff --git a/src/language.cpp b/src/language.cpp
index e6e052d..858d307 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -43,6 +43,9 @@
#ifdef LANG_JP
#include "translator_jp.h"
#endif
+#ifdef LANG_JE
+#include "translator_je.h"
+#endif
#ifdef LANG_ES
#include "translator_es.h"
#endif
@@ -297,11 +300,7 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorCatalan;
}
#endif
-// else if (L_EQUAL("japanese-sjis"))
-// {
-// theTranslator=new TranslatorJapaneseSjis;
-// }
-#endif
+#endif // ENGLISH_ONLY
else // use the default language (i.e. english)
{
theTranslator=new TranslatorEnglish;
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index d425404..cffcb5b 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1211,7 +1211,8 @@ void LatexGenerator::docify(const char *str)
void LatexGenerator::codify(const char *str)
{
- static bool isJapanese = theTranslator->idLanguage()=="japanese";
+ static bool isJapanese = theTranslator->idLanguage()=="japanese" ||
+ theTranslator->idLanguage()=="japanese-en";
if (str)
{
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 2944c2a..630a39e 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -99,6 +99,7 @@ HEADERS = bufstr.h \
translator_hr.h \
translator_hu.h \
translator_it.h \
+ translator_je.h \
translator_jp.h \
translator_kr.h \
translator_nl.h \
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 139002e..7f6dd61 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -136,13 +136,13 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
//printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
QCString n=a->type.left(vp);
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
- linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
+ linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
}
else // non-function pointer type
{
QCString n=a->type;
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
- linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
+ linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
}
if (!md->isDefine())
{
@@ -167,7 +167,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (vp!=-1) // write the part of the argument type
// that comes after the name
{
- linkifyText(TextGeneratorOLImpl(ol),cd,
+ linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),
md->name(),a->type.right(a->type.length()-vp));
}
if (!a->defval.isEmpty()) // write the default value
@@ -175,7 +175,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
QCString n=a->defval;
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
ol.docify(" = ");
- linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
+ linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
}
a=defArgList->next();
if (a)
@@ -806,21 +806,21 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (getAnonymousEnumType()) // type is an anonymous enum
{
- linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype.left(i),TRUE);
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype.left(i),TRUE);
getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
//ol+=*getAnonymousEnumType()->enumDecl();
- linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype.right(ltype.length()-i-l),TRUE);
+ linkifyText(TextGeneratorOLImpl(ol),d,fileDef,name(),ltype.right(ltype.length()-i-l),TRUE);
}
else
{
ltype = ltype.left(i) + " { ... } " + ltype.right(ltype.length()-i-l);
- linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype,TRUE);
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE);
}
}
}
else
{
- linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype,TRUE);
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE);
}
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
if (htmlOn && Config_getBool("HTML_ALIGN_MEMBERS") && !ltype.isEmpty())
@@ -891,7 +891,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (!isDefine()) ol.writeString(" ");
//ol.docify(argsString());
- linkifyText(TextGeneratorOLImpl(ol),d,name(),argsString());
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),argsString());
}
if (excpString())
@@ -902,7 +902,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!bitfields.isEmpty()) // add bitfields
{
- linkifyText(TextGeneratorOLImpl(ol),d,name(),bitfields.simplifyWhiteSpace());
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),bitfields.simplifyWhiteSpace());
}
else if (hasOneLineInitializer()
//!init.isEmpty() && initLines==0 && // one line initializer
@@ -912,12 +912,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!isDefine())
{
ol.writeString(" = ");
- linkifyText(TextGeneratorOLImpl(ol),d,name(),init.simplifyWhiteSpace());
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),init.simplifyWhiteSpace());
}
else
{
ol.writeNonBreakableSpace(3);
- linkifyText(TextGeneratorOLImpl(ol),d,name(),init);
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),init);
}
}
@@ -1094,10 +1094,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
- linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.left(i));
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
//ol+=*vmd->enumDecl();
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
- linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.right(ldef.length()-i-l));
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-i-l));
found=TRUE;
}
@@ -1122,7 +1122,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
- linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.right(ldef.length()-ei));
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-ei));
}
}
else // not an enum value
@@ -1184,25 +1184,25 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
ol.startMemberDocName();
- linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef);
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
if (hasOneLineInitializer()) // add initializer
{
if (!isDefine())
{
ol.docify(" = ");
- linkifyText(TextGeneratorOLImpl(ol),container,name(),init.simplifyWhiteSpace());
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init.simplifyWhiteSpace());
}
else
{
ol.writeNonBreakableSpace(3);
- linkifyText(TextGeneratorOLImpl(ol),container,name(),init);
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init);
}
}
if (excpString()) // add exception list
{
ol.docify(" ");
- linkifyText(TextGeneratorOLImpl(ol),container,name(),excpString());
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),excpString());
}
}
diff --git a/src/scanner.l b/src/scanner.l
index a895292..b8f0706 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -2860,6 +2860,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
+<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
+ }
<SkipInits,SkipCurly,SkipCurlyCpp>. {
//addToBody(yytext);
}
diff --git a/src/translator_es.h b/src/translator_es.h
index 0ba6422..95f4a7d 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -1342,6 +1342,55 @@ class TranslatorSpanish : public TranslatorAdapter_1_3_3
//////////////////////////////////////////////////////////////////////////
+ /*! When the search engine is enabled this text is put in the index
+ * of each page before the search field.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return "Buscar";
+ }
+
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Resultados de la Búsqueda";
+ }
+
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "Disculpe, no se encontraron documentos que coincidan con su búsqueda.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Se encontró <b>1</b> documento que coincide con su búsqueda.";
+ }
+ else
+ {
+ return "Se encontraron <b>$num</b> documentos que coinciden con su búsqueda. "
+ "Se muestran los mejores resultados primero.";
+ }
+ }
+
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "Coincidencias:";
+ }
+
};
diff --git a/src/translator_je.h b/src/translator_je.h
new file mode 100644
index 0000000..52ca87c
--- /dev/null
+++ b/src/translator_je.h
@@ -0,0 +1,67 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2003 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+/*
+ * translator_jp.h
+ *
+ * 1.2.5)
+ * First Translation
+ * by Kenji Nagamatsu
+ * 1.2.12)
+ * Update and Shift-Jis(_WIN32)
+ * by Ryunosuke Sato (30-Dec-2001)
+ */
+
+#ifndef TRANSLATOR_JE_H
+#define TRANSLATOR_JE_H
+
+class TranslatorJapaneseEn : public TranslatorEnglish
+{
+ public:
+ virtual QCString idLanguage()
+ { return "japanese-en"; }
+ virtual QCString latexLanguageSupportCommand()
+ {
+ return "platex";
+ }
+ /*! returns the name of the package that is included by LaTeX */
+ virtual QCString idLanguageCharset()
+ {
+ if (Config_getBool("USE_WINDOWS_ENCODING"))
+ {
+ return "Shift_JIS";
+ }
+ else
+ {
+ return "euc-jp";
+ }
+ }
+ virtual QCString trRTFansicp()
+ {
+ return "932";
+ }
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
+ virtual QCString trRTFCharSet()
+ {
+ return "128";
+ }
+};
+
+#endif
diff --git a/src/translator_jp.h b/src/translator_jp.h
index 4d7c8e0..ae2e508 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -29,42 +29,7 @@
#ifndef TRANSLATOR_JP_H
#define TRANSLATOR_JP_H
-class TranslatorJapaneseEn : public TranslatorEnglish
-{
- public:
- virtual QCString idLanguage()
- { return "japanese"; }
- virtual QCString latexLanguageSupportCommand()
- {
- return "";
- }
- /*! returns the name of the package that is included by LaTeX */
- virtual QCString idLanguageCharset()
- {
- if (Config_getBool("USE_WINDOWS_ENCODING"))
- {
- return "Shift_JIS";
- }
- else
- {
- return "euc-jp";
- }
- }
- virtual QCString trRTFansicp()
- {
- return "932";
- }
-
- /*! Used as ansicpg for RTF fcharset
- * \see trRTFansicp() for a table of possible values.
- */
- virtual QCString trRTFCharSet()
- {
- return "128";
- }
-};
-
-class TranslatorJapanese : public TranslatorEnglish
+class TranslatorJapanese : public TranslatorAdapter_1_3_3
{
private:
/*! The decode() can change euc into sjis */
@@ -109,30 +74,39 @@ class TranslatorJapanese : public TranslatorEnglish
/*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
- { return decode("²òÀâ"); }
+ { return decode("ÀâÌÀ"); }
/*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
- { return decode("Typedef ¤Î²òÀâ"); }
+ { return decode("·¿ÄêµÁ"); }
/*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
- { return decode("Enum ¤Î²òÀâ"); }
+ { return decode("Îóµó·¿"); }
/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
- { return decode("¥á¥½¥Ã¥É¤Î²òÀâ"); }
+ {
+ if( Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
+ {
+ return decode("¥á¥½¥Ã¥É");
+ }
+ else
+ {
+ return decode("´Ø¿ô");
+ }
+ }
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
if( Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode("¹½Â¤ÂΤβòÀâ");
+ return decode("¹½Â¤ÂÎ");
}
else
{
- return decode("ÊÑ¿ô¤Î²òÀâ");
+ return decode("ÊÑ¿ô");
}
}
@@ -267,11 +241,11 @@ class TranslatorJapanese : public TranslatorEnglish
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode("¥Ç¡¼¥¿¹½Â¤¤Î²òÀâ¤Ç¤¹¡£");
+ return decode("¥Ç¡¼¥¿¹½Â¤¤ÎÀâÌÀ¤Ç¤¹¡£");
}
else
{
- return decode("¥¯¥é¥¹¡¢¹½Â¤ÂΡ¢¶¦ÍÑÂΡ¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î²òÀâ¤Ç¤¹¡£");
+ return decode("¥¯¥é¥¹¡¢¹½Â¤ÂΡ¢¶¦ÍÑÂΡ¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÀâÌÀ¤Ç¤¹¡£");
}
}
@@ -289,7 +263,7 @@ class TranslatorJapanese : public TranslatorEnglish
result+=decode("¥¯¥é¥¹¥á¥ó¥Ð¤Î°ìÍ÷¤Ç¡¢¤½¤ì¤¾¤ì");
if (extractAll) result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥¯¥é¥¹");
}
- result+=decode("¤Î²òÀâ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£");
+ result+=decode("¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£");
return result;
}
@@ -305,7 +279,7 @@ class TranslatorJapanese : public TranslatorEnglish
{
result+=decode("¥Õ¥¡¥¤¥ë¥á¥ó¥Ð¤Î");
}
- result+=decode("°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì¤¬Â°¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î²òÀâ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£");
+ result+=decode("°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì¤¬Â°¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£");
return result;
}
@@ -375,7 +349,7 @@ class TranslatorJapanese : public TranslatorEnglish
* the documentation of all groups.
*/
virtual QCString trModuleDocumentation()
- { return decode("¥â¥¸¥å¡¼¥ë¤Î²òÀâ"); }
+ { return decode("¥â¥¸¥å¡¼¥ë"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
@@ -384,11 +358,11 @@ class TranslatorJapanese : public TranslatorEnglish
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode("¥Ç¡¼¥¿¹½Â¤¤Î²òÀâ");
+ return decode("¥Ç¡¼¥¿¹½Â¤");
}
else
{
- return decode("¥¯¥é¥¹¤Î²òÀâ");
+ return decode("¥¯¥é¥¹");
}
}
@@ -396,19 +370,19 @@ class TranslatorJapanese : public TranslatorEnglish
* the documentation of all files.
*/
virtual QCString trFileDocumentation()
- { return decode("¥Õ¥¡¥¤¥ë¤Î²òÀâ"); }
+ { return decode("¥Õ¥¡¥¤¥ë"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
virtual QCString trExampleDocumentation()
- { return decode("Îã¤Î²òÀâ"); }
+ { return decode("Îã"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
virtual QCString trPageDocumentation()
- { return decode("¥Ú¡¼¥¸¤Î²òÀâ"); }
+ { return decode("¥Ú¡¼¥¸"); }
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
@@ -430,13 +404,13 @@ class TranslatorJapanese : public TranslatorEnglish
* list of typedefs
*/
virtual QCString trTypedefs()
- { return decode("Typedef"); }
+ { return decode("·¿ÄêµÁ"); }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
virtual QCString trEnumerations()
- { return decode("Enum"); }
+ { return decode("Îóµó·¿"); }
/*! This is used in the documentation of a file as a header before the
* list of (global) functions
@@ -454,48 +428,48 @@ class TranslatorJapanese : public TranslatorEnglish
* list of (global) variables
*/
virtual QCString trEnumerationValues()
- { return decode("Enum ÃÍ"); }
+ { return decode("Îóµó·¿¤ÎÃÍ"); }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
virtual QCString trDefineDocumentation()
- { return decode("¥Þ¥¯¥íÄêµÁ¤Î²òÀâ"); }
+ { return decode("¥Þ¥¯¥íÄêµÁ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes
*/
virtual QCString trFunctionPrototypeDocumentation()
- { return decode("´Ø¿ô¥×¥í¥È¥¿¥¤¥×¤Î²òÀâ"); }
+ { return decode("´Ø¿ô¥×¥í¥È¥¿¥¤¥×"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
virtual QCString trTypedefDocumentation()
- { return decode("Typedef ¤Î²òÀâ"); }
+ { return decode("·¿ÄêµÁ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
- { return decode("Enum ¤Î²òÀâ"); }
+ { return decode("Îóµó·¿"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
- { return decode("Enum ÃͤβòÀâ"); }
+ { return decode("Îóµó·¿¤ÎÃÍ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
- { return decode("´Ø¿ô¤Î²òÀâ"); }
+ { return decode("´Ø¿ô"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
virtual QCString trVariableDocumentation()
- { return decode("ÊÑ¿ô¤Î²òÀâ"); }
+ { return decode("ÊÑ¿ô"); }
/*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
@@ -585,13 +559,13 @@ class TranslatorJapanese : public TranslatorEnglish
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
- { return decode("̾Á°¶õ´Ö°ìÍ÷"); }
+ { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹°ìÍ÷"); }
/*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool /*extractAll*/)
{
QCString result=decode("");
- result+=decode("̾Á°¶õ´Ö¤Î°ìÍ÷¤Ç¤¹¡£");
+ result+=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Î°ìÍ÷¤Ç¤¹¡£");
return result;
}
@@ -609,7 +583,7 @@ class TranslatorJapanese : public TranslatorEnglish
* related classes
*/
virtual QCString trRelatedFunctionDocumentation()
- { return decode("¥Õ¥ì¥ó¥É¤È´ØÏ¢¤¹¤ë´Ø¿ô¤Î²òÀâ"); }
+ { return decode("¥Õ¥ì¥ó¥É¤È´ØÏ¢¤¹¤ë´Ø¿ô"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
@@ -630,21 +604,21 @@ class TranslatorJapanese : public TranslatorEnglish
case ClassDef::Exception: result+=decode("Îã³°"); break; //TODO:fixme
}
if (isTemplate) result+=decode(" ¥Æ¥ó¥×¥ì¡¼¥È");
- result+=(QCString)clName+decode(" ¤Î²òÀâ");
+ result+=(QCString)clName;
return result;
}
/*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
- QCString result=decode("")+(QCString)fileName+decode(" ¤Î²òÀâ");
+ QCString result=decode("")+(QCString)fileName;
return result;
}
/*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
- QCString result=decode("̾Á°¶õ´Ö ")+(QCString)namespaceName+decode(" ¤Î²òÀâ");
+ QCString result=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹ ")+(QCString)namespaceName;
return result;
}
@@ -729,17 +703,17 @@ class TranslatorJapanese : public TranslatorEnglish
/*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
- { return decode("̾Á°¶õ´Ö¥á¥ó¥Ð"); }
+ { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¥á¥ó¥Ð"); }
/*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result=decode("¤³¤ì¤Ï");
- result+=decode("̾Á°¶õ´Ö¤Î°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì");
+ result+=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Î°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì");
if (extractAll)
- result+=decode("¤Î̾Á°¶õ´Ö¤Î²òÀâ");
+ result+=decode("¤Î¥Í¡¼¥à¥¹¥Ú¡¼¥¹");
else
- result+=decode("¤¬Â°¤·¤Æ¤¤¤ë̾Á°¶õ´Ö");
+ result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥Í¡¼¥à¥¹¥Ú¡¼¥¹");
result+=decode("¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£");
return result;
}
@@ -747,13 +721,13 @@ class TranslatorJapanese : public TranslatorEnglish
* index of all namespaces.
*/
virtual QCString trNamespaceIndex()
- { return decode("̾Á°¶õ´Öº÷°ú"); }
+ { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹º÷°ú"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
virtual QCString trNamespaceDocumentation()
- { return decode("̾Á°¶õ´Ö¤Î²òÀâ"); }
+ { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
@@ -763,7 +737,7 @@ class TranslatorJapanese : public TranslatorEnglish
* namespaces in a file.
*/
virtual QCString trNamespaces()
- { return decode("̾Á°¶õ´Ö"); }
+ { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990728
@@ -785,7 +759,7 @@ class TranslatorJapanese : public TranslatorEnglish
case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¥Õ¥§¡¼¥¹"); break;
case ClassDef::Exception: result+=decode("Îã³°"); break; //TODO:fixme
}
- result+=decode("¤Î²òÀâ¤Ï¼¡¤Î¥Õ¥¡¥¤¥ë¤«¤éÀ¸À®¤µ¤ì¤Þ¤·¤¿:");
+ result+=decode("¤ÎÀâÌÀ¤Ï¼¡¤Î¥Õ¥¡¥¤¥ë¤«¤éÀ¸À®¤µ¤ì¤Þ¤·¤¿:");
return result;
}
@@ -857,7 +831,7 @@ class TranslatorJapanese : public TranslatorEnglish
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
- return decode("¥³¥ó¥¹¥È¥é¥¯¥¿¤È¥Ç¥¹¥È¥é¥¯¥¿¤Î²òÀâ");
+ return decode("¥³¥ó¥¹¥È¥é¥¯¥¿¤È¥Ç¥¹¥È¥é¥¯¥¿");
}
/*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
@@ -867,7 +841,7 @@ class TranslatorJapanese : public TranslatorEnglish
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
- return decode("²òÀâ¤ò¸«¤ë¡£");
+ return decode("ÀâÌÀ¤ò¸«¤ë¡£");
}
/*! Text for the \\pre command */
virtual QCString trPrecondition()
@@ -984,7 +958,7 @@ class TranslatorJapanese : public TranslatorEnglish
virtual QCString trReferencedBy()
{
- return decode("¸Æ½Ð");
+ return decode("»²¾È¸µ");
}
virtual QCString trRemarks()
{
@@ -1112,7 +1086,7 @@ class TranslatorJapanese : public TranslatorEnglish
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
- return decode("¥×¥í¥Ñ¥Æ¥£¤Î²òÀâ");
+ return decode("¥×¥í¥Ñ¥Æ¥£");
}
@@ -1160,7 +1134,7 @@ class TranslatorJapanese : public TranslatorEnglish
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
- return decode("¥Ñ¥Ã¥±¡¼¥¸¤Î²òÀâ");
+ return decode("¥Ñ¥Ã¥±¡¼¥¸");
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
@@ -1265,7 +1239,7 @@ class TranslatorJapanese : public TranslatorEnglish
{
first_capital = first_capital;
singular = singular;
- QCString result(decode("̾Á°¶õ´Ö"));
+ QCString result(decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹"));
return result;
}
@@ -1351,7 +1325,7 @@ class TranslatorJapanese : public TranslatorEnglish
*/
virtual QCString trReferences()
{
- return decode("»²¾È");
+ return decode("»²¾ÈÀè");
}
//////////////////////////////////////////////////////////////////////////
@@ -1411,7 +1385,7 @@ class TranslatorJapanese : public TranslatorEnglish
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
- return decode("¥¤¥Ù¥ó¥È¤Î²òÀâ");
+ return decode("¥¤¥Ù¥ó¥È");
}
//////////////////////////////////////////////////////////////////////////
diff --git a/src/util.cpp b/src/util.cpp
index d0a5635..c6ac2f0 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -738,7 +738,7 @@ static QDict<MemberDef> g_resolvedTypedefs;
ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope,
const char *n,
- bool *pIsTypeDef,
+ MemberDef **pTypeDef,
QCString *pTemplSpec
);
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
@@ -1029,7 +1029,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope,
const char *n,
- bool *pIsTypeDef,
+ MemberDef **pTypeDef,
QCString *pTemplSpec
)
{
@@ -1057,7 +1057,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
DefinitionListIterator dli(*dl);
Definition *d;
ClassDef *bestMatch=0;
- bool bestIsTypedef=FALSE;
+ MemberDef *bestTypedef=0;
QCString bestTemplSpec;
int minDistance=10000; // init at "infinite"
for (dli.toFirst();(d=dli.current());++dli) // foreach definition
@@ -1078,7 +1078,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
{
minDistance=distance;
bestMatch = (ClassDef *)d;
- bestIsTypedef = FALSE;
+ bestTypedef = 0;
bestTemplSpec.resize(0);
}
}
@@ -1087,6 +1087,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
MemberDef *md = (MemberDef *)d;
if (md->isTypedef()) // d is a typedef
{
+ //printf("found typedef!\n");
QCString spec;
ClassDef *typedefClass = newResolveTypedef(fileScope,md,&spec);
@@ -1098,7 +1099,8 @@ ClassDef *getResolvedClassRec(Definition *scope,
{
minDistance=distance;
bestMatch = typedefClass;
- bestIsTypedef = TRUE;
+ //printf("bestTypeDef=%p\n",md);
+ bestTypedef = md;
bestTemplSpec = spec;
}
@@ -1107,9 +1109,9 @@ ClassDef *getResolvedClassRec(Definition *scope,
} // if definition accessible
} // if definition is a class or member
} // foreach definition
- if (pIsTypeDef)
+ if (pTypeDef)
{
- *pIsTypeDef = bestIsTypedef;
+ *pTypeDef = bestTypedef;
}
if (pTemplSpec)
{
@@ -1127,7 +1129,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
ClassDef *getResolvedClass(Definition *scope,
FileDef *fileScope,
const char *n,
- bool *pIsTypeDef,
+ MemberDef **pTypeDef,
QCString *pTemplSpec
)
{
@@ -1140,7 +1142,7 @@ ClassDef *getResolvedClass(Definition *scope,
{
scope=Doxygen::globalScope;
}
- ClassDef *result = getResolvedClassRec(scope,fileScope,n,pIsTypeDef,pTemplSpec);
+ ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec);
if (result && !result->isLinkable()) result=0; // don't link to artifical classes
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>");
@@ -1258,14 +1260,17 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
}
-void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*name*/,const char *text,bool autoBreak,bool external)
+void linkifyText(const TextGeneratorIntf &out,Definition *scope,FileDef *fileScope,const char * /*name*/,const char *text,bool autoBreak,bool external)
{
//printf("`%s'\n",text);
static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*");
QCString txtStr=text;
QCString scopeName;
int strLen = txtStr.length();
- //printf("linkifyText scope=%s strtxt=%s strlen=%d\n",scope?scope->name().data():"<none>",txtStr.data(),strLen);
+ //printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n",
+ // scope?scope->name().data():"<none>",
+ // fileScope?fileScope->name().data():"<none>",
+ // txtStr.data(),strLen);
int matchLen;
int index=0;
int newIndex;
@@ -1340,9 +1345,8 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n
// fullName.prepend(prefix+"::");
// }
-// bool isTypeDef=FALSE;
- if ((cd=getResolvedClass(scope,0,word/*fullName,&isTypeDef*/)))
- // todo: fill in fileScope
+ MemberDef *typeDef=0;
+ if ((cd=getResolvedClass(scope,fileScope,word,&typeDef)))
{
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
@@ -1351,10 +1355,17 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n
found=TRUE;
}
}
-// else if (isTypeDef)
-// {
-// goto endloop;
-// }
+ else if (typeDef)
+ {
+ if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject())
+ {
+ out.writeLink(typeDef->getReference(),
+ typeDef->getOutputFileBase(),
+ typeDef->anchor(),
+ word);
+ found=TRUE;
+ }
+ }
// if (curScope) curScope = curScope->getOuterScope();
// } //while (!found && scopeOffset>=0);
@@ -4499,7 +4510,8 @@ void filterLatexString(QTextStream &t,const char *str,
bool insideTabbing,bool insidePre,bool insideItem)
{
static bool isCzech = theTranslator->idLanguage()=="czech";
- static bool isJapanese = theTranslator->idLanguage()=="japanese";
+ static bool isJapanese = theTranslator->idLanguage()=="japanese" ||
+ theTranslator->idLanguage()=="japanese-en";
static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
diff --git a/src/util.h b/src/util.h
index 2459b4b..ec794dc 100644
--- a/src/util.h
+++ b/src/util.h
@@ -77,8 +77,14 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
//--------------------------------------------------------------------
-void linkifyText(const TextGeneratorIntf &ol,Definition *scope,const char *name,
- const char *text,bool autoBreak=FALSE,bool external=TRUE);
+void linkifyText(const TextGeneratorIntf &ol,
+ Definition *scope,
+ FileDef *fileScope,
+ const char *name,
+ const char *text,
+ bool autoBreak=FALSE,
+ bool external=TRUE
+ );
void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1);
QCString fileToString(const char *name,bool filter=FALSE);
QCString dateToString(bool);
@@ -131,7 +137,7 @@ ClassDef *getClass(const char *key);
ClassDef *getResolvedClass(Definition *scope,
FileDef *fileScope,
const char *key,
- bool *pIsTypeDef=0,
+ MemberDef **pTypeDef=0,
QCString *pTemplSpec=0);
NamespaceDef *getResolvedNamespace(const char *key);
FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 695f9b2..757e035 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -340,7 +340,11 @@ class XMLCodeGenerator : public BaseCodeDocInterface
};
-static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,Definition *scope,int indent)
+static void writeTemplateArgumentList(ArgumentList *al,
+ QTextStream &t,
+ Definition *scope,
+ FileDef *fileScope,
+ int indent)
{
QCString indentStr;
indentStr.fill(' ',indent);
@@ -355,7 +359,7 @@ static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,Definition
if (!a->type.isEmpty())
{
t << indentStr << " <type>";
- linkifyText(TextGeneratorXMLImpl(t),scope,0,a->type);
+ linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
@@ -366,7 +370,7 @@ static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,Definition
if (!a->defval.isEmpty())
{
t << indentStr << " <defval>";
- linkifyText(TextGeneratorXMLImpl(t),scope,0,a->defval);
+ linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->defval);
t << "</defval>" << endl;
}
t << indentStr << " </param>" << endl;
@@ -379,13 +383,13 @@ static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
{
if (md->templateArguments()) // function template prefix
{
- writeTemplateArgumentList(md->templateArguments(),t,md->getClassDef(),8);
+ writeTemplateArgumentList(md->templateArguments(),t,md->getClassDef(),md->getFileDef(),8);
}
}
static void writeTemplateList(ClassDef *cd,QTextStream &t)
{
- writeTemplateArgumentList(cd->templateArguments(),t,cd,4);
+ writeTemplateArgumentList(cd->templateArguments(),t,cd,0,4);
}
static void writeXMLDocBlock(QTextStream &t,
@@ -574,7 +578,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
}
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
- linkifyText(TextGeneratorXMLImpl(t),def,md->name(),typeStr);
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),typeStr);
t << "</type>" << endl;
t << " <definition>" << convertToXML(md->definition()) << "</definition>" << endl;
t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>" << endl;
@@ -622,7 +626,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!a->type.isEmpty())
{
t << " <type>";
- linkifyText(TextGeneratorXMLImpl(t),def,md->name(),a->type);
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
@@ -646,7 +650,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!a->defval.isEmpty())
{
t << " <defval>";
- linkifyText(TextGeneratorXMLImpl(t),def,md->name(),a->defval);
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),a->defval);
t << "</defval>" << endl;
}
if (defArg && defArg->hasDocumentation())
@@ -674,14 +678,14 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!md->initializer().isEmpty())
{
t << " <initializer>";
- linkifyText(TextGeneratorXMLImpl(t),def,md->name(),md->initializer());
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),md->initializer());
t << "</initializer>" << endl;
}
if (md->excpString())
{
t << " <exceptions>";
- linkifyText(TextGeneratorXMLImpl(t),def,md->name(),md->excpString());
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),md->excpString());
t << "</exceptions>" << endl;
}