[ncneofetch] kill 'KERNEL_XNU unhandled' warning

pull/2159/head
nick black 3 years ago
parent 5734444d49
commit e7fe2d2ffd
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -347,7 +347,6 @@ dragonfly_ncneofetch(fetched_info* fi){
return &fbsd; return &fbsd;
} }
#ifdef __APPLE__
static const distro_info* static const distro_info*
xnu_ncneofetch(fetched_info* fi){ xnu_ncneofetch(fetched_info* fi){
static distro_info fbsd = { static distro_info fbsd = {
@ -355,6 +354,7 @@ xnu_ncneofetch(fetched_info* fi){
.logofile = "/System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/Resources/apple@2x.png", .logofile = "/System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/Resources/apple@2x.png",
}; };
fi->neologo = get_neofetch_art("Darwin"); fi->neologo = get_neofetch_art("Darwin");
#ifdef __APPLE__
#define PREFIX "macOS " #define PREFIX "macOS "
char osver[30] = PREFIX; // shrug char osver[30] = PREFIX; // shrug
size_t oldlenp = sizeof(osver) - strlen(PREFIX); size_t oldlenp = sizeof(osver) - strlen(PREFIX);
@ -363,9 +363,11 @@ xnu_ncneofetch(fetched_info* fi){
fi->distro_pretty = strdup(osver); fi->distro_pretty = strdup(osver);
} }
#undef PREFIX #undef PREFIX
#else
fi->distro_pretty = strdup("macOS");
#endif
return &fbsd; return &fbsd;
} }
#endif
static int static int
drawpalette(struct notcurses* nc){ drawpalette(struct notcurses* nc){
@ -631,11 +633,9 @@ ncneofetch(struct notcurses* nc){
case NCNEO_DRAGONFLY: case NCNEO_DRAGONFLY:
fi.distro = dragonfly_ncneofetch(&fi); fi.distro = dragonfly_ncneofetch(&fi);
break; break;
#ifdef __APPLE__
case NCNEO_XNU: case NCNEO_XNU:
fi.distro = xnu_ncneofetch(&fi); fi.distro = xnu_ncneofetch(&fi);
break; break;
#endif
case NCNEO_WINDOWS: case NCNEO_WINDOWS:
fi.distro = windows_ncneofetch(&fi); fi.distro = windows_ncneofetch(&fi);
break; break;

Loading…
Cancel
Save