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
2da9dcc7
Commit
2da9dcc7
authored
Dec 07, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 711378 - Nested Aliases fail when the nested alias has two or more arguments.
parent
182bd7cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
util.cpp
src/util.cpp
+7
-7
No files found.
src/util.cpp
View file @
2da9dcc7
...
@@ -7014,7 +7014,7 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
...
@@ -7014,7 +7014,7 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
static
QDict
<
void
>
aliasesProcessed
;
static
QDict
<
void
>
aliasesProcessed
;
static
QCString
expandAliasRec
(
const
QCString
s
);
static
QCString
expandAliasRec
(
const
QCString
s
,
bool
allowRecursion
=
FALSE
);
struct
Marker
struct
Marker
{
{
...
@@ -7136,7 +7136,7 @@ static QCString replaceAliasArguments(const QCString &aliasValue,const QCString
...
@@ -7136,7 +7136,7 @@ static QCString replaceAliasArguments(const QCString &aliasValue,const QCString
//printf("part before marker %d: '%s'\n",i,aliasValue.mid(p,m->pos-p).data());
//printf("part before marker %d: '%s'\n",i,aliasValue.mid(p,m->pos-p).data());
if
(
m
->
number
>
0
&&
m
->
number
<=
(
int
)
args
.
count
())
// valid number
if
(
m
->
number
>
0
&&
m
->
number
<=
(
int
)
args
.
count
())
// valid number
{
{
result
+=
*
args
.
at
(
m
->
number
-
1
);
result
+=
expandAliasRec
(
*
args
.
at
(
m
->
number
-
1
),
TRUE
);
//printf("marker index=%d pos=%d number=%d size=%d replacement %s\n",i,m->pos,m->number,m->size,
//printf("marker index=%d pos=%d number=%d size=%d replacement %s\n",i,m->pos,m->number,m->size,
// args.at(m->number-1)->data());
// args.at(m->number-1)->data());
}
}
...
@@ -7175,7 +7175,7 @@ static QCString escapeCommas(const QCString &s)
...
@@ -7175,7 +7175,7 @@ static QCString escapeCommas(const QCString &s)
return
result
.
data
();
return
result
.
data
();
}
}
static
QCString
expandAliasRec
(
const
QCString
s
)
static
QCString
expandAliasRec
(
const
QCString
s
,
bool
allowRecursion
)
{
{
QCString
result
;
QCString
result
;
static
QRegExp
cmdPat
(
"[
\\\\
@][a-z_A-Z][a-z_A-Z0-9]*"
);
static
QRegExp
cmdPat
(
"[
\\\\
@][a-z_A-Z][a-z_A-Z0-9]*"
);
...
@@ -7208,10 +7208,10 @@ static QCString expandAliasRec(const QCString s)
...
@@ -7208,10 +7208,10 @@ static QCString expandAliasRec(const QCString s)
}
}
//printf("Found command s='%s' cmd='%s' numArgs=%d args='%s' aliasText=%s\n",
//printf("Found command s='%s' cmd='%s' numArgs=%d args='%s' aliasText=%s\n",
// s.data(),cmd.data(),numArgs,args.data(),aliasText?aliasText->data():"<none>");
// s.data(),cmd.data(),numArgs,args.data(),aliasText?aliasText->data():"<none>");
if
(
aliasesProcessed
.
find
(
cmd
)
==
0
&&
aliasText
)
// expand the alias
if
(
(
allowRecursion
||
aliasesProcessed
.
find
(
cmd
)
==
0
)
&&
aliasText
)
// expand the alias
{
{
//printf("is an alias!\n");
//printf("is an alias!\n");
aliasesProcessed
.
insert
(
cmd
,(
void
*
)
0x8
);
if
(
!
allowRecursion
)
aliasesProcessed
.
insert
(
cmd
,(
void
*
)
0x8
);
QCString
val
=
*
aliasText
;
QCString
val
=
*
aliasText
;
if
(
hasArgs
)
if
(
hasArgs
)
{
{
...
@@ -7220,7 +7220,7 @@ static QCString expandAliasRec(const QCString s)
...
@@ -7220,7 +7220,7 @@ static QCString expandAliasRec(const QCString s)
// aliasText->data(),val.data(),args.data());
// aliasText->data(),val.data(),args.data());
}
}
result
+=
expandAliasRec
(
val
);
result
+=
expandAliasRec
(
val
);
aliasesProcessed
.
remove
(
cmd
);
if
(
!
allowRecursion
)
aliasesProcessed
.
remove
(
cmd
);
p
=
i
+
l
;
p
=
i
+
l
;
if
(
hasArgs
)
p
+=
argsLen
+
2
;
if
(
hasArgs
)
p
+=
argsLen
+
2
;
}
}
...
...
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