summaryrefslogtreecommitdiff
path: root/inc/utils.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-11 00:09:12 -0400
committerbd <bdunahu@operationnull.com>2025-03-11 00:09:12 -0400
commitf34156105801c81677c54d1713104ac3d7c1c112 (patch)
treea37a0e14ec5cef442d979852876dd307c6d4bf22 /inc/utils.h
parent17dfdb2e00b609e3c7e975ce7a7c19da43318b79 (diff)
cli display clock cycle, parse ';' delimited commands
Diffstat (limited to 'inc/utils.h')
-rw-r--r--inc/utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/utils.h b/inc/utils.h
index e258ed8..71e515b 100644
--- a/inc/utils.h
+++ b/inc/utils.h
@@ -1,5 +1,6 @@
#ifndef UTILS_H
#define UTILS_H
+#include <string>
/**
* Parse an address into a tag, index into the cache table, and a line
@@ -11,4 +12,12 @@
*/
void get_bit_fields(int address, int *tag, int *index, int *offset);
+/**
+ * Formats a string using snprintf.
+ * @param an object that represents the format string
+ * @param arguments to be formatted
+ * @return a string object holding the formatted result
+ */
+const std::string string_format(const char *const zcFormat, ...);
+
#endif /* UTILS_H_INCLUDED */