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
19461211
Commit
19461211
authored
Oct 28, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function GetCurrentVolume added
parent
78ab3e22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
3 deletions
+61
-3
wb/lib/wb/src/wb_wccm.cpp
wb/lib/wb/src/wb_wccm.cpp
+61
-3
No files found.
wb/lib/wb/src/wb_wccm.cpp
View file @
19461211
/*
/*
* Proview $Id: wb_wccm.cpp,v 1.
5 2008-10-09 08:38:47
claes Exp $
* Proview $Id: wb_wccm.cpp,v 1.
6 2008-10-28 09:53:30
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -857,11 +857,20 @@ static int wccm_getnextfreeuservid_func(
...
@@ -857,11 +857,20 @@ static int wccm_getnextfreeuservid_func(
{
{
int
sts
;
int
sts
;
pwr_tVid
next_vid
;
pwr_tVid
next_vid
;
pwr_tVid
start_vid
=
cdh_cUserVolMin
;
if
(
arg_count
!=
0
)
if
(
arg_count
>
1
)
return
CCM__ARGMISM
;
return
CCM__ARGMISM
;
sts
=
WNav
::
get_next_free_vid
(
cdh_cUserVolMin
,
cdh_cUserVolMax
,
&
next_vid
);
if
(
arg_count
>
0
)
{
if
(
arg_list
->
value_decl
!=
CCM_DECL_INT
)
return
CCM__VARTYPE
;
if
(
(
pwr_tVid
)
arg_list
->
value_int
>
start_vid
)
start_vid
=
arg_list
->
value_int
;
}
sts
=
WNav
::
get_next_free_vid
(
start_vid
,
cdh_cUserVolMax
,
&
next_vid
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
strcpy
(
return_string
,
""
);
strcpy
(
return_string
,
""
);
else
else
...
@@ -928,6 +937,53 @@ static int wccm_checknewvolumename_func(
...
@@ -928,6 +937,53 @@ static int wccm_checknewvolumename_func(
return
1
;
return
1
;
}
}
static
int
wccm_getcurrentvolume_func
(
void
*
filectx
,
ccm_s_arg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
float
*
return_float
,
int
*
return_int
,
char
*
return_string
)
{
int
sts
;
char
name
[
80
];
int
size
;
ldh_tSesContext
ldhses
;
ldh_sSessInfo
info
;
ldh_tWBContext
wbctx
;
sts
=
wccm_get_wbctx
(
&
wbctx
);
if
(
EVEN
(
sts
))
{
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
CMD__NOWBATTACHED
;
}
sts
=
wccm_get_ldhses
(
&
ldhses
);
if
(
EVEN
(
sts
))
{
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
CMD__NOVOLATTACHED
;
}
if
(
arg_count
!=
0
)
return
CCM__ARGMISM
;
sts
=
ldh_GetSessionInfo
(
ldhses
,
&
info
);
if
(
ODD
(
sts
))
sts
=
ldh_VolumeIdToName
(
wbctx
,
info
.
Vid
,
name
,
sizeof
(
name
),
&
size
);
if
(
ODD
(
sts
))
strcpy
(
return_string
,
name
);
else
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
/*************************************************************************
/*************************************************************************
*
*
* Name: wccm_register()
* Name: wccm_register()
...
@@ -991,6 +1047,8 @@ int wccm_register(
...
@@ -991,6 +1047,8 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"CheckNewVolumeName"
,
wccm_checknewvolumename_func
);
sts
=
ccm_register_function
(
"CheckNewVolumeName"
,
wccm_checknewvolumename_func
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetCurrentVolume"
,
wccm_getcurrentvolume_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_create_external_var
(
"cmd_status"
,
CCM_DECL_INT
,
0
,
1
,
sts
=
ccm_create_external_var
(
"cmd_status"
,
CCM_DECL_INT
,
0
,
1
,
NULL
);
NULL
);
...
...
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