summaryrefslogtreecommitdiff
path: root/lib/cvtdec0.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-03-27 11:39:12 -0400
committerFreya Murphy <freya@freyacat.org>2025-03-27 11:39:12 -0400
commit0ff301cda68669c59351e5854ce98f2cf460543f (patch)
treecfe8f976261962420ada64b821559b9da0a56841 /lib/cvtdec0.c
parentadd compile_flags.txt for clangd lsp (diff)
downloadcomus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.gz
comus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.bz2
comus-0ff301cda68669c59351e5854ce98f2cf460543f.zip
pull upstream changes, add auto formatting
Diffstat (limited to 'lib/cvtdec0.c')
-rw-r--r--lib/cvtdec0.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/cvtdec0.c b/lib/cvtdec0.c
index 87792e0..2f89ad2 100644
--- a/lib/cvtdec0.c
+++ b/lib/cvtdec0.c
@@ -26,16 +26,17 @@
**
** NOTE: assumes buf is large enough to hold the resulting string
*/
-char *cvtdec0( char *buf, int value ) {
+char *cvtdec0(char *buf, int value)
+{
int quotient;
quotient = value / 10;
- if( quotient < 0 ) {
+ if (quotient < 0) {
quotient = 214748364;
value = 8;
}
- if( quotient != 0 ) {
- buf = cvtdec0( buf, quotient );
+ if (quotient != 0) {
+ buf = cvtdec0(buf, quotient);
}
*buf++ = value % 10 + '0';
return buf;