mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Global: don't expose internal functions
This commit is contained in:
@@ -45,22 +45,6 @@ void ffPrintCommand(FFCommandOptions* options)
|
||||
}
|
||||
}
|
||||
|
||||
void ffInitCommandOptions(FFCommandOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_COMMAND_MODULE_NAME, ffParseCommandCommandOptions, ffParseCommandJsonObject, ffPrintCommand, ffGenerateCommandJsonResult, ffPrintCommandHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
|
||||
ffStrbufInitStatic(&options->shell,
|
||||
#ifdef _WIN32
|
||||
"cmd.exe"
|
||||
#else
|
||||
"/bin/sh"
|
||||
#endif
|
||||
);
|
||||
|
||||
ffStrbufInit(&options->text);
|
||||
}
|
||||
|
||||
bool ffParseCommandCommandOptions(FFCommandOptions* options, const char* key, const char* value)
|
||||
{
|
||||
const char* subKey = ffOptionTestPrefix(key, FF_COMMAND_MODULE_NAME);
|
||||
@@ -83,13 +67,6 @@ bool ffParseCommandCommandOptions(FFCommandOptions* options, const char* key, co
|
||||
return false;
|
||||
}
|
||||
|
||||
void ffDestroyCommandOptions(FFCommandOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
ffStrbufDestroy(&options->shell);
|
||||
ffStrbufDestroy(&options->text);
|
||||
}
|
||||
|
||||
void ffParseCommandJsonObject(FFCommandOptions* options, yyjson_val* module)
|
||||
{
|
||||
yyjson_val *key_, *val;
|
||||
@@ -154,3 +131,26 @@ void ffPrintCommandHelpFormat(void)
|
||||
"Command result"
|
||||
});
|
||||
}
|
||||
|
||||
void ffInitCommandOptions(FFCommandOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_COMMAND_MODULE_NAME, ffParseCommandCommandOptions, ffParseCommandJsonObject, ffPrintCommand, ffGenerateCommandJsonResult, ffPrintCommandHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
|
||||
ffStrbufInitStatic(&options->shell,
|
||||
#ifdef _WIN32
|
||||
"cmd.exe"
|
||||
#else
|
||||
"/bin/sh"
|
||||
#endif
|
||||
);
|
||||
|
||||
ffStrbufInit(&options->text);
|
||||
}
|
||||
|
||||
void ffDestroyCommandOptions(FFCommandOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
ffStrbufDestroy(&options->shell);
|
||||
ffStrbufDestroy(&options->text);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,4 @@
|
||||
|
||||
void ffPrintCommand(FFCommandOptions* options);
|
||||
void ffInitCommandOptions(FFCommandOptions* options);
|
||||
bool ffParseCommandCommandOptions(FFCommandOptions* options, const char* key, const char* value);
|
||||
void ffDestroyCommandOptions(FFCommandOptions* options);
|
||||
void ffParseCommandJsonObject(FFCommandOptions* options, yyjson_val* module);
|
||||
void ffGenerateCommandJsonResult(FFCommandOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintCommandHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user