Merge branch 'master' into feat/image-module

This commit is contained in:
Jake Stanger
2022-02-22 23:40:59 +00:00
committed by GitHub
15 changed files with 55 additions and 22 deletions

View File

@ -68,7 +68,10 @@ inline int close(FILE* fp, pid_t pid) {
inline FILE* open(const std::string& cmd, int& pid) {
if (cmd == "") return nullptr;
int fd[2];
pipe(fd);
if (pipe(fd) != 0){
spdlog::error("Unable to pipe fd");
return nullptr;
}
pid_t child_pid = fork();

View File

@ -1,6 +1,7 @@
#pragma once
#include <fmt/format.h>
#include <glibmm/ustring.h>
class pow_format {
public:
@ -84,5 +85,15 @@ namespace fmt {
);
}
};
// Glib ustirng support
template <>
struct formatter<Glib::ustring> : formatter<std::string> {
template <typename FormatContext>
auto format(const Glib::ustring& value, FormatContext& ctx) {
return formatter<std::string>::format(value, ctx);
}
};
}