mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 06:54:21 +01:00
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
#include "common/printing.h"
|
|
#include "logo/logo.h"
|
|
#include "modules/break/break.h"
|
|
|
|
bool ffPrintBreak([[maybe_unused]] FFBreakOptions* options) {
|
|
ffLogoPrintLine();
|
|
putchar('\n');
|
|
return true;
|
|
}
|
|
|
|
void ffParseBreakJsonObject([[maybe_unused]] FFBreakOptions* options, [[maybe_unused]] yyjson_val* module) {
|
|
yyjson_val *key, *val;
|
|
size_t idx, max;
|
|
yyjson_obj_foreach (module, idx, max, key, val) {
|
|
if (unsafe_yyjson_equals_str(key, "type") || unsafe_yyjson_equals_str(key, "condition")) {
|
|
continue;
|
|
}
|
|
|
|
ffPrintError(FF_BREAK_MODULE_NAME, 0, nullptr, FF_PRINT_TYPE_NO_CUSTOM_KEY, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
|
}
|
|
}
|
|
|
|
void ffInitBreakOptions([[maybe_unused]] FFBreakOptions* options) {
|
|
}
|
|
|
|
void ffDestroyBreakOptions([[maybe_unused]] FFBreakOptions* options) {
|
|
}
|
|
|
|
FFModuleBaseInfo ffBreakModuleInfo = {
|
|
.name = FF_BREAK_MODULE_NAME,
|
|
.description = "Print an empty line",
|
|
.initOptions = (void*) ffInitBreakOptions,
|
|
.destroyOptions = (void*) ffDestroyBreakOptions,
|
|
.parseJsonObject = (void*) ffParseBreakJsonObject,
|
|
.printModule = (void*) ffPrintBreak,
|
|
.defaultOrder = 71,
|
|
};
|