summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clangparser.cpp26
-rw-r--r--src/commentcnv.l20
-rw-r--r--src/commentscan.l30
-rw-r--r--src/condparser.cpp7
-rw-r--r--src/config.xml10
-rw-r--r--src/docparser.cpp3
-rw-r--r--src/dot.cpp4
-rw-r--r--src/doxygen.cpp4
-rw-r--r--src/formula.cpp2
-rw-r--r--src/fortrancode.l3
-rw-r--r--src/fortranscanner.l8
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/latexdocvisitor.cpp8
-rw-r--r--src/latexgen.cpp47
-rw-r--r--src/portable.cpp24
-rw-r--r--src/pre.l24
-rw-r--r--src/reflist.cpp6
-rw-r--r--src/scanner.l60
-rw-r--r--src/textdocvisitor.cpp5
-rw-r--r--src/translator_hu.h646
-rw-r--r--src/util.cpp51
-rw-r--r--src/util.h2
22 files changed, 830 insertions, 162 deletions
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 2ea15ee..78b8faa 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -197,32 +197,32 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
std::vector<std::string> options = command[command.size()-1].CommandLine;
// copy each compiler option used from the database. Skip the first which is compiler exe.
for (auto option = options.begin()+1; option != options.end(); option++) {
- argv[argc++] = strdup(option->c_str());
+ argv[argc++] = qstrdup(option->c_str());
}
// this extra addition to argv is accounted for as we are skipping the first entry in
- argv[argc++]=strdup("-w"); // finally, turn off warnings.
+ argv[argc++]=qstrdup("-w"); // finally, turn off warnings.
} else {
// add include paths for input files
for (di.toFirst();di.current();++di,++argc)
{
QCString inc = QCString("-I")+di.currentKey();
- argv[argc]=strdup(inc.data());
+ argv[argc]=qstrdup(inc.data());
//printf("argv[%d]=%s\n",argc,argv[argc]);
}
// add external include paths
for (uint i=0;i<includePath.count();i++)
{
QCString inc = QCString("-I")+includePath.at(i);
- argv[argc++]=strdup(inc.data());
+ argv[argc++]=qstrdup(inc.data());
}
// user specified options
for (uint i=0;i<clangOptions.count();i++)
{
- argv[argc++]=strdup(clangOptions.at(i));
+ argv[argc++]=qstrdup(clangOptions.at(i));
}
// extra options
- argv[argc++]=strdup("-ferror-limit=0");
- argv[argc++]=strdup("-x");
+ argv[argc++]=qstrdup("-ferror-limit=0");
+ argv[argc++]=qstrdup("-x");
// Since we can be presented with a .h file that can contain C/C++ or
// Objective C code and we need to configure the parser before knowing this,
@@ -250,19 +250,19 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
switch(p->detectedLang)
{
case ClangParser::Private::Detected_Cpp:
- argv[argc++]=strdup("c++");
+ argv[argc++]=qstrdup("c++");
break;
case ClangParser::Private::Detected_ObjC:
- argv[argc++]=strdup("objective-c");
+ argv[argc++]=qstrdup("objective-c");
break;
case ClangParser::Private::Detected_ObjCpp:
- argv[argc++]=strdup("objective-c++");
+ argv[argc++]=qstrdup("objective-c++");
break;
}
// provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions
- argv[argc++]=strdup(fileName);
+ argv[argc++]=qstrdup(fileName);
}
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
//printf("source %s ----------\n%s\n-------------\n\n",
@@ -272,7 +272,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
p->sources = new QCString[numUnsavedFiles];
p->ufs = new CXUnsavedFile[numUnsavedFiles];
p->sources[0] = detab(fileToString(fileName,filterSourceFiles,TRUE));
- p->ufs[0].Filename = strdup(fileName);
+ p->ufs[0].Filename = qstrdup(fileName);
p->ufs[0].Contents = p->sources[0].data();
p->ufs[0].Length = p->sources[0].length();
QStrListIterator it(filesInTranslationUnit);
@@ -281,7 +281,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
{
p->fileMapping.insert(it.current(),new uint(i));
p->sources[i] = detab(fileToString(it.current(),filterSourceFiles,TRUE));
- p->ufs[i].Filename = strdup(it.current());
+ p->ufs[i].Filename = qstrdup(it.current());
p->ufs[i].Contents = p->sources[i].data();
p->ufs[i].Length = p->sources[i].length();
}
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 10dab28..88236ed 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -591,7 +591,15 @@ void replaceComment(int offset);
copyToOutput(yytext,(int)yyleng);
}
<SkipString>\\. { /* escaped character in string */
- copyToOutput(yytext,(int)yyleng);
+ if (g_lang==SrcLangExt_Fortran)
+ {
+ unput(yytext[1]);
+ copyToOutput(yytext,1);
+ }
+ else
+ {
+ copyToOutput(yytext,(int)yyleng);
+ }
}
<SkipString>"\"" { /* end of string */
copyToOutput(yytext,(int)yyleng);
@@ -604,7 +612,15 @@ void replaceComment(int offset);
copyToOutput(yytext,(int)yyleng);
}
<SkipChar>\\. { /* escaped character */
- copyToOutput(yytext,(int)yyleng);
+ if (g_lang==SrcLangExt_Fortran)
+ {
+ unput(yytext[1]);
+ copyToOutput(yytext,1);
+ }
+ else
+ {
+ copyToOutput(yytext,(int)yyleng);
+ }
}
<SkipChar>' { /* end of character literal */
copyToOutput(yytext,(int)yyleng);
diff --git a/src/commentscan.l b/src/commentscan.l
index 02ed0ea..f6cf099 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -583,7 +583,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
- cmdString.sprintf("\\xrefitem %s %d.",listName,itemId);
+ cmdString.sprintf(" \\xrefitem %s %d.",listName,itemId);
if (inBody)
{
docEntry->inbodyDocs += cmdString;
@@ -1047,10 +1047,13 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(yytext);
}
<Comment>"</summary>" { // start of a .NET XML style detailed description
+ setOutput(OutputBrief);
addOutput(yytext);
setOutput(OutputDoc);
}
<Comment>"</remarks>" { // end of a brief or detailed description
+
+ setOutput(OutputDoc);
addOutput(yytext);
}
<Comment>"<"{CAPTION}{ATTR}">" {
@@ -1087,7 +1090,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN(HtmlComment);
}
<Comment>{B}*{CMD}"endinternal"{B}* {
- addOutput("\\endinternal ");
+ addOutput(" \\endinternal ");
if (!inInternalDocs)
warn(yyFileName,yyLineNr,
"found \\endinternal without matching \\internal"
@@ -1718,7 +1721,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the section/subsection/.. commands ------- */
-<SectionLabel>{LABELID} { // first argyment
+<SectionLabel>{LABELID} { // first argument
g_sectionLabel=yytext;
addOutput(yytext);
g_sectionTitle.resize(0);
@@ -2052,7 +2055,6 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
}
<SkipInternal>[@\\]"endinternal"[ \t]* {
- addOutput("\\endinternal ");
BEGIN(Comment);
}
<SkipInternal>[^ \\@\n]+ { // skip non-special characters
@@ -2223,7 +2225,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the cite command ------- */
-<CiteLabel>{CITEID} { // found argyment
+<CiteLabel>{CITEID} { // found argument
addCite();
addOutput(yytext);
BEGIN(Comment);
@@ -2558,12 +2560,23 @@ static bool handleEndParBlock(const QCString &, const QCString &)
static bool handleRelated(const QCString &, const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
+ current->relatesType = Simple;
BEGIN(RelatesParam1);
return FALSE;
}
static bool handleRelatedAlso(const QCString &, const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = Duplicate;
BEGIN(RelatesParam1);
return FALSE;
@@ -2571,6 +2584,11 @@ static bool handleRelatedAlso(const QCString &, const QCString &)
static bool handleMemberOf(const QCString &, const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = MemberOf;
BEGIN(RelatesParam1);
return FALSE;
@@ -2784,7 +2802,7 @@ static bool handleInternal(const QCString &, const QCString &)
else
{
// re-enabled for bug640828
- addOutput("\\internal ");
+ addOutput(" \\internal ");
inInternalDocs = TRUE;
}
return FALSE;
diff --git a/src/condparser.cpp b/src/condparser.cpp
index ab33ae3..74e26bc 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -100,9 +100,10 @@ static bool isAlpha(const char c)
return (c>='A' && c<='Z') || (c>='a' && c<='z') || c=='_';
}
-static bool isAlphaNum(const char c)
+static bool isAlphaNumSpec(const char c)
{
- return isAlpha(c) || (c>='0' && c<='9');
+ return isAlpha(c) || (c>='0' && c<='9') || c=='-' || c=='.' ||
+ (((unsigned char)c)>=0x80 && ((unsigned char)c)<=0xFF);
}
/**
@@ -170,7 +171,7 @@ void CondParser::getToken()
if (isAlpha(*m_e))
{
m_tokenType = VARIABLE;
- while (isAlphaNum(*m_e))
+ while (isAlphaNumSpec(*m_e))
{
m_token += *m_e++;
}
diff --git a/src/config.xml b/src/config.xml
index 2dcc0f4..94376f5 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -1138,6 +1138,8 @@ Go to the <a href="commands.html">next</a> section or return to the
</docs>
<docs doxywizard='0' doxyfile='0'>
<![CDATA[
+<br>
+<br>
Example of using a shell script as a filter for Unix:
\verbatim
FILE_VERSION_FILTER = "/bin/sh versionfilter.sh"
@@ -1157,7 +1159,7 @@ svn stat -v $1 | sed -n 's/^[ A-Z?\*|!]\{1,15\}/r/;s/ \{1,15\}/\/r/;s/ .*//p'
<br>
Example filter for ClearCase:
\verbatim
-FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
+FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
\endverbatim
]]>
</docs>
@@ -1244,6 +1246,8 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
or return value. If set to \c NO, doxygen will only warn about
wrong or incomplete parameter documentation, but not about the absence of
documentation.
+ If \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES then this flag will
+ automatically be disabled.
]]>
</docs>
</option>
@@ -1639,7 +1643,7 @@ to disable this feature.
necessary type information.
@note The availability of this option depends on whether or not doxygen
- was generated with the `-Duse-libclang=ON` option for CMake.
+ was generated with the `-Duse_libclang=ON` option for CMake.
]]>
</docs>
</option>
@@ -1663,7 +1667,7 @@ to disable this feature.
will then be passed to the parser.
@note The availability of this option depends on whether or not doxygen
- was generated with the `-Duse-libclang=ON` option for CMake.
+ was generated with the `-Duse_libclang=ON` option for CMake.
]]>
</docs>
</option>
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 205e818..0cb4ea3 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -5635,7 +5635,8 @@ int DocPara::handleCommand(const QCString &cmdName)
defaultHandleTitleAndSize(CMD_STARTUML,dv,dv->children(),width,height);
doctokenizerYYsetStatePlantUML();
retval = doctokenizerYYlex();
- dv->setText(g_token->verb);
+ int line=0;
+ dv->setText(stripLeadingAndTrailingEmptyLines(g_token->verb,line));
dv->setWidth(width);
dv->setHeight(height);
if (jarPath.isEmpty())
diff --git a/src/dot.cpp b/src/dot.cpp
index 5adc2ab..93fdb20 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1883,6 +1883,10 @@ void DotNode::writeBox(FTextStream &t,
{
t << ",tooltip=\"" << escapeTooltip(m_tooltip) << "\"";
}
+ else
+ {
+ t << ",tooltip=\" \""; // space in tooltip is required otherwise still something like 'Node0' is used
+ }
t << "];" << endl;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index a8e50cc..8facb3f 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -13,6 +13,10 @@
*
*/
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#define _DEFAULT_SOURCE 1
+#endif
+
#include <locale.h>
#include <qfileinfo.h>
diff --git a/src/formula.cpp b/src/formula.cpp
index 46e2075..c252e07 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -69,8 +69,10 @@ void FormulaList::generateBitmaps(const char *path)
FTextStream t(&f);
if (Config_getBool(LATEX_BATCHMODE)) t << "\\batchmode" << endl;
t << "\\documentclass{article}" << endl;
+ t << "\\usepackage{ifthen}" << endl;
t << "\\usepackage{epsfig}" << endl; // for those who want to include images
writeExtraLatexPackages(t);
+ writeLatexSpecialFormulaChars(t);
t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl;
int page=0;
diff --git a/src/fortrancode.l b/src/fortrancode.l
index e64c38e..3c1829d 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -1194,9 +1194,6 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
g_insideBody=FALSE;
}
/*------ strings --------------------------------------------------*/
-<*>"\\\\" { str+=yytext; /* ignore \\ */}
-<*>"\\\""|\\\' { str+=yytext; /* ignore \" */}
-
<String>\n { // string with \n inside
g_contLineNr++;
str+=yytext;
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index d0503c2..884c86e 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -383,14 +383,6 @@ SCOPENAME ({ID}{BS}"::"{BS})*
/*------ ignore strings that are not initialization strings */
-<*>"\\\\" { if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- }
-<*>"\\\""|\\\' { if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- }
<String>\"|\' { // string ends with next quote without previous backspace
if (yytext[0]!=stringStartSymbol) { yyColNr -= (int)yyleng; REJECT; } // single vs double quote
if (yy_top_state() == Initialization
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 740b2f5..32eaff6 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -606,7 +606,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
if (desc)
{
m_t << "<div class=\"ttdoc\">";
- docify(desc); // desc is already HTML escaped; but there are still < and > signs
+ docify(desc);
m_t << "</div>";
}
if (!defInfo.file.isEmpty())
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 7fd27bb..d2c4c5d 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -219,7 +219,7 @@ void LatexDocVisitor::visit(DocURL *u)
if (u->isEmail()) m_t << "mailto:";
m_t << u->url() << "}";
}
- m_t << "{\\tt ";
+ m_t << "\\texttt{ ";
filter(u->url());
m_t << "}";
}
@@ -1249,7 +1249,7 @@ void LatexDocVisitor::visitPre(DocHRef *href)
m_t << href->url();
m_t << "}";
}
- m_t << "{\\tt ";
+ m_t << "\\texttt{ ";
}
void LatexDocVisitor::visitPost(DocHRef *)
@@ -1496,7 +1496,7 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
if (pl->direction()!=DocParamSect::Unspecified)
{
- m_t << "\\mbox{\\tt ";
+ m_t << "\\mbox{\\texttt{ ";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
@@ -1509,7 +1509,7 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
m_t << "in,out";
}
- m_t << "} ";
+ m_t << "}} ";
}
if (useTable) m_t << " & ";
}
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index b00bc6f..0e52914 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -182,7 +182,7 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
}
else
{
- m_t << name;
+ codify(name);
}
m_col+=l;
}
@@ -652,28 +652,12 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\n";
writeExtraLatexPackages(t);
+ writeLatexSpecialFormulaChars(t);
// Hyperlinks
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
- unsigned char minus[4]; // Superscript minus
- char *pminus = (char *)minus;
- unsigned char sup2[3]; // Superscript two
- char *psup2 = (char *)sup2;
- unsigned char sup3[3];
- char *psup3 = (char *)sup3; // Superscript three
- minus[0]= 0xE2;
- minus[1]= 0x81;
- minus[2]= 0xBB;
- minus[3]= 0;
- sup2[0]= 0xC2;
- sup2[1]= 0xB2;
- sup2[2]= 0;
- sup3[0]= 0xC2;
- sup3[1]= 0xB3;
- sup3[2]= 0;
-
t << "% Hyperlinks (required, but should be loaded last)\n"
"\\ifpdf\n"
" \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
@@ -684,18 +668,6 @@ static void writeDefaultHeaderPart1(FTextStream &t)
" \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
" \\fi\n"
"\\fi\n"
- "\\ifpdf\n"
- " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n"
- " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n"
- " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n"
- "\\else\n"
- " \\catcode`\\" << pminus << "=13% Superscript minus\n"
- " \\def" << pminus << "{${}^{-}$}\n"
- " \\catcode`\\" << psup2 << "=13% Superscript two\n"
- " \\def" << psup2 << "{${}^{2}$}\n"
- " \\catcode`\\"<<psup3<<"=13% Superscript three\n"
- " \\def"<<psup3<<"{${}^{3}$}\n"
- "\\fi\n"
"\n"
"\\hypersetup{%\n"
" colorlinks=true,%\n"
@@ -1385,7 +1357,7 @@ void LatexGenerator::startHtmlLink(const char *url)
t << url;
t << "}";
}
- t << "{\\tt ";
+ t << "\\texttt{ ";
}
void LatexGenerator::endHtmlLink()
@@ -1401,7 +1373,7 @@ void LatexGenerator::endHtmlLink()
// t << url;
// t << "}";
// }
-// t << "{\\tt ";
+// t << "\\texttt{ ";
// docify(url);
// t << "}";
//}
@@ -1409,7 +1381,7 @@ void LatexGenerator::endHtmlLink()
void LatexGenerator::writeStartAnnoItem(const char *,const char *,
const char *path,const char *name)
{
- t << "\\item\\contentsline{section}{\\bf ";
+ t << "\\item\\contentsline{section}\\textbf{ ";
if (path) docify(path);
docify(name);
t << "} ";
@@ -1444,7 +1416,7 @@ void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
//void LatexGenerator::writeClassLink(const char *,const char *,
// const char *,const char *name)
//{
-// t << "{\\bf ";
+// t << "\\textbf{ ";
// docify(name);
// t << "}";
//}
@@ -2157,7 +2129,7 @@ void LatexGenerator::endParameterList()
void LatexGenerator::startParameterType(bool first,const char *key)
{
t << "\\item[{";
- if (!first && key) t << key;
+ if (!first && key) docify(key);
}
void LatexGenerator::endParameterType()
@@ -2246,6 +2218,11 @@ void LatexGenerator::startCodeFragment()
void LatexGenerator::endCodeFragment()
{
+ //if (DoxyCodeOpen)
+ //{
+ // t << "}\n";
+ // DoxyCodeOpen = FALSE;
+ //}
t << "\\end{DoxyCode}\n";
DoxyCodeOpen = FALSE;
}
diff --git a/src/portable.cpp b/src/portable.cpp
index 4ad88a4..08691b2 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -22,10 +22,10 @@ extern char **environ;
#endif
#include "portable.h"
+#include "util.h"
#ifndef NODEBUG
#include "debug.h"
#endif
-//#include "doxygen.h"
static double g_sysElapsedTime;
static QTime g_time;
@@ -35,7 +35,12 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
if (command==0) return 1;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ QCString commandCorrectedPath = substitute(command,'/','\\');
+ QCString fullCmd=commandCorrectedPath;
+#else
QCString fullCmd=command;
+#endif
fullCmd=fullCmd.stripWhiteSpace();
if (fullCmd.at(0)!='"' && fullCmd.find(' ')!=-1)
{
@@ -134,7 +139,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
// For that case COM is initialized as follows
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
- QString commandw = QString::fromUtf8( command );
+ QString commandw = QString::fromUtf8( commandCorrectedPath );
QString argsw = QString::fromUtf8( args );
// gswin32 is a GUI api which will pop up a window and run
@@ -458,18 +463,7 @@ void portable_correct_path(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
const char *p = portable_getenv("PATH");
- char *q = (char *)malloc(strlen(p) + 1);
- strcpy(q, p);
- bool found = false;
- for (int i = 0 ; i < strlen(q); i++)
- {
- if (q[i] == '/')
- {
- q[i] = '\\';
- found = true;
- }
- }
- if (found) portable_setenv("PATH",q);
- free(q);
+ QCString result = substitute(p,'/','\\');
+ if (result!=p) portable_setenv("PATH",result.data());
#endif
}
diff --git a/src/pre.l b/src/pre.l
index 37f7115..2cc66c1 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1740,6 +1740,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x CopyLine
%x CopyString
%x CopyStringFtn
+%x CopyStringFtnDouble
%x Include
%x IncludeID
%x EndImport
@@ -1851,7 +1852,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<CopyLine>\" {
outputChar(*yytext);
- BEGIN( CopyString );
+ if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran)
+ {
+ BEGIN( CopyString );
+ }
+ else
+ {
+ BEGIN( CopyStringFtnDouble );
+ }
}
<CopyLine>\' {
if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT;
@@ -1859,7 +1867,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( CopyStringFtn );
}
<CopyString>[^\"\\\r\n]+ {
- outputArray(yytext,(int)yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyString>\\. {
outputArray(yytext,(int)yyleng);
@@ -1868,8 +1876,18 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar(*yytext);
BEGIN( CopyLine );
}
+<CopyStringFtnDouble>[^\"\\\r\n]+ {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\\. {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\" {
+ outputChar(*yytext);
+ BEGIN( CopyLine );
+ }
<CopyStringFtn>[^\'\\\r\n]+ {
- outputArray(yytext,(int)yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyStringFtn>\\. {
outputArray(yytext,(int)yyleng);
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 5a80b19..1da603e 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -164,12 +164,14 @@ void RefList::generatePage()
doc += " \\_internalref ";
doc += item->name;
doc += " \"";
- doc += item->title;
+ // escape \'s in title, see issue #5901
+ doc += substitute(item->title,"\\","\\\\");
doc += "\" ";
// write declaration in case a function with arguments
if (!item->args.isEmpty())
{
- doc += item->args;
+ // escape @'s in argument list, needed for Java annotations (see issue #6208)
+ doc += substitute(item->args,"@","@@");
}
doc += "</dt><dd> ";
doc += item->text;
diff --git a/src/scanner.l b/src/scanner.l
index 21b845f..4846132 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -149,6 +149,7 @@ static QCString *pCopyRawString;
static QGString *pCopyCurlyGString;
static QGString *pCopyRoundGString;
+static QGString *pCopySquareGString;
static QGString *pCopyQuotedGString;
static QGString *pCopyHereDocGString;
static QGString *pCopyRawGString;
@@ -734,6 +735,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%x CopyRound
%x CopyCurly
%x GCopyRound
+%x GCopySquare
%x GCopyCurly
%x SkipUnionSwitch
%x Specialization
@@ -2838,6 +2840,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->initializer+=*yytext;
BEGIN(GCopyRound);
}
+<ReadInitializer>"[" {
+ if (!insidePHP) REJECT;
+ lastSquareContext=YY_START;
+ pCopySquareGString=&current->initializer;
+ squareCount=0;
+ current->initializer+=*yytext;
+ BEGIN(GCopySquare);
+ }
<ReadInitializer>"{" {
lastCurlyContext=YY_START;
pCopyCurlyGString=&current->initializer;
@@ -3180,6 +3190,56 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
*pCopyRoundGString+=*yytext;
}
+ /* generic square bracket list copy rules for growable strings, we should only enter here in case of php, left the test part as in GCopyRound to keep it compatible with te round bracket version */
+<GCopySquare>\" {
+ *pCopySquareGString+=*yytext;
+ pCopyQuotedGString=pCopySquareGString;
+ lastStringContext=YY_START;
+ BEGIN(CopyGString);
+ }
+<GCopySquare>"[" {
+ *pCopySquareGString+=*yytext;
+ squareCount++;
+ }
+<GCopySquare>"]" {
+ *pCopySquareGString+=*yytext;
+ if (--squareCount<0)
+ BEGIN(lastSquareContext);
+ }
+<GCopySquare>\n {
+ lineCount();
+ *pCopySquareGString+=*yytext;
+ }
+<GCopySquare>\' {
+ if (insidePHP)
+ {
+ current->initializer+=yytext;
+ pCopyQuotedGString = pCopySquareGString;
+ lastStringContext=YY_START;
+ BEGIN(CopyPHPGString);
+ }
+ else
+ {
+ *pCopySquareGString+=yytext;
+ }
+ }
+<GCopySquare>{CHARLIT} {
+ if (insidePHP)
+ {
+ REJECT;
+ }
+ else
+ {
+ *pCopySquareGString+=yytext;
+ }
+ }
+<GCopySquare>[^"\[\]\n/]+ {
+ *pCopySquareGString+=yytext;
+ }
+<GCopySquare>. {
+ *pCopySquareGString+=*yytext;
+ }
+
/* generic curly bracket list copy rules */
<CopyCurly>\" {
*pCopyCurlyString+=*yytext;
diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp
index 8c8ecad..c899232 100644
--- a/src/textdocvisitor.cpp
+++ b/src/textdocvisitor.cpp
@@ -50,11 +50,6 @@ void TextDocVisitor::filter(const char *str)
switch(c)
{
case '\n': m_t << " "; break;
- case '"': m_t << "&quot;"; break;
- case '\'': m_t << "&#39;"; break;
- case '<': m_t << "&lt;"; break;
- case '>': m_t << "&gt;"; break;
- case '&': m_t << "&amp;"; break;
default: m_t << c;
}
}
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 17f0d44..44363c9 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -13,21 +13,46 @@
*
*/
- /*
- * Original Hungarian translation by
- * György Földvári <foldvari@diatronltd.com>
- *
- * Extended, revised and updated by
- * Ákos Kiss <akiss@users.sourceforge.net>
- *
- * Further extended, revised and updated by
- * Tamási Ferenc <tf551@hszk.bme.hu>
- */
+/*
+ * Original Hungarian translation by
+ * György Földvári <foldvari@diatronltd.com>
+ *
+ * Extended, revised and updated by
+ * Ákos Kiss <akiss@users.sourceforge.net>
+ *
+ * Further extended, revised and updated by
+ * Ferenc Tamási <tf551@hszk.bme.hu>
+ *
+ * Further extended, since 1.4.6 to 1.8.4
+ * László Kmety <silverkml@gmail.com>
+ */
#ifndef TRANSLATOR_HU_H
#define TRANSLATOR_HU_H
-class TranslatorHungarian : public TranslatorAdapter_1_4_6
+/*!
+ When defining a translator class for the new language, follow
+ the description in the documentation. One of the steps says
+ that you should copy the translator_en.h (this) file to your
+ translator_xx.h new file. Your new language should use the
+ Translator class as the base class. This means that you need to
+ implement exactly the same (pure virtual) methods as the
+ TranslatorEnglish does. Because of this, it is a good idea to
+ start with the copy of TranslatorEnglish and replace the strings
+ one by one.
+
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionally to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
+class TranslatorHungarian : public TranslatorAdapter_1_8_15
{
private:
const char * zed(char c)
@@ -45,12 +70,29 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
public:
// --- Language control methods -------------------
+
+ /*! Used for identification of the language. The identification
+ * should not be translated. It should be replaced by the name
+ * of the language in English using lower-case characters only
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
+ * the identification used in language.cpp.
+ */
virtual QCString idLanguage()
{ return "hungarian"; }
- /*! Used to get the command(s) for the language support. This method
- * was designed for languages which do not prefer babel package.
- * If this methods returns empty string, then the latexBabelPackage()
- * method is used to generate the command for using the babel package.
+
+ /*! Used to get the LaTeX command(s) for the language support.
+ * This method should return string with commands that switch
+ * LaTeX to the desired language. For example
+ * <pre>"\\usepackage[german]{babel}\n"
+ * </pre>
+ * or
+ * <pre>"\\usepackage{polski}\n"
+ * "\\usepackage[latin2]{inputenc}\n"
+ * "\\usepackage[T1]{fontenc}\n"
+ * </pre>
+ *
+ * The English LaTeX does not use such commands. Because of this
+ * the empty string is returned in this implementation.
*/
virtual QCString latexLanguageSupportCommand()
{
@@ -117,6 +159,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
virtual QCString trIncludingInheritedMembers()
{ return " osztály tagjainak teljes listája, az örökölt tagokkal együtt."; }
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
virtual QCString trGeneratedAutomatically(const char *s)
{ QCString result="Ezt a dokumentációt a Doxygen készítette ";
if (s) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
@@ -243,7 +288,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
}
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="struktúra- és úniómező";
+ result+="struktúra- és uniómező";
}
else
{
@@ -254,7 +299,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="a megfelelő struktúra-/úniódokumentációra minden mezőnél:";
+ result+="a megfelelő struktúra/unió dokumentációra minden mezőnél:";
}
else
{
@@ -265,7 +310,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="a struktúrákra/úniókra, amikhez tartoznak:";
+ result+="a struktúrákra/uniókra, amikhez tartoznak:";
}
else
{
@@ -575,8 +620,8 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
case ClassDef::Struct: result+=" struktúra"; break;
case ClassDef::Union: result+=" unió"; break;
case ClassDef::Interface: result+=" interfész"; break;
- case ClassDef::Protocol: result+=" protocol"; break; // translate me!
- case ClassDef::Category: result+=" category"; break; // translate me!
+ case ClassDef::Protocol: result+=" protokoll"; break;
+ case ClassDef::Category: result+=" kategória"; break;
case ClassDef::Exception: result+=" kivétel"; break;
default: break;
}
@@ -726,8 +771,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
- { // here s is one of " Class", " Struct" or " Union"
- // single is true implies a single file
+ { // single is true implies a single file
QCString result=(QCString)"Ez a dokumentáció ";
switch(compType)
{
@@ -735,8 +779,8 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
case ClassDef::Struct: result+="a struktúráról"; break;
case ClassDef::Union: result+="az unióról"; break;
case ClassDef::Interface: result+="az interfészről"; break;
- case ClassDef::Protocol: result+="protocol"; break; // translate me!
- case ClassDef::Category: result+="category"; break; // translate me!
+ case ClassDef::Protocol: result+="a protokollról"; break;
+ case ClassDef::Category: result+="a kategóriáról"; break;
case ClassDef::Exception: result+="a kivételről"; break;
default: break;
}
@@ -960,7 +1004,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
return "Jelmagyarázat";
}
- /*! page explaining how the dot graph's should be interpreted */
+ /*! page explaining how the dot graph's should be interpreted
+ * The %A in the text below are to prevent link to classes called "A".
+ */
virtual QCString trLegendDocs()
{
return
@@ -995,29 +1041,31 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
- "Ha a konfigurációs fájl \\c MAX_DOT_GRAPH_HEIGHT elemének értékét "
- "240-re állítjuk, az eredmény a következő ábra lesz:"
- "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n"
+ "Az eredmény a következő ábra lesz:"
+ "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
"<p>\n"
- "Az ábrán levő dobozok jelentése:\n"
+ "A fenti ábrán levő dobozok jelentése a következő:\n"
"<ul>\n"
"<li>Kitöltött fekete doboz jelzi azt az osztályt vagy struktúrát,"
- "amelyről az ábra szól.\n"
- "<li>Fekete keret jelzi a dokumentált osztályokat és struktúrákat.\n"
- "<li>Szürke keret jelzi a nem dokumentált osztályokat és struktúrákat.\n"
+ "amelyről az ábra szól.</li>\n"
+ "<li>Fekete keret jelzi a dokumentált osztályokat és struktúrákat.</li>\n"
+ "<li>Szürke keret jelzi a nem dokumentált osztályokat és struktúrákat.</li>\n"
"<li>Piros keret jelzi azokat az osztályokat és struktúrákat, amelyeknél vágás miatt nem látható "
"az összes leszármaztatási kapcsolat. Egy ábra vágásra kerül, ha nem fér bele "
- "a megadott tartományba."
+ "a megadott tartományba.</li>\n"
"</ul>\n"
- "A nyilak jelentése:\n"
+ "<p>\n"
+ "A nyilak jelentése a következő:\n"
+ "</p>\n"
"<ul>\n"
- "<li>Sötétkék nyíl jelzi a publikus származtatást.\n"
- "<li>Sötétzöld nyíl jelzi a védett származtatást.\n"
- "<li>Sötétvörös nyíl jelzi a privát származtatást.\n"
+ "<li>Sötétkék nyíl jelzi a publikus származtatás "
+ "kapcsolatát két osztály között.</li>\n"
+ "<li>Sötétzöld nyíl jelzi a védett származtatást.</li>\n"
+ "<li>Sötétvörös nyíl jelzi a privát származtatást.</li>\n"
"<li>Lila szaggatott nyíl jelzi, ha az osztály egy másikat használ vagy tartalmaz. "
- "A nyíl felirata jelzi a változó(k) nevét, amelyeken keresztül a másik osztály kapcsolódik.\n"
+ "A nyíl felirata jelzi a változó(k) nevét, amelyeken keresztül a másik osztály kapcsolódik.</li>\n"
"<li>Sárga szaggatott nyíl jelzi a kapcsolatot a sablonpéldány és a példányosított "
- "osztálysablon között. A nyíl felirata jelzi a pélány sablonparamétereit.\n"
+ "osztálysablon között. A nyíl felirata jelzi a pélány sablonparamétereit.</li>\n"
"</ul>\n";
}
@@ -1086,7 +1134,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
- return "A csomagok rövid leírásai (amennyiben léteznek):";
+ return "A csomagok rövid leírásai (ha léteznek):";
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
@@ -1167,10 +1215,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trClass(bool first_capital, bool /*singular*/)
+ virtual QCString trClass(bool first_capital, bool singular)
{
QCString result((first_capital ? "Osztály" : "osztály"));
- //if (!singular) result+="es";
+ //if (!singular) result+="ok";
return result;
}
@@ -1178,10 +1226,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trFile(bool first_capital, bool /*singular*/)
+ virtual QCString trFile(bool first_capital, bool singular)
{
QCString result((first_capital ? "Fájl" : "fájl"));
- //if (!singular) result+="s";
+ if (!singular) result+="ok";
return result;
}
@@ -1189,10 +1237,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trNamespace(bool first_capital, bool /*singular*/)
+ virtual QCString trNamespace(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Névtér" : "névtér"));
- //if (!singular) result+="s";
+ QCString result("");
+ if (!singular) result+=first_capital ? "Névterek" : "névterek";
+ else result+=first_capital ? "Névtér" : "névtér";
return result;
}
@@ -1200,10 +1249,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGroup(bool first_capital, bool /*singular*/)
+ virtual QCString trGroup(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Csoport" : "csoport"));
- //if (!singular) result+="s";
+ QCString result((first_capital ? "Modul" : "modul"));
+ if (!singular) result+="ok";
return result;
}
@@ -1211,10 +1260,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trPage(bool first_capital, bool /*singular*/)
+ virtual QCString trPage(bool first_capital, bool singular)
{
QCString result((first_capital ? "Oldal" : "oldal"));
- //if (!singular) result+="s";
+ if (!singular) result+="ak";
return result;
}
@@ -1222,10 +1271,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trMember(bool first_capital, bool /*singular*/)
+ virtual QCString trMember(bool first_capital, bool singular)
{
QCString result((first_capital ? "Tag" : "tag"));
- //if (!singular) result+="s";
+ if (!singular) result+="ok";
return result;
}
@@ -1233,10 +1282,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGlobal(bool first_capital, bool /*singular*/)
+ virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Globális elem" : "globális elem"));
- //if (!singular) result+="s";
+ if (!singular) result+="ek";
return result;
}
@@ -1490,9 +1539,490 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trOverloadText()
{
- return "Ez egy túlterhelt tagfüggvény."
- "A fenti függvénytől csak argumentumaiban különbözik.";
+ return "Ez egy túlterhelt tagfüggvény, "
+ "a kényelem érdekében. A fenti függvénytől csak abban különbözik, "
+ "hogy milyen argumentumokat fogad el.";
+ }
+
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "A függvény hívó gráfja:";
+ }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "Enumerációs-érték dokumentáció"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "Tagfüggvény/Alprogram dokumentáció"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "Adattípusok listája"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "Adatmezők"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "Rövid leírással ellátott adattípusok:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll)
+ {
+ result+="dokumentált ";
+ }
+ result+="adattípusú tagváltozó";
+ result+=" hivatkozásokkal ellátva ";
+ if (!extractAll)
+ {
+ result+="az egyes adattagok adatszerkezetének dokumentációjára";
+ }
+ else
+ {
+ result+="azokhoz az adattípusokhoz, amelyekhez tartoznak:";
+ }
+ return result;
+ }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "Adattípus index"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "Adattípus dokumentáció"; }
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "Függvények/Alprogramok"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "Függvény/Alprogram dokumentáció"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "Adattípusok"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "Modulok listája"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll) result+="dokumentált ";
+ result+="rövid leírással ellátott modul:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" modul"; break;
+ case ClassDef::Struct: result+=" típus"; break;
+ case ClassDef::Union: result+=" unió"; break;
+ case ClassDef::Interface: result+=" interfész"; break;
+ case ClassDef::Protocol: result+=" protokoll"; break;
+ case ClassDef::Category: result+=" kategória"; break;
+ case ClassDef::Exception: result+=" kivétel"; break;
+ default: break;
+ }
+ if (isTemplate) result+=" sablon";
+ result+=" hivatkozás";
+ return result;
+ }
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" modul hivatkozás";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "Modul adattagok"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll) result+="dokumentált ";
+ result+="modul adattagja hivatkozásokkal ellátva ";
+ if (extractAll)
+ {
+ result+="az egyes adattagok moduljainak dokumentációjára:";
+ }
+ else
+ {
+ result+="azokhoz a modulokhoz, amelyekhez tartoznak:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "Modulok indexe"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Modul" : "modul"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Ez a dokumentáció ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="a modulról"; break;
+ case ClassDef::Struct: result+="a típusról"; break;
+ case ClassDef::Union: result+="az unióról"; break;
+ case ClassDef::Interface: result+="az interfészról"; break;
+ case ClassDef::Protocol: result+="a protokollról"; break;
+ case ClassDef::Category: result+="a kategóriáról"; break;
+ case ClassDef::Exception: result+="a kivételről"; break;
+ default: break;
+ }
+ result+=" a következő fájl";
+ if (!single) result+="ok";
+ result+=" alapján készült:";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trType(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Típus" : "típus"));
+ if (!singular) result+="ok";
+ return result;
}
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trSubprogram(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Alprogram" : "alprogram"));
+ if (!singular) result+="ok";
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ {
+ return "Típuskorlátozások";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const char *name)
+ {
+ return QCString(name)+" kapcsolat";
+ }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ {
+ return "Betöltés...";
+ }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ {
+ return "Globális névtér";
+ }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ {
+ return "Keresés...";
+ }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ {
+ return "Nincs egyezés";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const char *name)
+ {
+ return (QCString)"Fájl a(z) "+name+" könyvtárban";
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const char *name)
+ {
+ return (QCString)"Tartalmazott fájl a(z) "+name+" könyvtárban";
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat","Vasárnap" };
+ static const char *months[] = { "Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "Bibliográfia"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "Szerzői jog"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const char *name)
+ { return QCString("Könyvtár függőségi gráf a(z) ")+name+"-könyvtárhoz:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "részletességi szint"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "Sablon paraméterek"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "és "+number+" elemmel több..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ { QCString result = "A dokumentáció ehhez az enum-hoz a következő fájl";
+ if (!single) result+="ok";
+ result+=" alapján készült:";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const char *name)
+ { return QCString(name)+" felsoroló referencia"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const char *members,const char *what)
+ { return QCString(members)+" a(z) "+what+" osztályból származnak"; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "További örökölt tagok"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "engedélyez" : "letilt";
+ return "Kattintson a(z) "+opt+" panel synchronisation";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "@0 kategória szerint.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "@0 kiterjesztett osztály.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Osztály metódusok";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Példány metódusok";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Metódus dokumentáció";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Dizájn áttekintés";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.4
+//////////////////////////////////////////////////////////////////////////
+
+ /** old style UNO IDL services: implemented interfaces */
+ virtual QCString trInterfaces()
+ { return "Exportált interfészek"; }
+
+ /** old style UNO IDL services: inherited services */
+ virtual QCString trServices()
+ { return "Mellékelt szolgáltatások"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroups()
+ { return "Konstans csoportok"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroupReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" konstans csoport referencia";
+ return result;
+ }
+ /** UNO IDL service page title */
+ virtual QCString trServiceReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" szolgáltatás referencia";
+ return result;
+ }
+ /** UNO IDL singleton page title */
+ virtual QCString trSingletonReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" egyke példány referencia";
+ return result;
+ }
+ /** UNO IDL service page */
+ virtual QCString trServiceGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"A szolgáltatás dokumentációja "
+ "a következő fájl";
+ if (single) result+="ból"; else result+="okból";
+ result+="lett létrehozva:";
+ return result;
+ }
+ /** UNO IDL singleton page */
+ virtual QCString trSingletonGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Az egyke példány dokomentációja "
+ "a következő fájl";
+ if (single) result+="ból"; else result+="okból";
+ result+="lett létrehozva:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index ea68cd7..a0522d4 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5290,6 +5290,22 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
return result;
}
+/// substitute all occurrences of \a srcChar in \a s by \a dstChar
+QCString substitute(const QCString &s,char srcChar,char dstChar)
+{
+ int l=s.length();
+ QCString result(l+1);
+ char *q=result.rawData();
+ if (l>0)
+ {
+ const char *p=s.data();
+ char c;
+ while ((c=*p++)) *q++ = (c==srcChar) ? dstChar : c;
+ }
+ *q='\0';
+ return result;
+}
+
//----------------------------------------------------------------------
QCString substituteKeywords(const QCString &s,const char *title,
@@ -8830,6 +8846,41 @@ void writeExtraLatexPackages(FTextStream &t)
}
}
+void writeLatexSpecialFormulaChars(FTextStream &t)
+{
+ unsigned char minus[4]; // Superscript minus
+ char *pminus = (char *)minus;
+ unsigned char sup2[3]; // Superscript two
+ char *psup2 = (char *)sup2;
+ unsigned char sup3[3];
+ char *psup3 = (char *)sup3; // Superscript three
+ minus[0]= 0xE2;
+ minus[1]= 0x81;
+ minus[2]= 0xBB;
+ minus[3]= 0;
+ sup2[0]= 0xC2;
+ sup2[1]= 0xB2;
+ sup2[2]= 0;
+ sup3[0]= 0xC2;
+ sup3[1]= 0xB3;
+ sup3[2]= 0;
+
+ t << "\\ifthenelse{\\isundefined{\\DeclareUnicodeCharacter}}{%\n"
+ " \\catcode`\\" << pminus << "=13% Superscript minus\n"
+ " \\def" << pminus << "{${}^{-}$}\n"
+ " \\catcode`\\" << psup2 << "=13% Superscript two\n"
+ " \\def" << psup2 << "{${}^{2}$}\n"
+ " \\catcode`\\"<<psup3<<"=13% Superscript three\n"
+ " \\def"<<psup3<<"{${}^{3}$}\n"
+ "}{%\n"
+ " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n"
+ " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n"
+ " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n"
+ " \\DeclareUnicodeCharacter{2212}{-}% Just a minus sign\n"
+ "}\n"
+ "\n";
+}
+
//------------------------------------------------------
static int g_usedTableLevels = 0;
diff --git a/src/util.h b/src/util.h
index 7cbe5e3..a9eee67 100644
--- a/src/util.h
+++ b/src/util.h
@@ -194,6 +194,7 @@ QCString substituteClassNames(const QCString &s);
QCString substitute(const QCString &s,const QCString &src,const QCString &dst);
QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq);
+QCString substitute(const QCString &s,char srcChar,char dstChar);
QCString clearBlock(const char *s,const char *begin,const char *end);
@@ -477,6 +478,7 @@ void convertProtectionLevel(
bool mainPageHasTitle();
bool openOutputFile(const char *outFile,QFile &f);
void writeExtraLatexPackages(FTextStream &t);
+void writeLatexSpecialFormulaChars(FTextStream &t);
int usedTableLevels();
void incUsedTableLevels();