Commit 9ead1e6b authored by Dimitri van Heesch's avatar Dimitri van Heesch
Browse files

Merge branch 'master' of github.com:doxygen/doxygen

parents 941eea99 dacdb42c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -554,8 +554,8 @@ fi

if test "$f_libclang" = YES; then
  printf "  Checking for libclang ... "
  libclang_hdr_dir="/usr/include /usr/local/include /opt/local/include"
  libclang_lib_dir="/usr/lib /usr/local/lib /opt/local/lib"
  libclang_hdr_dir="/usr/include /usr/local/include /opt/local/include /usr/lib/llvm-3.4/include"
  libclang_lib_dir="/usr/lib /usr/local/lib /opt/local/lib /usr/lib/llvm-3.4/lib"
  if test "$f_libclangstatic" = NO; then
    libclang_lib_name="libclang.so libclang.dylib libclang.a libclang.dll.a"
  else
@@ -941,7 +941,7 @@ EOF
     #if test "$f_thread" = YES; then
     #  realopts="$realopts thread"
     #fi
     cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" -e "s;%%SQLITE3_INC%%;$sqlite3_hdr_dir;g" -e "s;%%SQLITE3_LIBS%%;$sqlite3_link;g" -e "s;%%LIBCLANG_LIBS%%;$libclang_link;g" >> $DST
     cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" -e "s;%%SQLITE3_INC%%;$sqlite3_hdr_dir;g" -e "s;%%SQLITE3_LIBS%%;$sqlite3_link;g" -e "s;%%LIBCLANG_LIBS%%;$libclang_link;g" -e "s;%%LIBCLANG_INC%%;$libclang_hdr;g" >> $DST
     echo "  Created $DST from $SRC..."
done

+66 −22
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
    item->text += " <p>";
    if (Doxygen::markdownSupport)
    {
      item->text += processMarkdown(yyFileName,current,outputXRef);
      item->text += processMarkdown(yyFileName,yyLineNr,current,outputXRef);
    }
    else
    {
@@ -575,7 +575,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
    ASSERT(item!=0);
    if (Doxygen::markdownSupport)
    {
      item->text = processMarkdown(yyFileName,current,outputXRef);
      item->text = processMarkdown(yyFileName,yyLineNr,current,outputXRef);
    }
    else
    {
@@ -593,12 +593,27 @@ static void addXRefItem(const char *listName,const char *itemTitle,
    {
      docEntry->doc += cmdString;
    }
    SectionInfo *si=new SectionInfo(listName,anchorLabel,
    SectionInfo *si = Doxygen::sectionDict->find(anchorLabel);
    if (si)
    {
      if (si->lineNr != -1)
      {
        warn(listName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",anchorLabel,si->fileName.data(),si->lineNr);
      }
      else
      {
        warn(listName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",anchorLabel,si->fileName.data());
      }
    }
    else
    {
      si=new SectionInfo(listName,yyLineNr,anchorLabel,
                         g_sectionTitle,SectionInfo::Anchor,
                         g_sectionLevel);
      Doxygen::sectionDict->append(anchorLabel,si);
      docEntry->anchors->append(si);
    }
  }
  outputXRef.resize(0);
}

@@ -642,11 +657,25 @@ static SectionInfo::SectionType sectionLevelToType(int level)
}

static void addSection()
{
  SectionInfo *si = Doxygen::sectionDict->find(g_sectionLabel);
  if (si)
  {
    if (si->lineNr != -1)
    {
      warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",g_sectionLabel.data(),si->fileName.data(),si->lineNr);
    }
    else
    {
      warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",g_sectionLabel.data(),si->fileName.data());
    }
  }
  else
  {
    // create a new section element
    g_sectionTitle+=yytext;
    g_sectionTitle=g_sectionTitle.stripWhiteSpace();
  SectionInfo *si = new SectionInfo(yyFileName,g_sectionLabel,
    si = new SectionInfo(yyFileName,yyLineNr,g_sectionLabel,
                          g_sectionTitle,sectionLevelToType(g_sectionLevel),g_sectionLevel);

    // add section to this entry
@@ -654,7 +683,7 @@ static void addSection()

    // add section to the global dictionary
    Doxygen::sectionDict->append(g_sectionLabel,si);

  }
}

//-----------------------------------------------------------------------------
@@ -1701,9 +1730,24 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
  /* ----- handle arguments of the anchor command ------- */

<AnchorLabel>{LABELID}			{ // found argument
                                          SectionInfo  *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor,0);
                                          SectionInfo *si = Doxygen::sectionDict->find(yytext);
                                          if (si)
                                          {
                                            if (si->lineNr != -1)
                                            {
                                              warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",yytext,si->fileName.data(),si->lineNr);
                                            }
                                            else
                                            {
                                              warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",yytext,si->fileName.data());
                                            }
                                          }
                                          else
                                          {
                                            si = new SectionInfo(yyFileName,yyLineNr,yytext,0,SectionInfo::Anchor,0);
                                            Doxygen::sectionDict->append(yytext,si);
  					    current->anchors->append(si);
                                          }
					  addOutput(yytext);
					  BEGIN( Comment );
  					}
@@ -2876,9 +2920,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,

  if (Doxygen::markdownSupport)
  {
    current->brief      = processMarkdown(fileName,current,current->brief);
    current->doc        = processMarkdown(fileName,current,current->doc);
    current->inbodyDocs = processMarkdown(fileName,current,current->inbodyDocs);
    current->brief      = processMarkdown(fileName,lineNr,current,current->brief);
    current->doc        = processMarkdown(fileName,lineNr,current,current->doc);
    current->inbodyDocs = processMarkdown(fileName,lineNr,current,current->inbodyDocs);
  }

  Debug::print(Debug::CommentScan,0,
+20 −5
Original line number Diff line number Diff line
@@ -8643,9 +8643,23 @@ static void findMainPage(EntryNav *rootNav)
      Doxygen::mainPage->setShowToc(root->stat);
      addPageToContext(Doxygen::mainPage,rootNav);
          
      // a page name is a label as well!
      SectionInfo *si=new SectionInfo(
          indexName,
      SectionInfo *si = Doxygen::sectionDict->find(Doxygen::mainPage->name());
      if (si)
      {
        if (si->lineNr != -1)
        {
          warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s, line %d)",Doxygen::mainPage->name().data(),si->fileName.data(),si->lineNr);
        }
        else
        {
          warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s)",Doxygen::mainPage->name().data(),si->fileName.data());
        }
      }
      else
      {
        // a page name is a label as well! but should no be double either
        si=new SectionInfo(
          indexName, root->startLine,
          Doxygen::mainPage->name(),
          Doxygen::mainPage->title(),
          SectionInfo::Page,
@@ -8653,6 +8667,7 @@ static void findMainPage(EntryNav *rootNav)
        Doxygen::sectionDict->append(indexName,si);
        Doxygen::mainPage->addSectionsToDefinition(root->anchors);
      }
    }
    else
    {
      warn(root->fileName,root->startLine,
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ win32-g++:TMAKE_CXXFLAGS += -fno-exceptions
linux-g++:TMAKE_CXXFLAGS   += -fno-exceptions
INCLUDEPATH                += ../generated_src/doxygen ../src ../qtools ../libmd5
INCLUDEPATH                += %%SQLITE3_INC%%
INCLUDEPATH		   += %%LIBCLANG_INC%%
DEPENDPATH                 += ../generated_src/doxygen
win32:INCLUDEPATH          += .
DESTDIR                    =  ../lib
+43 −10
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include "commentcnv.h"
#include "config.h"
#include "section.h"
#include "message.h"

//-----------

@@ -90,6 +91,7 @@ static QDict<LinkRef> g_linkRefs(257);
static action_t       g_actions[256];
static Entry         *g_current;
static QCString       g_fileName;
static int            g_lineNr;

// In case a markdown page starts with a level1 header, that header is used
// as a title of the page, in effect making it a level0 header, so the
@@ -1690,13 +1692,28 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size)
      out.addStr(" ");
      out.addStr(header);
      out.addStr("\n");
      SectionInfo *si = new SectionInfo(g_fileName,id,header,type,level);
      SectionInfo *si = Doxygen::sectionDict->find(header);
      if (si)
      {
        if (si->lineNr != -1)
        {
          warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",header.data(),si->fileName.data(),si->lineNr);
        }
        else
        {
          warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s)",header.data(),si->fileName.data());
        }
      }
      else
      {
        si = new SectionInfo(g_fileName,g_lineNr,id,header,type,level);
        if (g_current)
        {
          g_current->anchors->append(si);
        }
        Doxygen::sectionDict->append(header,si);
      }
    }
    else
    {
      if (!id.isEmpty())
@@ -2020,7 +2037,21 @@ static QCString processBlocks(const QCString &s,int indent)
            out.addStr(" ");
            out.addStr(header);
            out.addStr("\n\n");
            SectionInfo *si = new SectionInfo(g_fileName,id,header,
            SectionInfo *si = Doxygen::sectionDict->find(header);
            if (si)
            {
              if (si->lineNr != -1)
              {
                warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",header.data(),si->fileName.data(),si->lineNr);
              }
              else
              {
                warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s)",header.data(),si->fileName.data());
              }
            }
            else
            {
              si = new SectionInfo(g_fileName,g_lineNr,id,header,
                      level==1 ? SectionInfo::Section : SectionInfo::Subsection,level);
              if (g_current)
              {
@@ -2028,6 +2059,7 @@ static QCString processBlocks(const QCString &s,int indent)
              }
              Doxygen::sectionDict->append(header,si);
            }
          }
          else
          {
            out.addStr(level==1?"<h1>":"<h2>");
@@ -2214,7 +2246,7 @@ static QCString detab(const QCString &s,int &refIndent)

//---------------------------------------------------------------------------

QCString processMarkdown(const QCString &fileName,Entry *e,const QCString &input)
QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,const QCString &input)
{
  static bool init=FALSE;
  if (!init)
@@ -2237,6 +2269,7 @@ QCString processMarkdown(const QCString &fileName,Entry *e,const QCString &input
  g_linkRefs.clear();
  g_current = e;
  g_fileName = fileName;
  g_lineNr   = lineNr;
  static GrowBuf out;
  if (input.isEmpty()) return input;
  out.clear();
Loading