mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-07 05:34:20 +01:00
Battery: major code refactoring
ditto
This commit is contained in:
@@ -105,6 +105,17 @@ void ffOptionParseEnum(const char* argumentKey, const char* requestedKey, void*
|
||||
exit(478);
|
||||
}
|
||||
|
||||
bool ffOptionParseBoolean(const char* str)
|
||||
{
|
||||
return (
|
||||
!ffStrSet(str) ||
|
||||
strcasecmp(str, "true") == 0 ||
|
||||
strcasecmp(str, "yes") == 0 ||
|
||||
strcasecmp(str, "on") == 0 ||
|
||||
strcasecmp(str, "1") == 0
|
||||
);
|
||||
}
|
||||
|
||||
void ffOptionInitModuleArg(FFModuleArgs* args)
|
||||
{
|
||||
ffStrbufInit(&args->key);
|
||||
|
||||
Reference in New Issue
Block a user