Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
purr-data
Commits
5b6630d5
Commit
5b6630d5
authored
May 21, 2018
by
Jonathan Wilkes
Browse files
Merge branch 'pranay_36/purr-data-pd-l2ork_double'
parents
fdb1fcc6
3b834678
Pipeline
#1302
passed with stage
in 343 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pd/src/m_atom.c
View file @
5b6630d5
...
@@ -8,6 +8,13 @@
...
@@ -8,6 +8,13 @@
#define DOLLARALL -0x7fffffff
/* defined in m_binbuf.c, too. Consider merging */
#define DOLLARALL -0x7fffffff
/* defined in m_binbuf.c, too. Consider merging */
#if PD_FLOATSIZE == 32
#define M_ATOM_FLOAT_SPECIFIER "%.6g"
#elif PD_FLOATSIZE == 64
#define M_ATOM_FLOAT_SPECIFIER "%.14lg"
#endif
/* convenience routines for checking and getting values of
/* convenience routines for checking and getting values of
atoms. There's no "pointer" version since there's nothing
atoms. There's no "pointer" version since there's nothing
safe to return if there's an error. */
safe to return if there's an error. */
...
@@ -85,7 +92,7 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize)
...
@@ -85,7 +92,7 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize)
strcpy
(
buf
,
"(pointer)"
);
strcpy
(
buf
,
"(pointer)"
);
break
;
break
;
case
A_FLOAT
:
case
A_FLOAT
:
sprintf
(
tbuf
,
"%g"
,
a
->
a_w
.
w_float
);
sprintf
(
tbuf
,
M_ATOM_FLOAT_SPECIFIER
,
a
->
a_w
.
w_float
);
if
(
strlen
(
tbuf
)
<
bufsize
-
1
)
strcpy
(
buf
,
tbuf
);
if
(
strlen
(
tbuf
)
<
bufsize
-
1
)
strcpy
(
buf
,
tbuf
);
else
if
(
a
->
a_w
.
w_float
<
0
)
strcpy
(
buf
,
"-"
);
else
if
(
a
->
a_w
.
w_float
<
0
)
strcpy
(
buf
,
"-"
);
else
strcat
(
buf
,
"+"
);
else
strcat
(
buf
,
"+"
);
...
...
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