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
653a2a8b
Commit
653a2a8b
authored
Apr 19, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 728530 - Crash on \addindex \term
parent
8ba739ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
40 deletions
+49
-40
htmldocvisitor.cpp
src/htmldocvisitor.cpp
+23
-20
latexdocvisitor.cpp
src/latexdocvisitor.cpp
+26
-20
No files found.
src/htmldocvisitor.cpp
View file @
653a2a8b
...
...
@@ -44,27 +44,30 @@ static QCString convertIndexWordToAnchor(const QString &word)
QCString
result
;
const
char
*
str
=
word
.
data
();
unsigned
char
c
;
while
((
c
=
*
str
++
))
{
if
((
c
>=
'a'
&&
c
<=
'z'
)
||
// ALPHA
(
c
>=
'A'
&&
c
<=
'A'
)
||
// ALPHA
(
c
>=
'0'
&&
c
<=
'9'
)
||
// DIGIT
c
==
'-'
||
c
==
'.'
||
c
==
'_'
||
c
==
'~'
)
{
result
+=
c
;
}
else
if
(
str
)
{
while
((
c
=
*
str
++
))
{
char
enc
[
4
];
enc
[
0
]
=
'%'
;
enc
[
1
]
=
hex
[(
c
&
0xf0
)
>>
4
];
enc
[
2
]
=
hex
[
c
&
0xf
];
enc
[
3
]
=
0
;
result
+=
enc
;
if
((
c
>=
'a'
&&
c
<=
'z'
)
||
// ALPHA
(
c
>=
'A'
&&
c
<=
'A'
)
||
// ALPHA
(
c
>=
'0'
&&
c
<=
'9'
)
||
// DIGIT
c
==
'-'
||
c
==
'.'
||
c
==
'_'
||
c
==
'~'
)
{
result
+=
c
;
}
else
{
char
enc
[
4
];
enc
[
0
]
=
'%'
;
enc
[
1
]
=
hex
[(
c
&
0xf0
)
>>
4
];
enc
[
2
]
=
hex
[
c
&
0xf
];
enc
[
3
]
=
0
;
result
+=
enc
;
}
}
}
return
result
;
...
...
src/latexdocvisitor.cpp
View file @
653a2a8b
...
...
@@ -38,17 +38,20 @@ static QCString escapeLabelName(const char *s)
QCString
result
;
const
char
*
p
=
s
;
char
c
;
while
((
c
=*
p
++
)
)
if
(
p
)
{
switch
(
c
)
while
((
c
=*
p
++
)
)
{
case
'%'
:
result
+=
"
\\
%"
;
break
;
case
'|'
:
result
+=
"
\\
texttt{
\"
|}"
;
break
;
case
'!'
:
result
+=
"
\"
!"
;
break
;
case
'{'
:
result
+=
"
\\
lcurly{}"
;
break
;
case
'}'
:
result
+=
"
\\
rcurly{}"
;
break
;
case
'~'
:
result
+=
"````~"
;
break
;
// to get it a bit better in index together with other special characters
default:
result
+=
c
;
switch
(
c
)
{
case
'%'
:
result
+=
"
\\
%"
;
break
;
case
'|'
:
result
+=
"
\\
texttt{
\"
|}"
;
break
;
case
'!'
:
result
+=
"
\"
!"
;
break
;
case
'{'
:
result
+=
"
\\
lcurly{}"
;
break
;
case
'}'
:
result
+=
"
\\
rcurly{}"
;
break
;
case
'~'
:
result
+=
"````~"
;
break
;
// to get it a bit better in index together with other special characters
default:
result
+=
c
;
}
}
}
return
result
;
...
...
@@ -73,19 +76,22 @@ QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
const
char
*
p
=
s
;
char
str
[
2
];
str
[
1
]
=
0
;
char
c
;
while
((
c
=*
p
++
)
)
if
(
p
)
{
switch
(
c
)
while
((
c
=*
p
++
)
)
{
case
'!'
:
m_t
<<
"
\"
!"
;
break
;
case
'"'
:
m_t
<<
"
\"\"
"
;
break
;
case
'@'
:
m_t
<<
"
\"
@"
;
break
;
case
'|'
:
m_t
<<
"
\\
texttt{
\"
|}"
;
break
;
case
'['
:
m_t
<<
"["
;
break
;
case
']'
:
m_t
<<
"]"
;
break
;
case
'{'
:
m_t
<<
"
\\
lcurly{}"
;
break
;
case
'}'
:
m_t
<<
"
\\
rcurly{}"
;
break
;
default
:
str
[
0
]
=
c
;
filter
(
str
);
break
;
switch
(
c
)
{
case
'!'
:
m_t
<<
"
\"
!"
;
break
;
case
'"'
:
m_t
<<
"
\"\"
"
;
break
;
case
'@'
:
m_t
<<
"
\"
@"
;
break
;
case
'|'
:
m_t
<<
"
\\
texttt{
\"
|}"
;
break
;
case
'['
:
m_t
<<
"["
;
break
;
case
']'
:
m_t
<<
"]"
;
break
;
case
'{'
:
m_t
<<
"
\\
lcurly{}"
;
break
;
case
'}'
:
m_t
<<
"
\\
rcurly{}"
;
break
;
default
:
str
[
0
]
=
c
;
filter
(
str
);
break
;
}
}
}
return
result
;
...
...
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