Custom: code cleanup

This commit is contained in:
李通洲
2023-09-22 13:39:40 +08:00
parent 560c2acb88
commit 4d86c53e81
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -12,7 +12,7 @@ void ffPrintCustom(FFCustomOptions* options)
return;
}
ffPrintLogoAndKey(options->moduleArgs.key.length == 0 ? NULL : FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
ffPrintLogoAndKey(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
ffStrbufWriteTo(&options->moduleArgs.outputFormat, stdout);
puts(FASTFETCH_TEXT_MODIFIER_RESET);
}
@@ -21,6 +21,7 @@ void ffInitCustomOptions(FFCustomOptions* options)
{
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CUSTOM_MODULE_NAME, ffParseCustomCommandOptions, ffParseCustomJsonObject, ffPrintCustom, NULL);
ffOptionInitModuleArg(&options->moduleArgs);
ffStrbufSetStatic(&options->moduleArgs.key, " ");
}
bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, const char* value)