Convert compressor submodule into a normal folder
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "print.hpp"
|
||||
|
||||
Logger logger;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
logger.err("No arguments provided.\n");
|
||||
logger.err("Usage: %s [args...]\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "print.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
void Logger::log(const char* format, ...)
|
||||
{
|
||||
printf("[Log]:\t");
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void Logger::err(const char* format, ...)
|
||||
{
|
||||
printf("[Error]:\t");
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
Reference in New Issue
Block a user