From eb6f986361713d6ce47c6d4572bb24d9f6207ddf Mon Sep 17 00:00:00 2001 From: Anser Date: Tue, 11 Aug 2026 00:18:57 +0200 Subject: TOBESQUISHED: safe in reconstruction of the codes layout and rework of information handeling also ascii art printing --- include/cfetch.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 include/cfetch.h (limited to 'include/cfetch.h') diff --git a/include/cfetch.h b/include/cfetch.h new file mode 100644 index 0000000..57c8781 --- /dev/null +++ b/include/cfetch.h @@ -0,0 +1,44 @@ +#ifndef CFETCH_H +#define CFETCH_H + +#include +#include +#include + +#define MAX_ASCII_LINES 50 +#define MAX_ASCII_WIDTH 256 + + +/* System information structure */ + +typedef struct system_info_t{ + char user[64]; + char kernel[64]; + 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; + + +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_os(system_info_t *info); + + +/* Util functions */ +char *string_format(char *string); +char *concat(const char *str1, const char *str2); + + + +#endif /* CFETCH_H */ -- cgit v1.2.3