mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Migration: finish modules support
This commit is contained in:
@@ -72,6 +72,14 @@ void ffParseVersionJsonObject(FFVersionOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGenerateVersionJsonConfig(FFVersionOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyVersionOptions))) FFVersionOptions defaultOptions;
|
||||
ffInitVersionOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGenerateVersionJsonResult(FF_MAYBE_UNUSED FFVersionOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
FFVersionResult result;
|
||||
@@ -129,7 +137,7 @@ void ffInitVersionOptions(FFVersionOptions* options)
|
||||
ffPrintVersion,
|
||||
ffGenerateVersionJsonResult,
|
||||
ffPrintVersionHelpFormat,
|
||||
NULL
|
||||
ffGenerateVersionJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user