From 537230def11fddb3a63f8b4d0bf9b5d64b96e6d0 Mon Sep 17 00:00:00 2001 From: Anser Date: Fri, 14 Aug 2026 10:43:03 +0200 Subject: Changed codingstyle to C kernel style. Print of Systeminformation is now its own function all systeminformation is now stored inside the struct --- include/cfetch.h | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/cfetch.h b/include/cfetch.h index 104ced4..b08c471 100644 --- a/include/cfetch.h +++ b/include/cfetch.h @@ -11,30 +11,32 @@ /* System information structure */ -typedef struct system_info_t{ - char user[64]; - char kernel[128]; - char memory[64]; - char cpu[64]; -} system_info_t; - -typedef struct { - char lines[MAX_ASCII_LINES][MAX_ASCII_WIDTH]; -} ascii_art_t; - -typedef struct distro_mapping_t -{ - const char *distro_pattern; - const char *ascii_file; -} distro_mapping_t; +struct system_info_t { + char user[64]; + char kernel[128]; + char memory[64]; + char cpu[64]; + char debug; + short ascii_art; +}; + +struct ascii_art_t { + char lines[MAX_ASCII_LINES][MAX_ASCII_WIDTH]; +}; + +struct ascii_mapping_t { + const char *ascii_pattern; + const char *ascii_file; +}; /* System info functions */ -void print_ascii_art(system_info_t *info, int art); -void get_cpu(system_info_t *info); -void get_memory(system_info_t *info); -void get_kernel(system_info_t *info); -void get_line_length(ascii_art_t *ascii, const char **line); +void print_ascii_art(struct system_info_t *info); +void get_cpu(struct system_info_t *info); +void get_memory(struct system_info_t *info); +void get_kernel(struct system_info_t *info); +void get_line_length(struct ascii_art_t *ascii, const char **line); +void print_system_info(struct system_info_t *info); /* Util functions */ -- cgit v1.2.3