Global: don't expose internal functions

This commit is contained in:
李通洲
2023-10-23 13:32:18 +08:00
parent 824ada49b6
commit 44632e9bf6
115 changed files with 709 additions and 930 deletions
+12 -12
View File
@@ -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);
}
-2
View File
@@ -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);