aggiunta warning message

This commit is contained in:
Edi De Candido 2023-05-18 11:58:55 +02:00
parent 674737db05
commit 77a16c43a3
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#define ERREXIT_H
void errExit(char *func, char *where);
void warningMsg(char *msg);
void errExitMsg(char *msg);
#endif

View File

@ -9,6 +9,10 @@ void errExit(char *func, char *where) {
exit(1);
}
void warningMsg(char *msg) {
fprintf(stderr, "\033[0;33m<Warning>\033[39m %s\n", msg);
}
void errExitMsg(char *msg) {
fprintf(stderr, "\033[91m<Error>\033[39m\n");
perror(msg);