mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-05 20:54:21 +01:00
Chore: remove all #ifndef guards
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user