Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Wilkes
purr-data
Commits
2bce172b
Commit
2bce172b
authored
7 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
use static declarations to protect against namespace pollution
parent
614c7da7
No related branches found
No related tags found
1 merge request
!114
External tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
externals/cxc/cxc_counter.c
+7
-7
7 additions, 7 deletions
externals/cxc/cxc_counter.c
with
7 additions
and
7 deletions
externals/cxc/cxc_counter.c
+
7
−
7
View file @
2bce172b
...
@@ -23,7 +23,7 @@ typedef struct _counter
...
@@ -23,7 +23,7 @@ typedef struct _counter
t_outlet
*
t_out2
;
/* the outlet */
t_outlet
*
t_out2
;
/* the outlet */
}
t_counter
;
}
t_counter
;
void
counter_bang
(
t_counter
*
x
)
static
void
counter_bang
(
t_counter
*
x
)
{
{
int
sendBang
=
0
;
int
sendBang
=
0
;
switch
(
x
->
c_dir
)
switch
(
x
->
c_dir
)
...
@@ -93,23 +93,23 @@ void counter_bang(t_counter *x)
...
@@ -93,23 +93,23 @@ void counter_bang(t_counter *x)
outlet_bang
(
x
->
t_out2
);
outlet_bang
(
x
->
t_out2
);
}
}
void
counter_dir
(
t_counter
*
x
,
t_floatarg
n
)
static
void
counter_dir
(
t_counter
*
x
,
t_floatarg
n
)
{
{
if
(
n
==
1
||
n
==
2
||
n
==
3
)
x
->
c_dir
=
(
int
)
n
;
if
(
n
==
1
||
n
==
2
||
n
==
3
)
x
->
c_dir
=
(
int
)
n
;
else
error
(
"bad dir"
);
else
error
(
"bad dir"
);
}
}
void
counter_high
(
t_counter
*
x
,
t_floatarg
n
)
static
void
counter_high
(
t_counter
*
x
,
t_floatarg
n
)
{
{
x
->
c_high
=
(
int
)
n
;
x
->
c_high
=
(
int
)
n
;
}
}
void
counter_low
(
t_counter
*
x
,
t_floatarg
n
)
static
void
counter_low
(
t_counter
*
x
,
t_floatarg
n
)
{
{
x
->
c_low
=
(
int
)
n
;
x
->
c_low
=
(
int
)
n
;
}
}
void
counter_reset
(
t_counter
*
x
,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
static
void
counter_reset
(
t_counter
*
x
,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
{
{
if
(
!
argc
)
if
(
!
argc
)
{
{
...
@@ -144,7 +144,7 @@ void counter_reset(t_counter *x, t_symbol *s, int argc, t_atom *argv)
...
@@ -144,7 +144,7 @@ void counter_reset(t_counter *x, t_symbol *s, int argc, t_atom *argv)
outlet_float
(
x
->
t_out1
,
(
float
)
x
->
c_current
);
outlet_float
(
x
->
t_out1
,
(
float
)
x
->
c_current
);
}
}
void
counter_clear
(
t_counter
*
x
,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
static
void
counter_clear
(
t_counter
*
x
,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
{
{
if
(
!
argc
)
if
(
!
argc
)
{
{
...
@@ -178,7 +178,7 @@ void counter_clear(t_counter *x, t_symbol *s, int argc, t_atom *argv)
...
@@ -178,7 +178,7 @@ void counter_clear(t_counter *x, t_symbol *s, int argc, t_atom *argv)
}
}
}
}
void
*
counter_new
(
t_floatarg
f
,
t_floatarg
g
,
t_floatarg
h
)
/* init vals in struc */
static
void
*
counter_new
(
t_floatarg
f
,
t_floatarg
g
,
t_floatarg
h
)
/* init vals in struc */
{
{
t_counter
*
x
=
(
t_counter
*
)
pd_new
(
counter_class
);
t_counter
*
x
=
(
t_counter
*
)
pd_new
(
counter_class
);
x
->
t_out1
=
outlet_new
(
&
x
->
x_obj
,
0
);
x
->
t_out1
=
outlet_new
(
&
x
->
x_obj
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment