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
a4c8418c
Commit
a4c8418c
authored
Nov 07, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed yes/no prompts in wb to match the one in rt_ini.
parent
7ead3dc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
38 deletions
+37
-38
wb/lib/wb/src/wb_utl.cpp
wb/lib/wb/src/wb_utl.cpp
+24
-24
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+13
-14
No files found.
wb/lib/wb/src/wb_utl.cpp
View file @
a4c8418c
...
...
@@ -2835,15 +2835,15 @@ int utl_show_object(ldh_tSesContext ldhses, char* windowstring,
int
utl_revert
(
ldh_tSesContext
ldhses
,
int
confirm
)
{
static
char
yes_or_no
[
200
]
;
char
ans
;
int
sts
;
if
(
confirm
)
{
// TODO
printf
(
"
(Y/N
: "
);
s
ts
=
scanf
(
"%s"
,
yes_or_no
);
printf
(
"
[Y/n]
: "
);
s
canf
(
"%c"
,
&
ans
);
if
(
!
(
(
yes_or_no
[
0
]
==
'Y'
)
||
(
yes_or_no
[
0
]
==
'y'
)
))
if
(
!
(
ans
==
'Y'
||
ans
==
'y'
))
return
FOE__SUCCESS
;
}
...
...
@@ -4906,7 +4906,6 @@ static int utl_set_parameter(pwr_sAttrRef* arp, ldh_tSesContext ldhses,
char
*
parameter
,
char
*
invaluestr
,
int
element
,
utl_ctx
utlctx
)
{
char
*
valuestr
;
static
char
yes_or_no
[
200
];
int
sts
,
size
,
k
;
int
parsize
;
char
*
object_par
=
NULL
;
...
...
@@ -5229,13 +5228,14 @@ static int utl_set_parameter(pwr_sAttrRef* arp, ldh_tSesContext ldhses,
if
(
utlctx
->
confirm
)
{
printf
(
"%s "
,
logstr
);
// TODO
printf
(
"(Y/N/Q/A): "
);
sts
=
scanf
(
"%s"
,
yes_or_no
);
if
(((
yes_or_no
[
0
]
==
'Q'
)
||
(
yes_or_no
[
0
]
==
'q'
)))
printf
(
"[Y/n/q/a]: "
);
char
ans
;
sts
=
scanf
(
"%c"
,
&
ans
);
if
((
ans
==
'Q'
||
ans
==
'q'
))
return
FOE__ABORTSEARCH
;
else
if
((
(
yes_or_no
[
0
]
==
'A'
)
||
(
yes_or_no
[
0
]
==
'a'
)
))
else
if
((
ans
==
'A'
||
ans
==
'a'
))
utlctx
->
confirm
=
0
;
else
if
(
!
(
(
yes_or_no
[
0
]
==
'Y'
)
||
(
yes_or_no
[
0
]
==
'y'
)
))
else
if
(
!
(
ans
==
'Y'
||
ans
==
'y'
))
continue
;
}
if
(
utlctx
->
log
)
...
...
@@ -8809,7 +8809,6 @@ int utl_disconnect(ldh_tSesContext ldhses, char* object_name)
static
int
utl_object_delete
(
pwr_tObjid
Objdid
,
ldh_tSesContext
ldhses
,
utl_ctx
utlctx
,
unsigned
long
dum1
,
unsigned
long
dum2
,
unsigned
long
dum3
)
{
static
char
yes_or_no
[
200
];
pwr_tOName
hier_name
;
int
sts
,
size
;
...
...
@@ -8821,13 +8820,14 @@ static int utl_object_delete(pwr_tObjid Objdid, ldh_tSesContext ldhses,
if
(
utlctx
->
confirm
)
{
printf
(
"Delete object %s "
,
hier_name
);
// TODO
printf
(
"(Y/N/Q/A): "
);
sts
=
scanf
(
"%s"
,
yes_or_no
);
if
(((
yes_or_no
[
0
]
==
'Q'
)
||
(
yes_or_no
[
0
]
==
'q'
)))
printf
(
"[Y/n/q/a]: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
((
ans
==
'Q'
||
ans
==
'q'
))
return
FOE__ABORTSEARCH
;
else
if
((
(
yes_or_no
[
0
]
==
'A'
)
||
(
yes_or_no
[
0
]
==
'a'
)
))
else
if
((
ans
==
'A'
||
ans
==
'a'
))
utlctx
->
confirm
=
0
;
else
if
(
!
(
(
yes_or_no
[
0
]
==
'Y'
)
||
(
yes_or_no
[
0
]
==
'y'
)
))
else
if
(
!
(
ans
==
'Y'
||
ans
==
'y'
))
return
FOE__SUCCESS
;
}
...
...
@@ -8863,7 +8863,6 @@ static int utl_object_delete(pwr_tObjid Objdid, ldh_tSesContext ldhses,
static
int
utl_tree_delete
(
pwr_tObjid
Objdid
,
ldh_tSesContext
ldhses
,
utl_ctx
utlctx
,
unsigned
long
dum1
,
unsigned
long
dum2
,
unsigned
long
dum3
)
{
static
char
yes_or_no
[
200
];
pwr_tOName
hier_name
;
int
sts
,
size
;
...
...
@@ -8875,9 +8874,10 @@ static int utl_tree_delete(pwr_tObjid Objdid, ldh_tSesContext ldhses,
if
(
utlctx
->
confirm
)
{
printf
(
"Delete tree %s "
,
hier_name
);
// TODO
printf
(
"(Y/N/Q): "
);
sts
=
scanf
(
"%s"
,
yes_or_no
);
if
(
!
((
yes_or_no
[
0
]
==
'Y'
)
||
(
yes_or_no
[
0
]
==
'y'
)))
printf
(
"[Y/n]: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
(
!
(
ans
==
'Y'
||
ans
==
'y'
))
return
FOE__SUCCESS
;
}
...
...
@@ -9077,7 +9077,6 @@ int utl_delete_volume(ldh_tWBContext ldhwb, char* name, int confirm, int log)
{
utl_ctx
utlctx
;
int
sts
;
static
char
yes_or_no
[
200
];
pwr_tVolumeId
volid
;
/* Get volid for the volume */
...
...
@@ -9092,9 +9091,10 @@ int utl_delete_volume(ldh_tWBContext ldhwb, char* name, int confirm, int log)
if
(
utlctx
->
confirm
)
{
printf
(
"Delete volume %s "
,
name
);
// TODO
printf
(
"(Y/N/Q): "
);
sts
=
scanf
(
"%s"
,
yes_or_no
);
if
(
!
((
yes_or_no
[
0
]
==
'Y'
)
||
(
yes_or_no
[
0
]
==
'y'
)))
printf
(
"[Y/n]: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
(
!
(
ans
==
'Y'
||
ans
==
'y'
))
return
FOE__SUCCESS
;
}
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
a4c8418c
...
...
@@ -6037,7 +6037,6 @@ static int wnav_confirmdialog_func(void* filectx, ccm_sArg* arg_list,
ccm_sArg
*
arg_p2
,
*
arg_p3
;
int
sts
;
int
cancel
;
char
str
[
80
];
if
(
!
(
arg_count
==
2
||
arg_count
==
3
))
return
CCM__ARGMISM
;
...
...
@@ -6056,13 +6055,13 @@ static int wnav_confirmdialog_func(void* filectx, ccm_sArg* arg_list,
wnav_get_stored_wnav
(
&
wnav
);
if
(
wnav
->
window_type
==
wnav_eWindowType_No
)
{
printf
(
"%s"
,
arg_p2
->
value_string
);
printf
(
"
(y/n/q)
: "
);
scanf
(
"%s"
,
str
)
;
if
(
streq
(
str
,
"Y"
)
||
streq
(
str
,
"y"
)
||
streq
(
str
,
""
)
)
{
printf
(
"
[Y/n/q]
: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
(
ans
==
'Y'
||
ans
==
'y'
||
ans
==
'\n'
)
{
sts
=
1
;
cancel
=
0
;
}
else
if
(
streq
(
str
,
"Q"
)
||
streq
(
str
,
"q"
)
)
{
}
else
if
(
ans
==
'Q'
||
ans
==
'q'
)
{
sts
=
0
;
cancel
=
1
;
}
else
{
...
...
@@ -6078,10 +6077,10 @@ static int wnav_confirmdialog_func(void* filectx, ccm_sArg* arg_list,
wnav_get_stored_wnav
(
&
wnav
);
if
(
wnav
->
window_type
==
wnav_eWindowType_No
)
{
printf
(
"%s"
,
arg_p2
->
value_string
);
printf
(
"
(y/n)
: "
);
scanf
(
"%s"
,
str
)
;
if
(
streq
(
str
,
"Y"
)
||
streq
(
str
,
"y"
)
||
streq
(
str
,
""
)
)
{
printf
(
"
[Y/n]
: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
(
ans
==
'Y'
||
ans
==
'y'
||
ans
==
'\n'
)
{
sts
=
1
;
cancel
=
0
;
}
else
{
...
...
@@ -6106,7 +6105,6 @@ static int wnav_continuedialog_func(void* filectx, ccm_sArg* arg_list,
WNav
*
wnav
;
ccm_sArg
*
arg_p2
;
int
sts
;
char
str
[
80
];
if
(
arg_count
!=
2
)
return
CCM__ARGMISM
;
...
...
@@ -6120,9 +6118,10 @@ static int wnav_continuedialog_func(void* filectx, ccm_sArg* arg_list,
wnav_get_stored_wnav
(
&
wnav
);
if
(
wnav
->
window_type
==
wnav_eWindowType_No
)
{
printf
(
"%s"
,
arg_p2
->
value_string
);
printf
(
"
\n
Do you want to continue ? (y/n) : "
);
scanf
(
"%s"
,
str
);
if
(
streq
(
str
,
"Y"
)
||
streq
(
str
,
"y"
)
||
streq
(
str
,
""
))
printf
(
"
\n
Do you want to continue ? [Y/n]: "
);
char
ans
;
scanf
(
"%c"
,
&
ans
);
if
(
ans
==
'Y'
||
ans
==
'y'
||
ans
==
'\n'
)
sts
=
1
;
else
sts
=
0
;
...
...
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