Global: refactor code of -h <module>-format

This commit is contained in:
李通洲
2024-12-11 10:47:02 +08:00
parent e45ff546ed
commit 9a36d63d18
78 changed files with 1454 additions and 1872 deletions
+10 -11
View File
@@ -44,19 +44,18 @@ void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module)
}
}
static FFModuleBaseInfo ffModuleInfo = {
.name = FF_CUSTOM_MODULE_NAME,
.description = "Print a custom string, with or without key",
.parseCommandOptions = (void*) ffParseCustomCommandOptions,
.parseJsonObject = (void*) ffParseCustomJsonObject,
.printModule = (void*) ffPrintCustom,
.generateJsonConfig = (void*) ffGenerateCustomJsonConfig,
};
void ffInitCustomOptions(FFCustomOptions* options)
{
ffOptionInitModuleBaseInfo(
&options->moduleInfo,
FF_CUSTOM_MODULE_NAME,
"Print a custom string, with or without key",
ffParseCustomCommandOptions,
ffParseCustomJsonObject,
ffPrintCustom,
NULL,
NULL,
ffGenerateCustomJsonConfig
);
options->moduleInfo = ffModuleInfo;
ffOptionInitModuleArg(&options->moduleArgs, "");
ffStrbufSetStatic(&options->moduleArgs.key, " ");
}