From f9597eba39d6afd278eeca2f2972f73a7e54f111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 8 Nov 2023 14:21:18 +0800 Subject: [PATCH] Global: remove `#ifndef FF_INCLUDED_*` guards --- src/common/bar.h | 5 ----- src/common/commandoption.h | 5 ----- src/common/dbus.h | 4 ---- src/common/font.h | 5 ----- src/common/format.h | 5 ----- src/common/io/io.h | 5 ----- src/common/library.h | 5 ----- src/common/networking.h | 5 ----- src/common/parsing.h | 5 ----- src/common/printing.h | 5 ----- src/common/processing.h | 5 ----- src/common/properties.h | 5 ----- src/common/settings.h | 5 ----- src/common/sysctl.h | 5 ----- src/common/thread.h | 5 ----- src/common/time.h | 5 ----- src/detection/battery/battery.h | 5 ----- src/detection/bios/bios.h | 5 ----- src/detection/bluetooth/bluetooth.h | 5 ----- src/detection/board/board.h | 5 ----- src/detection/brightness/brightness.h | 5 ----- src/detection/chassis/chassis.h | 5 ----- src/detection/cpu/cpu.h | 5 ----- src/detection/cpuusage/cpuusage.h | 5 ----- src/detection/cursor/cursor.h | 5 ----- src/detection/disk/disk.h | 5 ----- src/detection/displayserver/displayserver.h | 5 ----- src/detection/font/font.h | 5 ----- src/detection/gamepad/gamepad.h | 5 ----- src/detection/gpu/gpu.h | 5 ----- src/detection/gtk_qt/gtk_qt.h | 5 ----- src/detection/host/host.h | 5 ----- src/detection/icons/icons.h | 5 ----- src/detection/internal.h | 5 ----- src/detection/libc/libc.h | 5 ----- src/detection/lm/lm.h | 5 ----- src/detection/locale/locale.h | 5 ----- src/detection/localip/localip.h | 5 ----- src/detection/media/media.h | 5 ----- src/detection/memory/memory.h | 5 ----- src/detection/opencl/opencl.h | 5 ----- src/detection/opengl/opengl.h | 5 ----- src/detection/os/os.h | 5 ----- src/detection/packages/packages.h | 5 ----- src/detection/poweradapter/poweradapter.h | 5 ----- src/detection/processes/processes.h | 5 ----- src/detection/publicip/publicip.h | 5 ----- src/detection/sound/sound.h | 5 ----- src/detection/swap/swap.h | 5 ----- src/detection/temps/temps_apple.h | 5 ----- src/detection/temps/temps_bsd.h | 5 ----- src/detection/temps/temps_linux.h | 5 ----- src/detection/temps/temps_windows.h | 5 ----- src/detection/terminalfont/terminalfont.h | 5 ----- src/detection/terminalshell/terminalshell.h | 5 ----- src/detection/terminalsize/terminalsize.h | 5 ----- src/detection/theme/theme.h | 5 ----- src/detection/uptime/uptime.h | 5 ----- src/detection/users/users.h | 5 ----- src/detection/version/version.h | 5 ----- src/detection/vulkan/vulkan.h | 5 ----- src/detection/wallpaper/wallpaper.h | 15 +++++---------- src/detection/weather/weather.h | 5 ----- src/detection/wifi/wifi.h | 5 ----- src/logo/image/image.h | 5 ----- src/util/FFlist.h | 5 ----- src/util/edidHelper.h | 5 ----- src/util/platform/FFPlatform.h | 5 ----- src/util/platform/FFPlatform_private.h | 5 ----- src/util/stringUtils.h | 5 ----- src/util/wcwidth.h | 5 ----- src/util/windows/com.hpp | 5 ----- src/util/windows/wmi.hpp | 5 ----- 73 files changed, 5 insertions(+), 369 deletions(-) diff --git a/src/common/bar.h b/src/common/bar.h index d35276cef..c77234ae6 100644 --- a/src/common/bar.h +++ b/src/common/bar.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_bar -#define FF_INCLUDED_common_bar - #include "fastfetch.h" enum @@ -15,5 +12,3 @@ enum void ffAppendPercentBar(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, uint8_t red); void ffAppendPercentNum(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, bool parentheses); - -#endif diff --git a/src/common/commandoption.h b/src/common/commandoption.h index c20d0f81f..276477b91 100644 --- a/src/common/commandoption.h +++ b/src/common/commandoption.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_commandoption -#define FF_INCLUDED_common_commandoption - #include "fastfetch.h" typedef struct FFCustomValue @@ -24,5 +21,3 @@ bool ffParseModuleOptions(const char* key, const char* value); void ffPrepareCommandOption(FFdata* data); void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc); void ffMigrateCommandOptionToJsonc(FFdata* data, yyjson_mut_doc* jsonDoc); - -#endif diff --git a/src/common/dbus.h b/src/common/dbus.h index bf112e244..8c9be36c2 100644 --- a/src/common/dbus.h +++ b/src/common/dbus.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_dbus -#define FF_INCLUDED_common_dbus - #ifdef FF_HAVE_DBUS #include @@ -54,4 +51,3 @@ DBusMessage* ffDBusGetProperty(FFDBusData* dbus, const char* busName, const char void ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, FFstrbuf* result); #endif // FF_HAVE_DBUS -#endif // FF_INCLUDED_common_dbus diff --git a/src/common/font.h b/src/common/font.h index 58b3841ae..5ececb2f6 100644 --- a/src/common/font.h +++ b/src/common/font.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_font -#define FF_INCLUDED_common_font - #include "util/FFstrbuf.h" #include "util/FFlist.h" @@ -21,5 +18,3 @@ void ffFontInitCopy(FFfont* font, const char* name); void ffFontInitValues(FFfont* font, const char* name, const char* size); void ffFontInitWithSpace(FFfont* font, const char* rawName); void ffFontDestroy(FFfont* font); - -#endif diff --git a/src/common/format.h b/src/common/format.h index 3e7c751f2..969de6c36 100644 --- a/src/common/format.h +++ b/src/common/format.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_format -#define FF_INCLUDED_common_format - typedef enum FFformatargtype { FF_FORMAT_ARG_TYPE_NULL = 0, @@ -27,5 +24,3 @@ typedef struct FFformatarg void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg); void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t numArgs, const FFformatarg* arguments); - -#endif diff --git a/src/common/io/io.h b/src/common/io/io.h index 78c94ad9f..f25381e51 100644 --- a/src/common/io/io.h +++ b/src/common/io/io.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_io_io -#define FF_INCLUDED_common_io_io - #include "util/FFstrbuf.h" #ifdef _WIN32 @@ -153,5 +150,3 @@ static inline bool wrapClosedir(HANDLE* pdir) } #endif #define FF_AUTO_CLOSE_DIR __attribute__((__cleanup__(wrapClosedir))) - -#endif // FF_INCLUDED_common_io_io diff --git a/src/common/library.h b/src/common/library.h index 1721ea8d3..5a283bc2e 100644 --- a/src/common/library.h +++ b/src/common/library.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_library -#define FF_INCLUDED_common_library - #include "fastfetch.h" #include "util/FFcheckmacros.h" @@ -74,5 +71,3 @@ static inline void ffLibraryUnload(void** handle) FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, (varName)->ff ## symbolName, symbolName, returnValue); void* ffLibraryLoad(const FFstrbuf* userProvidedName, ...); - -#endif diff --git a/src/common/networking.h b/src/common/networking.h index f27850477..1fb4589d9 100644 --- a/src/common/networking.h +++ b/src/common/networking.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_networking -#define FF_INCLUDED_common_networking - #include "common/thread.h" #include "util/FFstrbuf.h" @@ -35,5 +32,3 @@ static inline bool ffNetworkingGetHttp(const char* host, const char* path, uint3 return ffNetworkingRecvHttpResponse(&state, buffer, timeout); return false; } - -#endif diff --git a/src/common/parsing.h b/src/common/parsing.h index deb555c01..e98883b06 100644 --- a/src/common/parsing.h +++ b/src/common/parsing.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_parsing_h -#define FF_INCLUDED_parsing_h - #include "fastfetch.h" #include @@ -24,5 +21,3 @@ int8_t ffVersionCompare(const FFVersion* version1, const FFVersion* version2); void ffParseSize(uint64_t bytes, FFstrbuf* result); void ffParseTemperature(double celsius, FFstrbuf* buffer); - -#endif diff --git a/src/common/printing.h b/src/common/printing.h index d9925757c..5b8d1b6ad 100644 --- a/src/common/printing.h +++ b/src/common/printing.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_printing -#define FF_INCLUDED_common_printing - #include "fastfetch.h" #include "common/format.h" @@ -26,5 +23,3 @@ void ffPrintColor(const FFstrbuf* colorValue); void ffPrintCharTimes(char c, uint32_t times); void ffPrintModuleFormatHelp(const char* name, const char* def, uint32_t numArgs, const char* args[]); - -#endif diff --git a/src/common/processing.h b/src/common/processing.h index 380c2a36e..98b9fe09f 100644 --- a/src/common/processing.h +++ b/src/common/processing.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_processing -#define FF_INCLUDED_common_processing - #include "util/FFstrbuf.h" const char* ffProcessAppendOutput(FFstrbuf* buffer, char* const argv[], bool useStdErr); @@ -28,5 +25,3 @@ static inline const char* ffProcessAppendStdErr(FFstrbuf* buffer, char* const ar } return error; } - -#endif diff --git a/src/common/properties.h b/src/common/properties.h index 8b65e419c..69ea5ddf4 100644 --- a/src/common/properties.h +++ b/src/common/properties.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_properties -#define FF_INCLUDED_common_properties - #include "fastfetch.h" typedef struct FFpropquery @@ -51,5 +48,3 @@ static inline bool ffParsePropFileData(const char* relativeFile, const char* sta { return ffParsePropFileDataValues(relativeFile, 1, (FFpropquery[]){{start, buffer}}); } - -#endif diff --git a/src/common/settings.h b/src/common/settings.h index 212727fe9..0b87bb33e 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_settings -#define FF_INCLUDED_common_settings - #include "fastfetch.h" typedef enum FFvarianttype @@ -38,5 +35,3 @@ bool ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result); #elif defined(__FreeBSD__) bool ffSettingsGetFreeBSDKenv(const char* propName, FFstrbuf* result); #endif - -#endif diff --git a/src/common/sysctl.h b/src/common/sysctl.h index 562e625d5..2a210de86 100644 --- a/src/common/sysctl.h +++ b/src/common/sysctl.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_sysctl -#define FF_INCLUDED_common_sysctl - #include "fastfetch.h" #include "util/FFcheckmacros.h" @@ -13,5 +10,3 @@ const char* ffSysctlGetString(const char* propName, FFstrbuf* result); FF_C_NODISCARD int ffSysctlGetInt(const char* propName, int defaultValue); FF_C_NODISCARD int64_t ffSysctlGetInt64(const char* propName, int64_t defaultValue); FF_C_NODISCARD void* ffSysctlGetData(int* request, u_int requestLength, size_t* resultLength); - -#endif diff --git a/src/common/thread.h b/src/common/thread.h index 55b4c5be7..2fd328cf4 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_thread -#define FF_INCLUDED_common_thread - #include "fastfetch.h" #ifdef FF_HAVE_THREADS @@ -82,5 +79,3 @@ static inline void ffThreadMutexUnlock(FFThreadMutex* mutex) { FF_UNUSED(mutex) } #define FF_THREAD_ENTRY_DECL_WRAPPER(fn, paramType) #endif //FF_HAVE_THREADS - -#endif diff --git a/src/common/time.h b/src/common/time.h index 8da249448..4dd00f0e3 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_common_time -#define FF_INCLUDED_common_time - #include #ifdef _WIN32 #include @@ -48,5 +45,3 @@ static inline void ffTimeSleep(uint32_t msec) nanosleep(&(struct timespec){ msec / 1000, (msec % 1000) * 1000000 }, NULL); #endif } - -#endif diff --git a/src/detection/battery/battery.h b/src/detection/battery/battery.h index 8f94e93a8..6dfe6466b 100644 --- a/src/detection/battery/battery.h +++ b/src/detection/battery/battery.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_battery_battery -#define FF_INCLUDED_detection_battery_battery - #include "fastfetch.h" #define FF_BATTERY_TEMP_UNSET (0/0.0) @@ -19,5 +16,3 @@ typedef struct FFBatteryResult } FFBatteryResult; const char* ffDetectBattery(FFBatteryOptions* options, FFlist* results); - -#endif diff --git a/src/detection/bios/bios.h b/src/detection/bios/bios.h index 04d55811c..5272c5ca1 100644 --- a/src/detection/bios/bios.h +++ b/src/detection/bios/bios.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_bios_bios -#define FF_INCLUDED_detection_bios_bios - #include "fastfetch.h" typedef struct FFBiosResult @@ -15,5 +12,3 @@ typedef struct FFBiosResult } FFBiosResult; const char* ffDetectBios(FFBiosResult* bios); - -#endif diff --git a/src/detection/bluetooth/bluetooth.h b/src/detection/bluetooth/bluetooth.h index a9c07b161..0702abbdb 100644 --- a/src/detection/bluetooth/bluetooth.h +++ b/src/detection/bluetooth/bluetooth.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_bluetooth_bluetooth -#define FF_INCLUDED_detection_bluetooth_bluetooth - #include "fastfetch.h" typedef struct FFBluetoothResult @@ -15,5 +12,3 @@ typedef struct FFBluetoothResult } FFBluetoothResult; const char* ffDetectBluetooth(FFlist* devices /* FFBluetoothResult */); - -#endif diff --git a/src/detection/board/board.h b/src/detection/board/board.h index bc232e244..c847436b5 100644 --- a/src/detection/board/board.h +++ b/src/detection/board/board.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_board_board -#define FF_INCLUDED_detection_board_board - #include "fastfetch.h" typedef struct FFBoardResult @@ -13,5 +10,3 @@ typedef struct FFBoardResult } FFBoardResult; const char* ffDetectBoard(FFBoardResult* result); - -#endif diff --git a/src/detection/brightness/brightness.h b/src/detection/brightness/brightness.h index b32e5d15c..f0adf329d 100644 --- a/src/detection/brightness/brightness.h +++ b/src/detection/brightness/brightness.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_brightness_brightness -#define FF_INCLUDED_detection_brightness_brightness - #include "fastfetch.h" #include "util/FFlist.h" @@ -13,5 +10,3 @@ typedef struct FFBrightnessResult } FFBrightnessResult; const char* ffDetectBrightness(FFBrightnessOptions* options, FFlist* result); // list of FFBrightnessResult - -#endif diff --git a/src/detection/chassis/chassis.h b/src/detection/chassis/chassis.h index 534141666..60befc83e 100644 --- a/src/detection/chassis/chassis.h +++ b/src/detection/chassis/chassis.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_chassis_chassis -#define FF_INCLUDED_detection_chassis_chassis - #include "fastfetch.h" typedef struct FFChassisResult @@ -14,5 +11,3 @@ typedef struct FFChassisResult const char* ffDetectChassis(FFChassisResult* result, FFChassisOptions* options); const char* ffChassisTypeToString(uint32_t type); - -#endif diff --git a/src/detection/cpu/cpu.h b/src/detection/cpu/cpu.h index 7dd1c29d2..9ae364808 100644 --- a/src/detection/cpu/cpu.h +++ b/src/detection/cpu/cpu.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_cpu_cpu -#define FF_INCLUDED_detection_cpu_cpu - #include "fastfetch.h" #define FF_CPU_TEMP_UNSET (0/0.0) @@ -23,5 +20,3 @@ typedef struct FFCPUResult } FFCPUResult; const char* ffDetectCPU(const FFCPUOptions* options, FFCPUResult* cpu); - -#endif diff --git a/src/detection/cpuusage/cpuusage.h b/src/detection/cpuusage/cpuusage.h index 655239350..839902e6e 100644 --- a/src/detection/cpuusage/cpuusage.h +++ b/src/detection/cpuusage/cpuusage.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_cpuusage_cpuusage -#define FF_INCLUDED_detection_cpuusage_cpuusage - #include "fastfetch.h" typedef struct FFCpuUsageInfo { @@ -12,5 +9,3 @@ typedef struct FFCpuUsageInfo { const char* ffGetCpuUsageInfo(FFlist* cpuTimes); const char* ffGetCpuUsageResult(FFlist* result); // list of double - -#endif diff --git a/src/detection/cursor/cursor.h b/src/detection/cursor/cursor.h index 793721f0b..3e3ff6d40 100644 --- a/src/detection/cursor/cursor.h +++ b/src/detection/cursor/cursor.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_cursor_cursor -#define FF_INCLUDED_detection_cursor_cursor - #include "fastfetch.h" typedef struct FFCursorResult @@ -13,5 +10,3 @@ typedef struct FFCursorResult } FFCursorResult; void ffDetectCursor(FFCursorResult* result); - -#endif diff --git a/src/detection/disk/disk.h b/src/detection/disk/disk.h index 3ccab52c4..72ea82f2c 100644 --- a/src/detection/disk/disk.h +++ b/src/detection/disk/disk.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_disk_disk -#define FF_INCLUDED_detection_disk_disk - #include "fastfetch.h" typedef struct FFDisk @@ -27,5 +24,3 @@ typedef struct FFDisk * If error is not set, disks contains at least one disk. */ const char* ffDetectDisks(FFDiskOptions* options, FFlist* result /* list of FFDisk */); - -#endif diff --git a/src/detection/displayserver/displayserver.h b/src/detection/displayserver/displayserver.h index 4ae40320f..7a5ebb8f8 100644 --- a/src/detection/displayserver/displayserver.h +++ b/src/detection/displayserver/displayserver.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_displayserver -#define FF_INCLUDED_detection_displayserver - #include "fastfetch.h" #define FF_DE_PRETTY_PLASMA "KDE Plasma" @@ -85,5 +82,3 @@ bool ffdsAppendDisplay( FFDisplayType type, bool primary, uint64_t id); - -#endif diff --git a/src/detection/font/font.h b/src/detection/font/font.h index 22e402652..411efde7a 100644 --- a/src/detection/font/font.h +++ b/src/detection/font/font.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_font_font -#define FF_INCLUDED_detection_font_font - #include "fastfetch.h" #define FF_DETECT_FONT_NUM_FONTS 4 @@ -20,5 +17,3 @@ typedef struct FFFontResult } FFFontResult; const char* ffDetectFont(FFFontResult* font); - -#endif diff --git a/src/detection/gamepad/gamepad.h b/src/detection/gamepad/gamepad.h index 59519bb16..be63e9dea 100644 --- a/src/detection/gamepad/gamepad.h +++ b/src/detection/gamepad/gamepad.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_gamepad_gamepad -#define FF_INCLUDED_detection_gamepad_gamepad - #include "fastfetch.h" typedef struct FFGamepadDevice @@ -12,5 +9,3 @@ typedef struct FFGamepadDevice } FFGamepadDevice; const char* ffDetectGamepad(FFlist* devices /* List of FFGamepadDevice */); - -#endif diff --git a/src/detection/gpu/gpu.h b/src/detection/gpu/gpu.h index 70ccd96b2..9c73637cc 100644 --- a/src/detection/gpu/gpu.h +++ b/src/detection/gpu/gpu.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_gpu_gpu -#define FF_INCLUDED_detection_gpu_gpu - #include "fastfetch.h" #define FF_GPU_TEMP_UNSET (0/0.0) @@ -42,5 +39,3 @@ const char* ffDetectGPU(const FFGPUOptions* options, FFlist* result); const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus); const char* ffGetGPUVendorString(unsigned vendorId); - -#endif diff --git a/src/detection/gtk_qt/gtk_qt.h b/src/detection/gtk_qt/gtk_qt.h index ef329f03a..58b373b8e 100644 --- a/src/detection/gtk_qt/gtk_qt.h +++ b/src/detection/gtk_qt/gtk_qt.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_gtkqt_gtkqt -#define FF_INCLUDED_detection_gtkqt_gtkqt - #include "fastfetch.h" typedef struct FFGTKResult @@ -28,5 +25,3 @@ const FFGTKResult* ffDetectGTK2(void); const FFGTKResult* ffDetectGTK4(void); const FFGTKResult* ffDetectGTK3(void); const FFQtResult* ffDetectQt(void); - -#endif diff --git a/src/detection/host/host.h b/src/detection/host/host.h index a0fd66511..f3b1011f2 100644 --- a/src/detection/host/host.h +++ b/src/detection/host/host.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_host_host -#define FF_INCLUDED_detection_host_host - #include "fastfetch.h" typedef struct FFHostResult @@ -15,5 +12,3 @@ typedef struct FFHostResult } FFHostResult; const char* ffDetectHost(FFHostResult* result); - -#endif diff --git a/src/detection/icons/icons.h b/src/detection/icons/icons.h index 744dc3f5f..3e2096e09 100644 --- a/src/detection/icons/icons.h +++ b/src/detection/icons/icons.h @@ -1,10 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_icons -#define FF_INCLUDED_detection_icons - #include "fastfetch.h" const char* ffDetectIcons(FFstrbuf* result); - -#endif diff --git a/src/detection/internal.h b/src/detection/internal.h index 19ec8d1a2..a25f8fee6 100644 --- a/src/detection/internal.h +++ b/src/detection/internal.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_internal -#define FF_INCLUDED_detection_internal - #include "common/thread.h" #define FF_DETECTION_INTERNAL_GUARD(ResultType, ...) \ @@ -13,5 +10,3 @@ init = true; \ __VA_ARGS__; \ return &result; \ - -#endif diff --git a/src/detection/libc/libc.h b/src/detection/libc/libc.h index dc89cc2be..ea7bb8013 100644 --- a/src/detection/libc/libc.h +++ b/src/detection/libc/libc.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_libc_libc -#define FF_INCLUDED_detection_libc_libc - #include "fastfetch.h" typedef struct FFLibcResult @@ -12,5 +9,3 @@ typedef struct FFLibcResult } FFLibcResult; const char* ffDetectLibc(FFLibcResult* result); - -#endif diff --git a/src/detection/lm/lm.h b/src/detection/lm/lm.h index e118419a5..4cbaf7c13 100644 --- a/src/detection/lm/lm.h +++ b/src/detection/lm/lm.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_lm_lm -#define FF_INCLUDED_detection_lm_lm - #include "fastfetch.h" typedef struct FFLMResult @@ -13,5 +10,3 @@ typedef struct FFLMResult } FFLMResult; const char* ffDetectLM(FFLMResult* result); - -#endif diff --git a/src/detection/locale/locale.h b/src/detection/locale/locale.h index 6ca84ab6f..2fe9cd0bf 100644 --- a/src/detection/locale/locale.h +++ b/src/detection/locale/locale.h @@ -1,10 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_locale_locale -#define FF_INCLUDED_detection_locale_locale - #include "fastfetch.h" void ffDetectLocale(FFstrbuf* result); - -#endif diff --git a/src/detection/localip/localip.h b/src/detection/localip/localip.h index 8d0fe84bf..fe50575ad 100644 --- a/src/detection/localip/localip.h +++ b/src/detection/localip/localip.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_localip_localip -#define FF_INCLUDED_detection_localip_localip - #include "fastfetch.h" typedef struct FFLocalIpResult @@ -15,5 +12,3 @@ typedef struct FFLocalIpResult } FFLocalIpResult; const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results); - -#endif diff --git a/src/detection/media/media.h b/src/detection/media/media.h index 8043e0d93..5c97da471 100644 --- a/src/detection/media/media.h +++ b/src/detection/media/media.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_media -#define FF_INCLUDED_detection_media - #include "fastfetch.h" typedef struct FFMediaResult @@ -18,5 +15,3 @@ typedef struct FFMediaResult } FFMediaResult; const FFMediaResult* ffDetectMedia(); - -#endif diff --git a/src/detection/memory/memory.h b/src/detection/memory/memory.h index bc140e689..9e88c6118 100644 --- a/src/detection/memory/memory.h +++ b/src/detection/memory/memory.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_memory_memory -#define FF_INCLUDED_detection_memory_memory - #include "fastfetch.h" typedef struct FFMemoryResult @@ -12,5 +9,3 @@ typedef struct FFMemoryResult } FFMemoryResult; const char* ffDetectMemory(FFMemoryResult* result); - -#endif diff --git a/src/detection/opencl/opencl.h b/src/detection/opencl/opencl.h index 56a96c98f..5daaacbda 100644 --- a/src/detection/opencl/opencl.h +++ b/src/detection/opencl/opencl.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_opencl_opencl -#define FF_INCLUDED_detection_opencl_opencl - #include "fastfetch.h" typedef struct FFOpenCLResult @@ -13,5 +10,3 @@ typedef struct FFOpenCLResult } FFOpenCLResult; const char* ffDetectOpenCL(FFOpenCLResult* result); - -#endif diff --git a/src/detection/opengl/opengl.h b/src/detection/opengl/opengl.h index fbd9e897d..3c878f97c 100644 --- a/src/detection/opengl/opengl.h +++ b/src/detection/opengl/opengl.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_opengl_opengl -#define FF_INCLUDED_detection_opengl_opengl - #include "fastfetch.h" typedef struct FFOpenGLResult @@ -14,5 +11,3 @@ typedef struct FFOpenGLResult } FFOpenGLResult; const char* ffDetectOpenGL(FFOpenGLOptions* options, FFOpenGLResult* result); - -#endif diff --git a/src/detection/os/os.h b/src/detection/os/os.h index 87af406a9..e1b7828fe 100644 --- a/src/detection/os/os.h +++ b/src/detection/os/os.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_os_os -#define FF_INCLUDED_detection_os_os - #include "fastfetch.h" typedef struct FFOSResult @@ -20,5 +17,3 @@ typedef struct FFOSResult } FFOSResult; const FFOSResult* ffDetectOS(); - -#endif diff --git a/src/detection/packages/packages.h b/src/detection/packages/packages.h index 1fb5e0d85..b7d7520b5 100644 --- a/src/detection/packages/packages.h +++ b/src/detection/packages/packages.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_packages_packages -#define FF_INCLUDED_detection_packages_packages - #include "fastfetch.h" typedef struct FFPackagesResult @@ -37,5 +34,3 @@ typedef struct FFPackagesResult } FFPackagesResult; const char* ffDetectPackages(FFPackagesResult* result, FFPackagesOptions* options); - -#endif diff --git a/src/detection/poweradapter/poweradapter.h b/src/detection/poweradapter/poweradapter.h index 0c60d4d9f..21c93b64a 100644 --- a/src/detection/poweradapter/poweradapter.h +++ b/src/detection/poweradapter/poweradapter.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_poweradapter_poweradapter -#define FF_INCLUDED_detection_poweradapter_poweradapter - #include "fastfetch.h" typedef struct FFPowerAdapterResult @@ -18,5 +15,3 @@ const char* ffDetectPowerAdapterImpl(FFlist* results); #define FF_POWERADAPTER_UNSET -2 #define FF_POWERADAPTER_NOT_CONNECTED -1 - -#endif diff --git a/src/detection/processes/processes.h b/src/detection/processes/processes.h index 3feaaed87..69cf46381 100644 --- a/src/detection/processes/processes.h +++ b/src/detection/processes/processes.h @@ -1,10 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_processes_processes -#define FF_INCLUDED_detection_processes_processes - #include "fastfetch.h" const char* ffDetectProcesses(uint32_t* result); - -#endif diff --git a/src/detection/publicip/publicip.h b/src/detection/publicip/publicip.h index 1313cc46a..463514762 100644 --- a/src/detection/publicip/publicip.h +++ b/src/detection/publicip/publicip.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_publicip_publicip -#define FF_INCLUDED_detection_publicip_publicip - #include "fastfetch.h" typedef struct FFPublicIpResult @@ -13,5 +10,3 @@ typedef struct FFPublicIpResult void ffPreparePublicIp(FFPublicIpOptions* options); const char* ffDetectPublicIp(FFPublicIpOptions* options, FFPublicIpResult* result); - -#endif diff --git a/src/detection/sound/sound.h b/src/detection/sound/sound.h index 350a4f3e6..6ad811044 100644 --- a/src/detection/sound/sound.h +++ b/src/detection/sound/sound.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_sound_sound -#define FF_INCLUDED_detection_sound_sound - #include "fastfetch.h" #define FF_SOUND_VOLUME_UNKNOWN 255 @@ -17,5 +14,3 @@ typedef struct FFSoundDevice } FFSoundDevice; const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */); - -#endif diff --git a/src/detection/swap/swap.h b/src/detection/swap/swap.h index 18e74c7ba..f52654ca4 100644 --- a/src/detection/swap/swap.h +++ b/src/detection/swap/swap.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_swap_swap -#define FF_INCLUDED_detection_swap_swap - #include "fastfetch.h" typedef struct FFSwapResult @@ -12,5 +9,3 @@ typedef struct FFSwapResult } FFSwapResult; const char* ffDetectSwap(FFSwapResult* result); - -#endif diff --git a/src/detection/temps/temps_apple.h b/src/detection/temps/temps_apple.h index 0fe4b0174..7d340ba22 100644 --- a/src/detection/temps/temps_apple.h +++ b/src/detection/temps/temps_apple.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_temps_apple -#define FF_INCLUDED_detection_temps_apple - #include "fastfetch.h" #include "util/FFlist.h" @@ -31,5 +28,3 @@ enum FFTempType }; const char *ffDetectCoreTemps(enum FFTempType type, double* result); - -#endif diff --git a/src/detection/temps/temps_bsd.h b/src/detection/temps/temps_bsd.h index b126811a0..36789740b 100644 --- a/src/detection/temps/temps_bsd.h +++ b/src/detection/temps/temps_bsd.h @@ -1,9 +1,4 @@ #pragma once -#ifndef FF_INCLUDED_detection_temps_windows -#define FF_INCLUDED_detection_temps_windows - const char* ffDetectCpuTemp(double* current); const char* ffDetectThermalTemp(double* current); - -#endif diff --git a/src/detection/temps/temps_linux.h b/src/detection/temps/temps_linux.h index f99dd4138..0d153ccfd 100644 --- a/src/detection/temps/temps_linux.h +++ b/src/detection/temps/temps_linux.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_temps_linux -#define FF_INCLUDED_detection_temps_linux - #include "fastfetch.h" typedef struct FFTempValue @@ -13,5 +10,3 @@ typedef struct FFTempValue } FFTempValue; const FFlist* /* List of FFTempValue */ ffDetectTemps(); - -#endif diff --git a/src/detection/temps/temps_windows.h b/src/detection/temps/temps_windows.h index 57e27ba5a..501cc0aa7 100644 --- a/src/detection/temps/temps_windows.h +++ b/src/detection/temps/temps_windows.h @@ -1,8 +1,3 @@ #pragma once -#ifndef FF_INCLUDED_detection_temps_windows -#define FF_INCLUDED_detection_temps_windows - const char* ffDetectSmbiosTemp(double* current, double* critical); - -#endif diff --git a/src/detection/terminalfont/terminalfont.h b/src/detection/terminalfont/terminalfont.h index 936cdeb4f..0cb33b71d 100644 --- a/src/detection/terminalfont/terminalfont.h +++ b/src/detection/terminalfont/terminalfont.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_terminalfont_terminalfont -#define FF_INCLUDED_detection_terminalfont_terminalfont - #include "fastfetch.h" #include "common/font.h" @@ -14,5 +11,3 @@ typedef struct FFTerminalFontResult } FFTerminalFontResult; bool ffDetectTerminalFont(FFTerminalFontResult* result); - -#endif diff --git a/src/detection/terminalshell/terminalshell.h b/src/detection/terminalshell/terminalshell.h index 41e31700f..3dbb0633f 100644 --- a/src/detection/terminalshell/terminalshell.h +++ b/src/detection/terminalshell/terminalshell.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_terminalshell -#define FF_INCLUDED_detection_terminalshell - #include "fastfetch.h" typedef struct FFTerminalShellResult @@ -23,5 +20,3 @@ typedef struct FFTerminalShellResult } FFTerminalShellResult; const FFTerminalShellResult* ffDetectTerminalShell(); - -#endif diff --git a/src/detection/terminalsize/terminalsize.h b/src/detection/terminalsize/terminalsize.h index b1b51ebe5..f8b116d73 100644 --- a/src/detection/terminalsize/terminalsize.h +++ b/src/detection/terminalsize/terminalsize.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_terminalsize_terminalsize -#define FF_INCLUDED_detection_terminalsize_terminalsize - #include "fastfetch.h" typedef struct FFTerminalSizeResult @@ -14,5 +11,3 @@ typedef struct FFTerminalSizeResult } FFTerminalSizeResult; bool ffDetectTerminalSize(FFTerminalSizeResult* result); - -#endif diff --git a/src/detection/theme/theme.h b/src/detection/theme/theme.h index ec4c596e8..2536c6fb7 100644 --- a/src/detection/theme/theme.h +++ b/src/detection/theme/theme.h @@ -1,10 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_theme -#define FF_INCLUDED_detection_theme - #include "fastfetch.h" const char* ffDetectTheme(FFstrbuf* result); - -#endif diff --git a/src/detection/uptime/uptime.h b/src/detection/uptime/uptime.h index 105e1bfa5..6f0696d39 100644 --- a/src/detection/uptime/uptime.h +++ b/src/detection/uptime/uptime.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_uptime_uptime -#define FF_INCLUDED_detection_uptime_uptime - #include "fastfetch.h" typedef struct FFUptimeResult @@ -12,5 +9,3 @@ typedef struct FFUptimeResult } FFUptimeResult; const char* ffDetectUptime(FFUptimeResult* result); - -#endif diff --git a/src/detection/users/users.h b/src/detection/users/users.h index 38b3cf204..67be7f1fd 100644 --- a/src/detection/users/users.h +++ b/src/detection/users/users.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_users_users -#define FF_INCLUDED_detection_users_users - #include "fastfetch.h" typedef struct FFUserResult @@ -15,5 +12,3 @@ typedef struct FFUserResult } FFUserResult; const char* ffDetectUsers(FFlist* users); - -#endif diff --git a/src/detection/version/version.h b/src/detection/version/version.h index 4cb7b9ac6..5227561e0 100644 --- a/src/detection/version/version.h +++ b/src/detection/version/version.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_version_version -#define FF_INCLUDED_detection_version_version - #include "fastfetch.h" typedef struct FFVersionResult @@ -18,5 +15,3 @@ typedef struct FFVersionResult } FFVersionResult; void ffDetectVersion(FFVersionResult* version); - -#endif diff --git a/src/detection/vulkan/vulkan.h b/src/detection/vulkan/vulkan.h index 560fcdc53..9ac051cbc 100644 --- a/src/detection/vulkan/vulkan.h +++ b/src/detection/vulkan/vulkan.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_vulkan -#define FF_INCLUDED_detection_vulkan - #include "fastfetch.h" typedef struct FFVulkanResult @@ -15,5 +12,3 @@ typedef struct FFVulkanResult } FFVulkanResult; FFVulkanResult* ffDetectVulkan(); - -#endif diff --git a/src/detection/wallpaper/wallpaper.h b/src/detection/wallpaper/wallpaper.h index f75ad77dd..96fead922 100644 --- a/src/detection/wallpaper/wallpaper.h +++ b/src/detection/wallpaper/wallpaper.h @@ -1,10 +1,5 @@ -#pragma once - -#ifndef FF_INCLUDED_detection_wallpaper -#define FF_INCLUDED_detection_wallpaper - -#include "fastfetch.h" - -const char* ffDetectWallpaper(FFstrbuf* result); - -#endif +#pragma once + +#include "fastfetch.h" + +const char* ffDetectWallpaper(FFstrbuf* result); diff --git a/src/detection/weather/weather.h b/src/detection/weather/weather.h index c15f1ea3a..55a578628 100644 --- a/src/detection/weather/weather.h +++ b/src/detection/weather/weather.h @@ -1,11 +1,6 @@ #pragma once -#ifndef FF_INCLUDED_detection_weather_weather -#define FF_INCLUDED_detection_weather_weather - #include "common/networking.h" void ffPrepareWeather(FFWeatherOptions* options); const char* ffDetectWeather(FFWeatherOptions* options, FFstrbuf* result); - -#endif diff --git a/src/detection/wifi/wifi.h b/src/detection/wifi/wifi.h index d3257a9ef..2e292439d 100644 --- a/src/detection/wifi/wifi.h +++ b/src/detection/wifi/wifi.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_detection_wifi_wifi -#define FF_INCLUDED_detection_wifi_wifi - #include "fastfetch.h" struct FFWifiInterface @@ -30,5 +27,3 @@ typedef struct FFWifiResult } FFWifiResult; const char* ffDetectWifi(FFlist* result /*list of FFWifiItem*/); - -#endif diff --git a/src/logo/image/image.h b/src/logo/image/image.h index 7d54edd8a..608286392 100644 --- a/src/logo/image/image.h +++ b/src/logo/image/image.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_LOGO_SIXEL_sixel -#define FF_INCLUDED_LOGO_SIXEL_sixel - #include "../logo.h" #if defined(FF_HAVE_IMAGEMAGICK7) || defined(FF_HAVE_IMAGEMAGICK6) @@ -47,5 +44,3 @@ FFLogoImageResult ffLogoPrintImageIM7(FFLogoRequestData* requestData); #include FFLogoImageResult ffLogoPrintImageIM6(FFLogoRequestData* requestData); #endif - -#endif diff --git a/src/util/FFlist.h b/src/util/FFlist.h index 0f71b1bff..c3fd451e5 100644 --- a/src/util/FFlist.h +++ b/src/util/FFlist.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_FFLIST -#define FF_INCLUDED_FFLIST - #include "FFcheckmacros.h" #include @@ -109,5 +106,3 @@ static inline void ffListClear(FFlist* list) assert((listVar).capacity > (index)); \ (itemType*)(listVar).data + (index); \ }) - -#endif diff --git a/src/util/edidHelper.h b/src/util/edidHelper.h index 75fa6ce8c..2fc8d591d 100644 --- a/src/util/edidHelper.h +++ b/src/util/edidHelper.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_EDID_HELPER_H -#define FF_INCLUDED_EDID_HELPER_H - #include #include "util/FFstrbuf.h" @@ -11,5 +8,3 @@ bool ffEdidGetName(const uint8_t edid[128], FFstrbuf* name); void ffEdidGetPhysicalResolution(const uint8_t edid[128], uint32_t* width, uint32_t* height); void ffEdidGetPhysicalSize(const uint8_t edid[128], uint32_t* width, uint32_t* height); // in mm bool ffEdidGetHdrCompatible(const uint8_t* edid, uint32_t length); - -#endif diff --git a/src/util/platform/FFPlatform.h b/src/util/platform/FFPlatform.h index 6386cf479..8594e2039 100644 --- a/src/util/platform/FFPlatform.h +++ b/src/util/platform/FFPlatform.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_util_platform_FFPlatform -#define FF_INCLUDED_util_platform_FFPlatform - #include "util/FFstrbuf.h" #include "util/FFlist.h" @@ -28,5 +25,3 @@ typedef struct FFPlatform { void ffPlatformInit(FFPlatform* platform); void ffPlatformDestroy(FFPlatform* platform); - -#endif diff --git a/src/util/platform/FFPlatform_private.h b/src/util/platform/FFPlatform_private.h index d81e6f9cf..bb0247e6a 100644 --- a/src/util/platform/FFPlatform_private.h +++ b/src/util/platform/FFPlatform_private.h @@ -1,13 +1,8 @@ #pragma once -#ifndef FF_INCLUDED_util_platform_FFPlatform_private -#define FF_INCLUDED_util_platform_FFPlatform_private - #include "FFPlatform.h" void ffPlatformInitImpl(FFPlatform* platform); void ffPlatformPathAddAbsolute(FFlist* dirs, const char* path); void ffPlatformPathAddHome(FFlist* dirs, const FFPlatform* platform, const char* suffix); - -#endif diff --git a/src/util/stringUtils.h b/src/util/stringUtils.h index d3ff894c6..e67298224 100644 --- a/src/util/stringUtils.h +++ b/src/util/stringUtils.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_util_stringUtils_h -#define FF_INCLUDED_util_stringUtils_h - #include #include #include @@ -47,5 +44,3 @@ static inline bool ffStrEquals(const char* str, const char* compareTo) { return strcmp(str, compareTo) == 0; } - -#endif diff --git a/src/util/wcwidth.h b/src/util/wcwidth.h index eaeceed22..4252e0f36 100644 --- a/src/util/wcwidth.h +++ b/src/util/wcwidth.h @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_UTIL_WCWIDTH_H -#define FF_INCLUDED_UTIL_WCWIDTH_H - #include #ifdef FF_HAVE_WCWIDTH @@ -17,5 +14,3 @@ static inline int mk_wcswidth(const wchar_t *pwcs, size_t n) { int mk_wcwidth(wchar_t ucs); int mk_wcswidth(const wchar_t *pwcs, size_t n); #endif - -#endif diff --git a/src/util/windows/com.hpp b/src/util/windows/com.hpp index e0f1051ae..3714d79dc 100644 --- a/src/util/windows/com.hpp +++ b/src/util/windows/com.hpp @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_util_windows_com -#define FF_INCLUDED_util_windows_com - #ifdef __cplusplus #include @@ -21,5 +18,3 @@ static inline void ffReleaseComObject(void* ppUnknown) // Win32 COM headers requires C++ compiler #error Must be included in C++ source file #endif - -#endif diff --git a/src/util/windows/wmi.hpp b/src/util/windows/wmi.hpp index 5e8d57a32..561f1ff5e 100644 --- a/src/util/windows/wmi.hpp +++ b/src/util/windows/wmi.hpp @@ -1,8 +1,5 @@ #pragma once -#ifndef FF_INCLUDED_util_windows_wmi -#define FF_INCLUDED_util_windows_wmi - #ifdef __cplusplus extern "C" { @@ -215,5 +212,3 @@ struct FFWmiQuery // Win32 COM headers requires C++ compiler #error Must be included in C++ source file #endif //__cplusplus - -#endif //FF_INCLUDED_util_windows_wmi