summaryrefslogtreecommitdiffhomepage
path: root/src/internal/mdso_object_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/mdso_object_impl.h')
-rw-r--r--src/internal/mdso_object_impl.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/internal/mdso_object_impl.h b/src/internal/mdso_object_impl.h
index b329ef9..539a77d 100644
--- a/src/internal/mdso_object_impl.h
+++ b/src/internal/mdso_object_impl.h
@@ -1,6 +1,6 @@
/****************************************************************/
/* mdso: midipix dso scavenger */
-/* Copyright (C) 2015--2017 Z. Gilboa */
+/* Copyright (C) 2015--2024 SysDeer Technologies, LLC */
/* Released under GPLv2 and GPLv3; see COPYING.MDSO. */
/****************************************************************/
@@ -31,3 +31,17 @@ static inline void mdso_obj_write_quad(unsigned char * ch, uint64_t val)
ch[6] = val >> 48;
ch[7] = val >> 56;
}
+
+static inline void mdso_obj_write_dec(unsigned char * ch, uint64_t dec)
+{
+ int digits;
+ uint64_t val;
+
+ *ch = '0';
+
+ for (digits=0,val=dec; val; digits++)
+ val /= 10;
+
+ for (val=dec; val; val/=10)
+ ch[--digits] = (val % 10) + '0';
+}