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
39241640
Commit
39241640
authored
Feb 23, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New functions OpenGraph, CloseGraph, SetSubwindow and CheckSystemGroup
parent
da02e89c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
1 deletion
+88
-1
wb/lib/wb/src/wb_wccm.c
wb/lib/wb/src/wb_wccm.c
+88
-1
No files found.
wb/lib/wb/src/wb_wccm.c
View file @
39241640
/*
* Proview $Id: wb_wccm.c,v 1.
6 2005-10-25 15:28:11
claes Exp $
* Proview $Id: wb_wccm.c,v 1.
7 2006-02-23 14:41:26
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -29,6 +29,7 @@
#include "co_time.h"
#include "co_ccm.h"
#include "co_cdh.h"
#include "co_api.h"
#include "wb_utl.h"
#include "wb_trv.h"
#include "wb_cmd_msg.h"
...
...
@@ -667,6 +668,88 @@ static int wccm_getprojectname_func(
return
1
;
}
static
int
wccm_setattribute_func
(
void
*
filectx
,
ccm_s_arg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
float
*
return_float
,
int
*
return_int
,
char
*
return_string
)
{
ccm_s_arg
*
arg_p2
;
int
sts
;
char
buf
[
400
];
pwr_tAName
name
;
pwr_tOName
attr
;
char
*
s
;
ldh_tSesContext
ldhses
;
sts
=
wccm_get_ldhses
(
&
ldhses
);
if
(
EVEN
(
sts
))
{
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
CMD__NOVOLATTACHED
;
}
if
(
arg_count
!=
2
)
return
CCM__ARGMISM
;
arg_p2
=
arg_list
->
next
;
if
(
arg_list
->
value_decl
!=
CCM_DECL_STRING
)
return
CCM__VARTYPE
;
switch
(
arg_p2
->
value_decl
)
{
case
CCM_DECL_STRING
:
strcpy
(
buf
,
arg_p2
->
value_string
);
break
;
case
CCM_DECL_INT
:
sprintf
(
buf
,
"%d"
,
arg_p2
->
value_int
);
break
;
case
CCM_DECL_FLOAT
:
sprintf
(
buf
,
"%f"
,
arg_p2
->
value_float
);
break
;
}
strcpy
(
name
,
arg_list
->
value_string
);
if
(
(
s
=
strrchr
(
name
,
'.'
)))
{
*
s
=
0
;
strcpy
(
attr
,
s
+
1
);
}
else
return
CMD__ATTRIBUTE
;
sts
=
utl_set_object_parameter
(
ldhses
,
0
,
0
,
name
,
attr
,
buf
,
0
,
""
,
0
,
0
);
*
return_int
=
sts
;
*
return_decl
=
CCM_DECL_INT
;
return
1
;
}
static
int
wccm_checksystemgroup_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
=
user_CheckSystemGroup
(
arg_list
->
value_string
);
*
return_int
=
ODD
(
sts
);
*
return_decl
=
CCM_DECL_INT
;
return
1
;
}
/*************************************************************************
*
* Name: wccm_register()
...
...
@@ -716,6 +799,10 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetProjectName"
,
wccm_getprojectname_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"SetAttribute"
,
wccm_setattribute_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"CheckSystemGroup"
,
wccm_checksystemgroup_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_create_external_var
(
"cmd_status"
,
CCM_DECL_INT
,
0
,
1
,
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