aboutsummaryrefslogtreecommitdiff
path: root/analyzer/utils/roman.h
diff options
context:
space:
mode:
authorMosder <xmosder12@gmail.com>2026-07-21 17:26:09 +0200
committerMosder <xmosder12@gmail.com>2026-07-21 17:26:09 +0200
commit5c0e713713143bad475a92d20ee5fe215b5bafd3 (patch)
tree2f0dfb464b46181644f28a6be59a88f2ef6305d4 /analyzer/utils/roman.h
parentf73349115edbc75021885eefd33ee33ee504d9a7 (diff)
feat: added parsing for gear
Diffstat (limited to 'analyzer/utils/roman.h')
-rw-r--r--analyzer/utils/roman.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/analyzer/utils/roman.h b/analyzer/utils/roman.h
new file mode 100644
index 0000000..b4f5d3f
--- /dev/null
+++ b/analyzer/utils/roman.h
@@ -0,0 +1,12 @@
+// utils/roman.h
+// functions for roman numbers
+
+#define ROMAN_CHAR_COUNT 13
+#define ROMAN_NUMS {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}
+#define ROMAN_CHARS {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}
+
+// convert a arabic number to roman number
+// params:
+// buffer - buffer to save the roman number to
+// number - arabic number to convert
+extern void to_roman(char *buffer, int number);