bruh. you took too long to get colours
... that you don't even need
This commit is contained in:
11
src/helper.h
Normal file
11
src/helper.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define RED(msg) "\e[31m" msg
|
||||||
|
#define GREEN(msg) "\e[32m" msg
|
||||||
|
#define YELLOW(msg) "\e[33m" msg
|
||||||
|
|
||||||
|
#define BOLD(x) "\e[1m" #x "\e[22m"
|
||||||
|
|
||||||
|
#define PRINT_ERROR(msg,...) fprintf(stderr,RED(msg)"\e[0m\n",__VA_ARGS__)
|
||||||
|
#define PRINT_WARN(msg,...) fprintf(stderr,YELLOW(msg)"\e[0m\n",__VA_ARGS__)
|
||||||
|
#define PRINT_SUCCESS(msg,...) fprintf(stderr,GREEN(msg)"\e[0m\n",__VA_ARGS__)
|
||||||
11
src/main.c
11
src/main.c
@@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "helper.h"
|
||||||
|
#define NAME "args"
|
||||||
|
|
||||||
|
int main(int argc, char **argv){
|
||||||
|
if (argc < 2) {
|
||||||
|
PRINT_ERROR("%s obviously needs arguments to work…", NAME);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user