mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
Options (General): symbol renaming to prevent from possible naming conflicts
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ static void initState(FFstate* state)
|
||||
static void defaultConfig(void)
|
||||
{
|
||||
ffInitLogoOptions(&instance.config.logo);
|
||||
ffInitGeneralOptions(&instance.config.general);
|
||||
ffOptionsInitGeneral(&instance.config.general);
|
||||
|
||||
ffStrbufInit(&instance.config.colorKeys);
|
||||
ffStrbufInit(&instance.config.colorTitle);
|
||||
|
||||
+2
-2
@@ -532,7 +532,7 @@ static void parseOption(FFdata* data, const char* key, const char* value)
|
||||
//General options//
|
||||
///////////////////
|
||||
|
||||
else if(ffParseGeneralCommandOptions(&instance.config.general, key, value)) {}
|
||||
else if(ffOptionsParseGeneralCommandLine(&instance.config.general, key, value)) {}
|
||||
|
||||
////////////////
|
||||
//Logo options//
|
||||
@@ -794,7 +794,7 @@ static void run(FFdata* data)
|
||||
if (
|
||||
error ||
|
||||
(error = ffParseLogoJsonConfig(&instance.config.logo, root)) ||
|
||||
(error = ffParseGeneralJsonConfig(&instance.config.general, root)) ||
|
||||
(error = ffOptionsParseGeneralJsonConfig(&instance.config.general, root)) ||
|
||||
(error = ffParseDisplayJsonConfig(&instance.config)) ||
|
||||
(error = ffParseLibraryJsonConfig(&instance.config)) ||
|
||||
false
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ typedef enum FFTemperatureUnit
|
||||
typedef struct FFconfig
|
||||
{
|
||||
FFLogoOptions logo;
|
||||
FFGeneralOptions general;
|
||||
FFOptionsGeneral general;
|
||||
|
||||
//If one of those is empty, ffLogoPrint will set them
|
||||
FFstrbuf colorKeys;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
const char* ffParseGeneralJsonConfig(FFGeneralOptions* options, yyjson_val* root)
|
||||
const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_val* root)
|
||||
{
|
||||
yyjson_val* object = yyjson_obj_get(root, "general");
|
||||
if (!object) return NULL;
|
||||
@@ -44,7 +44,7 @@ const char* ffParseGeneralJsonConfig(FFGeneralOptions* options, yyjson_val* root
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool ffParseGeneralCommandOptions(FFGeneralOptions* options, const char* key, const char* value)
|
||||
bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key, const char* value)
|
||||
{
|
||||
if(ffStrEqualsIgnCase(key, "--allow-slow-operations"))
|
||||
options->allowSlowOperations = ffOptionParseBoolean(value);
|
||||
@@ -73,7 +73,7 @@ bool ffParseGeneralCommandOptions(FFGeneralOptions* options, const char* key, co
|
||||
return true;
|
||||
}
|
||||
|
||||
void ffInitGeneralOptions(FFGeneralOptions* options)
|
||||
void ffOptionsInitGeneral(FFOptionsGeneral* options)
|
||||
{
|
||||
options->processingTimeout = 1000;
|
||||
options->allowSlowOperations = false;
|
||||
@@ -89,7 +89,7 @@ void ffInitGeneralOptions(FFGeneralOptions* options)
|
||||
#endif
|
||||
}
|
||||
|
||||
void ffDestroyGeneralOptions(FF_MAYBE_UNUSED FFGeneralOptions* options)
|
||||
void ffOptionsDestroyGeneral(FF_MAYBE_UNUSED FFOptionsGeneral* options)
|
||||
{
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
ffStrbufDestroy(&options->playerName);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
|
||||
typedef struct FFGeneralOptions
|
||||
typedef struct FFOptionsGeneral
|
||||
{
|
||||
bool allowSlowOperations;
|
||||
bool multithreading;
|
||||
@@ -17,9 +17,9 @@ typedef struct FFGeneralOptions
|
||||
#elif defined(_WIN32)
|
||||
int32_t wmiTimeout;
|
||||
#endif
|
||||
} FFGeneralOptions;
|
||||
} FFOptionsGeneral;
|
||||
|
||||
const char* ffParseGeneralJsonConfig(FFGeneralOptions* options, yyjson_val* root);
|
||||
bool ffParseGeneralCommandOptions(FFGeneralOptions* options, const char* key, const char* value);
|
||||
void ffInitGeneralOptions(FFGeneralOptions* options);
|
||||
void ffDestroyGeneralOptions(FFGeneralOptions* options);
|
||||
const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_val* root);
|
||||
bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key, const char* value);
|
||||
void ffOptionsInitGeneral(FFOptionsGeneral* options);
|
||||
void ffOptionsDestroyGeneral(FFOptionsGeneral* options);
|
||||
|
||||
Reference in New Issue
Block a user