mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Global: pack all enums and make flag enums unsigned
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
|
||||
typedef enum FFSizeBinaryPrefixType
|
||||
typedef enum __attribute__((__packed__)) FFSizeBinaryPrefixType
|
||||
{
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_IEC, // 1024 Bytes = 1 KiB, 1024 KiB = 1 MiB, ... (standard)
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_SI, // 1000 Bytes = 1 KB, 1000 KB = 1 MB, ...
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_JEDEC, // 1024 Bytes = 1 kB, 1024 kB = 1 MB, ...
|
||||
} FFSizeBinaryPrefixType;
|
||||
|
||||
typedef enum FFTemperatureUnit
|
||||
typedef enum __attribute__((__packed__)) FFTemperatureUnit
|
||||
{
|
||||
FF_TEMPERATURE_UNIT_CELSIUS,
|
||||
FF_TEMPERATURE_UNIT_FAHRENHEIT,
|
||||
@@ -46,7 +46,7 @@ typedef struct FFOptionsDisplay
|
||||
FFstrbuf barBorderLeft;
|
||||
FFstrbuf barBorderRight;
|
||||
uint8_t barWidth;
|
||||
uint8_t percentType;
|
||||
FFPercentageTypeFlags percentType;
|
||||
uint8_t percentNdigits;
|
||||
FFstrbuf percentColorGreen;
|
||||
FFstrbuf percentColorYellow;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
|
||||
typedef enum FFDsForceDrmType
|
||||
typedef enum __attribute__((__packed__)) FFDsForceDrmType
|
||||
{
|
||||
FF_DS_FORCE_DRM_TYPE_FALSE = 0, // Disable
|
||||
FF_DS_FORCE_DRM_TYPE_TRUE = 1, // Try `libdrm`, then `sysfs` if libdrm failed
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
#define FASTFETCH_LOGO_MAX_NAMES 9
|
||||
#define FASTFETCH_LOGO_MAX_COLORS 9 //two digits would make parsing much more complicated (index 1 - 9)
|
||||
|
||||
typedef enum FFLogoType
|
||||
typedef enum __attribute__((__packed__)) FFLogoType
|
||||
{
|
||||
FF_LOGO_TYPE_AUTO, //if something is given, first try builtin, then file. Otherwise detect logo
|
||||
FF_LOGO_TYPE_BUILTIN, //builtin ascii art
|
||||
@@ -23,7 +23,7 @@ typedef enum FFLogoType
|
||||
FF_LOGO_TYPE_NONE, //--logo none
|
||||
} FFLogoType;
|
||||
|
||||
typedef enum FFLogoPosition
|
||||
typedef enum __attribute__((__packed__)) FFLogoPosition
|
||||
{
|
||||
FF_LOGO_POSITION_LEFT,
|
||||
FF_LOGO_POSITION_TOP,
|
||||
|
||||
Reference in New Issue
Block a user