From d7047ceb1e691029f02cf1f4199f24802d37c87d Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 26 Dec 2023 22:01:04 +0300 Subject: [PATCH] fix --- include/logo.h | 4 ++-- src/fetch.c | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/logo.h b/include/logo.h index ed43d82..9b305c7 100644 --- a/include/logo.h +++ b/include/logo.h @@ -58,7 +58,7 @@ char *Android[] = { }; char *OpenBSD[] = { - " ", + " ", "\033[1;33m _____ ", "\033[1;33m \\- -/ ", "\033[1;33m \\_/ \\ ", @@ -66,7 +66,7 @@ char *OpenBSD[] = { "\033[1;33m |_ < ) 3 ) ", "\033[1;33m / \\ / ", "\033[1;33m /-_____-\\ ", - " " + " " }; char *PlainOs[] = { diff --git a/src/fetch.c b/src/fetch.c index 5068781..445b158 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -109,8 +109,7 @@ int PrintColors(const char *title, const FETCH fetch) { } int Blank(const char *title, const FETCH fetch) { - UNUSED(title); - UNUSED(fetch); + printf("%s%s%s", fetch.color, title, fetch.font_color); return 0; } @@ -193,11 +192,11 @@ int GetMem(const char *title, const FETCH fetch) { return 1; off_t unused = 0, total = 0, available = 0; - if (fscanf(fp, "MemTotal: %ju kB\nMemFree: %ju kB\nMemAvailable: %ju kB", &total, &unused, &available) < 0) + if (fscanf(fp, "MemTotal: %lu kB\nMemFree: %lu kB\nMemAvailable: %lu kB", &total, &unused, &available) < 0) return 1; UNUSED(unused); - printf("%s%s%s%jumb / %jumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - available) / 1024, (uintmax_t)total / 1024); + printf("%s%s%s%lumb / %lumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - available) / 1024, (uintmax_t)total / 1024); fclose(fp); return 0;