Added a janky system for storing commands

This commit is contained in:
2024-02-19 16:44:07 +01:00
parent 5cf1b33178
commit b77418f0ec
4 changed files with 64 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
#include <fcntl.h>
#include <openssl/md5.h>
char _error_buffer[ERROR_BUFFER_SIZE];
char ERROR_BUFFER[ERROR_BUFFER_SIZE];
result_t success(void) {
return EXIT_SUCCESS;
@@ -23,7 +23,7 @@ result_t failure(const char* format, ...) {
va_start(args, format);
// Print the error message into the error buffer
vsnprintf(_error_buffer, ERROR_BUFFER_SIZE, format, args);
vsnprintf(ERROR_BUFFER, ERROR_BUFFER_SIZE, format, args);
va_end(args);
@@ -31,7 +31,7 @@ result_t failure(const char* format, ...) {
}
const char* error(void) {
return _error_buffer;
return ERROR_BUFFER;
}
result_t format(char** _str, const char* format, ...) {