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
f9faa11a
Commit
f9faa11a
authored
Dec 22, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Script functions ODD and EVEN added
parent
1cd5969c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
src/lib/co/src/co_ccm.c
src/lib/co/src/co_ccm.c
+46
-0
No files found.
src/lib/co/src/co_ccm.c
View file @
f9faa11a
...
@@ -273,6 +273,10 @@ static int ccm_func_get_node_name( void *filectx, ccm_sArg *arg_list, int arg_co
...
@@ -273,6 +273,10 @@ static int ccm_func_get_node_name( void *filectx, ccm_sArg *arg_list, int arg_co
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
static
int
ccm_func_get_language
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
static
int
ccm_func_get_language
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
static
int
ccm_func_odd
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
static
int
ccm_func_even
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
);
#define CCM_SYSFUNC_MAX 100
#define CCM_SYSFUNC_MAX 100
...
@@ -304,6 +308,8 @@ static ccm_sSysFunc ccm_sysfunc[CCM_SYSFUNC_MAX] = {
...
@@ -304,6 +308,8 @@ static ccm_sSysFunc ccm_sysfunc[CCM_SYSFUNC_MAX] = {
{
"get_pwr_config"
,
&
ccm_func_get_pwr_config
},
{
"get_pwr_config"
,
&
ccm_func_get_pwr_config
},
{
"get_node_name"
,
&
ccm_func_get_node_name
},
{
"get_node_name"
,
&
ccm_func_get_node_name
},
{
"get_language"
,
&
ccm_func_get_language
},
{
"get_language"
,
&
ccm_func_get_language
},
{
"ODD"
,
&
ccm_func_odd
},
{
"EVEN"
,
&
ccm_func_even
},
{
""
,
0
}};
{
""
,
0
}};
/************* TEST *********************/
/************* TEST *********************/
...
@@ -5194,6 +5200,46 @@ static int ccm_func_get_node_name(
...
@@ -5194,6 +5200,46 @@ static int ccm_func_get_node_name(
return
1
;
return
1
;
}
}
static
int
ccm_func_odd
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
)
{
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
if
(
arg_list
->
value_decl
!=
K_DECL_INT
)
return
CCM__VARTYPE
;
*
return_int
=
(
arg_list
->
value_int
&
1
);
*
return_decl
=
K_DECL_INT
;
return
1
;
}
static
int
ccm_func_even
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
)
{
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
if
(
arg_list
->
value_decl
!=
K_DECL_INT
)
return
CCM__VARTYPE
;
*
return_int
=
!
(
arg_list
->
value_int
&
1
);
*
return_decl
=
K_DECL_INT
;
return
1
;
}
static
int
ccm_extract_parenthes_expr
(
char
*
expr
,
char
*
line
)
static
int
ccm_extract_parenthes_expr
(
char
*
expr
,
char
*
line
)
{
{
char
*
s
;
char
*
s
;
...
...
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