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
aea3b739
Commit
aea3b739
authored
Mar 28, 2010
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt -s doesn't show OpDefault
parent
0f7df12b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
xtt/exe/rt_xtt/src/xtt_main.cpp
xtt/exe/rt_xtt/src/xtt_main.cpp
+33
-2
No files found.
xtt/exe/rt_xtt/src/xtt_main.cpp
View file @
aea3b739
...
...
@@ -556,6 +556,31 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
opplace_found
=
1
;
}
else
if
(
select_opplace
)
{
// Check if there is only one single opplace
pwr_tOName
fullname
;
pwr_tObjName
name
;
pwr_tStatus
sts
;
pwr_tOid
oid
;
int
i
=
0
;
for
(
sts
=
gdh_GetClassList
(
pwr_cClass_OpPlace
,
&
oid
);
ODD
(
sts
);
sts
=
gdh_GetNextObject
(
oid
,
&
oid
))
{
sts
=
gdh_ObjidToName
(
oid
,
name
,
sizeof
(
name
),
cdh_mName_object
);
if
(
EVEN
(
sts
)
||
cdh_NoCaseStrcmp
(
name
,
"opdefault"
)
==
0
)
continue
;
sts
=
gdh_ObjidToName
(
oid
,
fullname
,
sizeof
(
fullname
),
cdh_mNName
);
if
(
EVEN
(
sts
))
continue
;
i
++
;
}
if
(
i
==
1
)
{
strcpy
(
opplace_str
,
fullname
);
opplace_found
=
1
;
}
}
else
{
// Look for default opplace
pwr_tOid
oid
;
...
...
@@ -681,10 +706,12 @@ void Xtt::opplace_selected_cb( void *ctx, char *text)
void
Xtt
::
list_opplace
()
{
char
texts
[
20
][
80
];
pwr_tOName
texts
[
20
];
pwr_tObjName
name
;
pwr_tStatus
sts
;
pwr_tOid
oid
;
int
i
=
0
;
for
(
sts
=
gdh_GetClassList
(
pwr_cClass_OpPlace
,
&
oid
);
ODD
(
sts
);
...
...
@@ -692,6 +719,10 @@ void Xtt::list_opplace()
sts
=
gdh_ObjidToName
(
oid
,
texts
[
i
],
sizeof
(
texts
[
0
]),
cdh_mNName
);
if
(
EVEN
(
sts
))
continue
;
sts
=
gdh_ObjidToName
(
oid
,
name
,
sizeof
(
name
),
cdh_mName_object
);
if
(
EVEN
(
sts
)
||
cdh_NoCaseStrcmp
(
name
,
"opdefault"
)
==
0
)
continue
;
i
++
;
if
(
i
==
(
int
)(
sizeof
(
texts
)
/
sizeof
(
texts
[
0
])
-
2
))
break
;
...
...
@@ -714,7 +745,7 @@ void Xtt::list_opplace()
}
else
// Select oplace from list
wow
->
CreateList
(
"Select Operator Place"
,
(
char
*
)
texts
,
80
,
opplace_selected_cb
,
0
,
this
);
wow
->
CreateList
(
"Select Operator Place"
,
(
char
*
)
texts
,
sizeof
(
pwr_tOName
)
,
opplace_selected_cb
,
0
,
this
);
}
int
Xtt
::
xnav_get_select
(
void
*
ctx
,
pwr_tAttrRef
*
attrref
,
int
*
is_attr
)
...
...
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