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
47b471f3
Commit
47b471f3
authored
Oct 09, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functions to get next free vid and to check vid and volumename
parent
5eb3cdc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
1 deletion
+90
-1
wb/lib/wb/src/wb_wccm.cpp
wb/lib/wb/src/wb_wccm.cpp
+90
-1
No files found.
wb/lib/wb/src/wb_wccm.cpp
View file @
47b471f3
/*
/*
* Proview $Id: wb_wccm.cpp,v 1.
4 2008-06-24 07:52:21
claes Exp $
* Proview $Id: wb_wccm.cpp,v 1.
5 2008-10-09 08:38:47
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
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "wb_cmd_msg.h"
#include "wb_cmd_msg.h"
#include "co_ccm_msg.h"
#include "co_ccm_msg.h"
#include "wb_foe_msg.h"
#include "wb_foe_msg.h"
#include "wb_wnav.h"
//#include "wb_cmd.h"
//#include "wb_cmd.h"
...
@@ -845,6 +846,88 @@ static int wccm_checksystemgroup_func(
...
@@ -845,6 +846,88 @@ static int wccm_checksystemgroup_func(
return
1
;
return
1
;
}
}
static
int
wccm_getnextfreeuservid_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
;
pwr_tVid
next_vid
;
if
(
arg_count
!=
0
)
return
CCM__ARGMISM
;
sts
=
WNav
::
get_next_free_vid
(
cdh_cUserVolMin
,
cdh_cUserVolMax
,
&
next_vid
);
if
(
EVEN
(
sts
))
strcpy
(
return_string
,
""
);
else
strcpy
(
return_string
,
cdh_VolumeIdToString
(
0
,
next_vid
,
0
,
0
));
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
wccm_checknewvid_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
;
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
if
(
arg_list
->
value_decl
!=
CCM_DECL_INT
)
return
CCM__VARTYPE
;
sts
=
WNav
::
check_new_vid
(
arg_list
->
value_int
);
if
(
EVEN
(
sts
))
*
return_int
=
0
;
else
*
return_int
=
1
;
*
return_decl
=
CCM_DECL_INT
;
return
1
;
}
static
int
wccm_checknewvolumename_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
;
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
if
(
arg_list
->
value_decl
!=
CCM_DECL_STRING
)
return
CCM__VARTYPE
;
sts
=
WNav
::
check_new_volumename
(
arg_list
->
value_string
);
if
(
EVEN
(
sts
))
*
return_int
=
0
;
else
*
return_int
=
1
;
*
return_decl
=
CCM_DECL_INT
;
return
1
;
}
/*************************************************************************
/*************************************************************************
*
*
* Name: wccm_register()
* Name: wccm_register()
...
@@ -902,6 +985,12 @@ int wccm_register(
...
@@ -902,6 +985,12 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"CheckSystemGroup"
,
wccm_checksystemgroup_func
);
sts
=
ccm_register_function
(
"CheckSystemGroup"
,
wccm_checksystemgroup_func
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetNextFreeUserVid"
,
wccm_getnextfreeuservid_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"CheckNewVid"
,
wccm_checknewvid_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"CheckNewVolumeName"
,
wccm_checknewvolumename_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