Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7f4c4fbe
Commit
7f4c4fbe
authored
Jan 19, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wbl print fix when template objects are not found
parent
ee821a34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
wb/lib/wb/src/wb_print_wbl.cpp
wb/lib/wb/src/wb_print_wbl.cpp
+14
-5
No files found.
wb/lib/wb/src/wb_print_wbl.cpp
View file @
7f4c4fbe
...
@@ -313,6 +313,7 @@ void wb_print_wbl::printClass(wb_volume& v,
...
@@ -313,6 +313,7 @@ void wb_print_wbl::printClass(wb_volume& v,
printAttribute
(
v
,
attr2
,
tattr2
,
adef2
,
0
);
printAttribute
(
v
,
attr2
,
tattr2
,
adef2
,
0
);
attr2
=
attr2
.
after
();
attr2
=
attr2
.
after
();
if
(
tattr2
.
oddSts
())
tattr2
=
tattr2
.
after
();
tattr2
=
tattr2
.
after
();
}
}
}
}
...
@@ -530,11 +531,12 @@ void wb_print_wbl::printParameter(wb_volume& v,
...
@@ -530,11 +531,12 @@ void wb_print_wbl::printParameter(wb_volume& v,
int
varSize
=
adef
.
size
()
/
nElement
;
int
varSize
=
adef
.
size
()
/
nElement
;
char
*
valueb
=
(
char
*
)
attr
.
value
();
char
*
valueb
=
(
char
*
)
attr
.
value
();
char
*
val
;
char
*
val
;
char
*
tvalueb
=
(
char
*
)
tattr
.
value
()
;
char
*
tvalueb
;
char
*
tval
;
char
*
tval
;
char
*
svalp
;
char
*
svalp
;
int
varOffset
;
int
varOffset
;
bool
parValOk
;
bool
parValOk
;
bool
print_all
=
false
;
const
char
*
name
=
adef
.
subName
();
const
char
*
name
=
adef
.
subName
();
if
(
valueb
==
NULL
)
{
if
(
valueb
==
NULL
)
{
...
@@ -549,9 +551,16 @@ void wb_print_wbl::printParameter(wb_volume& v,
...
@@ -549,9 +551,16 @@ void wb_print_wbl::printParameter(wb_volume& v,
return
;
return
;
}
}
if
(
attr
==
tattr
)
if
(
tattr
.
evenSts
())
{
// Template attribute not found, should not happen
tvalueb
=
(
char
*
)
calloc
(
1
,
attr
.
size
());
print_all
=
true
;
}
else
if
(
attr
==
tattr
)
// This is the template object itself, print all nonzero
// This is the template object itself, print all nonzero
tvalueb
=
(
char
*
)
calloc
(
1
,
tattr
.
size
());
tvalueb
=
(
char
*
)
calloc
(
1
,
tattr
.
size
());
else
tvalueb
=
(
char
*
)
tattr
.
value
();
for
(
int
i
=
0
;
i
<
nElement
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nElement
;
i
++
)
{
switch
(
adef
.
type
())
{
switch
(
adef
.
type
())
{
...
@@ -589,7 +598,7 @@ void wb_print_wbl::printParameter(wb_volume& v,
...
@@ -589,7 +598,7 @@ void wb_print_wbl::printParameter(wb_volume& v,
val
=
valueb
+
varOffset
;
val
=
valueb
+
varOffset
;
tval
=
tvalueb
+
varOffset
;
tval
=
tvalueb
+
varOffset
;
if
(
memcmp
(
val
,
tval
,
varSize
)
==
0
&&
!
(
adef
.
flags
()
&
PWR_MASK_ALWAYSWBL
))
if
(
memcmp
(
val
,
tval
,
varSize
)
==
0
&&
!
(
adef
.
flags
()
&
PWR_MASK_ALWAYSWBL
)
&&
!
print_all
)
continue
;
continue
;
parValOk
=
printValue
(
v
,
adef
,
val
,
varSize
,
&
svalp
);
parValOk
=
printValue
(
v
,
adef
,
val
,
varSize
,
&
svalp
);
...
@@ -623,7 +632,7 @@ void wb_print_wbl::printParameter(wb_volume& v,
...
@@ -623,7 +632,7 @@ void wb_print_wbl::printParameter(wb_volume& v,
break
;
break
;
}
}
}
}
if
(
attr
==
tattr
)
if
(
tattr
.
evenSts
()
||
attr
==
tattr
)
free
(
tvalueb
);
free
(
tvalueb
);
}
}
...
...
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