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
commit11182ea41cc5f453b06d769dea6e157aa9c3cf86 (patch)
treea37a0e14ec5cef442d979852876dd307c6d4bf22 /inc/utils.h
parent183ddf3d0d4c9eb6fa6470f45dbb4041c48eebab (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 */