From cb417a1f59c3bf956677a59ce94cf13b4010f3c4 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 18 Jun 2000 16:12:02 +0000 Subject: Release-1.1.4-20000618 --- INSTALL | 15 ++++--- README | 2 +- addon/configgen/config_templ.l | 1 + addon/configgen/configgen.cpp | 14 +++--- doc/commands.doc | 37 ++++++++++++++-- make.bat | 9 ++++ src/classdef.cpp | 2 +- src/code.l | 2 +- src/config.l | 1 + src/declinfo.l | 5 ++- src/defargs.l | 11 ++--- src/definition.cpp | 29 ++++++++++--- src/definition.h | 1 + src/doxygen.cpp | 98 +++++++++++++++++++++++------------------- src/doxygen.h | 8 ++-- src/groupdef.cpp | 2 +- src/memberdef.cpp | 1 + src/pre.l | 4 +- src/scanner.l | 75 ++++++++++++++++++++++++++++---- src/tag.l | 4 +- src/translator.h | 9 +++- src/util.cpp | 4 +- 22 files changed, 236 insertions(+), 98 deletions(-) diff --git a/INSTALL b/INSTALL index 787aecd..d2f9e7f 100644 --- a/INSTALL +++ b/INSTALL @@ -84,10 +84,13 @@ You will need to install the windows/dos versions of following tools: You can download them at: http://sourceware.cygnus.com/cygwin/ Make sure the BISONLIB environment variable points to the location where bison.simple and bison.hairy are located. -- Qt-1.xx (Qt-2.xx should also work, but I didn't test it for Windows) - (Hint: only the tools section is required, so you can use the free - X-windows version (use Qt-1.44) as well!) - You can get it at http://www.troll.no +- Qt-1.xx (Qt-2.xx does not work without adding some extra code) + Only the tools section is required, so you can use the free + X-windows version (use Qt-1.44) and build a library called qt.lib out of + the sources in src/tools. The library should be put in the lib directory + of the Qt distribution. You can get Qt-1.44 at http://www.trolltech.com + Before continuing make sure the QTDIR environment variable points to the + root of the Qt distribution. - Microsoft Visual C++ (I only tested with version 5.0). Use the vcvars32.bat to set the environment variables (if you did not select to do this automatically during installation). @@ -146,7 +149,7 @@ QT RELATED PROBLEMS: - do "cd qt" - do "ln -s your-qt-include-dir-here include", - do "ln -s your-qt-lib-dir-here lib", - - do "export QTDIR=$PWD" (or "setenv QTDIR $PWD if you have a csh) + - do "export QTDIR=$PWD" (or "setenv QTDIR $PWD if you have a csh-like shell) Now install doxygen as described above. @@ -252,4 +255,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (11 June 2000) +Dimitri van Heesch (18 June 2000) diff --git a/README b/README index 39ccee6..58d746c 100644 --- a/README +++ b/README @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (11 June 2000) +Dimitri van Heesch (18 June 2000) diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l index 561e54b..6e84ea4 100644 --- a/addon/configgen/config_templ.l +++ b/addon/configgen/config_templ.l @@ -318,6 +318,7 @@ void configStrToVal() static void substEnvVarsInString(QCString &s) { static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)"); + if (s.isEmpty()) return; int p=0; int i,l; //printf("substEnvVarInString(%s) start\n",s.data()); diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp index 1dcc7b1..92ec41e 100644 --- a/addon/configgen/configgen.cpp +++ b/addon/configgen/configgen.cpp @@ -788,29 +788,33 @@ void init() "EXTRACT_ALL", "FALSE", "gererate docs for all classes flag", - "If the EXTRACT_ALL tag is set to YES all classes and functions will be \n" - "included in the documentation, even if no documentation was available. \n" + "If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n" + "documentation are documented, even if no documentation was available. \n" + "Private class members and static file members will be hidden unless \n" + "the EXTRACT_PRIVATE tag is set to YES \n" ); ConfigBool::add( "extractPrivateFlag", "EXTRACT_PRIVATE", "FALSE", "generate docs for private members flag", "If the EXTRACT_PRIVATE tag is set to YES all private members of a class \n" - "will be included in the documentation. \n" + "and the static members of a file will be included in the documentation. \n" ); ConfigBool::add( "hideMemberFlag", "HIDE_UNDOC_MEMBERS", "FALSE", "hide undocumented members.", "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n" - "undocumented members inside documented classes or files. \n" + "undocumented members of documented classes, files or namespaces. \n" + "This option has no effect if EXTRACT_ALL is enabled. \n" ); ConfigBool::add( "hideClassFlag", "HIDE_UNDOC_CLASSES", "FALSE", "hide undocumented members.", "If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all \n" - "undocumented classes. \n" + "undocumented classes that are normally visible in the class hierarchy. \n" + "This option has no effect if EXTRACT_ALL is enabled. \n" ); ConfigBool::add( "briefMemDescFlag", "BRIEF_MEMBER_DESC", diff --git a/doc/commands.doc b/doc/commands.doc index 4618000..8bf691a 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -47,6 +47,7 @@ documentation:
  • \refitem cmdaddindex \addindex
  • \refitem cmdanchor \anchor
  • \refitem cmdarg \arg +
  • \refitem cmdattention \attention
  • \refitem cmdauthor \author
  • \refitem cmdb \b
  • \refitem cmdbrief \brief @@ -97,6 +98,7 @@ documentation:
  • \refitem cmdpre \pre
  • \refitem cmdref \ref
  • \refitem cmdrelates \relates +
  • \refitem cmdremarks \remarks
  • \refitem cmdreturn \return
  • \refitem cmdretval \retval
  • \refitem cmdsa \sa @@ -523,6 +525,18 @@ Public/Protected/Private/... section. Section indicators \htmlonly --- \endhtmlonly +
    +\subsection cmdattention \attention { attention text } + + \addindex \attention + Starts a paragraph where a message that needs attention may be entered. + The paragraph will be indented. + The text of the paragraph has no special internal structure. All visual + enhancement commands may be used inside the paragraph. + Multiple adjacent \\attention commands will be joined into a single paragraph. + The \\attention command ends when a blank line or some other + sectioning command is encountered. + \subsection cmdauthor \author { list of authors } \addindex \author @@ -664,7 +678,7 @@ Public/Protected/Private/... section. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \\invariant commands will be joined into a single paragraph. - Each warning description will start on a new line. + Each invariant description will start on a new line. Alternatively, one \\invariant command may mention several invariants. The \\invariant command ends when a blank line or some other sectioning command is encountered. @@ -712,7 +726,7 @@ Public/Protected/Private/... section. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \\post commands will be joined into a single paragraph. - Each warning description will start on a new line. + Each postcondition will start on a new line. Alternatively, one \\post command may mention several postconditions. The \\post command ends when a blank line or some other sectioning command is encountered. @@ -726,12 +740,26 @@ Public/Protected/Private/... section. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \\pre commands will be joined into a single paragraph. - Each warning description will start on a new line. + Each precondition will start on a new line. Alternatively, one \\pre command may mention several preconditions. The \\pre command ends when a blank line or some other sectioning command is encountered.
    +\subsection cmdremarks \remarks { remark text } + + \addindex \remarks + Starts a paragraph where one or more marks may be entered. + The paragraph will be indented. + The text of the paragraph has no special internal structure. All visual + enhancement commands may be used inside the paragraph. + Multiple adjacent \\remark commands will be joined into a single paragraph. + Each remark will start on a new line. + Alternatively, one \\remark command may mention + several remarks. The \\remark command ends when a blank line or some other + sectioning command is encountered. + +
    \subsection cmdreturn \return { description of the return value } \addindex \return @@ -800,7 +828,8 @@ Public/Protected/Private/... section. Multiple adjacent \\version commands will be joined into a single paragraph. Each version description will start on a new line. Alternatively, one \\version command may mention - several dates. The \\version command ends when a blank line or some other + several version strings. + The \\version command ends when a blank line or some other sectioning command is encountered. See section \ref cmdauthor "\\author" for an example. diff --git a/make.bat b/make.bat index c298a9f..c867915 100644 --- a/make.bat +++ b/make.bat @@ -1,5 +1,7 @@ REM make script for Microsoft Visual C++ +if "%QTDIR%"=="" goto ERROR + REM use perl to create the config file perl wintools\make.pl @@ -12,3 +14,10 @@ type src\doxytag.pro.in | sed "s/\$extraopts/release/g" >src\doxytag.pro type src\doxysearch.pro.in | sed "s/\$extraopts/release/g" >src\doxysearch.pro nmake +goto END + +:ERROR +echo The QTDIR environment variable is not set! See the INSTALL file for more info. +goto END + +:END diff --git a/src/classdef.cpp b/src/classdef.cpp index a4d6c33..1ccf663 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1025,7 +1025,7 @@ void ClassDef::writeDocumentation(OutputList &ol) while (file) { bool ambig; - FileDef *fd=findFileDef(&inputNameDict,file,ambig); + FileDef *fd=findFileDef(inputNameDict,file,ambig); if (fd) { if (first) diff --git a/src/code.l b/src/code.l index 29d0e0b..08f10ce 100644 --- a/src/code.l +++ b/src/code.l @@ -676,7 +676,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" //FileInfo *f; bool ambig; FileDef *fd; - if ((fd=findFileDef(&inputNameDict,yytext,ambig)) && + if ((fd=findFileDef(inputNameDict,yytext,ambig)) && fd->isLinkable()) { g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext); diff --git a/src/config.l b/src/config.l index fca2e4e..e088707 100644 --- a/src/config.l +++ b/src/config.l @@ -1875,6 +1875,7 @@ void configStrToVal() static void substEnvVarsInString(QCString &s) { static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)"); + if (s.isEmpty()) return; int p=0; int i,l; //printf("substEnvVarInString(%s) start\n",s.data()); diff --git a/src/declinfo.l b/src/declinfo.l index fe2fed0..a6cafc4 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -136,9 +136,10 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) {B}+ { addType(); } -{B}*"("{B}*"*" { +{B}*"("({ID}"::")*{B}*"*" { addType(); - type+="(*"; + QCString text=yytext; + type+=text.stripWhiteSpace(); } {B}*")" { type+=")"; diff --git a/src/defargs.l b/src/defargs.l index 5ff1fcb..88e4148 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -256,12 +256,9 @@ ID [a-z_A-Z][a-z_A-Z0-9]* if (l>0) { int i=l-1; - while (i>=0 && - ( - isspace(g_curArgTypeName.at(i)) || - isId(g_curArgTypeName.at(i)) - ) - ) i--; + while (i>=0 && isspace(g_curArgTypeName.at(i))) i--; + while (i>=0 && isId(g_curArgTypeName.at(i))) i--; + //printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i); Argument *a = new Argument; a->attrib = g_curArgAttrib.copy(); if (i>=0 && g_curArgTypeName.at(i)!=':') @@ -276,7 +273,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* a->array = g_curArgArray.copy(); a->defval = g_curArgDefValue.copy(); a->docs = g_curArgDocs.stripWhiteSpace(); - //printf("Argument %s %s adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data()); + //printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data()); g_argList->append(a); } g_curArgAttrib.resize(0); diff --git a/src/definition.cpp b/src/definition.cpp index af964f0..629a45a 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -141,15 +141,27 @@ static bool readCodeFragment(const char *fileName, } if (!f.atEnd()) { - // skip until the opening bracket is found - while (lineNr<=endLine && !f.atEnd() && c!='{') + // skip until the opening bracket or lonely : is found + bool found=FALSE; + char cn; + while (lineNr<=endLine && !f.atEnd() && !found) { - while ((c=f.getch())!='{' && c!=-1) if (c=='\n') lineNr++; + while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++; + if (c==':') + { + cn=f.getch(); + if (cn!=':') found=TRUE; + } + else if (c=='{') + { + found=TRUE; + } } - if (c=='{') + if (found) { // copy until end of line result+=c; + if (c==':') result+=cn; startLine=lineNr; const int maxLineLength=4096; char lineStr[maxLineLength]; @@ -179,7 +191,7 @@ static bool readCodeFragment(const char *fileName, } /*! Write a reference to the source code defining this definition */ -void Definition::writeSourceDef(OutputList &ol,const char *scopeName) +void Definition::writeSourceDef(OutputList &ol,const char *) { ol.pushGeneratorState(); //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef); @@ -271,6 +283,13 @@ void Definition::writeSourceDef(OutputList &ol,const char *scopeName) ol.newParagraph(); ol.enableAll(); } + ol.popGeneratorState(); +} + +/*! Write code of this definition into the documentation */ +void Definition::writeInlineCode(OutputList &ol,const char *scopeName) +{ + ol.pushGeneratorState(); if (Config::inlineSourceFlag && startBodyLine!=-1 && endBodyLine>=startBodyLine && bodyDef) { diff --git a/src/definition.h b/src/definition.h index 36aa229..701fd03 100644 --- a/src/definition.h +++ b/src/definition.h @@ -97,6 +97,7 @@ class Definition int getEndBodyLine() const { return endBodyLine; } FileDef *getBodyDef() { return bodyDef; } void writeSourceDef(OutputList &ol,const char *scopeName); + void writeInlineCode(OutputList &ol,const char *scopeName); void writeSourceRefs(OutputList &ol,const char *scopeName); void addSourceReference(MemberDef *d); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1e857f9..3240633 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * * Copyright (C) 1997-2000 by Dimitri van Heesch. @@ -80,11 +80,15 @@ MemberNameDict memberNameDict(10007); // all class member names MemberNameDict functionNameDict(10007); // all functions StringDict substituteDict(1009); // class name substitutes SectionDict sectionDict(257); // all page sections -FileNameDict inputNameDict(1009); // sections StringDict excludeNameDict(1009); // sections -FileNameDict includeNameDict(1009); // include names -FileNameDict exampleNameDict(1009); // examples -FileNameDict imageNameDict(257); // images +//FileNameDict inputNameDict(1009); // sections +//FileNameDict includeNameDict(1009); // include names +//FileNameDict exampleNameDict(1009); // examples +//FileNameDict imageNameDict(257); // images +FileNameDict *inputNameDict; // sections +FileNameDict *includeNameDict; // include names +FileNameDict *exampleNameDict; // examples +FileNameDict *imageNameDict; // images StringDict typedefDict(1009); // all typedefs GroupDict groupDict(257); // all groups FormulaDict formulaDict(1009); // all formulas @@ -119,11 +123,11 @@ void clearAll() functionNameDict.clear(); substituteDict.clear(); sectionDict.clear(); - inputNameDict.clear(); + inputNameDict->clear(); excludeNameDict.clear(); - includeNameDict.clear(); - exampleNameDict.clear(); - imageNameDict.clear(); + includeNameDict->clear(); + exampleNameDict->clear(); + imageNameDict->clear(); typedefDict.clear(); groupDict.clear(); formulaDict.clear(); @@ -246,7 +250,7 @@ static void buildFileList(Entry *root) ) { bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->name,ambig); + FileDef *fd=findFileDef(inputNameDict,root->name,ambig); if (fd && !ambig) { if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) || @@ -291,7 +295,7 @@ static void buildFileList(Entry *root) if (ambig) // name is ambigious { text+="matches the following input files:\n"; - text+=showFileDefMatches(&inputNameDict,root->name); + text+=showFileDefMatches(inputNameDict,root->name); text+="Please use a more specific name by " "including a (larger) part of the path!"; } @@ -326,7 +330,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) // see if we need to include a verbatim copy of the header file //printf("root->includeFile=%s\n",root->includeFile.data()); if (!root->includeFile.isEmpty() && - (fd=findFileDef(&inputNameDict,root->includeFile,ambig))==0 + (fd=findFileDef(inputNameDict,root->includeFile,ambig))==0 ) { // explicit request QCString text; @@ -337,7 +341,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) if (ambig) // name is ambigious { text+="matches the following input files:\n"; - text+=showFileDefMatches(&inputNameDict,root->includeFile); + text+=showFileDefMatches(inputNameDict,root->includeFile); text+="Please use a more specific name by " "including a (larger) part of the path!"; } @@ -442,7 +446,7 @@ static void buildClassList(Entry *root) bool ambig; ClassDef *cd; //printf("findFileDef(%s)\n",root->fileName.data()); - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); if ((cd=getClass(fullName))) { @@ -486,7 +490,7 @@ static void buildClassList(Entry *root) if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1) { cd->setBodySegment(root->bodyLine,root->endBodyLine); - cd->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + cd->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); } cd->addSectionsToDefinition(root->anchors); cd->setName(fullName); // change name to match docs @@ -652,7 +656,7 @@ static void buildNamespaceList(Entry *root) bool ambig; // file definition containing the namespace nd - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); // insert the namespace in the file definition if (fd) fd->insertNamespace(nd); } @@ -672,7 +676,7 @@ static void buildNamespaceList(Entry *root) bool ambig; // file definition containing the namespace nd - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); // insert the namespace in the file definition if (fd) fd->insertNamespace(nd); @@ -707,7 +711,7 @@ static void findUsingDirectives(Entry *root) { NamespaceDef *usingNd = 0; NamespaceDef *nd = 0; - FileDef *fd = findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd = findFileDef(inputNameDict,root->fileName,ambig); QCString nsName; // see if the using statement was found inside a namespace or inside @@ -777,7 +781,7 @@ static void findUsingDirectives(Entry *root) bool ambig; // file definition containing the namespace nd - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); // insert the namespace in the file definition if (fd) { @@ -815,7 +819,7 @@ void findUsingDeclarations(Entry *root) { ClassDef *usingCd = 0; NamespaceDef *nd = 0; - FileDef *fd = findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd = findFileDef(inputNameDict,root->fileName,ambig); QCString scName; // see if the using statement was found inside a namespace or inside @@ -977,7 +981,7 @@ static MemberDef *addVariableToClass( // md->setMemberGroup(memberGroupDict[root->mGrpId]); // bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); // add the member to the global list if (mn) @@ -1040,7 +1044,7 @@ static MemberDef *addVariableToFile( md->setMaxInitLines(root->initLines); md->setMemberGroupId(root->mGrpId); bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); md->setBodyDef(fd); //if (root->mGrpId!=-1) //{ @@ -1391,7 +1395,7 @@ static void buildMemberList(Entry *root) md->setMemberSpecifiers(root->memSpec); md->setMemberGroupId(root->mGrpId); bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); //md->setScopeTemplateArguments(root->tArgList); md->addSectionsToDefinition(root->anchors); QCString def; @@ -1528,7 +1532,7 @@ static void buildMemberList(Entry *root) { md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); } md->addSectionsToDefinition(root->anchors); } @@ -1555,7 +1559,7 @@ static void buildMemberList(Entry *root) //md->setBody(root->body); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); md->setBodyDef(fd); md->addSectionsToDefinition(root->anchors); md->setMemberSpecifiers(root->memSpec); @@ -1622,7 +1626,7 @@ static void buildMemberList(Entry *root) //FileDef *fd=0; //bool ambig; //if (!root->fileName.isEmpty() && - // (fd=findFileDef(&inputNameDict,root->fileName,ambig)) + // (fd=findFileDef(inputNameDict,root->fileName,ambig)) // ) if (fd) { @@ -2178,7 +2182,7 @@ static void addMemberDocs(Entry *root, { md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); md->setBodyDef(fd); } } @@ -2214,7 +2218,7 @@ static void addMemberDocs(Entry *root, // else // { // bool ambig; - // FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + // FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); // if (fd) // { // //fd->addMemberToGroup(md,root->mGrpId); @@ -2343,8 +2347,9 @@ static bool findUnrelatedFunction(Entry *root, { bool ambig; NamespaceDef *nd=md->getNamespace(); - //printf("Namespace %s\n",nd ? nd->name().data() : ""); - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + //printf("Namespace namespaceName=%s nd=%s\n", + // namespaceName.data(),nd ? nd->name().data() : ""); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); //printf("File %s\n",fd ? fd->name().data() : ""); NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0; //printf("NamespaceList %p\n",nl); @@ -2360,11 +2365,10 @@ static bool findUnrelatedFunction(Entry *root, { Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n", md->name().data(),namespaceName.data()); - //ArgumentList *al = new ArgumentList; - //stringToArgumentList(funcArgs,al); QCString nsName = nd ? nd->name().data() : ""; bool matching= (md->argumentList()==0 && root->argList->count()==0) || + md->isVariable() || md->isTypedef() || /* in case of function pointers */ matchArguments(md->argumentList(),root->argList,0,nsName); if (matching) // add docs to the member { @@ -2372,7 +2376,6 @@ static bool findUnrelatedFunction(Entry *root, addMemberDocs(root,md,decl,root->argList,FALSE); found=TRUE; } - //delete al; } md=mn->next(); } @@ -2851,7 +2854,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ClassDef *tcd=0; bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); NamespaceDef *nd=0; if (!namespaceName.isEmpty()) nd=namespaceDict[namespaceName]; tcd = findClassDefinition(fd,nd,scopeName,classTempList); @@ -2935,7 +2938,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl // TODO: match loop for all possible scopes bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); // list of namespaces using in the file that this member definition is part of NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0; @@ -3034,7 +3037,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl md->addSectionsToDefinition(root->anchors); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); md->setBodyDef(fd); md->setMemberSpecifiers(root->memSpec); md->setMemberGroupId(root->mGrpId); @@ -3136,7 +3139,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl { md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); md->setBodyDef(fd); } @@ -3355,7 +3358,7 @@ static void findEnums(Entry *root) else // found a global enum { bool ambig; - fd=findFileDef(&inputNameDict,root->fileName,ambig); + fd=findFileDef(inputNameDict,root->fileName,ambig); mnd=&functionNameDict; mnl=&functionNameList; isGlobal=TRUE; @@ -3372,7 +3375,7 @@ static void findEnums(Entry *root) //md->setDefLine(root->startLine); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); //printf("Enum %s definition at line %d of %s: protection=%d\n", // root->name.data(),root->bodyLine,root->fileName.data(),root->protection); md->addSectionsToDefinition(root->anchors); @@ -4046,7 +4049,7 @@ static void findDefineDocumentation(Entry *root) md->setBriefDescription(root->brief); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->addSectionsToDefinition(root->anchors); md->setMaxInitLines(root->initLines); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); @@ -4084,7 +4087,7 @@ static void findDefineDocumentation(Entry *root) md->setBriefDescription(root->brief); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; - md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); + md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->addSectionsToDefinition(root->anchors); //if (root->mGrpId!=-1 && md->getMemberGroup()==0) //{ @@ -5163,6 +5166,11 @@ int main(int argc,char **argv) substituteEnvironmentVars(); checkConfig(); + inputNameDict = new FileNameDict(1009); + includeNameDict = new FileNameDict(1009); + exampleNameDict = new FileNameDict(1009); + imageNameDict = new FileNameDict(257); + /************************************************************************** * Initialize some global constants **************************************************************************/ @@ -5214,7 +5222,7 @@ int main(int argc,char **argv) s=Config::includePath.first(); while (s) { - readFileOrDirectory(s,0,&includeNameDict,0,&Config::filePatternList, + readFileOrDirectory(s,0,includeNameDict,0,&Config::filePatternList, &Config::excludePatternList,0,0); s=Config::includePath.next(); } @@ -5223,7 +5231,7 @@ int main(int argc,char **argv) s=Config::examplePath.first(); while (s) { - readFileOrDirectory(s,0,&exampleNameDict,0,&Config::examplePatternList, + readFileOrDirectory(s,0,exampleNameDict,0,&Config::examplePatternList, 0,0,0); s=Config::examplePath.next(); } @@ -5232,7 +5240,7 @@ int main(int argc,char **argv) s=Config::imagePath.first(); while (s) { - readFileOrDirectory(s,0,&imageNameDict,0,0, + readFileOrDirectory(s,0,imageNameDict,0,0, 0,0,0); s=Config::imagePath.next(); } @@ -5252,7 +5260,7 @@ int main(int argc,char **argv) while (s) { inputSize+=readFileOrDirectory(s,&inputNameList, - &inputNameDict,&excludeNameDict, + inputNameDict,&excludeNameDict, &Config::filePatternList, &Config::excludePatternList, &inputFiles,0); diff --git a/src/doxygen.h b/src/doxygen.h index aa9c198..87c4592 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -109,10 +109,10 @@ extern ClassDef unrelatedClass; extern QTextStream tagFile; extern SectionDict sectionDict; extern FileNameList inputNameList; -extern FileNameDict includeNameDict; -extern FileNameDict exampleNameDict; -extern FileNameDict inputNameDict; -extern FileNameDict imageNameDict; +extern FileNameDict *includeNameDict; +extern FileNameDict *exampleNameDict; +extern FileNameDict *inputNameDict; +extern FileNameDict *imageNameDict; //extern FileList includeFiles; extern StringDict typedefDict; extern GroupList groupList; diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 941fdc9..7857cc9 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -213,7 +213,7 @@ void GroupDef::writeDocumentation(OutputList &ol) while (fd) { ol.startMemberItem(0); - ol.docify("file"); + ol.docify("file "); ol.insertMemberAlign(); ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); ol.endMemberItem(FALSE); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 10bc0cd..3613f78 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1302,6 +1302,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, // write reference to the source writeSourceDef(ol,cname); writeSourceRefs(ol,cname); + writeInlineCode(ol,cname); ol.endIndent(); // enable LaTeX again diff --git a/src/pre.l b/src/pre.l index 8974744..04e67e0 100644 --- a/src/pre.l +++ b/src/pre.l @@ -99,7 +99,7 @@ static void setFileName(const char *name) { bool ambig; g_yyFileName=name; - g_yyFileDef=findFileDef(&inputNameDict,g_yyFileName,ambig); + g_yyFileDef=findFileDef(inputNameDict,g_yyFileName,ambig); } static void incrLevel() @@ -858,7 +858,7 @@ static void readIncludeFile(const QCString &inc) if (oldFileDef) { bool ambig; - FileDef *fd = findFileDef(&inputNameDict,incFileName,ambig); + FileDef *fd = findFileDef(inputNameDict,incFileName,ambig); // add include dependency to the file in which the #include was found oldFileDef->addIncludeDependency(fd,incFileName,localInclude); } diff --git a/src/scanner.l b/src/scanner.l index c6fd289..1c2bc01 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -137,6 +137,8 @@ static bool inPreBlock; static bool inPostBlock; static bool inInvarBlock; static bool inWarningBlock; +static bool inRemarkBlock; +static bool inAttentionBlock; static bool inParBlock; static bool firstSeeArg; static char afterDocTerminator; @@ -223,6 +225,8 @@ static void initParser() inPostBlock = FALSE; inInvarBlock = FALSE; inWarningBlock = FALSE; + inRemarkBlock = FALSE; + inAttentionBlock = FALSE; inParBlock = FALSE; firstSeeArg = FALSE; } @@ -400,7 +404,7 @@ static void includeFile(OutputList &ol,const char *fileName,bool quiet) //FileInfo *f; bool ambig; FileDef *fd; - if ((fd=findFileDef(&exampleNameDict,fileName,ambig))) + if ((fd=findFileDef(exampleNameDict,fileName,ambig))) { currentIncludeFile=fileToString(fd->absFilePath()); includeFileOffset=0; @@ -419,7 +423,7 @@ static void includeFile(OutputList &ol,const char *fileName,bool quiet) QCString text; text.sprintf("Include file name %s is ambigious.\n",fileName); text+="Possible candidates:\n"; - text+=showFileDefMatches(&exampleNameDict,fileName); + text+=showFileDefMatches(exampleNameDict,fileName); warn(yyFileName,yyLineNr,text); } else @@ -436,7 +440,7 @@ static void verbIncludeFile(OutputList &ol,const char *name) //FileInfo *f; bool ambig; FileDef *fd; - if ((fd=findFileDef(&exampleNameDict,name,ambig))) + if ((fd=findFileDef(exampleNameDict,name,ambig))) { ol.startCodeFragment(); ol.codify(fileToString(fd->absFilePath())); @@ -447,7 +451,7 @@ static void verbIncludeFile(OutputList &ol,const char *name) QCString text; text.sprintf("Include file name %s is ambigious.\n",name); text+=("Possible candidates:\n"); - text+=showFileDefMatches(&exampleNameDict,name); + text+=showFileDefMatches(exampleNameDict,name); warn(yyFileName,yyLineNr,text); } else @@ -665,7 +669,8 @@ static void tryEndItemList() static bool inBlock() { return inParamBlock || inRetValBlock || inSeeBlock || inReturnBlock || inAuthorBlock || - inVersionBlock || inDateBlock || inWarningBlock || inBugBlock || inNoteBlock || + inVersionBlock || inDateBlock || inWarningBlock || inRemarkBlock || + inAttentionBlock || inBugBlock || inNoteBlock || inParBlock || inExceptionBlock || inDeprecatedBlock || inPreBlock || inPostBlock || inInvarBlock; } @@ -681,7 +686,7 @@ static void endBlock() inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock= inVersionBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock= inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock= - inInvarBlock=FALSE; + inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE; } static void addSection() @@ -786,7 +791,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) QCString result; bool ambig; FileDef *fd; - if ((fd=findFileDef(&imageNameDict,fileName,ambig))) + if ((fd=findFileDef(imageNameDict,fileName,ambig))) { QFile inImage(fd->absFilePath().data()); if (inImage.open(IO_ReadOnly)) @@ -834,7 +839,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) QCString text; text.sprintf("Warning: image file name %s is ambigious.\n",fileName); text+="Possible candidates:\n"; - text+=showFileDefMatches(&imageNameDict,fileName); + text+=showFileDefMatches(imageNameDict,fileName); warn(yyFileName,yyLineNr,text); } else @@ -1317,7 +1322,6 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") if (inBlock()) endBlock(); inWarningBlock=TRUE; outDoc->startDescList(); - //outDoc->writeBoldString("Warning: "); outDoc->startBold(); scanString(theTranslator->trWarning()+": "); outDoc->endBold(); @@ -1329,6 +1333,42 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") outDoc->writeDescItem(); } } +{CMD}"remark"[s]?/{BN} { + endArgumentList(); + if (!inRemarkBlock) + { + if (inBlock()) endBlock(); + inRemarkBlock=TRUE; + outDoc->startDescList(); + outDoc->startBold(); + scanString(theTranslator->trRemarks()+": "); + outDoc->endBold(); + outDoc->endDescTitle(); + outDoc->writeDescItem(); + } + else + { + outDoc->writeDescItem(); + } + } +{CMD}"attention"[s]?/{BN} { + endArgumentList(); + if (!inAttentionBlock) + { + if (inBlock()) endBlock(); + inAttentionBlock=TRUE; + outDoc->startDescList(); + outDoc->startBold(); + scanString(theTranslator->trAttention()+": "); + outDoc->endBold(); + outDoc->endDescTitle(); + outDoc->writeDescItem(); + } + else + { + outDoc->writeDescItem(); + } + } {CMD}"bug"[s]?/{BN} { endArgumentList(); if (!inBugBlock) @@ -1473,6 +1513,22 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") outDoc->writeDescItem(); } } +"$"[a-zA-Z_0-9]+":"[^\n\$]+"$" { // RCS tag + QCString tagName(&yytext[1]); + int i=tagName.find(':'); + tagName=tagName.left(i); + QCString tagText=&yytext[i+2]; + tagText=tagText.left(tagText.length()-1); + endArgumentList(); + if (inBlock()) endBlock(); + outDoc->startDescList(); + outDoc->startBold(); + scanString(tagName+": "); + outDoc->endBold(); + outDoc->endDescTitle(); + scanString(tagText); + outDoc->endDescList(); + } {CMD}"author"/{BN} { endArgumentList(); if (!inAuthorBlock) @@ -2417,6 +2473,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") BEGIN( FindMembers ) ; } [^(] { + lineCount(); current->name += *yytext ; } "<>" { /* skip guided templ specifiers */ } diff --git a/src/tag.l b/src/tag.l index 58f7714..2030b41 100644 --- a/src/tag.l +++ b/src/tag.l @@ -67,7 +67,7 @@ static void addFile(const char *name) //printf("adding file %s tagName=`%s'\n",name,tagName.data()); fd = new FileDef(0,name,tagName); FileName *mn; - if ((mn=inputNameDict[name])) + if ((mn=inputNameDict->find(name))) { mn->append(fd); } @@ -76,7 +76,7 @@ static void addFile(const char *name) mn = new FileName(name,name); mn->append(fd); inputNameList.inSort(mn); - inputNameDict.insert(name,mn); + inputNameDict->insert(name,mn); } cd = 0; nd = 0; diff --git a/src/translator.h b/src/translator.h index 8316e3f..80adc32 100644 --- a/src/translator.h +++ b/src/translator.h @@ -885,7 +885,14 @@ class Translator { return "Referenced by"; } - + virtual QCString trRemarks() + { + return "Remarks"; + } + virtual QCString trAttention() + { + return "Attention"; + } }; #endif diff --git a/src/util.cpp b/src/util.cpp index fed416a..83aafe2 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1954,7 +1954,7 @@ bool generateLink(OutputList &ol,const char *clName, ol.endTextLink(); return TRUE; } - else if ((fd=findFileDef(&inputNameDict,linkRef,ambig)) + else if ((fd=findFileDef(inputNameDict,linkRef,ambig)) && fd->isLinkable()) { // link to documented input file @@ -1973,7 +1973,7 @@ void generateFileRef(OutputList &ol,const char *name,const char *text) //FileInfo *fi; FileDef *fd; bool ambig; - if ((fd=findFileDef(&inputNameDict,name,ambig)) && + if ((fd=findFileDef(inputNameDict,name,ambig)) && fd->isLinkable()) // link to documented input file ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText); -- cgit v0.12