reformat main
Some checks failed
build_test / build (push) Has been cancelled

This commit is contained in:
PoliEcho 2025-04-14 10:42:58 +02:00
parent 1b61b87cc7
commit f307ed3448

View File

@ -1,8 +1,8 @@
#include "color.h"
#include "const.h"
#include <unistd.h>
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include "color.h"
#include "const.h"
void PrintHelp() {
std::cout << RED R"( ____ ____
@ -24,21 +24,21 @@ void PrintVersion() {
exit(0);
}
int main(int argc, char *argv[]) {
int main(int argc, char* argv[]) {
int opt;
while ((opt = getopt(argc, argv, "hV")) != -1) {
switch (opt) {
case 'h':
PrintHelp();
break;
case 'V':
PrintVersion();
break;
default:
std::cerr << RED "[ERROR]" << RESET " invalid option: " << (char)optopt
<< "\ntry: -h\n";
return EINVAL;
case 'h':
PrintHelp();
break;
case 'V':
PrintVersion();
break;
default:
std::cerr << RED "[ERROR]" << RESET " invalid option: " << (char)optopt
<< "\ntry: -h\n";
return EINVAL;
}
}