diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-10-30 21:12:45 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-10-30 21:12:45 (GMT) |
commit | 1f15cdfe735375f781fddf5e3e483887b7f481bd (patch) | |
tree | 7d5c1ef91e61313f10266a746afd0d903d1e5f2a /src | |
parent | 00340144fa3b240a602f008e01b6283fa7f1fd4e (diff) | |
download | Doxygen-1f15cdfe735375f781fddf5e3e483887b7f481bd.zip Doxygen-1f15cdfe735375f781fddf5e3e483887b7f481bd.tar.gz Doxygen-1f15cdfe735375f781fddf5e3e483887b7f481bd.tar.bz2 |
Release-1.2.3
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 2 | ||||
-rw-r--r-- | src/code.l | 59 | ||||
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/config.l | 58 | ||||
-rw-r--r-- | src/declinfo.l | 2 | ||||
-rw-r--r-- | src/define.h | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 1 | ||||
-rw-r--r-- | src/filedef.cpp | 9 | ||||
-rw-r--r-- | src/index.cpp | 2 | ||||
-rw-r--r-- | src/language.cpp | 1 | ||||
-rw-r--r-- | src/memberdef.cpp | 6 | ||||
-rw-r--r-- | src/memberlist.cpp | 7 | ||||
-rw-r--r-- | src/pre.l | 42 | ||||
-rw-r--r-- | src/scanner.l | 20 | ||||
-rw-r--r-- | src/translator_cz.h | 18 | ||||
-rw-r--r-- | src/translator_jp.h | 3 | ||||
-rw-r--r-- | src/util.cpp | 64 | ||||
-rw-r--r-- | src/util.h | 2 |
18 files changed, 226 insertions, 76 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 9289375..49846b6 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -727,7 +727,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ClassDef *cd=bcd->classDef; if (cd->isLinkable()) { - if (!Config::genTagFile.isEmpty()) tagFile << cd->getOutputFileBase() << "?"; + if (!Config::genTagFile.isEmpty()) tagFile << cd->name() << "?"; ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers); } else @@ -127,12 +127,9 @@ static QCString g_saveType; * is TRUE. If a definition starts at the current line, then the line * number is linked to the documentation of that definition. */ -static void startCodeLine(OutputList &ol) +static void startCodeLine() { - if (g_currentFontClass) - { - g_code->endFontClass(); - } + //if (g_currentFontClass) { g_code->endFontClass(); } if (g_sourceFileDef) { QCString lineNumber,lineAnchor; @@ -149,25 +146,32 @@ static void startCodeLine(OutputList &ol) g_searchingForBody = TRUE; g_bodyCurlyCount = 0; if (g_currentMemberDef) anchor=g_currentMemberDef->anchor(); - ol.startCodeAnchor(lineAnchor); - ol.writeCodeLink(d->getReference(),d->getOutputFileBase(), + g_code->startCodeAnchor(lineAnchor); + g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(), anchor,lineNumber); - ol.endCodeAnchor(); - ol.codify(" "); + g_code->endCodeAnchor(); + g_code->codify(" "); } else { - ol.codify(lineNumber); - ol.codify(" "); + g_code->codify(lineNumber); + g_code->codify(" "); } } - ol.startCodeLine(); + g_code->startCodeLine(); if (g_currentFontClass) { g_code->startFontClass(g_currentFontClass); } } + +static void endCodeLine() +{ + if (g_currentFontClass) { g_code->endFontClass(); } + g_code->endCodeLine(); +} + /*! write a code fragment `text' that may span multiple lines, inserting * line numbers for each line. */ @@ -185,10 +189,10 @@ static void codifyLines(char *text) g_yyLineNr++; *(p-1)='\0'; g_code->codify(sp); - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } } else @@ -219,10 +223,10 @@ static void writeMultiLineCodeLink(OutputList &ol, g_yyLineNr++; *(p-1)='\0'; ol.writeCodeLink(ref,file,anchor,sp); - ol.endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(ol); + startCodeLine(); } } else @@ -1241,10 +1245,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" } <RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)? { g_yyLineNr+=QCString(yytext).contains('\n'); - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } if (g_lastSpecialCContext==SkipCxxComment) { // force end of C++ comment here @@ -1267,10 +1271,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" if (Config::stripCommentsFlag) { g_yyLineNr+=((QCString)yytext).contains('\n'); - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } } else @@ -1284,10 +1288,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" if (Config::stripCommentsFlag) { g_yyLineNr+=2; - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } } else @@ -1320,10 +1324,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" if (Config::stripCommentsFlag) { g_yyLineNr++; - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } } else @@ -1355,10 +1359,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" if (Config::stripCommentsFlag) { g_yyLineNr++; - g_code->endCodeLine(); + endCodeLine(); if (g_yyLineNr<g_inputLines) { - startCodeLine(*g_code); + startCodeLine(); } } else @@ -1527,7 +1531,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s, g_bracketCount = 0; g_exampleFile = convertFileName(g_exampleName)+"-example"; g_includeCodeFragment = inlineFragment; - startCodeLine(*g_code); + startCodeLine(); g_type.resize(0); g_name.resize(0); g_args.resize(0); @@ -1537,7 +1541,6 @@ void parseCode(OutputList &ol,const char *className,const QCString &s, BEGIN( Body ); codeYYlex(); endFontClass(); - //if (g_yyLineNr<=g_inputLines) code->endCodeLine(); ol+=*g_code; delete g_code; return; diff --git a/src/config.h b/src/config.h index a85fc68..a3165d7 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Tue Oct 10 22:16:03 2000 +/* This file was generated by configgen on Sat Oct 28 15:42:39 2000 * from config_templ.h * * DO NOT EDIT! @@ -84,6 +84,7 @@ struct Config static QStrList examplePatternList; // list of example patterns static QStrList imagePath; // list of image paths static QCString inputFilter; // a filter command that is applied to input files + static bool filterForSourceFlag; // do we filter source files? static bool alphaIndexFlag; // should an alphabetical index be generated? static int colsInAlphaIndex; // number of columns in the alphabetical index static QStrList ignorePrefixList; // list of prefixes to ignore for the alphabetical index @@ -95,6 +96,7 @@ struct Config static bool htmlAlignMemberFlag; // align members in HTML using tables. static bool htmlHelpFlag; // should html help files be generated? static bool noIndexFlag; // generate condensed index flag + static int enumValuesPerLine; // number of enum values that are put on one line static bool generateLatex; // generate Latex output static QCString latexOutputDir; // the directory to put the Latex files static bool compactLatexFlag; // generate compact LaTeX documentation. diff --git a/src/config.l b/src/config.l index 86b6578..d158cdb 100644 --- a/src/config.l +++ b/src/config.l @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Tue Oct 10 22:16:03 2000 +/* This file was generated by configgen on Sat Oct 28 15:42:39 2000 * from config_templ.l * * DO NOT EDIT! @@ -121,6 +121,7 @@ QStrList Config::examplePath; QStrList Config::examplePatternList; QStrList Config::imagePath; QCString Config::inputFilter; +bool Config::filterForSourceFlag = FALSE; bool Config::alphaIndexFlag = FALSE; int Config::colsInAlphaIndex = 5; QStrList Config::ignorePrefixList; @@ -132,6 +133,7 @@ QCString Config::htmlStyleSheet; bool Config::htmlAlignMemberFlag = TRUE; bool Config::htmlHelpFlag = FALSE; bool Config::noIndexFlag = FALSE; +int Config::enumValuesPerLine = 4; bool Config::generateLatex = TRUE; QCString Config::latexOutputDir = "latex"; bool Config::compactLatexFlag = FALSE; @@ -211,6 +213,7 @@ static int includeDepth; static QCString tabSizeString; static QCString colsInAlphaIndexString; +static QCString enumValuesPerLineString; static QCString maxDotGraphWidthString; static QCString maxDotGraphHeightString; @@ -253,8 +256,12 @@ static FILE *tryPath(const char *path,const char *fileName) return 0; } +static void substEnvVarsInStrList(QStrList &sl); +static void substEnvVarsInString(QCString &s); + static FILE *findFile(const char *fileName) { + substEnvVarsInStrList(includePathList); char *s=includePathList.first(); while (s) // try each of the include paths { @@ -275,6 +282,7 @@ static void readIncludeFile(const char *incName) } QCString inc = incName; + substEnvVarsInString(inc); inc = inc.stripWhiteSpace(); uint incLen = inc.length(); if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes @@ -389,6 +397,7 @@ static void readIncludeFile(const char *incName) <Start>"IMAGE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePath; l->clear(); elemStr=""; } <Start>"IMAGE_PATH"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::imagePath; elemStr=""; } <Start>"INPUT_FILTER"[ \t]*"=" { BEGIN(GetString); s=&Config::inputFilter; s->resize(0); } +<Start>"FILTER_SOURCE_FILES"[ \t]*"=" { BEGIN(GetBool); b=&Config::filterForSourceFlag; } <Start>"ALPHABETICAL_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::alphaIndexFlag; } <Start>"COLS_IN_ALPHA_INDEX"[ \t]*"=" { BEGIN(GetString); s=&colsInAlphaIndexString; s->resize(0); } <Start>"IGNORE_PREFIX"[ \t]*"=" { BEGIN(GetStrList); l=&Config::ignorePrefixList; l->clear(); elemStr=""; } @@ -401,6 +410,7 @@ static void readIncludeFile(const char *incName) <Start>"HTML_ALIGN_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlAlignMemberFlag; } <Start>"GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; } <Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; } +<Start>"ENUM_VALUES_PER_LINE"[ \t]*"=" { BEGIN(GetString); s=&enumValuesPerLineString; s->resize(0); } <Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; } <Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); } <Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; } @@ -678,6 +688,7 @@ void dumpConfig() } } printf("inputFilter=`%s'\n",Config::inputFilter.data()); + printf("filterForSourceFlag=`%d'\n",Config::filterForSourceFlag); printf("# configuration options related to the alphabetical class index\n"); printf("alphaIndexFlag=`%d'\n",Config::alphaIndexFlag); printf("colsInAlphaIndex=`%d'\n",Config::colsInAlphaIndex); @@ -698,6 +709,7 @@ void dumpConfig() printf("htmlAlignMemberFlag=`%d'\n",Config::htmlAlignMemberFlag); printf("htmlHelpFlag=`%d'\n",Config::htmlHelpFlag); printf("noIndexFlag=`%d'\n",Config::noIndexFlag); + printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine); printf("# configuration options related to the LaTeX output\n"); printf("generateLatex=`%d'\n",Config::generateLatex); printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data()); @@ -853,6 +865,7 @@ void Config::init() Config::examplePatternList.clear(); Config::imagePath.clear(); Config::inputFilter.resize(0); + Config::filterForSourceFlag = FALSE; Config::alphaIndexFlag = FALSE; Config::colsInAlphaIndex = 5; Config::ignorePrefixList.clear(); @@ -864,6 +877,7 @@ void Config::init() Config::htmlAlignMemberFlag = TRUE; Config::htmlHelpFlag = FALSE; Config::noIndexFlag = FALSE; + Config::enumValuesPerLine = 4; Config::generateLatex = TRUE; Config::latexOutputDir = "latex"; Config::compactLatexFlag = FALSE; @@ -1536,6 +1550,17 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; + t << "# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \n"; + t << "# INPUT_FILTER) will be used to filter the input files when producing source \n"; + t << "# files to browse. \n"; + t << "\n"; + } + t << "FILTER_SOURCE_FILES = "; + writeBoolValue(t,Config::filterForSourceFlag); + t << "\n"; + if (!sl) + { + t << "\n"; } t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to the alphabetical class index\n"; @@ -1673,6 +1698,16 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; + t << "# This tag can be used to set the number of enum values (range [1..20]) \n"; + t << "# that doxygen will group on one line in the generated HTML documentation. \n"; + t << "\n"; + } + t << "ENUM_VALUES_PER_LINE = "; + writeIntValue(t,Config::enumValuesPerLine); + t << "\n"; + if (!sl) + { + t << "\n"; } t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to the LaTeX output\n"; @@ -2286,6 +2321,23 @@ void configStrToVal() } Config::colsInAlphaIndex=cols; } + + if (enumValuesPerLineString.isEmpty()) + { + Config::enumValuesPerLine=4; + } + else + { + bool ok; + int cols = enumValuesPerLineString.toInt(&ok); + if (!ok || cols<1 || cols>20) + { + warn_cont("Warning: argument of ENUM_VALUES_PER_LINE is not a valid number in the range [1..20]!\n" + "Using the default of 4!\n"); + cols = 4; + } + Config::enumValuesPerLine=cols; + } if (maxDotGraphWidthString.isEmpty()) { @@ -2297,7 +2349,7 @@ void configStrToVal() int width =maxDotGraphWidthString.toInt(&ok); if (!ok) { - warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n" + warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [100..30000]!\n" "Using the default of 1024 pixels!\n"); width=1024; } @@ -2322,7 +2374,7 @@ void configStrToVal() int height =maxDotGraphHeightString.toInt(&ok); if (!ok) { - warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n" + warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [100..30000]!\n" "Using the default of 1024 pixels!\n"); height=1024; } diff --git a/src/declinfo.l b/src/declinfo.l index a6cafc4..84e2abd 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -136,7 +136,7 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) <Start>{B}+ { addType(); } -<Start>{B}*"("({ID}"::")*{B}*"*" { +<Start>{B}*"("({ID}"::")*{B}*"*"({B}*("const"|"volatile"){B}+)? { addType(); QCString text=yytext; type+=text.stripWhiteSpace(); diff --git a/src/define.h b/src/define.h index 09e0140..060270e 100644 --- a/src/define.h +++ b/src/define.h @@ -20,7 +20,7 @@ #include "qtbc.h" #include <qdict.h> -#include "util.h" +#include <qlist.h> class FileDef; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 621039d..6d390b5 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1307,6 +1307,7 @@ void buildVarList(Entry *root) ) || (root->section==Entry::FUNCTION_SEC && // function variable !root->type.isEmpty() && root->type.find(re,0)!=-1 && + // special case to catch function pointers root->type.find("operator")==-1 && root->type.find(")(")==-1 ) ) diff --git a/src/filedef.cpp b/src/filedef.cpp index 6ce4c86..c4fe0f1 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -422,11 +422,6 @@ void FileDef::writeDocumentation(OutputList &ol) /*! Write a source listing of this file to the output */ void FileDef::writeSource(OutputList &ol) { - //QCString fn=name(); - //if (Config::fullPathNameFlag) - //{ - // fn.prepend(stripFromPath(getPath().copy())); - //} ol.disableAllBut(OutputGenerator::Html); startFile(ol,sourceName(),docname+" Source File"); startTitle(ol,0); @@ -440,11 +435,9 @@ void FileDef::writeSource(OutputList &ol) ol.endTextLink(); } - //parseText(ol,theTranslator->trVerbatimText(incFile->name())); - //ol.writeRuler(); initParseCodeContext(); ol.startCodeFragment(); - parseCode(ol,0,fileToString(absFilePath()),FALSE,0,this); + parseCode(ol,0,fileToString(absFilePath(),TRUE),FALSE,0,this); ol.endCodeFragment(); endFile(ol); ol.enableAll(); diff --git a/src/index.cpp b/src/index.cpp index f470341..383b41f 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1199,7 +1199,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) { char lastChar=0; bool first=TRUE; - ol.startItemList(); + //ol.startItemList(); MemberName *mn=functionNameList.first(); while (mn) { diff --git a/src/language.cpp b/src/language.cpp index e7a9576..0711aa3 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -36,6 +36,7 @@ #include "translator_ro.h" #include "translator_si.h" #include "translator_cn.h" +#include "translator_no.h" #endif #define L_EQUAL(a) !stricmp(langName,a) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 1c2e940..7a20e12 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1198,7 +1198,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, bmd->anchor(),bcd->name()); if ( bcd->isLinkableInProject()/* && !Config::pdfHyperFlag*/ ) { - writePageRef(ol,bcd->name(),bmd->anchor()); + writePageRef(ol,bcd->getOutputFileBase(),bmd->anchor()); } } else @@ -1207,7 +1207,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, 0,bcd->name()); if (bcd->isLinkableInProject()/* && !Config::pdfHyperFlag*/ ) { - writePageRef(ol,bcd->name(),0); + writePageRef(ol,bcd->getOutputFileBase(),0); } } parseText(ol,reimplFromLine.right( @@ -1273,7 +1273,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, bmd->anchor(),bcd->name()); if (bcd->isLinkableInProject()/* && !Config::pdfHyperFlag*/ ) { - writePageRef(ol,bcd->name(),bmd->anchor()); + writePageRef(ol,bcd->getOutputFileBase(),bmd->anchor()); } } ++mli; diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 3e7b7a0..17b9226 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -302,7 +302,6 @@ void MemberList::writePlainDeclarations(OutputList &ol, typeDecl.writeChar(' '); } - const uint MAX_ENUM_VALUES_FOR_ONE_LINE = 4; int enumMemCount=0; typeDecl.docify("{ "); @@ -313,8 +312,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, while (fmd) { /* in html we start a new line after a number of items */ - if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE - && (enumMemCount%MAX_ENUM_VALUES_FOR_ONE_LINE)==0 + if (fmdl->count()>(uint)Config::enumValuesPerLine + && (enumMemCount%(uint)Config::enumValuesPerLine)==0 ) { typeDecl.pushGeneratorState(); @@ -348,7 +347,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, typeDecl.enable(OutputGenerator::Man); enumMemCount++; } - if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE) + if (fmdl->count()>(uint)Config::enumValuesPerLine) { typeDecl.pushGeneratorState(); typeDecl.disableAllBut(OutputGenerator::Html); @@ -92,6 +92,7 @@ static int g_findDefArgContext; static QCString g_lastGuardName; static QCString g_incName; static QCString g_guardExpr; +static int g_curlyCount; static void setFileName(const char *name) { @@ -818,12 +819,12 @@ void addDefine() static void outputChar(char c) { - if (g_includeStack.isEmpty()) g_outputBuf->addChar(c); + if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addChar(c); } static void outputArray(const char *a,int len) { - if (g_includeStack.isEmpty()) g_outputBuf->addArray(a,len); + if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addArray(a,len); } static void readIncludeFile(const QCString &inc) @@ -917,6 +918,7 @@ BN [ \t\r\n] %x SkipCommand %x SkipLine %x CopyLine +%x CopyString %x Include %x IncludeID %x DefName @@ -967,6 +969,41 @@ BN [ \t\r\n] outputArray(yytext,yyleng); } */ + +<CopyLine>"{" { // count brackets inside the main file + if (g_includeStack.isEmpty()) + g_curlyCount++; + outputChar(*yytext); + } +<CopyLine>"}" { // count brackets inside the main file + if (g_includeStack.isEmpty()) + g_curlyCount--; + outputChar(*yytext); + ASSERT(g_curlyCount>=0); + } +<CopyLine>"'"\\[0-7]{1,3}"'" { + outputArray(yytext,yyleng); + } +<CopyLine>"'"\\."'" { + outputArray(yytext,yyleng); + } +<CopyLine>"'"."'" { + outputArray(yytext,yyleng); + } +<CopyLine>\" { + outputChar(*yytext); + BEGIN( CopyString ); + } +<CopyString>[^\"\\]+ { + outputArray(yytext,yyleng); + } +<CopyString>\\. { + outputArray(yytext,yyleng); + } +<CopyString>\" { + outputChar(*yytext); + BEGIN( CopyLine ); + } <CopyLine>{ID}/{BN}*"(" { Define *def=0; //printf("Search for define %s\n",yytext); @@ -1726,6 +1763,7 @@ void preprocessFile(const char *fileName,BufStr &output) uint orgOffset=output.curPos(); //#endif + g_curlyCount=0; g_outputBuf=&output; g_includeStack.setAutoDelete(TRUE); g_includeStack.clear(); diff --git a/src/scanner.l b/src/scanner.l index a12189b..5d8484e 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1615,7 +1615,14 @@ TITLE [tT][iI][tT][lL][eE] } <FuncPtr>{SCOPENAME} { current->name = yytext; - BEGIN( EndFuncPtr ); + if (current->name=="const" || current->name=="volatile") + { + funcPtrType += current->name; + } + else + { + BEGIN( EndFuncPtr ); + } } <FuncPtr>. { //printf("Error: FuncPtr `%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName); @@ -2337,7 +2344,7 @@ TITLE [tT][iI][tT][lL][eE] } <Comment>. { current->program += *yytext ; } -<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits>("//"{B}*)?"/*!" { +<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases>("//"{B}*)?"/*!" { //printf("Start doc block at %d\n",yyLineNr); removeSlashes=(yytext[1]=='/'); tmpDocType=-1; @@ -2350,7 +2357,7 @@ TITLE [tT][iI][tT][lL][eE] current->inside = current_root->name+"::"; BEGIN( Doc ); } -<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits>("//"{B}*)?"/**"/[^/*] { +<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases>("//"{B}*)?"/**"/[^/*] { removeSlashes=(yytext[1]=='/'); lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) @@ -2382,7 +2389,7 @@ TITLE [tT][iI][tT][lL][eE] } } } -<FindMembers,FindFields,MemberSpec,FuncQual,Operator,ClassVar>"//!" { +<FindMembers,FindFields,MemberSpec,FuncQual,Operator,ClassVar,Bases>"//!" { current->brief.resize(0); tmpDocType=-1; lastDocContext = YY_START; @@ -2390,7 +2397,7 @@ TITLE [tT][iI][tT][lL][eE] current->inside = current_root->name+"::"; BEGIN( LineDoc ); } -<FindMembers,FindFields,MemberSpec,FuncQual,Operator,ClassVar>"///"/[^/] { +<FindMembers,FindFields,MemberSpec,FuncQual,Operator,ClassVar,Bases>"///"/[^/] { current->brief.resize(0); tmpDocType=-1; lastDocContext = YY_START; @@ -3181,9 +3188,8 @@ TITLE [tT][iI][tT][lL][eE] current->brief=current->brief.stripWhiteSpace(); BEGIN( lastBriefContext ); } -<ClassDocBrief>{BS}/{CMD}("brief"|"short"){BN}+ { +<ClassDocBrief>{BS}{CMD}("brief"|"short"){BN}+ { lastBriefContext=YY_START; - BEGIN( ClassDocBrief ); } <ClassDocBrief>. { current->brief += *yytext; } <ClassDocDefine>{ID}/"(" { diff --git a/src/translator_cz.h b/src/translator_cz.h index 9b758c4..bad2bf2 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -70,6 +70,9 @@ // - Update for "new since 1.2.1" version. The text of trDCOPMethods() // was translated rather blindly (not knowing what exactly // the DCOP means). +// +// 2000/10/17 (Petr Prikryl) +// - Update for "new since 1.2.2" version. // // Notices: // -------- @@ -1108,6 +1111,21 @@ class TranslatorCzech : public Translator { return Decode("Metody DCOP"); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return Decode("Vlastnosti"); + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return Decode("Dokumentace k vlastnosti"); + } }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_jp.h b/src/translator_jp.h index 650dc5d..4946379 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -25,6 +25,9 @@ class TranslatorJapanese : public Translator public: QCString idLanguage() { return "japanese"; } + QCString idLanguageCharset() + { return "euc-jp"; } + /*! returns the name of the package that is included by LaTeX */ QCString latexBabelPackage() { return "a4j"; } diff --git a/src/util.cpp b/src/util.cpp index 02188c4..72701d2 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -48,6 +48,11 @@ extern char **environ; #endif +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define popen _popen +#define pclose _pclose +#endif + //------------------------------------------------------------------------ // TextGeneratorOLImpl implementation //------------------------------------------------------------------------ @@ -954,7 +959,7 @@ void setAnchors(char id,MemberList *ml,int groupId) //---------------------------------------------------------------------------- // read a file with `name' to a string. -QCString fileToString(const char *name) +QCString fileToString(const char *name,bool filter) { if (name==0 || name[0]==0) return 0; QFile f; @@ -989,19 +994,47 @@ QCString fileToString(const char *name) err("Error: file `%s' not found\n",name); return ""; } - f.setName(name); - fileOpened=f.open(IO_ReadOnly); - if (fileOpened) + if (Config::inputFilter.isEmpty() || !filter) { - int fsize=f.size(); - QCString contents(fsize+2); - f.readBlock(contents.data(),fsize); - if (fsize==0 || contents[fsize-1]=='\n') - contents[fsize]='\0'; - else - contents[fsize]='\n'; // to help the scanner - contents[fsize+1]='\0'; - f.close(); + f.setName(name); + fileOpened=f.open(IO_ReadOnly); + if (fileOpened) + { + int fsize=f.size(); + QCString contents(fsize+2); + f.readBlock(contents.data(),fsize); + if (fsize==0 || contents[fsize-1]=='\n') + contents[fsize]='\0'; + else + contents[fsize]='\n'; // to help the scanner + contents[fsize+1]='\0'; + f.close(); + return contents; + } + } + else // filter the input + { + QCString cmd=Config::inputFilter+" "+name; + FILE *f=popen(cmd,"r"); + if (!f) + { + err("Error: could not execute filter %s\n",Config::inputFilter.data()); + return ""; + } + const int bSize=4096; + QCString contents(bSize); + int totalSize=0; + int size; + while ((size=fread(contents.data()+totalSize,1,bSize,f))==bSize) + { + totalSize+=bSize; + contents.resize(totalSize+bSize); + } + totalSize+=size+2; + contents.resize(totalSize); + contents.at(totalSize-2)='\n'; // to help the scanner + contents.at(totalSize-1)='\0'; + pclose(f); return contents; } } @@ -2340,7 +2373,8 @@ bool generateRef(OutputList &ol,const char *scName, if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot() || md->isDefine())) { if (argsStr.isEmpty() && (!md->isDefine() || md->argsString()!=0)) - ol.writeString("()"); + // ol.writeString("()") + ; else ol.docify(argsStr); } @@ -2732,7 +2766,7 @@ void extractNamespaceName(const QCString &scopeName, { QCString clName=scopeName.copy(); //QCString nsName; - NamespaceDef *nd; + NamespaceDef *nd = 0; if (!clName.isEmpty() && (nd=getResolvedNamespace(clName)) && getClass(clName)==0) { // the whole name is a namespace (and not a class) namespaceName=nd->name().copy(); @@ -83,7 +83,7 @@ extern void linkifyText(const TextGeneratorIntf &ol,const char *clName,const cha const char *text,bool autoBreak=FALSE,bool external=TRUE); extern void setAnchors(char id,MemberList *ml,int groupId=-1); -extern QCString fileToString(const char *name); +extern QCString fileToString(const char *name,bool filter=FALSE); extern QCString dateToString(bool); extern bool getDefs(const QCString &scopeName, const QCString &memberName, |