mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 06:00:08 +01:00
Global: don't expose internal functions
This commit is contained in:
@@ -101,17 +101,6 @@ void ffPrintBattery(FFBatteryOptions* options)
|
||||
}
|
||||
}
|
||||
|
||||
void ffInitBatteryOptions(FFBatteryOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_BATTERY_MODULE_NAME, ffParseBatteryCommandOptions, ffParseBatteryJsonObject, ffPrintBattery, ffGenerateBatteryJsonResult, ffPrintBatteryHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
options->temp = false;
|
||||
|
||||
#ifdef __linux__
|
||||
ffStrbufInit(&options->dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ffParseBatteryCommandOptions(FFBatteryOptions* options, const char* key, const char* value)
|
||||
{
|
||||
const char* subKey = ffOptionTestPrefix(key, FF_BATTERY_MODULE_NAME);
|
||||
@@ -136,15 +125,6 @@ bool ffParseBatteryCommandOptions(FFBatteryOptions* options, const char* key, co
|
||||
return false;
|
||||
}
|
||||
|
||||
void ffDestroyBatteryOptions(FFBatteryOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
|
||||
#ifdef __linux__
|
||||
ffStrbufDestroy(&options->dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ffParseBatteryJsonObject(FFBatteryOptions* options, yyjson_val* module)
|
||||
{
|
||||
yyjson_val *key_, *val;
|
||||
@@ -219,3 +199,23 @@ void ffPrintBatteryHelpFormat(void)
|
||||
"Battery status"
|
||||
});
|
||||
}
|
||||
|
||||
void ffInitBatteryOptions(FFBatteryOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_BATTERY_MODULE_NAME, ffParseBatteryCommandOptions, ffParseBatteryJsonObject, ffPrintBattery, ffGenerateBatteryJsonResult, ffPrintBatteryHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
options->temp = false;
|
||||
|
||||
#ifdef __linux__
|
||||
ffStrbufInit(&options->dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ffDestroyBatteryOptions(FFBatteryOptions* options)
|
||||
{
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
|
||||
#ifdef __linux__
|
||||
ffStrbufDestroy(&options->dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5,10 +5,5 @@
|
||||
#define FF_BATTERY_MODULE_NAME "Battery"
|
||||
|
||||
void ffPrintBattery(FFBatteryOptions* options);
|
||||
|
||||
void ffInitBatteryOptions(FFBatteryOptions* options);
|
||||
bool ffParseBatteryCommandOptions(FFBatteryOptions* options, const char* key, const char* value);
|
||||
void ffDestroyBatteryOptions(FFBatteryOptions* options);
|
||||
void ffParseBatteryJsonObject(FFBatteryOptions* options, yyjson_val* module);
|
||||
void ffGenerateBatteryJsonResult(FFBatteryOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintBatteryHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user