From fe6e8250bcec59f992546d7378fb10c48a75abb2 Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Wed, 25 Oct 2023 22:02:58 +0200
Subject: [PATCH] Rename my_inttypes to leon_inttypes

Extend leon_inttypes to 64 bit types
---
 header_pars.c                              |  2 +-
 include/{my_inttypes.h => leon_inttypes.h} | 32 +++++++++++++++++++---
 lib/cmp_entity.c                           |  2 +-
 lib/cmp_guess.c                            |  2 +-
 lib/cmp_io.c                               |  2 +-
 lib/cmp_support.c                          |  2 +-
 lib/rmap.c                                 |  3 +-
 test/cmp_decmp/test_cmp_decmp.c            |  2 +-
 test/cmp_icu/test_cmp_icu.c                |  2 +-
 9 files changed, 37 insertions(+), 12 deletions(-)
 rename include/{my_inttypes.h => leon_inttypes.h} (72%)

diff --git a/header_pars.c b/header_pars.c
index d94e75a..2810954 100644
--- a/header_pars.c
+++ b/header_pars.c
@@ -1,6 +1,6 @@
 #include <stdlib.h>
 
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 #include <cmp_io.h>
 #include <cmp_debug.h>
diff --git a/include/my_inttypes.h b/include/leon_inttypes.h
similarity index 72%
rename from include/my_inttypes.h
rename to include/leon_inttypes.h
index 83c3723..694af3e 100644
--- a/include/my_inttypes.h
+++ b/include/leon_inttypes.h
@@ -1,5 +1,5 @@
 /**
- * @file   my_inttypes.h
+ * @file   leon_inttypes.h
  * @author Dominik Loidolt (dominik.loidolt@univie.ac.at)
  * @date   2021
  *
@@ -18,8 +18,8 @@
  * @warning Does not fully implement the standard.
  */
 
-#ifndef MY_INTTYPES_H
-#define MY_INTTYPES_H
+#ifndef LEON_INTTYPES_H
+#define LEON_INTTYPES_H
 
 #ifndef __sparc__
 #  include <inttypes.h>
@@ -49,6 +49,30 @@
 #  define PRIX32 "lX"
 #endif /*PRIX32*/
 
+#ifndef PRId64
+#  define PRId64 "lld"
+#endif /*PRId64*/
+
+#ifndef PRIi64
+#  define PRIi64 "lli"
+#endif /*PRIi64*/
+
+#ifndef PRIo64
+#  define PRIo64 "llo"
+#endif /*PRIo64*/
+
+#ifndef PRIu64
+#  define PRIu64 "llu"
+#endif /* PRIu64 */
+
+#ifndef PRIx64
+#  define PRIx64 "llx"
+#endif /*PRIx64*/
+
+#ifndef PRIX64
+#  define PRIX64 "llX"
+#endif /*PRIX64*/
+
 #endif /* __sparc__ */
 
-#endif /* MY_INTTYPES_H */
+#endif /* LEON_INTTYPES_H */
diff --git a/lib/cmp_entity.c b/lib/cmp_entity.c
index 1c18815..d82a0fd 100644
--- a/lib/cmp_entity.c
+++ b/lib/cmp_entity.c
@@ -35,7 +35,7 @@
 #include <cmp_support.h>
 #include <cmp_data_types.h>
 #include <cmp_entity.h>
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 
 #ifdef HAS_TIME_H
diff --git a/lib/cmp_guess.c b/lib/cmp_guess.c
index 15109a3..bda3c3e 100644
--- a/lib/cmp_guess.c
+++ b/lib/cmp_guess.c
@@ -25,7 +25,7 @@
 #include <cmp_data_types.h>
 #include <cmp_icu.h>
 #include <cmp_guess.h>
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 #define CMP_GUESS_MAX_CAL_STEPS 20274
 
diff --git a/lib/cmp_io.c b/lib/cmp_io.c
index 485fc4e..57f9ec5 100644
--- a/lib/cmp_io.c
+++ b/lib/cmp_io.c
@@ -34,7 +34,7 @@
 #include <rdcu_cmd.h>
 #include <byteorder.h>
 #include <cmp_data_types.h>
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 
 /* directory to convert from data_type to string */
diff --git a/lib/cmp_support.c b/lib/cmp_support.c
index e1dcfe5..cbad0cf 100644
--- a/lib/cmp_support.c
+++ b/lib/cmp_support.c
@@ -21,7 +21,7 @@
 
 #include <cmp_support.h>
 #include <cmp_debug.h>
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 
 /**
diff --git a/lib/rmap.c b/lib/rmap.c
index 3583576..52953d0 100644
--- a/lib/rmap.c
+++ b/lib/rmap.c
@@ -24,8 +24,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include <leon_inttypes.h>
 #include <rmap.h>
-#include <my_inttypes.h>
+
 
 
 /**
diff --git a/test/cmp_decmp/test_cmp_decmp.c b/test/cmp_decmp/test_cmp_decmp.c
index 5f06a70..da53450 100644
--- a/test/cmp_decmp/test_cmp_decmp.c
+++ b/test/cmp_decmp/test_cmp_decmp.c
@@ -30,7 +30,7 @@
 #include <cmp_icu.h>
 #include <decmp.h>
 #include <cmp_data_types.h>
-#include <my_inttypes.h>
+#include <leon_inttypes.h>
 
 #if defined __has_include
 #  if __has_include(<time.h>)
diff --git a/test/cmp_icu/test_cmp_icu.c b/test/cmp_icu/test_cmp_icu.c
index 87caed6..b78cb52 100644
--- a/test/cmp_icu/test_cmp_icu.c
+++ b/test/cmp_icu/test_cmp_icu.c
@@ -18,7 +18,7 @@
 
 
 #include <stdlib.h>
-#include <inttypes.h>
+#include <leon_inttypes.h>
 
 #if defined __has_include
 #  if __has_include(<time.h>)
-- 
GitLab