remove use of fmt

All uses of fmt can be replaced with either std::format directly
or a tentative implementation of std::print (which we can use
until GCC supports std::print).  Remove the extra dependency.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I466497695a6d53b7767a6456bebe165c5a75121a
diff --git a/src/print.hpp b/src/print.hpp
new file mode 100644
index 0000000..001149c
--- /dev/null
+++ b/src/print.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <stdio.h>
+
+#include <format>
+
+// use this until gcc c++ lib has <print>
+namespace std
+{
+inline void vprint(std::FILE* f, std::string_view format, std::format_args args)
+{
+    std::string d = std::vformat(format, args);
+    fwrite(d.data(), 1, d.size(), f);
+}
+template <class... Args>
+inline void print(std::FILE* f, std::format_string<Args...> format,
+                  Args&&... args)
+{
+    vprint(f, format.get(), std::make_format_args(std::forward<Args>(args)...));
+}
+template <class... Args>
+inline void print(std::format_string<Args...> format, Args&&... args)
+{
+    vprint(stdout, format.get(),
+           std::make_format_args(std::forward<Args>(args)...));
+}
+} // namespace std