From 55db25040a0dff58ba4d62ee2f2c731cc380f698 Mon Sep 17 00:00:00 2001 From: Andrew Haynes Date: Wed, 15 Jul 2026 00:53:51 -0400 Subject: [PATCH] fixed spacing and comments --- include/image/utils.h | 6 ++++++ src/utils.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/image/utils.h b/include/image/utils.h index a06ec79..eb3a1f1 100644 --- a/include/image/utils.h +++ b/include/image/utils.h @@ -57,7 +57,13 @@ u32to_u64(const unsigned int clr); unsigned int u64to_u32(const unsigned long clr, const unsigned long u64_div); +/** + * Pretty Self Explanitory but prints the attributes of PPM images + * */ void __attribute__((overloadable)) print_attr(const PPM *src); +/** + * Pretty Self Explanitory but prints the attributes of JPEG images + * */ void __attribute__((overloadable)) print_attr(const JPEG *src); #endif diff --git a/src/utils.c b/src/utils.c index 8d5d847..0ad0d64 100644 --- a/src/utils.c +++ b/src/utils.c @@ -23,18 +23,16 @@ u64to_u32(const unsigned long clr, const unsigned long u64_div) (b / u64_div)); } -// Utilizing new knowledge below - void __attribute__((overloadable)) print_attr(const PPM *src) { - printf("Name: %s\nFMT: %c\nWidth: %i, Height: %i\nLength: %i", + printf("Name: %s\nFMT: %c\nWidth: %i, Height: %i\nLength: %i\n", src->name, src->fmt, src->width, src->height, src->len); } void __attribute__((overloadable)) print_attr(const JPEG *src) { - printf("Name: %s\nWidth: %i, Height: %i\nLength: %i", + printf("Name: %s\nWidth: %i, Height: %i\nLength: %i\n", src->name, src->width, src->height, src->len); }