mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 21:24:43 +01:00
Chore: run clang-format
```bash find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i ```
This commit is contained in:
@@ -4,38 +4,33 @@
|
||||
#include "common/stringUtils.h"
|
||||
#include "modules/custom/custom.h"
|
||||
|
||||
bool ffPrintCustom(FFCustomOptions* options)
|
||||
{
|
||||
bool ffPrintCustom(FFCustomOptions* options) {
|
||||
ffPrintFormat(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, 0, ((FFformatarg[]) {}));
|
||||
return true;
|
||||
}
|
||||
|
||||
void ffGenerateCustomJsonConfig(FFCustomOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
void ffGenerateCustomJsonConfig(FFCustomOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module) {
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module)
|
||||
{
|
||||
void ffParseCustomJsonObject(FFCustomOptions* options, yyjson_val* module) {
|
||||
yyjson_val *key, *val;
|
||||
size_t idx, max;
|
||||
yyjson_obj_foreach(module, idx, max, key, val)
|
||||
{
|
||||
if (ffJsonConfigParseModuleArgs(key, val, &options->moduleArgs))
|
||||
yyjson_obj_foreach (module, idx, max, key, val) {
|
||||
if (ffJsonConfigParseModuleArgs(key, val, &options->moduleArgs)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ffPrintError(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
||||
}
|
||||
}
|
||||
|
||||
void ffInitCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
void ffInitCustomOptions(FFCustomOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
ffStrbufSetStatic(&options->moduleArgs.key, " ");
|
||||
}
|
||||
|
||||
void ffDestroyCustomOptions(FFCustomOptions* options)
|
||||
{
|
||||
void ffDestroyCustomOptions(FFCustomOptions* options) {
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user