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
dfd2baa3
Commit
dfd2baa3
authored
Feb 18, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
ba8439e7
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
131 additions
and
83 deletions
+131
-83
wb/lib/wb/src/wb_admin.cpp
wb/lib/wb/src/wb_admin.cpp
+0
-3
wb/lib/wb/src/wb_adrep.cpp
wb/lib/wb/src/wb_adrep.cpp
+3
-1
wb/lib/wb/src/wb_adrep.h
wb/lib/wb/src/wb_adrep.h
+2
-0
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+32
-2
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+4
-2
wb/lib/wb/src/wb_bdrep.cpp
wb/lib/wb/src/wb_bdrep.cpp
+1
-0
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+8
-12
wb/lib/wb/src/wb_nav.cpp
wb/lib/wb/src/wb_nav.cpp
+1
-1
wb/lib/wb/src/wb_volume.cpp
wb/lib/wb/src/wb_volume.cpp
+19
-2
wb/lib/wb/src/wb_volume.h
wb/lib/wb/src/wb_volume.h
+2
-1
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+2
-2
wb/lib/wb/src/wb_vsel.cpp
wb/lib/wb/src/wb_vsel.cpp
+4
-4
wb/lib/wb/src/wb_wattnav.cpp
wb/lib/wb/src/wb_wattnav.cpp
+4
-4
wb/lib/wb/src/wb_wda.cpp
wb/lib/wb/src/wb_wda.cpp
+8
-8
wb/lib/wb/src/wb_wdanav.cpp
wb/lib/wb/src/wb_wdanav.cpp
+5
-5
wb/lib/wb/src/wb_wnav.cpp
wb/lib/wb/src/wb_wnav.cpp
+4
-4
wb/lib/wb/src/wb_wnav_item.cpp
wb/lib/wb/src/wb_wnav_item.cpp
+30
-30
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+2
-2
No files found.
wb/lib/wb/src/wb_admin.cpp
View file @
dfd2baa3
...
...
@@ -523,9 +523,6 @@ int Admin::open_input()
else
XmTextSetString
(
text_w
,
""
);
if
(
value
)
XtFree
(
value
);
message
(
' '
,
""
);
flow_SetInputFocus
(
text_w
);
set_prompt
(
"admin >"
);
...
...
wb/lib/wb/src/wb_adrep.cpp
View file @
dfd2baa3
...
...
@@ -15,7 +15,8 @@ wb_adrep *wb_adrep::ref()
return
this
;
}
wb_adrep
::
wb_adrep
(
wb_orepdbs
&
o
)
:
m_nRef
(
0
),
m_orep
(
&
o
),
m_sts
(
LDH__SUCCESS
)
wb_adrep
::
wb_adrep
(
wb_orepdbs
&
o
)
:
m_nRef
(
0
),
m_orep
(
&
o
),
m_sts
(
LDH__SUCCESS
),
m_bufferClass
(
pwr_eClass__
)
{
m_orep
->
ref
();
...
...
@@ -110,6 +111,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS)
m_paramindex
=
attr
.
Info
.
ParamIndex
;
m_flags
=
attr
.
Info
.
Flags
;
m_tid
=
0
;
m_bufferClass
=
attr
.
Class
;
break
;
}
...
...
wb/lib/wb/src/wb_adrep.h
View file @
dfd2baa3
...
...
@@ -22,6 +22,7 @@ class wb_adrep
int
m_flags
;
pwr_tTid
m_tid
;
pwr_tPgmName
m_pgmname
;
pwr_eClass
m_bufferClass
;
friend
class
wb_bdrep
;
friend
class
wb_cdrep
;
...
...
@@ -51,6 +52,7 @@ class wb_adrep
int
bix
();
int
flags
()
{
return
m_flags
;}
pwr_tOid
boid
();
pwr_eClass
bufferClass
()
{
return
m_bufferClass
;}
const
char
*
name
()
const
;
wb_name
longName
();
...
...
wb/lib/wb/src/wb_attribute.cpp
View file @
dfd2baa3
...
...
@@ -58,8 +58,30 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep, wb_adrep * con
}
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
const
char
*
aname
,
const
char
*
bname
)
:
wb_status
(
sts
),
m_orep
(
orep
)
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
const
char
*
bname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
else
{
wb_cdrep
*
cd
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
&
m_sts
,
m_orep
->
cid
());
if
(
oddSts
())
{
wb_bdrep
*
bd
=
cd
->
bdrep
(
&
m_sts
,
bname
);
if
(
oddSts
())
{
m_size
=
bd
->
size
();
delete
bd
;
}
delete
cd
;
}
if
(
oddSts
())
m_orep
->
ref
();
}
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
char
const
*
bname
,
const
char
*
aname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -205,6 +227,14 @@ pwr_tOid wb_attribute::boid()
return
oid
;
// Fix
}
pwr_eClass
wb_attribute
::
bufferClass
()
{
// This is not recursive for subclasses
if
(
m_adrep
)
return
m_adrep
->
bufferClass
();
return
pwr_eClass__
;
}
bool
wb_attribute
::
checkXref
()
{
return
true
;
// Fix
...
...
wb/lib/wb/src/wb_attribute.h
View file @
dfd2baa3
...
...
@@ -42,11 +42,12 @@ public:
wb_attribute
(
const
wb_attribute
&
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
wb_adrep
*
const
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
const
char
*
aname
,
const
char
*
bname
=
0
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
const
char
*
bname
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
const
char
*
aname
,
const
char
*
bname
);
~
wb_attribute
();
wb_attribute
&
operator
=
(
const
wb_attribute
&
);
operator
bool
()
const
{
return
even
Sts
();}
operator
bool
()
const
{
return
odd
Sts
();}
operator
wb_orep
*
()
const
;
bool
operator
==
(
wb_attribute
&
);
...
...
@@ -69,6 +70,7 @@ public:
bool
checkXref
();
pwr_sAttrXRef
*
xref
();
pwr_sObjXRef
*
oxref
();
pwr_eClass
bufferClass
();
void
*
value
(
void
*
p
=
0
);
void
*
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
);
...
...
wb/lib/wb/src/wb_bdrep.cpp
View file @
dfd2baa3
...
...
@@ -81,6 +81,7 @@ int wb_bdrep::nAttribute()
case
pwr_eClass_Output
:
case
pwr_eClass_ObjXRef
:
case
pwr_eClass_AttrXRef
:
case
pwr_eClass_Buffer
:
attr_count
++
;
break
;
default:
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
dfd2baa3
...
...
@@ -548,9 +548,9 @@ ldh_GetObjectBody(ldh_tSession session, pwr_tOid oid, char *bname, void **buff,
wb_object
o
=
sp
->
object
(
oid
);
wb_attribute
a
=
sp
->
attribute
(
o
,
bname
);
*
buff
=
XtM
alloc
(
a
.
size
());
*
buff
=
m
alloc
(
a
.
size
());
if
(
*
buff
==
NULL
)
return
LDH__INSVIRMEM
;
memcpy
(
*
buff
,
a
.
value
(
0
),
a
.
size
()
);
a
.
value
(
*
buff
);
if
(
size
!=
NULL
)
*
size
=
a
.
size
();
return
LDH__SUCCESS
;
...
...
@@ -591,14 +591,10 @@ ldh_GetObjectBuffer(ldh_tSession session, pwr_tOid oid, char *bname,
*
value
=
(
char
*
)
calloc
(
1
,
a
.
size
());
*
size
=
a
.
size
();
//*bufferclass = a.?;
//wb_value v(value, size);
//if (!v) return v.sts();
//v = a.value();
//return v.sts();
return
LDH__NYI
;
a
.
value
(
value
);
*
bufferclass
=
a
.
bufferClass
();
return
LDH__SUCCESS
;
}
pwr_tStatus
...
...
@@ -647,9 +643,9 @@ ldh_GetObjectPar(ldh_tSession session, pwr_tOid oid, char *bname, char *aname, c
*
buff
=
(
char
*
)
calloc
(
1
,
a
.
size
());
if
(
*
buff
==
NULL
)
return
LDH__INSVIRMEM
;
memcpy
(
*
buff
,
a
.
value
(),
a
.
size
()
);
a
.
value
(
*
buff
);
if
(
size
!=
0
)
*
size
=
a
.
size
();
*
size
=
a
.
size
();
return
a
.
sts
();
}
...
...
wb/lib/wb/src/wb_nav.cpp
View file @
dfd2baa3
...
...
@@ -371,7 +371,7 @@ int ItemObject::open_attributes( Nav *nav, double x, double y)
bodydef
[
i
].
Par
->
Param
.
Info
.
Type
,
is_root
);
}
}
XtF
ree
(
(
char
*
)
bodydef
);
f
ree
(
(
char
*
)
bodydef
);
}
if
(
attr_exist
&&
!
is_root
)
...
...
wb/lib/wb/src/wb_volume.cpp
View file @
dfd2baa3
...
...
@@ -197,7 +197,7 @@ wb_cdef wb_volume::cdef(wb_name n)
return
wb_cdef
(
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
n
));
}
wb_attribute
wb_volume
::
attribute
(
pwr_tOid
oid
,
const
char
*
aname
,
const
char
*
b
name
)
const
wb_attribute
wb_volume
::
attribute
(
pwr_tOid
oid
,
const
char
*
bname
,
const
char
*
a
name
)
const
{
pwr_tStatus
sts
;
wb_orep
*
orep
;
...
...
@@ -209,7 +209,24 @@ wb_attribute wb_volume::attribute(pwr_tOid oid, const char *aname, const char *b
// Other volume
orep
=
m_vrep
->
erep
()
->
object
(
&
sts
,
oid
);
wb_attribute
a
=
wb_attribute
(
sts
,
orep
,
aname
,
bname
);
wb_attribute
a
=
wb_attribute
(
sts
,
orep
,
bname
,
aname
);
return
a
;
}
wb_attribute
wb_volume
::
attribute
(
pwr_tOid
oid
,
const
char
*
bname
)
const
{
pwr_tStatus
sts
;
wb_orep
*
orep
;
if
(
oid
.
vid
==
m_vrep
->
vid
())
// This volume
orep
=
m_vrep
->
object
(
&
sts
,
oid
);
else
// Other volume
orep
=
m_vrep
->
erep
()
->
object
(
&
sts
,
oid
);
wb_attribute
a
=
wb_attribute
(
sts
,
orep
,
bname
);
return
a
;
}
...
...
wb/lib/wb/src/wb_volume.h
View file @
dfd2baa3
...
...
@@ -51,7 +51,8 @@ public:
wb_object
object
(
pwr_tCid
cid
)
const
{
wb_object
o
;
return
o
;}
// Fix
wb_object
object
(
const
char
*
name
)
const
;
wb_attribute
attribute
(
pwr_tOid
oid
,
const
char
*
aname
,
const
char
*
bname
)
const
;
wb_attribute
attribute
(
pwr_tOid
oid
,
const
char
*
bname
,
const
char
*
aname
)
const
;
wb_attribute
attribute
(
pwr_tOid
oid
,
const
char
*
bname
)
const
;
wb_attribute
attribute
(
wb_object
o
,
wb_adef
adef
)
{
wb_attribute
a
;
return
a
;};
// Fix
wb_attribute
attribute
(
wb_object
o
,
wb_name
aname
)
{
wb_attribute
a
;
return
a
;};
// Fix
wb_attribute
attribute
(
wb_name
aname
)
{
wb_attribute
a
;
return
a
;};
// Fix
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
dfd2baa3
...
...
@@ -201,11 +201,11 @@ wb_vrepdbs::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned i
return
0
;
if
(
p
)
{
memcpy
(
p
,
bp
,
MIN
(
op
->
rbody
.
size
,
size
));
memcpy
(
p
,
(
char
*
)
bp
+
offset
,
MIN
(
op
->
rbody
.
size
-
offset
,
size
));
return
p
;
}
return
bp
;
return
(
void
*
)((
char
*
)
bp
+
offset
)
;
}
...
...
wb/lib/wb/src/wb_vsel.cpp
View file @
dfd2baa3
...
...
@@ -78,7 +78,7 @@ void WVsel::vsel_activate_ok (
int
i
;
pwr_tVolumeId
*
volume_ptr
;
volume_ptr
=
(
pwr_tVolumeId
*
)
XtC
alloc
(
vsel
->
volume_count
,
volume_ptr
=
(
pwr_tVolumeId
*
)
c
alloc
(
vsel
->
volume_count
,
sizeof
(
pwr_tVolumeId
));
if
(
XmListGetSelectedPos
(
vsel
->
widgets
.
volumelist
,
&
pos_list
,
&
pos_cnt
))
...
...
@@ -91,7 +91,7 @@ void WVsel::vsel_activate_ok (
if
(
vsel
->
vsel_bc_success
!=
NULL
)
sts
=
(
vsel
->
vsel_bc_success
)
(
vsel
,
volume_ptr
,
pos_cnt
);
XtF
ree
(
(
char
*
)
volume_ptr
);
f
ree
(
(
char
*
)
volume_ptr
);
if
(
ODD
(
sts
))
{
...
...
@@ -217,13 +217,13 @@ void WVsel::vsel_action_volumelist(
// The ok callback will be called later
return
;
volume_ptr
=
(
pwr_tVolumeId
*
)
XtC
alloc
(
1
,
sizeof
(
pwr_tVolumeId
));
volume_ptr
=
(
pwr_tVolumeId
*
)
c
alloc
(
1
,
sizeof
(
pwr_tVolumeId
));
*
volume_ptr
=
vsel
->
volumes
[
data
->
item_position
-
1
];
if
(
vsel
->
vsel_bc_success
!=
NULL
)
sts
=
(
vsel
->
vsel_bc_success
)
(
vsel
,
volume_ptr
,
1
);
XtF
ree
(
(
char
*
)
volume_ptr
);
f
ree
(
(
char
*
)
volume_ptr
);
if
(
ODD
(
sts
))
{
...
...
wb/lib/wb/src/wb_wattnav.cpp
View file @
dfd2baa3
...
...
@@ -151,7 +151,7 @@ int WAttNav::check_attr( int *multiline, brow_tObject *node,
sts
=
item
->
get_value
(
(
char
**
)
&
p
);
wnav_attrvalue_to_string
(
ldhses
,
item
->
type_id
,
p
,
init_value
,
&
len
);
XtF
ree
(
p
);
f
ree
(
p
);
*
size
=
item
->
size
;
if
(
item
->
type_id
==
pwr_eType_Text
)
*
multiline
=
1
;
...
...
@@ -173,7 +173,7 @@ int WAttNav::check_attr( int *multiline, brow_tObject *node,
sts
=
((
WItemObjectName
*
)
base_item
)
->
get_value
(
&
p
);
if
(
ODD
(
sts
))
{
strcpy
(
name
,
p
);
XtF
ree
(
p
);
f
ree
(
p
);
}
else
strcpy
(
name
,
""
);
...
...
@@ -820,7 +820,7 @@ int WAttNav::object_attr()
attr_exist
=
1
;
}
}
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
brow_ResetNodraw
(
brow
->
ctx
);
brow_Redraw
(
brow
->
ctx
,
0
);
...
...
@@ -977,7 +977,7 @@ int WAttNav::set_attr_value( brow_tObject node, char *name, char *value_str)
memcpy
(
value
+
item
->
element
*
item
->
size
,
buff
,
item
->
size
);
sts
=
ldh_SetObjectPar
(
ldhses
,
item
->
objid
,
item
->
body
,
item
->
attr
,
value
,
size
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
item
->
update
();
}
...
...
wb/lib/wb/src/wb_wda.cpp
View file @
dfd2baa3
...
...
@@ -147,7 +147,7 @@ void Wda::change_value( int set_focus)
}
if
(
value
)
XtF
ree
(
value
);
f
ree
(
value
);
message
(
' '
,
""
);
if
(
set_focus
)
...
...
@@ -580,7 +580,7 @@ void Wda::open_attr_dialog()
for
(
j
=
0
;
j
<
rows
;
j
++
)
attr_cnt
++
;
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
attr_vect
=
(
char
(
*
)[
80
])
calloc
(
attr_cnt
+
1
,
80
);
...
...
@@ -602,7 +602,7 @@ void Wda::open_attr_dialog()
for
(
j
=
0
;
j
<
rows
;
j
++
)
strcpy
(
attr_vect
[
attr_cnt
++
],
bodydef
[
j
].
ParName
);
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
strcpy
(
attr_vect
[
attr_cnt
],
""
);
...
...
@@ -646,11 +646,11 @@ int Wda::next_attr()
else
if
(
get_next
)
{
strcpy
(
attribute
,
bodydef
[
j
].
ParName
);
sts
=
((
WdaNav
*
)
wdanav
)
->
update
(
objid
,
classid
,
attribute
);
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
return
WDA__SUCCESS
;
}
}
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
return
WDA__NONEXTATTR
;
}
...
...
@@ -689,19 +689,19 @@ int Wda::prev_attr()
if
(
cdh_NoCaseStrcmp
(
attribute
,
bodydef
[
j
].
ParName
)
==
0
)
{
if
(
strcmp
(
prev_attr
,
""
)
==
0
)
{
// get_last = 1;
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
return
WDA__NOPREVATTR
;
}
else
{
strcpy
(
attribute
,
prev_attr
);
sts
=
((
WdaNav
*
)
wdanav
)
->
update
(
objid
,
classid
,
attribute
);
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
return
WDA__SUCCESS
;
}
}
strcpy
(
prev_attr
,
bodydef
[
j
].
ParName
);
}
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
if
(
get_last
&&
strcmp
(
prev_attr
,
""
)
!=
0
)
{
...
...
wb/lib/wb/src/wb_wdanav.cpp
View file @
dfd2baa3
...
...
@@ -698,7 +698,7 @@ int WdaNav::get_attr()
if
(
found
)
break
;
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
if
(
!
found
)
{
...
...
@@ -707,14 +707,14 @@ int WdaNav::get_attr()
}
if
(
bodydef
[
j
].
Par
->
Output
.
Info
.
Type
==
pwr_eType_Buffer
)
{
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
brow_ResetNodraw
(
brow
->
ctx
);
return
WDA__ATTRINVALID
;
}
if
(
bodydef
[
j
].
Par
->
Output
.
Info
.
Flags
&
PWR_MASK_ARRAY
)
{
if
(
bodydef
[
j
].
Par
->
Output
.
Info
.
Flags
&
PWR_MASK_INVISIBLE
)
{
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
brow_ResetNodraw
(
brow
->
ctx
);
return
WDA__ATTRINVISIBLE
;
}
...
...
@@ -728,7 +728,7 @@ int WdaNav::get_attr()
(
void
*
)
this
,
(
void
*
)
&
bodydef
[
j
],
(
void
*
)
body
,
NULL
,
NULL
);
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
brow_ResetNodraw
(
brow
->
ctx
);
brow_Redraw
(
brow
->
ctx
,
0
);
...
...
@@ -996,7 +996,7 @@ int WdaNav::set_attr_value( brow_tObject node, char *name, char *value_str)
memcpy
(
value
+
item
->
element
*
item
->
size
,
buff
,
item
->
size
);
sts
=
ldh_SetObjectPar
(
ldhses
,
item
->
objid
,
item
->
body
,
item
->
attr
,
value
,
size
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
item
->
update
();
}
...
...
wb/lib/wb/src/wb_wnav.cpp
View file @
dfd2baa3
...
...
@@ -737,7 +737,7 @@ int WNav::set_attr_value( brow_tObject node, pwr_tObjid objid, char *value_str)
memcpy
(
value
+
item
->
element
*
item
->
size
,
buff
,
item
->
size
);
sts
=
ldh_SetObjectPar
(
ldhses
,
item
->
objid
,
item
->
body
,
item
->
attr
,
value
,
size
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
}
return
sts
;
}
...
...
@@ -808,7 +808,7 @@ int WNav::check_attr_value( brow_tObject node, int *multiline,
sts
=
item
->
get_value
(
(
char
**
)
&
p
);
wnav_attrvalue_to_string
(
ldhses
,
item
->
type_id
,
p
,
init_value
,
&
len
);
XtF
ree
(
p
);
f
ree
(
p
);
*
size
=
item
->
size
;
if
(
item
->
type_id
==
pwr_eType_Text
)
*
multiline
=
1
;
...
...
@@ -831,7 +831,7 @@ int WNav::check_attr_value( brow_tObject node, int *multiline,
sts
=
item
->
get_value
(
(
char
**
)
&
p
);
wnav_attrvalue_to_string
(
ldhses
,
item
->
type_id
,
p
,
init_value
,
&
len
);
XtF
ree
(
p
);
f
ree
(
p
);
*
size
=
item
->
size
;
if
(
item
->
type_id
==
pwr_eType_Text
)
*
multiline
=
1
;
...
...
@@ -850,7 +850,7 @@ int WNav::check_attr_value( brow_tObject node, int *multiline,
sts
=
((
WItemObjectName
*
)
base_item
)
->
get_value
(
&
p
);
if
(
ODD
(
sts
))
{
strcpy
(
name
,
p
);
XtF
ree
(
p
);
f
ree
(
p
);
}
else
strcpy
(
name
,
""
);
...
...
wb/lib/wb/src/wb_wnav_item.cpp
View file @
dfd2baa3
...
...
@@ -113,7 +113,7 @@ WItemObject::WItemObject( WNav *wnav, pwr_tObjid item_objid,
if
(
ODD
(
sts
))
{
brow_SetAnnotation
(
node
,
next_annot
++
,
descr
,
strlen
(
descr
));
XtF
ree
(
descr
);
f
ree
(
descr
);
}
}
if
(
wnav
->
gbl
.
show_alias
&&
classid
==
pwr_eClass_Alias
)
...
...
@@ -129,7 +129,7 @@ WItemObject::WItemObject( WNav *wnav, pwr_tObjid item_objid,
alias_name
,
sizeof
(
alias_name
),
&
size
);
if
(
EVEN
(
sts
))
strcpy
(
alias_name
,
"-"
);
XtF
ree
((
char
*
)
ref_object
);
f
ree
((
char
*
)
ref_object
);
brow_SetAnnotation
(
node
,
next_annot
++
,
alias_name
,
strlen
(
alias_name
));
}
}
...
...
@@ -466,7 +466,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
attr_exist
=
1
;
}
}
XtF
ree
((
char
*
)
bodydef
);
f
ree
((
char
*
)
bodydef
);
}
if
(
attr_exist
&&
!
is_root
)
...
...
@@ -860,12 +860,12 @@ int WItemObjectName::get_value( char **value)
int
size
=
120
;
int
sts
;
segname
=
XtM
alloc
(
size
);
segname
=
(
char
*
)
m
alloc
(
size
);
sts
=
ldh_ObjidToName
(
ldhses
,
objid
,
ldh_eName_Object
,
segname
,
size
,
&
size
);
if
(
EVEN
(
sts
))
{
XtF
ree
(
segname
);
f
ree
(
segname
);
return
sts
;
}
*
value
=
segname
;
...
...
@@ -1300,7 +1300,7 @@ int WItemAttr::update()
}
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1369,7 +1369,7 @@ int WItemAttrInput::update()
wnav_attrvalue_to_string
(
ldhses
,
type_id
,
value
,
&
buff
,
&
len
);
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
sts
=
ldh_GetObjectBuffer
(
ldhses
,
objid
,
"DevBody"
,
"PlcNode"
,
&
eclass
,
(
char
**
)
&
plcnode
,
&
psize
);
...
...
@@ -1387,7 +1387,7 @@ int WItemAttrInput::update()
else
brow_SetRadiobutton
(
node
,
1
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1438,7 +1438,7 @@ int WItemAttrInput::set_mask( int radio_button, int value)
brow_SetRadiobutton
(
node
,
1
,
0
);
}
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1506,7 +1506,7 @@ int WItemAttrInputF::update()
wnav_attrvalue_to_string
(
ldhses
,
type_id
,
value
,
&
buff
,
&
len
);
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
sts
=
ldh_GetObjectBuffer
(
ldhses
,
objid
,
"DevBody"
,
"PlcNode"
,
&
eclass
,
(
char
**
)
&
plcnode
,
&
psize
);
...
...
@@ -1518,7 +1518,7 @@ int WItemAttrInputF::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1555,7 +1555,7 @@ int WItemAttrInputF::set_mask( int radio_button, int value)
else
brow_SetRadiobutton
(
node
,
0
,
0
);
}
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1623,7 +1623,7 @@ int WItemAttrInputInv::update()
wnav_attrvalue_to_string
(
ldhses
,
type_id
,
value
,
&
buff
,
&
len
);
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
sts
=
ldh_GetObjectBuffer
(
ldhses
,
objid
,
"DevBody"
,
"PlcNode"
,
&
eclass
,
(
char
**
)
&
plcnode
,
&
psize
);
...
...
@@ -1635,7 +1635,7 @@ int WItemAttrInputInv::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1672,7 +1672,7 @@ int WItemAttrInputInv::set_mask( int radio_button, int value)
else
brow_SetRadiobutton
(
node
,
0
,
0
);
}
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1740,7 +1740,7 @@ int WItemAttrOutput::update()
wnav_attrvalue_to_string
(
ldhses
,
type_id
,
value
,
&
buff
,
&
len
);
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
sts
=
ldh_GetObjectBuffer
(
ldhses
,
objid
,
"DevBody"
,
"PlcNode"
,
&
eclass
,
(
char
**
)
&
plcnode
,
&
psize
);
...
...
@@ -1752,7 +1752,7 @@ int WItemAttrOutput::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1789,7 +1789,7 @@ int WItemAttrOutput::set_mask( int radio_button, int value)
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
}
return
WNAV__SUCCESS
;
...
...
@@ -1939,7 +1939,7 @@ int WItemAttrArrayOutput::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
return
WNAV__SUCCESS
;
}
...
...
@@ -1976,7 +1976,7 @@ int WItemAttrArrayOutput::set_mask( int radio_button, int value)
else
brow_SetRadiobutton
(
node
,
0
,
0
);
XtF
ree
((
char
*
)
plcnode
);
f
ree
((
char
*
)
plcnode
);
}
return
WNAV__SUCCESS
;
...
...
@@ -2102,9 +2102,9 @@ int WItemAttrArrayElem::get_value( char **value)
attr
,
&
attr_value
,
&
psize
);
if
(
EVEN
(
sts
))
return
sts
;
*
value
=
(
char
*
)
XtM
alloc
(
size
);
*
value
=
(
char
*
)
m
alloc
(
size
);
memcpy
(
*
value
,
attr_value
+
offset
,
size
);
XtF
ree
(
attr_value
);
f
ree
(
attr_value
);
return
WNAV__SUCCESS
;
}
...
...
@@ -2261,7 +2261,7 @@ int WItemAttrArrayElem::update()
}
brow_SetAnnotation
(
node
,
1
,
buff
,
len
);
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
return
WNAV__SUCCESS
;
}
...
...
@@ -2325,9 +2325,9 @@ int WItemEnum::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
if
(
!
is_element
)
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
else
XtF
ree
(
buf
);
f
ree
(
buf
);
return
WNAV__SUCCESS
;
}
...
...
@@ -2360,7 +2360,7 @@ int WItemEnum::set()
if
(
EVEN
(
sts
))
return
sts
;
// Warning!! the item will be deleted here by the ldh backcall
XtF
ree
(
buf
);
f
ree
(
buf
);
}
if
(
!
ldh_cb_used
)
...
...
@@ -2451,9 +2451,9 @@ int WItemMask::update()
else
brow_SetRadiobutton
(
node
,
0
,
0
);
if
(
!
is_element
)
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
else
XtF
ree
(
buf
);
f
ree
(
buf
);
return
WNAV__SUCCESS
;
}
...
...
@@ -2511,9 +2511,9 @@ int WItemMask::set( int set_value)
}
if
(
!
is_elem
)
XtF
ree
(
(
char
*
)
value
);
f
ree
(
(
char
*
)
value
);
else
XtF
ree
(
buf
);
f
ree
(
buf
);
if
(
!
ldh_cb_used
)
{
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
dfd2baa3
...
...
@@ -1890,7 +1890,7 @@ static void wtt_activate_openge( Widget w, Wtt *wtt, XmAnyCallbackStruct *data)
if
(
EVEN
(
sts
))
break
;
cdh_ToLower
(
graph_name
,
action
);
XtF
ree
(
(
char
*
)
action
);
f
ree
(
(
char
*
)
action
);
}
else
if
(
classid
==
pwr_cClass_WebGraph
)
{
sts
=
ldh_GetObjectPar
(
wtt
->
ldhses
,
attrref
.
Objid
,
"RtBody"
,
...
...
@@ -1900,7 +1900,7 @@ static void wtt_activate_openge( Widget w, Wtt *wtt, XmAnyCallbackStruct *data)
cdh_ToLower
(
graph_name
,
action
);
if
(
strcmp
(
graph_name
,
""
)
!=
0
&&
strstr
(
graph_name
,
".pwg"
)
==
0
)
strcat
(
graph_name
,
".pwg"
);
XtF
ree
(
(
char
*
)
action
);
f
ree
(
(
char
*
)
action
);
}
else
break
;
...
...
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