Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
0e080f48
Commit
0e080f48
authored
Feb 11, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved handling of percent symbol
parent
a28ff233
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
25 deletions
+36
-25
docbookvisitor.cpp
src/docbookvisitor.cpp
+1
-1
htmldocvisitor.cpp
src/htmldocvisitor.cpp
+1
-1
htmlentity.cpp
src/htmlentity.cpp
+24
-6
htmlentity.h
src/htmlentity.h
+2
-2
latexdocvisitor.cpp
src/latexdocvisitor.cpp
+1
-1
perlmodgen.cpp
src/perlmodgen.cpp
+1
-1
printdocvisitor.h
src/printdocvisitor.h
+3
-10
rtfdocvisitor.cpp
src/rtfdocvisitor.cpp
+1
-1
textdocvisitor.cpp
src/textdocvisitor.cpp
+1
-1
xmldocvisitor.cpp
src/xmldocvisitor.cpp
+1
-1
No files found.
src/docbookvisitor.cpp
View file @
0e080f48
...
...
@@ -81,7 +81,7 @@ void DocbookDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"DocBook: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"DocBook: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
...
...
src/htmldocvisitor.cpp
View file @
0e080f48
...
...
@@ -190,7 +190,7 @@ void HtmlDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"HTML: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"HTML: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
...
...
src/htmlentity.cpp
View file @
0e080f48
...
...
@@ -354,23 +354,41 @@ void HtmlEntityMapper::deleteInstance()
/*! @brief Access routine to the UTF8 code of the HTML entity
*
* @param symb Code of the requested HTML entity
* @param useInPrintf If TRUE the result will be escaped such that it can be
* used in a printf string pattern
* @return the UTF8 code of the HTML entity,
* in case the UTF code is unknown \c NULL is returned.
*/
const
char
*
HtmlEntityMapper
::
utf8
(
DocSymbol
::
SymType
symb
)
const
const
char
*
HtmlEntityMapper
::
utf8
(
DocSymbol
::
SymType
symb
,
bool
useInPrintf
)
const
{
return
g_htmlEntities
[
symb
].
UTF8
;
if
(
useInPrintf
&&
symb
==
DocSymbol
::
Sym_Percent
)
{
return
"%%"
;
// escape for printf
}
else
{
return
g_htmlEntities
[
symb
].
UTF8
;
}
}
/*! @brief Access routine to the html code of the HTML entity
*
* @param symb Code of the requested HTML entity
* @return the html of the HTML entity,
* @param symb Code of the requested HTML entity
* @param useInPrintf If TRUE the result will be escaped such that it can be
* used in a printf string pattern
* @return the html representation of the HTML entity,
* in case the html code is unknown \c NULL is returned.
*/
const
char
*
HtmlEntityMapper
::
html
(
DocSymbol
::
SymType
symb
)
const
const
char
*
HtmlEntityMapper
::
html
(
DocSymbol
::
SymType
symb
,
bool
useInPrintf
)
const
{
return
g_htmlEntities
[
symb
].
html
;
if
(
useInPrintf
&&
symb
==
DocSymbol
::
Sym_Percent
)
{
return
"%%"
;
// escape for printf
}
else
{
return
g_htmlEntities
[
symb
].
html
;
}
}
/*! @brief Access routine to the XML code of the HTML entity
...
...
src/htmlentity.h
View file @
0e080f48
...
...
@@ -27,8 +27,8 @@ class HtmlEntityMapper
static
HtmlEntityMapper
*
instance
();
static
void
deleteInstance
();
DocSymbol
::
SymType
name2sym
(
const
QCString
&
symName
)
const
;
const
char
*
utf8
(
DocSymbol
::
SymType
symb
)
const
;
const
char
*
html
(
DocSymbol
::
SymType
symb
)
const
;
const
char
*
utf8
(
DocSymbol
::
SymType
symb
,
bool
useInPrintf
=
FALSE
)
const
;
const
char
*
html
(
DocSymbol
::
SymType
symb
,
bool
useInPrintf
=
FALSE
)
const
;
const
char
*
xml
(
DocSymbol
::
SymType
symb
)
const
;
const
char
*
docbook
(
DocSymbol
::
SymType
symb
)
const
;
const
char
*
latex
(
DocSymbol
::
SymType
symb
)
const
;
...
...
src/latexdocvisitor.cpp
View file @
0e080f48
...
...
@@ -154,7 +154,7 @@ void LatexDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"LaTeX: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"LaTeX: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
...
...
src/perlmodgen.cpp
View file @
0e080f48
...
...
@@ -606,7 +606,7 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
}
else
{
err
(
"perl: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
sy
->
symbol
()));
err
(
"perl: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
sy
->
symbol
()
,
TRUE
));
}
}
...
...
src/printdocvisitor.h
View file @
0e080f48
...
...
@@ -57,21 +57,14 @@ class PrintDocVisitor : public DocVisitor
void
visit
(
DocSymbol
*
s
)
{
indent_leaf
();
const
char
*
res
=
HtmlEntityMapper
::
instance
()
->
utf8
(
s
->
symbol
());
const
char
*
res
=
HtmlEntityMapper
::
instance
()
->
utf8
(
s
->
symbol
()
,
TRUE
);
if
(
res
)
{
if
(
qstrcmp
(
res
,
"%"
)
==
0
)
{
printf
(
"%%"
);
}
else
{
printf
(
"%s"
,
res
);
}
printf
(
"%s"
,
res
);
}
else
{
printf
(
"print: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
printf
(
"print: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
void
visit
(
DocURL
*
u
)
...
...
src/rtfdocvisitor.cpp
View file @
0e080f48
...
...
@@ -129,7 +129,7 @@ void RTFDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"RTF: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"RTF: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
m_lastIsPara
=
FALSE
;
}
...
...
src/textdocvisitor.cpp
View file @
0e080f48
...
...
@@ -33,7 +33,7 @@ void TextDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"text: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"text: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
...
...
src/xmldocvisitor.cpp
View file @
0e080f48
...
...
@@ -78,7 +78,7 @@ void XmlDocVisitor::visit(DocSymbol *s)
}
else
{
err
(
"XML: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()));
err
(
"XML: non supported HTML-entity found: %s
\n
"
,
HtmlEntityMapper
::
instance
()
->
html
(
s
->
symbol
()
,
TRUE
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment