23 #include <qfileinfo.h>
59 #define DBG(x) do {} while(0)
68 #define INTERNAL_ASSERT(x) do {} while(0)
195 g_scope = ctx->
scope;
242 char *p = tmp.rawData();
248 if (c==
'{') c=
'<';
else if (c==
'}') c=
'>';
273 QFile inImage(inputFile);
274 if (inImage.open(IO_ReadOnly))
278 if ((i=result.findRev(
'/'))!=-1 || (i=result.findRev(
'\\'))!=-1)
280 result = result.right(result.length()-i-1);
303 QCString outputFile = outputDir+
"/"+result;
304 QFileInfo outfi(outputFile);
305 if (outfi.isSymLink())
307 QFile::remove(outputFile);
309 "destination of image %s is a symlink, replacing with image",
312 if (outputFile!=inputFile)
314 QFile outImage(outputFile.data());
315 if (outImage.open(IO_WriteOnly))
317 char *buffer =
new char[inImage.size()];
318 inImage.readBlock(buffer,inImage.size());
319 outImage.writeBlock(buffer,inImage.size());
327 "could not write output image %s",qPrint(outputFile));
332 printf(
"Source & Destination are the same!\n");
338 "could not open image %s",qPrint(fileName));
342 fd->
name().right(4)==
".eps"
346 QCString baseName = fd->
name().left(fd->
name().length()-4);
347 QCString epstopdfArgs(4096);
348 epstopdfArgs.sprintf(
"\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
349 outputDir.data(), baseName.data(),
350 outputDir.data(), baseName.data());
354 err(
"Problems running epstopdf. Check your TeX installation!\n");
363 text.sprintf(
"image file name %s is ambiguous.\n",qPrint(fileName));
364 text+=
"Possible candidates:\n";
371 if (result.left(5)!=
"http:" && result.left(6)!=
"https:")
374 "image file %s is not found in IMAGE_PATH: "
375 "assuming external image.",qPrint(fileName)
391 if (g_memberDef==0)
return;
399 static QRegExp re(
"$?[a-zA-Z0-9_\\x80-\\xFF]+\\.*");
401 while ((i=re.match(name,p,&l))!=-1)
403 QCString aName=name.mid(i,l);
409 for (ali.toFirst();(a=ali.current());++ali)
413 argName=argName.stripWhiteSpace();
415 if (argName.right(3)==
"...") argName=argName.left(argName.length()-3);
423 if (!found && isParam)
427 if (!scope.isEmpty()) scope+=
"::";
else scope=
"";
428 QCString inheritedFrom =
"";
429 QCString docFile = g_memberDef->
docFile();
430 int docLine = g_memberDef->
docLine();
434 inheritedFrom.sprintf(
" inherited from member %s at line "
435 "%d in file %s",qPrint(inheritedMd->
name()),
443 "argument '%s' of command @param "
444 "is not found in the argument list of %s%s%s%s",
445 qPrint(aName), qPrint(scope), qPrint(g_memberDef->
name()),
446 qPrint(alStr), qPrint(inheritedFrom));
470 for (ali.toFirst();(a=ali.current());++ali)
474 argName=argName.stripWhiteSpace();
475 if (argName.right(3)==
"...") argName=argName.left(argName.length()-3);
480 else if (!argName.isEmpty() &&
g_paramsFound.find(argName)==0 && a->
docs.isEmpty())
490 "The following parameters of "+
493 " are not documented:\n";
494 for (ali.toFirst();(a=ali.current());++ali)
498 argName=argName.stripWhiteSpace();
503 else if (!argName.isEmpty() &&
g_paramsFound.find(argName)==0)
513 errMsg+=
" parameter '"+argName+
"'";
535 QCString returnType = g_memberDef->
typeString();
556 for (ali.toFirst();(a=ali.current()) && allDoc;++ali)
558 if (!a->
name.isEmpty() && a->
type!=
"void" &&
559 !(isPython && (a->
name==
"self" || a->
name==
"cls"))
562 allDoc = !a->
docs.isEmpty();
567 if (!allDoc && declAl!=0)
572 for (ali.toFirst();(a=ali.current()) && allDoc;++ali)
574 if (!a->
name.isEmpty() && a->
type!=
"void" &&
575 !(isPython && (a->
name==
"self" || a->
name==
"cls"))
578 allDoc = !a->
docs.isEmpty();
599 returnType.isEmpty() ||
600 returnType.find(
"void")!=-1 ||
601 returnType.find(
"subroutine")!=-1 ||
610 (returnType.isEmpty() ||
611 returnType.find(
"void")!=-1 ||
612 returnType.find(
"subroutine")!=-1 ||
629 QCString result=text;
630 if (result.right(4)==
".tex")
632 result=result.left(result.length()-4);
727 QCString cmdArg=
substitute(commandName,
"#",
"::");
728 int l=cmdArg.length();
729 if (l==0)
return FALSE;
731 int funcStart=cmdArg.find(
'(');
740 int secondParen = cmdArg.find(
'(', funcStart+1);
741 int leftParen = cmdArg.find(
')', funcStart+1);
742 if (leftParen!=-1 && secondParen!=-1)
744 if (leftParen<secondParen)
746 funcStart=secondParen;
752 QCString args=cmdArg.right(l-funcStart);
764 args.isEmpty()?0:args.data(),
765 md,cd,fd,nd,gd,FALSE,0,TRUE);
779 QCString fullName=cmdArg;
782 fullName.prepend(
g_context.left(scopeOffset)+
"::");
791 *pBrief=cd->briefDescription();
799 *pBrief=nd->briefDescription();
807 *pBrief=gd->briefDescription();
823 *pDoc=fd->documentation();
824 *pBrief=fd->briefDescription();
835 scopeOffset =
g_context.findRev(
"::",scopeOffset-1);
836 if (scopeOffset==-1) scopeOffset=0;
838 }
while (scopeOffset>=0);
847 QList<DocNode> &children,
bool
851 const QCString &cmdName)
853 DBG((
"handleStyleArgument(%s)\n",qPrint(cmdName)));
868 static QRegExp specialChar(
"[.,|()\\[\\]:;\\?]");
902 DBG((
"handleStyleArgument(%s) end tok=%x\n",qPrint(cmdName),tok));
913 DBG((
"HandleStyleEnter\n"));
925 DBG((
"HandleStyleLeave\n"));
934 qPrint(tagName),qPrint(tagName));
939 qPrint(tagName),qPrint(
g_styleStack.top()->styleString()));
989 for (li.toFirst();(opt=li.current());++li,++index)
991 if (opt->
name==
"name")
993 if (!opt->
value.isEmpty())
996 children.append(anc);
1004 else if (opt->
name==
"href")
1009 bool result = attrList.remove(index);
1012 children.append(href);
1014 retval = href->
parse();
1051 "end of comment block while expecting "
1060 if (!autolinkSupport && !ignoreAutoLinkFlag)
1062 children.append(
new DocWord(parent,name));
1101 QCString anchor = compound->
anchor();
1108 name=((
GroupDef*)compound)->groupTitle();
1120 ((
FileDef*)compound)->generateSourceFile()
1125 compound->getReference(),
1126 compound->getSourceFileBase(),
1128 compound->briefDescriptionAsTooltip()
1134 children.append(
new DocWord(parent,name));
1143 children.append(
new DocWord(parent,
":"));
1178 children.append(
new DocWord(parent,name));
1187 while ((i=paramTypes.find(
'|',p))!=-1)
1416 DBG((
"CMD_EMPHASIS: reparsing command %s\n",qPrint(
g_token->
name)));
1506 children.append(form);
1514 children.append(anchor);
1523 children.append(ref);
1636 children.append(
new DocSymbol(parent,s));
1647 if (
insidePRE(parent) || !children.isEmpty())
1692 for (li.toFirst();(opt=li.current());++li,++index)
1695 if (opt->
name==
"src" && !opt->
value.isEmpty())
1700 bool result = attrList.remove(index);
1703 children.append(img);
1717 DBG((
"decodeSymbol(%s)\n",qPrint(symName)));
1724 const QCString &
doc)
1728 if (doc.isEmpty())
return retval;
1737 lastPar = (
DocPara*)children.getLast();
1743 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
1744 retval=par->
parse();
1747 children.append(par);
1748 if (lastPar) lastPar->
markLast(FALSE);
1778 char *s=examplePathList.first();
1782 QFileInfo fi(absFileName);
1788 s=examplePathList.next();
1801 "Possible candidates:\n%s",qPrint(file),
1808 "Check your EXAMPLE_PATH",qPrint(file));
1828 const QCString &ref,
const QCString &file,
1829 const QCString &anchor,
const QCString &tooltip) :
1830 m_word(word), m_ref(ref),
1831 m_file(file), m_relPath(
g_relPath), m_anchor(anchor),
1879 if (g_sectionDict && g_sectionDict->
find(
id)==0)
1882 g_sectionDict->
append(
id,sec);
1897 const QCString &text,
Type t,
bool isExample,
1898 const QCString &exampleFile,
bool isBlock,
const QCString &lang)
1899 : m_context(context), m_text(text), m_type(t),
1900 m_isExample(isExample), m_exampleFile(exampleFile),
1901 m_relPath(
g_relPath), m_lang(lang), m_isBlock(isBlock)
1911 DBG((
"DocInclude::parse(file=%s,text=%s)\n",qPrint(
m_file),qPrint(
m_text)));
1946 err(
"Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
1947 "Please create a bug report\n",__FILE__);
1959 DBG((
"DocIncOperator::parse() text=%s off=%d len=%d\n",qPrint(p),o,l));
1961 bool nonEmpty = FALSE;
1970 if (nonEmpty)
break;
1973 else if (!isspace((uchar)c))
1982 DBG((
"DocIncOperator::parse() Line: %s\n",qPrint(
m_text)));
1995 if (nonEmpty)
break;
1998 else if (!isspace((uchar)c))
2007 DBG((
"DocIncOperator::parse() SkipLine: %s\n",qPrint(
m_text)));
2023 if (nonEmpty)
break;
2026 else if (!isspace((uchar)c))
2050 if (nonEmpty)
break;
2053 else if (!isspace((uchar)c))
2062 DBG((
"DocIncOperator::parse() Until: %s\n",qPrint(
m_text)));
2120 for (;(item=it.current());++it)
2122 paramsFound.insert(it.currentKey(),it.current());
2136 for (;(item=it.current());++it)
2138 paramsFound.insert(it.currentKey(),it.current());
2169 m_id(id), m_key(key), m_relPath(
g_relPath)
2191 if (g_memberDef && g_memberDef->
name().at(0)==
'@')
2205 if (!item->
text.isEmpty())
2224 formCmd.sprintf(
"\\form#%d",
id);
2270 DBG((
"DocSecRefItem::parse() start\n"));
2323 DBG((
"DocSecRefItem::parse() end\n"));
2332 DBG((
"DocSecRefList::parse() start\n"));
2388 DBG((
"DocSecRefList::parse() end\n"));
2399 int i=ref.find(
'#');
2402 m_anchor = ref.right(ref.length()-i-1);
2414 DBG((
"DocInternalRef::parse() start\n"));
2440 DBG((
"DocInternalRef::parse() end\n"));
2448 m_refType(Unknown), m_isSubPage(FALSE)
2454 ASSERT(!target.isEmpty());
2492 else if (
resolveLink(context,target,TRUE,&compound,anchor))
2494 bool isFile = compound ?
2502 if (anchor.isEmpty() &&
2504 ((
GroupDef *)compound)->groupTitle()
2507 m_text=((
GroupDef *)compound)->groupTitle();
2518 m_file = compound->getOutputFileBase();
2519 m_ref = compound->getReference();
2525 ((
FileDef*)compound)->generateSourceFile()
2528 m_file = compound->getSourceFileBase();
2529 m_ref = compound->getReference();
2540 QListIterator<DocNode> li(children);
2541 QList<DocNode> newChildren;
2543 for (li.toFirst();(dn=li.current());++li)
2548 QList<DocNode> ¶Children = para->
children();
2549 paraChildren.setAutoDelete(FALSE);
2550 QListIterator<DocNode> li2(paraChildren);
2552 for (li2.toFirst();(dn2=li2.current());++li2)
2554 newChildren.append(dn2);
2559 QListIterator<DocNode> li3(newChildren);
2560 for (li3.toFirst();(dn=li3.current());++li3)
2562 children.append(dn);
2570 DBG((
"DocRef::parse() start\n"));
2617 static uint numBibFiles =
Config_getList(CITE_BIB_FILES).count();
2620 ASSERT(!target.isEmpty());
2624 if (numBibFiles>0 && cite && !cite->
text.isEmpty())
2674 ((
FileDef*)compound)->generateSourceFile()
2677 m_file = compound->getSourceFileBase();
2678 m_ref = compound->getReference();
2693 DBG((
"DocLink::parse() start\n"));
2738 else if ((p=w.find(
'}'))!=-1)
2744 result=w.right(l-p-1);
2771 DBG((
"DocLink::parse() end\n"));
2781 m_name(name), m_relPath(
g_relPath), m_context(context)
2792 if (fd==0 &&
m_name.right(4)!=
".dot")
2803 "Possible candidates:\n%s",qPrint(
m_name),
2810 "in any of the paths specified via DOTFILE_DIRS!",qPrint(
m_name));
2815 m_name(name), m_relPath(
g_relPath), m_context(context)
2826 if (fd==0 &&
m_name.right(4)!=
".msc")
2837 "Possible candidates:\n%s",qPrint(
m_name),
2844 "in any of the paths specified via MSCFILE_DIRS!",qPrint(
m_name));
2851 m_name(name), m_relPath(
g_relPath), m_context(context)
2862 if (fd==0 &&
m_name.right(4)!=
".dia")
2873 "Possible candidates:\n%s",qPrint(
m_name),
2880 "in any of the paths specified via DIAFILE_DIRS!",qPrint(
m_name));
2894 DBG((
"DocVhdlFlow::parse() start\n"));
2924 DBG((
"DocVhdlFlow::parse() end\n"));
2934 Type t,
const QCString &url) :
2935 m_attribs(attribs), m_name(name),
2954 DBG((
"DocHtmlHeader::parse() start\n"));
3062 DBG((
"DocHtmlHeader::parse() end\n"));
3074 DBG((
"DocHRef::parse() start\n"));
3120 DBG((
"DocHRef::parse() end\n"));
3132 DBG((
"DocInternal::parse() start\n"));
3140 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
3141 retval=par->
parse();
3155 }
while (retval!=0 &&
3174 retval = s->
parse();
3182 DBG((
"DocInternal::parse() end: retval=%x\n",retval));
3194 DBG((
"DocIndexEntry::parse() start\n"));
3274 DBG((
"DocIndexEntry::parse() end retval=%x\n",retval));
3287 for (li.toFirst();(opt=li.current());++li)
3289 if (opt->
name==
"id")
3298 if (g_sectionDict && g_sectionDict->
find(opt->
value)==0)
3321 DBG((
"DocHtmlCaption::parse() start\n"));
3366 DBG((
"DocHtmlCaption::parse() end\n"));
3378 DBG((
"DocHtmlCell::parse() start\n"));
3386 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
3388 retval=par->
parse();
3405 DBG((
"DocHtmlCell::parse() end\n"));
3415 DBG((
"DocHtmlCell::parseXml() start\n"));
3423 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
3425 retval=par->
parse();
3442 DBG((
"DocHtmlCell::parseXml() end\n"));
3453 for (i=0; i<attrs.count(); ++i)
3455 if (attrs.at(i)->name.lower()==
"rowspan")
3457 retval = attrs.at(i)->value.toInt();
3469 for (i=0; i<attrs.count(); ++i)
3471 if (attrs.at(i)->name.lower()==
"colspan")
3473 retval = QMAX(1,attrs.at(i)->value.toInt());
3484 for (i=0; i<attrs.count(); ++i)
3486 if (attrs.at(i)->name.lower()==
"align")
3488 if (attrs.at(i)->value.lower()==
"center")
3490 else if (attrs.at(i)->value.lower()==
"right")
3505 DBG((
"DocHtmlRow::parse() start\n"));
3537 " for a html description title");
3554 retval=cell->
parse();
3561 DBG((
"DocHtmlRow::parse() end\n"));
3571 DBG((
"DocHtmlRow::parseXml() start\n"));
3601 " for a html description title");
3623 DBG((
"DocHtmlRow::parseXml() end\n"));
3635 DBG((
"DocHtmlTable::parse() start\n"));
3677 " for a <tr> or <caption> tag");
3695 DBG((
"DocHtmlTable::parse() end\n"));
3705 DBG((
"DocHtmlTable::parseXml() start\n"));
3713 bool isHeader=FALSE;
3739 DBG((
"DocHtmlTable::parseXml() end\n"));
3765 rowSpans.setAutoDelete(TRUE);
3768 QListIterator<DocNode> li(
children());
3770 for (li.toFirst();(rowNode=li.current());++li)
3778 QListIterator<DocNode> rli(row->
children());
3780 for (rli.toFirst();(cellNode=rli.current());++rli)
3788 for (i=0;i<rowSpans.count();i++)
3790 if (rowSpans.at(i)->rowsLeft>0 &&
3791 rowSpans.at(i)->column==colIdx)
3793 colIdx=rowSpans.at(i)->column+1;
3805 for (i=0;i<rowSpans.count();i++)
3807 if (rowSpans.at(i)->rowsLeft>0) rowSpans.at(i)->rowsLeft--;
3813 if (colIdx-1>maxCols) maxCols=colIdx-1;
3827 for (cli.toFirst();(n=cli.current());++cli) n->
accept(v);
3839 DBG((
"DocHtmlDescTitle::parse() start\n"));
3851 bool isJavaLink=FALSE;
3906 QCString leftOver = lnk->
parse(isJavaLink);
3907 if (!leftOver.isEmpty())
3977 DBG((
"DocHtmlDescTitle::parse() end\n"));
3990 DBG((
"DocHtmlDescData::parse() start\n"));
3997 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
3999 retval=par->
parse();
4004 DBG((
"DocHtmlDescData::parse() end\n"));
4016 DBG((
"DocHtmlDescList::parse() start\n"));
4041 " for a html description title");
4078 DBG((
"DocHtmlDescList::parse() end\n"));
4086 DBG((
"DocHtmlListItem::parse() start\n"));
4096 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
4098 retval=par->
parse();
4105 DBG((
"DocHtmlListItem::parse() end retval=%x\n",retval));
4111 DBG((
"DocHtmlListItem::parseXml() start\n"));
4121 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
4123 retval=par->
parse();
4124 if (retval==0)
break;
4139 DBG((
"DocHtmlListItem::parseXml() end retval=%x\n",retval));
4147 DBG((
"DocHtmlList::parse() start\n"));
4190 " for a html list item");
4216 DBG((
"DocHtmlList::parse() end retval=%x\n",retval));
4224 DBG((
"DocHtmlList::parseXml() start\n"));
4253 " for a html list item");
4268 if (retval==0)
break;
4279 DBG((
"DocHtmlList::parseXml() end retval=%x\n",retval));
4291 DBG((
"DocHtmlBlockQuote::parse() start\n"));
4301 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
4303 retval=par->
parse();
4310 DBG((
"DocHtmlBlockQuote::parse() end retval=%x\n",retval));
4318 DBG((
"DocParBlock::parse() start\n"));
4328 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
4330 retval=par->
parse();
4337 DBG((
"DocParBlock::parse() end retval=%x\n",retval));
4374 : m_indent(indent), m_itemNum(num)
4390 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
4391 retval=par->
parse();
4395 if (lastPar) lastPar->
markLast(FALSE);
4417 m_indent(indent), m_isEnumList(isEnumList),
4461 DBG((
"DocTitle::parse() start\n"));
4488 DBG((
"DocTitle::parse() end\n"));
4518 for (cli.toFirst();(n=cli.current());++cli) n->
accept(v);
4524 DBG((
"DocSimpleSect::parse() start\n"));
4550 int retval = par->
parse();
4552 DBG((
"DocSimpleSect::parse() end retval=%d\n",retval));
4560 DBG((
"DocSimpleSect::parseRcs() start\n"));
4571 DBG((
"DocSimpleSect::parseRcs()\n"));
4579 DBG((
"DocSimpleSect::parse() start\n"));
4600 retval = par->
parse();
4601 if (retval == 0)
break;
4609 DBG((
"DocSimpleSect::parseXml() end retval=%d\n",retval));
4642 case See:
return "see";
4643 case Return:
return "return";
4645 case Authors:
return "author";
4646 case Version:
return "version";
4647 case Since:
return "since";
4648 case Date:
return "date";
4649 case Note:
return "note";
4650 case Warning:
return "warning";
4651 case Pre:
return "pre";
4652 case Post:
return "post";
4654 case Invar:
return "invariant";
4655 case Remark:
return "remark";
4657 case User:
return "user";
4658 case Rcs:
return "rcs";
4668 DBG((
"DocParamList::parse() start\n"));
4671 QCString saveCmdName = cmdName;
4688 if (typeSeparator!=-1)
4715 "argument of command %s",qPrint(cmdName));
4722 "argument of command %s",qPrint(saveCmdName));
4729 retval = par->
parse();
4734 DBG((
"DocParamList::parse() end retval=%d\n",retval));
4743 DBG((
"DocParamList::parseXml() start\n"));
4763 retval = par->
parse();
4784 if (retval == 0)
break;
4802 DBG((
"DocParamList::parse() end retval=%d\n",retval));
4813 DBG((
"DocParamSect::parse() start\n"));
4840 retval = pl->
parse(cmdName);
4847 DBG((
"DocParamSect::parse() end retval=%d\n",retval));
4858 bool needsSeparator = FALSE;
4866 needsSeparator = TRUE;
4887 bool xmlContext=FALSE,
4922 "argument of command %s\n", qPrint(
"cite"));
4963 DBG((
"handleIncludeOperator(%s)\n",qPrint(cmdName)));
4977 "argument of command %s", qPrint(cmdName));
4990 DocNode *n2 = n1!=0 ? it.current() : 0;
5047 qPrint(imgType),qPrint(cmdName));
5117 QCString leftOver = lnk->
parse(isJavaLink);
5118 if (!leftOver.isEmpty())
5126 DBG((
"handleRef(%s)\n",qPrint(cmdName)));
5152 DBG((
"handleInclude(%s)\n",qPrint(cmdName)));
5166 "argument of command %s",qPrint(cmdName));
5201 inc_line =
lineBlock(inc_text, blockId);
5232 "argument of command %s\n", qPrint(cmdName));
5251 int retval = header->
parse();
5268 if (!lang.isEmpty() && lang.at(0)!=
'.')
5312 g_memberDef = thisMd;
5320 DBG((
"handleCommand(%s)\n",qPrint(cmdName)));
5452 retval = sl->
parse();
5552 QCString width,height;
5568 QCString width,height;
5588 QCString width,height;
5595 if (jarPath.isEmpty())
5661 retval = ie->
parse();
5674 retval = block->
parse();
5726 handleFile<DocDotFile>(cmdName);
5732 handleFile<DocMscFile>(cmdName);
5735 handleFile<DocDiaFile>(cmdName);
5798 DBG((
"handleCommand(%s) end retval=%x\n",qPrint(cmdName),retval));
5803 const char *attrName,
5809 for (li.toFirst();(opt=li.current());++li)
5811 if (opt->
name==attrName)
5813 *result = opt->
value;
5822 DBG((
"handleHtmlStartTag(%s,%d)\n",qPrint(tagName),tagHtmlAttribs.count()));
5836 retval=list->
parse();
5843 retval=list->
parse();
5905 retval=list->
parse();
5918 retval=table->
parse();
5975 retval = block->
parse();
6007 if (paramName.isEmpty())
6048 QCString exceptName;
6114 QCString leftOver = lnk->
parse(FALSE,TRUE);
6115 if (!leftOver.isEmpty())
6138 for (cli.toFirst();(n=cli.current());++cli)
6207 DBG((
"handleHtmlEndTag(%s)\n",qPrint(tagName)));
6391 DBG((
"DocPara::parse() start\n"));
6454 DBG((
"previous list item at %d\n",al->
indent()));
6480 retval = al->
parse();
6536 "has invalid indent level");
6582 DBG((
"handleCommand returns %x\n",retval));
6688 "Found unexpected token (id=%x)\n",tok);
6697 DBG((
"DocPara::parse() end retval=%x\n",retval));
6714 if (!
m_id.isEmpty())
6723 if (g_sectionDict && g_sectionDict->
find(
m_id)==0)
6736 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
6737 retval=par->
parse();
6761 }
while (retval!=0 &&
6782 retval = s->
parse();
6794 retval = s->
parse();
6806 retval = s->
parse();
6815 "command found inside %s!",
6832 DBG((
"DocSection::parse() end: retval=%x\n",retval));
6842 DBG((
"DocText::parse() start\n"));
6939 DBG((
"DocText::parse() end\n"));
6947 DBG((
"DocRoot::parse() start\n"));
6958 if (isFirst) { par->
markFirst(); isFirst=FALSE; }
6959 retval=par->
parse();
6989 retval = in->
parse(1);
7004 retval = s->
parse();
7017 DBG((
"DocRoot::parse() end\n"));
7025 bool insideDQuote=FALSE;
7026 bool insideSQuote=FALSE;
7028 while (j<len && !found)
7030 if (!insideSQuote && !insideDQuote)
7034 case '(': round++;
break;
7035 case ')': round--;
break;
7036 case '"': insideDQuote=TRUE;
break;
7037 case '\'': insideSQuote=TRUE;
break;
7045 else if (insideSQuote)
7047 if (data[j]==
'\'' && (j==0 || data[j]!=
'\\'))
7052 else if (insideDQuote)
7054 if (data[j]==
'"' && (j==0 || data[j]!=
'\\'))
7061 if (qstrncmp(data+j,
" const",6)==0)
7065 else if (qstrncmp(data+j,
" volatile",9)==0)
7071 if (e>s) memcpy(
id.rawData(),data+s,e-s);
7081 #define CHECK_FOR_COMMAND(str,action) \
7082 do if ((i+sizeof(str)<len) && qstrncmp(data+i+1,str,sizeof(str)-1)==0) \
7083 { j=i+sizeof(str); action; } while(0)
7088 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
7099 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
7121 if ((data[i]==
'@' || data[i]==
'\\') &&
7122 (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\')))
7124 if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker,endMarker.length())==0)
7126 return i+endMarker.length()+1;
7132 return i<len ? i+1 : len;
7143 if (c==
'@' || c==
'\\')
7150 while (j<len && (data[j]==
' ' || data[j]==
'\t')) j++;
7164 uint l=brief.length();
7169 uint l=doc.length();
7177 "Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
7178 isBrief?
"brief":
"details",
id.data());
7184 "@copy%s or @copydoc target '%s' not found", isBrief?
"brief":
"details",
7198 buf.
addStr(data+orgPos,i-orgPos);
7222 const char *input,
bool indexWords,
7223 bool isExample,
const char *exampleName,
7224 bool singleLine,
bool linkFromIndex)
7302 if (!pd->
title().isEmpty())
7383 uint inpLen=qstrlen(input);
7385 if (inpStr.isEmpty() || inpStr.at(inpStr.length()-1)!=
'\n')
7478 const char *fileName)