ohmu
·
2026-10-15
1#pragma once
2
3#include "common/FFstrbuf.h"
4
5typedef enum FFDataResultDocType: uint8_t {
6 FF_RESULT_DOC_TYPE_DEFAULT = 0,
7 FF_RESULT_DOC_TYPE_JSON,
8 FF_RESULT_DOC_TYPE_CONFIG,
9 FF_RESULT_DOC_TYPE_CONFIG_FULL,
10} FFDataResultDocType;
11
12// FFdata aggregates configuration, generation parameters, and output state used by fastfetch.
13// It holds the parsed configuration document, a mutable JSON document for results, and related metadata.
14typedef struct FFdata {
15 yyjson_doc* configDoc; // Parsed JSON configuration document
16 yyjson_mut_doc* resultDoc; // Mutable JSON document for storing results
17 FFstrbuf structure; // Custom output structure from command line
18 FFstrbuf structureDisabled; // Disabled modules in the output structure from command line
19 FFstrbuf genConfigPath; // Path to generate configuration file
20 FFDataResultDocType docType; // Type of result document
21 bool configLoaded;
22 bool genConfigInteractive; // `--gen-config` entered the interactive CUI
23} FFdata;