mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
@@ -41,7 +41,7 @@ void ffPrintOpenCL(FFOpenCLOptions* options)
|
||||
|
||||
void ffInitOpenCLOptions(FFOpenCLOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_OPENCL_MODULE_NAME, ffParseOpenCLCommandOptions, ffParseOpenCLJsonObject, ffPrintOpenCL, ffGenerateOpenCLJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_OPENCL_MODULE_NAME, ffParseOpenCLCommandOptions, ffParseOpenCLJsonObject, ffPrintOpenCL, ffGenerateOpenCLJson, ffPrintOpenCLHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -102,3 +102,12 @@ void ffGenerateOpenCLJson(FF_MAYBE_UNUSED FFOpenCLOptions* options, yyjson_mut_d
|
||||
ffStrbufDestroy(&opencl.device);
|
||||
ffStrbufDestroy(&opencl.vendor);
|
||||
}
|
||||
|
||||
void ffPrintOpenCLHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_OPENCL_MODULE_NAME, "{1}", FF_OPENCL_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"version",
|
||||
"device",
|
||||
"vendor"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseOpenCLCommandOptions(FFOpenCLOptions* options, const char* key, cons
|
||||
void ffDestroyOpenCLOptions(FFOpenCLOptions* options);
|
||||
void ffParseOpenCLJsonObject(FFOpenCLOptions* options, yyjson_val* module);
|
||||
void ffGenerateOpenCLJson(FFOpenCLOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintOpenCLHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user