mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.96] Fix AMD ASCII art. Add third digit in frequency output
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
\
|
||||
\
|
||||
@@@@ @@@ @@@ @@@@@@@@ ############ \
|
||||
@@@@@@ @@@@@ @@@@ @@@ @@@@ ########## \
|
||||
@@@ @@@ @@@@@@@@@@@@@ @@@ @@ # #### \
|
||||
@@@ @@@ @@@ @@@ @@@ @@@ @@@ ### #### \
|
||||
@@@@@@@@@@@@ @@@ @@@ @@@ @@@ #### ## ### \
|
||||
@@@@@@ @@@@@ @@@@@ @@@ @@@ ########## \
|
||||
@@@ @@@ @@@@@@@@@@@@@ @@@ @@ # ##### \
|
||||
@@@ @@@ @@@ @@@ @@@ @@@ @@ ### ##### \
|
||||
@@@@@@@@@@@@ @@@ @@@ @@@ @@@ ######### ### \
|
||||
@@@ @@@ @@@ @@@ @@@@@@@@@ ######## ## \
|
||||
\
|
||||
\
|
||||
|
||||
@@ -147,18 +147,18 @@ char* get_str_l3(struct cache* cach) {
|
||||
|
||||
char* get_str_freq(struct frequency* freq) {
|
||||
//Max 3 digits and 3 for '(M/G)Hz' plus 1 for '\0'
|
||||
uint32_t size = (4+3+1);
|
||||
uint32_t size = (5+1+3+1);
|
||||
assert(strlen(STRING_UNKNOWN)+1 <= size);
|
||||
char* string = malloc(sizeof(char)*size);
|
||||
memset(string, 0, sizeof(char)*size);
|
||||
|
||||
|
||||
if(freq->max == UNKNOWN_FREQ || freq->max < 0)
|
||||
snprintf(string,strlen(STRING_UNKNOWN)+1,STRING_UNKNOWN);
|
||||
else if(freq->max >= 1000)
|
||||
snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000);
|
||||
snprintf(string,size,"%.3f "STRING_GIGAHERZ,(float)(freq->max)/1000);
|
||||
else
|
||||
snprintf(string,size,"%d"STRING_MEGAHERZ,freq->max);
|
||||
|
||||
snprintf(string,size,"%d "STRING_MEGAHERZ,freq->max);
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "../arm/midr.h"
|
||||
#endif
|
||||
|
||||
static const char* VERSION = "0.95";
|
||||
static const char* VERSION = "0.96";
|
||||
|
||||
void print_help(char *argv[]) {
|
||||
printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);
|
||||
|
||||
Reference in New Issue
Block a user