Chore: remove all #ifndef guards

This commit is contained in:
李通洲
2024-10-17 22:33:52 +08:00
parent 48bb5b8746
commit 188dbde595
18 changed files with 0 additions and 90 deletions
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_DISPLAYSERVER
#define FASTFETCH_INCLUDED_DISPLAYSERVER
#include "detection/displayserver/displayserver.h"
const char* ffdsConnectWayland(FFDisplayServerResult* result);
@@ -18,5 +15,3 @@ const char* ffdsConnectDrm(FFDisplayServerResult* result);
void ffdsDetectWMDE(FFDisplayServerResult* result);
FFDisplayType ffdsGetDisplayType(const char* drmConnectorName);
#endif
-5
View File
@@ -1,10 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_detection_wmtheme
#define FASTFETCH_INCLUDED_detection_wmtheme
#include "fastfetch.h"
bool ffDetectWmTheme(FFstrbuf* themeOrError);
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED
#define FASTFETCH_INCLUDED
#include "fastfetch_config.h"
#include <stdint.h>
@@ -80,5 +77,3 @@ void ffLogoPrintLine();
void ffLogoBuiltinPrint();
void ffLogoBuiltinList();
void ffLogoBuiltinListAutocompletion();
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INDLUDED_fastfetch_config_h_in
#define FASTFETCH_INDLUDED_fastfetch_config_h_in
#define FASTFETCH_PROJECT_NAME "@PROJECT_NAME@"
#define FASTFETCH_PROJECT_VERSION "@PROJECT_VERSION@"
#define FASTFETCH_PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
@@ -22,5 +19,3 @@
#define FASTFETCH_TARGET_DIR_ETC "@TARGET_DIR_ETC@"
#define FASTFETCH_TARGET_DIR_INSTALL_SYSCONF "@CMAKE_INSTALL_SYSCONFDIR@"
#endif // FASTFETCH_INDLUDED_fastfetch_config_h_in
-5
View File
@@ -1,13 +1,8 @@
#pragma once
#ifndef FASTFETCH_INDLUDED_fastfetch_datatext_h_in
#define FASTFETCH_INDLUDED_fastfetch_datatext_h_in
#define FASTFETCH_DATATEXT_JSON_HELP @DATATEXT_JSON_HELP@
#define FASTFETCH_DATATEXT_STRUCTURE @DATATEXT_STRUCTURE@
#define FASTFETCH_DATATEXT_HELP_FOOTER @DATATEXT_HELP_FOOTER@
#define FASTFETCH_DATATEXT_HELP_COLOR @DATATEXT_HELP_COLOR@
#define FASTFETCH_DATATEXT_HELP_FORMAT @DATATEXT_HELP_FORMAT@
#define FASTFETCH_DATATEXT_HELP_CONFIG @DATATEXT_HELP_CONFIG@
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_LOGO_logo
#define FASTFETCH_INCLUDED_LOGO_logo
#include "fastfetch.h"
typedef enum FFLogoLineType
@@ -31,5 +28,3 @@ extern const FFlogo ffLogoUnknown;
//image/image.c
bool ffLogoPrintImageIfExists(FFLogoType type, bool printError);
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_FFCHECKMACROS
#define FASTFETCH_INCLUDED_FFCHECKMACROS
#ifdef _MSC_VER
#include <sal.h>
#endif
@@ -26,5 +23,3 @@
#else
#define FF_C_SCANF(formatStrIndex, argsStartIndex)
#endif
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_FFSTRBUF
#define FASTFETCH_INCLUDED_FFSTRBUF
#include "FFcheckmacros.h"
#include <stdint.h>
@@ -491,5 +488,3 @@ static inline void ffStrbufTrim(FFstrbuf* strbuf, char c)
}
#define FF_STRBUF_AUTO_DESTROY FFstrbuf __attribute__((__cleanup__(ffStrbufDestroy)))
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_cf_helpers
#define FASTFETCH_INCLUDED_cf_helpers
#include "fastfetch.h"
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOKitLib.h>
@@ -38,5 +35,3 @@ static inline void wrapIoObjectRelease(io_service_t* service)
IOObjectRelease(*service);
}
#define FF_IOOBJECT_AUTO_RELEASE __attribute__((__cleanup__(wrapIoObjectRelease)))
#endif
-5
View File
@@ -1,10 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_osascript
#define FASTFETCH_INCLUDED_osascript
#include "fastfetch.h"
bool ffOsascript(const char* input, FFstrbuf* result);
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_UTIL_MALLOC_HELPER
#define FASTFETCH_INCLUDED_UTIL_MALLOC_HELPER
#include <stdlib.h>
#include <assert.h>
@@ -14,5 +11,3 @@ static inline void ffWrapFree(const void* pPtr)
}
#define FF_AUTO_FREE __attribute__((__cleanup__(ffWrapFree)))
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_SMBIOSVALUEHELPER
#define FASTFETCH_INCLUDED_SMBIOSVALUEHELPER
#include "util/FFstrbuf.h"
bool ffIsSmbiosValueSet(FFstrbuf* value);
@@ -95,5 +92,3 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable();
#ifdef __linux__
bool ffGetSmbiosValue(const char* devicesPath, const char* classPath, FFstrbuf* buffer);
#endif
#endif
-5
View File
@@ -1,10 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_TEXT_MODIFIER
#define FASTFETCH_INCLUDED_TEXT_MODIFIER
#define FASTFETCH_TEXT_MODIFIER_BOLT "\033[1m"
#define FASTFETCH_TEXT_MODIFIER_ERROR "\033[1;31m"
#define FASTFETCH_TEXT_MODIFIER_RESET "\033[m"
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_UNUSED
#define FASTFETCH_INCLUDED_UNUSED
static inline void ffUnused(int dummy, ...) { (void) dummy; }
#define FF_UNUSED(...) ffUnused(0, __VA_ARGS__);
#if defined(__GNUC__) || defined(__clang__)
@@ -10,5 +7,3 @@ static inline void ffUnused(int dummy, ...) { (void) dummy; }
#else
#define FF_MAYBE_UNUSED
#endif
#endif
-5
View File
@@ -1,11 +1,6 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_UTIL_GETLINE
#define FASTFETCH_INCLUDED_UTIL_GETLINE
#include <stdint.h>
#include <stdio.h>
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_REGISTER_H
#define FASTFETCH_INCLUDED_REGISTER_H
#include "fastfetch.h"
#include <windows.h>
@@ -22,5 +19,3 @@ bool ffRegReadUint(HKEY hKey, const wchar_t* valueNameW, uint32_t* result, FFstr
bool ffRegReadUint64(HKEY hKey, const wchar_t* valueNameW, uint64_t* result, FFstrbuf* error);
bool ffRegGetSubKey(HKEY hKey, uint32_t index, FFstrbuf* result, FFstrbuf* error);
bool ffRegGetNSubKeys(HKEY hKey, uint32_t* result, FFstrbuf* error);
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_UNICODE_H
#define FASTFETCH_INCLUDED_UNICODE_H
#include "util/FFstrbuf.h"
#include <wchar.h>
@@ -34,5 +31,3 @@ static inline FFstrbuf ffStrbufCreateWS(const wchar_t* source)
if (!source) return ffStrbufCreate();
return ffStrbufCreateNWS((uint32_t)wcslen(source), source);
}
#endif
-5
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef FASTFETCH_INCLUDED_UNICODE_HPP
#define FASTFETCH_INCLUDED_UNICODE_HPP
#ifdef __cplusplus
extern "C" {
@@ -26,5 +23,3 @@ static inline void ffStrbufSetWSV(FFstrbuf* result, const std::wstring_view sour
#error Must be included in C++ source file
#endif
#endif