mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
e812380f20
Prepare for JSON config support
27 lines
969 B
C
27 lines
969 B
C
#pragma once
|
|
|
|
#include "util/FFstrbuf.h"
|
|
|
|
typedef struct FFModuleArgs
|
|
{
|
|
FFstrbuf key;
|
|
FFstrbuf outputFormat;
|
|
FFstrbuf errorFormat;
|
|
} FFModuleArgs;
|
|
|
|
typedef struct FFKeyValuePair
|
|
{
|
|
const char* key;
|
|
int value;
|
|
} FFKeyValuePair;
|
|
|
|
const char* ffOptionTestPrefix(const char* argumentKey, const char* moduleName);
|
|
bool ffOptionParseModuleArgs(const char* argumentKey, const char* pkey, const char* value, FFModuleArgs* result);
|
|
void ffOptionParseString(const char* argumentKey, const char* value, FFstrbuf* buffer);
|
|
FF_C_NODISCARD uint32_t ffOptionParseUInt32(const char* argumentKey, const char* value);
|
|
FF_C_NODISCARD int ffOptionParseEnum(const char* argumentKey, const char* requestedKey, FFKeyValuePair pairs[]);
|
|
FF_C_NODISCARD bool ffOptionParseBoolean(const char* str);
|
|
void ffOptionParseColor(const char* key, const char* value, FFstrbuf* buffer);
|
|
void ffOptionInitModuleArg(FFModuleArgs* args);
|
|
void ffOptionDestroyModuleArg(FFModuleArgs* args);
|