summaryrefslogtreecommitdiffstats
path: root/src/docbookgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docbookgen.cpp')
-rw-r--r--src/docbookgen.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index b25a43c..385c2ef 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -101,9 +101,21 @@ inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
case '&': t << "&amp;"; col++; break;
case '\'': t << "&apos;"; col++; break;
case '"': t << "&quot;"; col++; break;
- case '\007': t << "^G"; col++; break; // bell
- case '\014': t << "^L"; col++; break; // form feed
- default: t << c; col++; break;
+ default:
+ {
+ uchar uc = static_cast<uchar>(c);
+ static const char *hex="0123456789ABCDEF";
+ if (uc<32)
+ {
+ t << "&#x24" << hex[uc>>4] << hex[uc&0xF] << ";";
+ }
+ else
+ {
+ t << c;
+ }
+ col++;
+ }
+ break;
}
}
}
@@ -296,7 +308,7 @@ void DocbookGenerator::init()
createSubDirs(d);
}
-void DocbookGenerator::startFile(const char *name,const char *,const char *)
+void DocbookGenerator::startFile(const char *name,const char *,const char *,int)
{
DB_GEN_C
QCString fileName=name;
@@ -525,7 +537,7 @@ DB_GEN_C2("IndexSections " << is)
bool found=FALSE;
for (nli.toFirst();(nd=nli.current()) && !found;++nli)
{
- if (nd->isLinkableInProject())
+ if (nd->isLinkableInProject() && !nd->isAlias())
{
t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
found=TRUE;
@@ -533,7 +545,7 @@ DB_GEN_C2("IndexSections " << is)
}
while ((nd=nli.current()))
{
- if (nd->isLinkableInProject())
+ if (nd->isLinkableInProject() && !nd->isAlias())
{
t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
}
@@ -552,7 +564,8 @@ DB_GEN_C2("IndexSections " << is)
{
if (cd->isLinkableInProject() &&
cd->templateMaster()==0 &&
- !cd->isEmbeddedInOuterScope()
+ !cd->isEmbeddedInOuterScope() &&
+ !cd->isAlias()
)
{
t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
@@ -563,7 +576,8 @@ DB_GEN_C2("IndexSections " << is)
{
if (cd->isLinkableInProject() &&
cd->templateMaster()==0 &&
- !cd->isEmbeddedInOuterScope()
+ !cd->isEmbeddedInOuterScope() &&
+ !cd->isAlias()
)
{
t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
@@ -654,7 +668,7 @@ DB_GEN_C
}
}
-void DocbookGenerator::writeDoc(DocNode *n,const Definition *,const MemberDef *)
+void DocbookGenerator::writeDoc(DocNode *n,const Definition *,const MemberDef *,int)
{
DB_GEN_C
DocbookDocVisitor *visitor =