mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-01 10:32:35 +01:00
e0eba8ce21
```bash find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i ```
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#include "common/printing.h"
|
|
#include "logo/logo.h"
|
|
#include "modules/break/break.h"
|
|
|
|
bool ffPrintBreak(FF_MAYBE_UNUSED FFBreakOptions* options) {
|
|
ffLogoPrintLine();
|
|
putchar('\n');
|
|
return true;
|
|
}
|
|
|
|
void ffParseBreakJsonObject(FF_MAYBE_UNUSED FFBreakOptions* options, FF_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, NULL, FF_PRINT_TYPE_NO_CUSTOM_KEY, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
|
}
|
|
}
|
|
|
|
void ffInitBreakOptions(FF_MAYBE_UNUSED FFBreakOptions* options) {
|
|
}
|
|
|
|
void ffDestroyBreakOptions(FF_MAYBE_UNUSED FFBreakOptions* options) {
|
|
}
|
|
|
|
FFModuleBaseInfo ffBreakModuleInfo = {
|
|
.name = FF_BREAK_MODULE_NAME,
|
|
.description = "Print a empty line",
|
|
.initOptions = (void*) ffInitBreakOptions,
|
|
.destroyOptions = (void*) ffDestroyBreakOptions,
|
|
.parseJsonObject = (void*) ffParseBreakJsonObject,
|
|
.printModule = (void*) ffPrintBreak,
|
|
};
|