mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
0b02543ef2
Also make keys case-sensitive
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
#include "common/printing.h"
|
|
#include "logo/logo.h"
|
|
#include "modules/break/break.h"
|
|
|
|
void ffPrintBreak(FF_MAYBE_UNUSED FFBreakOptions* options)
|
|
{
|
|
ffLogoPrintLine();
|
|
putchar('\n');
|
|
}
|
|
|
|
bool ffParseBreakCommandOptions(FF_MAYBE_UNUSED FFBreakOptions* options, FF_MAYBE_UNUSED const char* key, FF_MAYBE_UNUSED const char* value)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
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));
|
|
}
|
|
}
|
|
|
|
static FFModuleBaseInfo ffModuleInfo = {
|
|
.name = FF_BREAK_MODULE_NAME,
|
|
.description = "Print a empty line",
|
|
.parseCommandOptions = (void*) ffParseBreakCommandOptions,
|
|
.parseJsonObject = (void*) ffParseBreakJsonObject,
|
|
.printModule = (void*) ffPrintBreak,
|
|
};
|
|
|
|
void ffInitBreakOptions(FF_MAYBE_UNUSED FFBreakOptions* options)
|
|
{
|
|
options->moduleInfo = ffModuleInfo;
|
|
}
|
|
|
|
void ffDestroyBreakOptions(FF_MAYBE_UNUSED FFBreakOptions* options)
|
|
{
|
|
}
|