Battery: major code refactoring

ditto
This commit is contained in:
李通洲
2023-03-07 16:13:53 +08:00
parent 6cb073e6a5
commit 4e3e469ba8
16 changed files with 122 additions and 39 deletions
+11
View File
@@ -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);