mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-01 10:32:35 +01:00
Global: don't expose internal functions
This commit is contained in:
+12
-12
@@ -17,13 +17,6 @@ void ffPrintCustom(FFCustomOptions* options)
|
||||
puts(FASTFETCH_TEXT_MODIFIER_RESET);
|
||||
}
|
||||
|
||||
void ffInitCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CUSTOM_MODULE_NAME, ffParseCustomCommandOptions, ffParseCustomJsonObject, ffPrintCustom, NULL, NULL);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
ffStrbufSetStatic(&options->moduleArgs.key, " ");
|
||||
}
|
||||
|
||||
bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, const char* value)
|
||||
{
|
||||
const char* subKey = ffOptionTestPrefix(key, FF_CUSTOM_MODULE_NAME);
|
||||
@@ -34,11 +27,6 @@ bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, cons
|
||||
return false;
|
||||
}
|
||||
|
||||
void ffDestroyCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module)
|
||||
{
|
||||
yyjson_val *key_, *val;
|
||||
@@ -55,3 +43,15 @@ void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module)
|
||||
ffPrintError(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, "Unknown JSON key %s", key);
|
||||
}
|
||||
}
|
||||
|
||||
void ffInitCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CUSTOM_MODULE_NAME, ffParseCustomCommandOptions, ffParseCustomJsonObject, ffPrintCustom, NULL, NULL);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
ffStrbufSetStatic(&options->moduleArgs.key, " ");
|
||||
}
|
||||
|
||||
void ffDestroyCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,4 @@
|
||||
|
||||
void ffPrintCustom(FFCustomOptions* options);
|
||||
void ffInitCustomOptions(FFCustomOptions* options);
|
||||
bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, const char* value);
|
||||
void ffDestroyCustomOptions(FFCustomOptions* options);
|
||||
void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module);
|
||||
|
||||
Reference in New Issue
Block a user