From 9bf45d3378d6b8375dab957f6ef441504b53ac67 Mon Sep 17 00:00:00 2001 From: Grayson W Date: Tue, 21 Jan 2025 13:47:23 -0500 Subject: [PATCH 1/2] Upload files to "src" --- src/log.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/log.c diff --git a/src/log.c b/src/log.c new file mode 100644 index 0000000..b6ed1ef --- /dev/null +++ b/src/log.c @@ -0,0 +1,79 @@ +/* + * infolog + * + * DESCRIPTION: Output a stylized info message. + * PARAMETERS: char MSG[] + * DEFINED IN: log.h + * + */ + +void +infolog(char MSG[]) +{ + if (MSG == NULL) { + return; + } + + printf(COL_BLUE "[i]" COL_RESET " %s\n", MSG); + return; +} + +/* + * warnlog + * + * DESCRIPTION: Output a stylized warning message. + * Parameters: char MSG[] + * DEFINED IN: log.h + * + */ + +void +warnlog(char MSG[]) +{ + if (MSG == NULL) { + return; + } + + printf(COL_YELLOW "[!]" COL_RESET " %s\n", MSG); + return; +} + +/* + * errlog + * + * DESCRIPTION: Output a stylized error message. + * PARAMETERS: char MSG[] + * DEFINED IN: log.h + * + */ + +void +errlog(char MSG[]) +{ + if (MSG == NULL) { + return; + } + + fprintf(stderr, COL_RED "[x]" COL_RESET " %s\n", MSG); + return; +} + +/* + * successlog + * + * DESCRIPTION: Output a stylized success message. + * PARAMETERS: char MSG[] + * DEFINED IN: log.h + * + */ + +void +successlog(char MSG[]) +{ + if (MSG == NULL) { + return; + } + + printf(COL_GREEN "[*]" COL_RESET " %s\n", MSG); + return; +} \ No newline at end of file From 706da12ba827b05590d00d90853a07ac90525cac Mon Sep 17 00:00:00 2001 From: Grayson W Date: Tue, 21 Jan 2025 14:31:29 -0500 Subject: [PATCH 2/2] Delete src/log.c --- src/log.c | 79 ------------------------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 src/log.c diff --git a/src/log.c b/src/log.c deleted file mode 100644 index b6ed1ef..0000000 --- a/src/log.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * infolog - * - * DESCRIPTION: Output a stylized info message. - * PARAMETERS: char MSG[] - * DEFINED IN: log.h - * - */ - -void -infolog(char MSG[]) -{ - if (MSG == NULL) { - return; - } - - printf(COL_BLUE "[i]" COL_RESET " %s\n", MSG); - return; -} - -/* - * warnlog - * - * DESCRIPTION: Output a stylized warning message. - * Parameters: char MSG[] - * DEFINED IN: log.h - * - */ - -void -warnlog(char MSG[]) -{ - if (MSG == NULL) { - return; - } - - printf(COL_YELLOW "[!]" COL_RESET " %s\n", MSG); - return; -} - -/* - * errlog - * - * DESCRIPTION: Output a stylized error message. - * PARAMETERS: char MSG[] - * DEFINED IN: log.h - * - */ - -void -errlog(char MSG[]) -{ - if (MSG == NULL) { - return; - } - - fprintf(stderr, COL_RED "[x]" COL_RESET " %s\n", MSG); - return; -} - -/* - * successlog - * - * DESCRIPTION: Output a stylized success message. - * PARAMETERS: char MSG[] - * DEFINED IN: log.h - * - */ - -void -successlog(char MSG[]) -{ - if (MSG == NULL) { - return; - } - - printf(COL_GREEN "[*]" COL_RESET " %s\n", MSG); - return; -} \ No newline at end of file