mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
IO: Separate platform specific implementations
This commit is contained in:
parent
2c51d55ba2
commit
a1ea7804f3
@ -227,7 +227,6 @@ set(LIBFASTFETCH_SRC
|
||||
src/common/font.c
|
||||
src/common/format.c
|
||||
src/common/init.c
|
||||
src/common/io.c
|
||||
src/common/library.c
|
||||
src/common/parsing.c
|
||||
src/common/printing.c
|
||||
@ -313,6 +312,7 @@ set(LIBFASTFETCH_SRC
|
||||
if(LINUX)
|
||||
list(APPEND LIBFASTFETCH_SRC
|
||||
src/common/dbus.c
|
||||
src/common/io/io_unix.c
|
||||
src/common/networking_linux.c
|
||||
src/common/processing_linux.c
|
||||
src/detection/battery/battery_linux.c
|
||||
@ -356,6 +356,7 @@ if(LINUX)
|
||||
)
|
||||
elseif(ANDROID)
|
||||
list(APPEND LIBFASTFETCH_SRC
|
||||
src/common/io/io_unix.c
|
||||
src/common/networking_linux.c
|
||||
src/common/processing_linux.c
|
||||
src/detection/battery/battery_android.c
|
||||
@ -394,6 +395,7 @@ elseif(ANDROID)
|
||||
elseif(BSD)
|
||||
list(APPEND LIBFASTFETCH_SRC
|
||||
src/common/dbus.c
|
||||
src/common/io/io_unix.c
|
||||
src/common/networking_linux.c
|
||||
src/common/processing_linux.c
|
||||
src/common/sysctl.c
|
||||
@ -438,6 +440,7 @@ elseif(BSD)
|
||||
)
|
||||
elseif(APPLE)
|
||||
list(APPEND LIBFASTFETCH_SRC
|
||||
src/common/io/io_unix.c
|
||||
src/common/networking_linux.c
|
||||
src/common/processing_linux.c
|
||||
src/common/sysctl.c
|
||||
@ -479,6 +482,7 @@ elseif(APPLE)
|
||||
)
|
||||
elseif(WIN32)
|
||||
list(APPEND LIBFASTFETCH_SRC
|
||||
src/common/io/io_windows.c
|
||||
src/common/networking_windows.c
|
||||
src/common/processing_windows.c
|
||||
src/detection/battery/battery_windows.c
|
||||
|
@ -1,39 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef FF_INCLUDED_common_io
|
||||
#define FF_INCLUDED_common_io
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
bool ffWriteFDBuffer(int fd, const FFstrbuf* content);
|
||||
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data);
|
||||
bool ffWriteFileBuffer(const char* fileName, const FFstrbuf* buffer);
|
||||
|
||||
bool ffAppendFDBuffer(int fd, FFstrbuf* buffer);
|
||||
ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data);
|
||||
bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer);
|
||||
bool ffReadFileBuffer(const char* fileName, FFstrbuf* buffer);
|
||||
|
||||
#ifdef _WIN32
|
||||
bool ffAppendHandleBuffer(HANDLE handle, FFstrbuf* buffer);
|
||||
#endif
|
||||
|
||||
//Bit flags, combine with |
|
||||
typedef enum FFPathType
|
||||
{
|
||||
FF_PATHTYPE_REGULAR = 1,
|
||||
FF_PATHTYPE_LINK = 2,
|
||||
FF_PATHTYPE_DIRECTORY = 4
|
||||
} FFPathType;
|
||||
|
||||
#define FF_PATHTYPE_FILE (FF_PATHTYPE_REGULAR | FF_PATHTYPE_LINK)
|
||||
#define FF_PATHTYPE_ANY (FF_PATHTYPE_FILE | FF_PATHTYPE_DIRECTORY)
|
||||
|
||||
bool ffPathExists(const char* path, FFPathType pathType);
|
||||
|
||||
// Not thread safe!
|
||||
void ffSuppressIO(bool suppress);
|
||||
|
||||
FF_C_SCANF(2, 3) void ffGetTerminalResponse(const char* request, const char* format, ...);
|
||||
|
||||
#endif
|
64
src/common/io/io.h
Normal file
64
src/common/io/io.h
Normal file
@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef FF_INCLUDED_common_io_io
|
||||
#define FF_INCLUDED_common_io_io
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fileapi.h>
|
||||
typedef HANDLE FFNativeFD;
|
||||
#else
|
||||
#include <unistd.h>
|
||||
typedef int FFNativeFD;
|
||||
#endif
|
||||
|
||||
static inline bool ffWriteFDBuffer(FFNativeFD fd, const FFstrbuf* content)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
return write(fd, content->chars, content->length) != -1;
|
||||
#else
|
||||
DWORD written;
|
||||
return WriteFile(fd, content->chars, content->length, &written, NULL) && written == content->length;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data);
|
||||
|
||||
static inline bool ffWriteFileBuffer(const char* fileName, const FFstrbuf* buffer)
|
||||
{
|
||||
return ffWriteFileData(fileName, buffer->length, buffer->chars);
|
||||
}
|
||||
|
||||
bool ffAppendFDBuffer(FFNativeFD fd, FFstrbuf* buffer);
|
||||
ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data);
|
||||
bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer);
|
||||
|
||||
static inline bool ffReadFileBuffer(const char* fileName, FFstrbuf* buffer)
|
||||
{
|
||||
ffStrbufClear(buffer);
|
||||
return ffAppendFileBuffer(fileName, buffer);
|
||||
}
|
||||
|
||||
//Bit flags, combine with |
|
||||
typedef enum FFPathType
|
||||
{
|
||||
FF_PATHTYPE_REGULAR = 1,
|
||||
FF_PATHTYPE_LINK = 2,
|
||||
FF_PATHTYPE_DIRECTORY = 4
|
||||
} FFPathType;
|
||||
|
||||
#define FF_PATHTYPE_FILE (FF_PATHTYPE_REGULAR | FF_PATHTYPE_LINK)
|
||||
#define FF_PATHTYPE_ANY (FF_PATHTYPE_FILE | FF_PATHTYPE_DIRECTORY)
|
||||
|
||||
bool ffPathExists(const char* path, FFPathType pathType);
|
||||
|
||||
#ifndef _WIN32
|
||||
FF_C_SCANF(2, 3)
|
||||
void ffGetTerminalResponse(const char* request, const char* format, ...);
|
||||
#endif
|
||||
|
||||
// Not thread safe!
|
||||
void ffSuppressIO(bool suppress);
|
||||
|
||||
#endif // FF_INCLUDED_common_io_io
|
@ -1,16 +1,9 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/io.h"
|
||||
#include "io.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fileapi.h>
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#include <termios.h>
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <termios.h>
|
||||
#include <poll.h>
|
||||
|
||||
static void createSubfolders(const char* fileName)
|
||||
{
|
||||
@ -21,41 +14,15 @@ static void createSubfolders(const char* fileName)
|
||||
{
|
||||
ffStrbufAppendC(&path, *fileName);
|
||||
if(*fileName == '/')
|
||||
{
|
||||
mkdir(path.chars
|
||||
#ifndef WIN32
|
||||
, S_IRWXU | S_IRGRP | S_IROTH
|
||||
#endif
|
||||
);
|
||||
}
|
||||
mkdir(path.chars, S_IRWXU | S_IRGRP | S_IROTH);
|
||||
++fileName;
|
||||
}
|
||||
|
||||
ffStrbufDestroy(&path);
|
||||
}
|
||||
|
||||
bool ffWriteFDBuffer(int fd, const FFstrbuf* content)
|
||||
{
|
||||
return write(fd, content->chars, content->length) != -1;
|
||||
}
|
||||
|
||||
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
createSubfolders(fileName);
|
||||
handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
}
|
||||
|
||||
DWORD written;
|
||||
bool ret = !!WriteFile(handle, data, (DWORD)dataSize, &written, NULL);
|
||||
|
||||
CloseHandle(handle);
|
||||
#else
|
||||
int openFlagsModes = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
int openFlagsRights = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
|
||||
|
||||
@ -71,52 +38,10 @@ bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
|
||||
bool ret = write(fd, data, dataSize) != -1;
|
||||
|
||||
close(fd);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ffWriteFileBuffer(const char* fileName, const FFstrbuf* buffer)
|
||||
{
|
||||
return ffWriteFileData(fileName, buffer->length, buffer->chars);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
bool ffAppendHandleBuffer(HANDLE handle, FFstrbuf* buffer)
|
||||
{
|
||||
DWORD readed = 0;
|
||||
|
||||
LARGE_INTEGER fileSize;
|
||||
if(!GetFileSizeEx(handle, &fileSize))
|
||||
fileSize.QuadPart = 0;
|
||||
|
||||
ffStrbufEnsureFree(buffer, fileSize.QuadPart > 0 ? (uint32_t)fileSize.QuadPart : 31);
|
||||
uint32_t free = ffStrbufGetFree(buffer);
|
||||
|
||||
bool success;
|
||||
while(
|
||||
(success = !!ReadFile(handle, buffer->chars + buffer->length, free, &readed, NULL)) &&
|
||||
(uint32_t) readed == free
|
||||
) {
|
||||
buffer->length += (uint32_t) readed;
|
||||
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
|
||||
free = ffStrbufGetFree(buffer);
|
||||
}
|
||||
|
||||
if(readed > 0)
|
||||
buffer->length += (uint32_t) readed;
|
||||
|
||||
buffer->chars[buffer->length] = '\0';
|
||||
|
||||
ffStrbufTrimRight(buffer, '\n');
|
||||
ffStrbufTrimRight(buffer, ' ');
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool ffAppendFDBuffer(int fd, FFstrbuf* buffer)
|
||||
{
|
||||
ssize_t readed = 0;
|
||||
@ -151,17 +76,6 @@ bool ffAppendFDBuffer(int fd, FFstrbuf* buffer)
|
||||
|
||||
ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
DWORD readed;
|
||||
if(!ReadFile(handle, data, (DWORD)dataSize, &readed, NULL))
|
||||
return -1;
|
||||
|
||||
return (ssize_t)readed;
|
||||
#else
|
||||
int fd = open(fileName, O_RDONLY);
|
||||
if(fd == -1)
|
||||
return -1;
|
||||
@ -171,20 +85,10 @@ ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data)
|
||||
close(fd);
|
||||
|
||||
return readed;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
bool ret = ffAppendHandleBuffer(handle, buffer);
|
||||
|
||||
CloseHandle(handle);
|
||||
#else
|
||||
int fd = open(fileName, O_RDONLY);
|
||||
if(fd == -1)
|
||||
return false;
|
||||
@ -192,47 +96,10 @@ bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer)
|
||||
bool ret = ffAppendFDBuffer(fd, buffer);
|
||||
|
||||
close(fd);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ffReadFileBuffer(const char* fileName, FFstrbuf* buffer)
|
||||
{
|
||||
ffStrbufClear(buffer);
|
||||
return ffAppendFileBuffer(fileName, buffer);
|
||||
}
|
||||
|
||||
// Not thread safe!
|
||||
void ffSuppressIO(bool suppress)
|
||||
{
|
||||
static bool init = false;
|
||||
static int origOut = -1;
|
||||
static int origErr = -1;
|
||||
static int nullFile = -1;
|
||||
|
||||
if(!init)
|
||||
{
|
||||
if(!suppress)
|
||||
return;
|
||||
|
||||
origOut = dup(STDOUT_FILENO);
|
||||
origErr = dup(STDERR_FILENO);
|
||||
nullFile = open("/dev/null", O_WRONLY);
|
||||
init = true;
|
||||
}
|
||||
|
||||
if(nullFile == -1)
|
||||
return;
|
||||
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
dup2(suppress ? nullFile : origOut, STDOUT_FILENO);
|
||||
dup2(suppress ? nullFile : origErr, STDERR_FILENO);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
bool ffPathExists(const char* path, FFPathType type)
|
||||
{
|
||||
struct stat fileStat;
|
||||
@ -253,29 +120,8 @@ bool ffPathExists(const char* path, FFPathType type)
|
||||
return false;
|
||||
}
|
||||
|
||||
#else
|
||||
bool ffPathExists(const char* path, FFPathType type)
|
||||
{
|
||||
DWORD attr = GetFileAttributesA(path);
|
||||
if(attr == INVALID_FILE_ATTRIBUTES)
|
||||
return false;
|
||||
|
||||
if(type & FF_PATHTYPE_REGULAR && !(attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
return true;
|
||||
|
||||
if(type & FF_PATHTYPE_DIRECTORY && (attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
return true;
|
||||
|
||||
if(type & FF_PATHTYPE_LINK && (attr & FILE_ATTRIBUTE_REPARSE_POINT))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ffGetTerminalResponse(const char* request, const char* format, ...)
|
||||
{
|
||||
#ifndef WIN32
|
||||
struct termios oldTerm, newTerm;
|
||||
if(tcgetattr(STDIN_FILENO, &oldTerm) == -1)
|
||||
return;
|
||||
@ -314,8 +160,32 @@ void ffGetTerminalResponse(const char* request, const char* format, ...)
|
||||
va_start(args, format);
|
||||
vsscanf(buffer, format, args);
|
||||
va_end(args);
|
||||
#else
|
||||
//Unimplemented
|
||||
FF_UNUSED(request, format);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ffSuppressIO(bool suppress)
|
||||
{
|
||||
static bool init = false;
|
||||
static int origOut = -1;
|
||||
static int origErr = -1;
|
||||
static int nullFile = -1;
|
||||
|
||||
if(!init)
|
||||
{
|
||||
if(!suppress)
|
||||
return;
|
||||
|
||||
origOut = dup(STDOUT_FILENO);
|
||||
origErr = dup(STDERR_FILENO);
|
||||
nullFile = open("/dev/null", O_WRONLY);
|
||||
init = true;
|
||||
}
|
||||
|
||||
if(nullFile == -1)
|
||||
return;
|
||||
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
dup2(suppress ? nullFile : origOut, STDOUT_FILENO);
|
||||
dup2(suppress ? nullFile : origErr, STDERR_FILENO);
|
||||
}
|
117
src/common/io/io_windows.c
Normal file
117
src/common/io/io_windows.c
Normal file
@ -0,0 +1,117 @@
|
||||
#include "io.h"
|
||||
|
||||
static void createSubfolders(const char* fileName)
|
||||
{
|
||||
FFstrbuf path;
|
||||
ffStrbufInit(&path);
|
||||
|
||||
while(*fileName != '\0')
|
||||
{
|
||||
ffStrbufAppendC(&path, *fileName);
|
||||
if(*fileName == '/')
|
||||
CreateDirectoryA(path.chars, NULL);
|
||||
++fileName;
|
||||
}
|
||||
|
||||
ffStrbufDestroy(&path);
|
||||
}
|
||||
|
||||
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
|
||||
{
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
createSubfolders(fileName);
|
||||
handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
}
|
||||
|
||||
DWORD written;
|
||||
bool ret = !!WriteFile(handle, data, (DWORD)dataSize, &written, NULL);
|
||||
|
||||
CloseHandle(handle);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ffAppendFDBuffer(HANDLE handle, FFstrbuf* buffer)
|
||||
{
|
||||
DWORD readed = 0;
|
||||
|
||||
LARGE_INTEGER fileSize;
|
||||
if(!GetFileSizeEx(handle, &fileSize))
|
||||
fileSize.QuadPart = 0;
|
||||
|
||||
ffStrbufEnsureFree(buffer, fileSize.QuadPart > 0 ? (uint32_t)fileSize.QuadPart : 31);
|
||||
uint32_t free = ffStrbufGetFree(buffer);
|
||||
|
||||
bool success;
|
||||
while(
|
||||
(success = !!ReadFile(handle, buffer->chars + buffer->length, free, &readed, NULL)) &&
|
||||
(uint32_t) readed == free
|
||||
) {
|
||||
buffer->length += (uint32_t) readed;
|
||||
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
|
||||
free = ffStrbufGetFree(buffer);
|
||||
}
|
||||
|
||||
if(readed > 0)
|
||||
buffer->length += (uint32_t) readed;
|
||||
|
||||
buffer->chars[buffer->length] = '\0';
|
||||
|
||||
ffStrbufTrimRight(buffer, '\n');
|
||||
ffStrbufTrimRight(buffer, ' ');
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data)
|
||||
{
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
DWORD readed;
|
||||
if(!ReadFile(handle, data, (DWORD)dataSize, &readed, NULL))
|
||||
return -1;
|
||||
|
||||
return (ssize_t)readed;
|
||||
}
|
||||
|
||||
bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer)
|
||||
{
|
||||
HANDLE handle = CreateFileA(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
bool ret = ffAppendFDBuffer(handle, buffer);
|
||||
|
||||
CloseHandle(handle);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ffPathExists(const char* path, FFPathType type)
|
||||
{
|
||||
DWORD attr = GetFileAttributesA(path);
|
||||
if(attr == INVALID_FILE_ATTRIBUTES)
|
||||
return false;
|
||||
|
||||
if(type & FF_PATHTYPE_REGULAR && !(attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
return true;
|
||||
|
||||
if(type & FF_PATHTYPE_DIRECTORY && (attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
return true;
|
||||
|
||||
if(type & FF_PATHTYPE_LINK && (attr & FILE_ATTRIBUTE_REPARSE_POINT))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ffSuppressIO(bool suppress)
|
||||
{
|
||||
FF_UNUSED(suppress);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "common/settings.h"
|
||||
#include "common/library.h"
|
||||
#include "common/thread.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "battery.h"
|
||||
|
||||
#include <dirent.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "bios.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "board.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "brightness.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "chassis.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "cpu.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/properties.h"
|
||||
#include "detection/temps/temps_linux.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#ifdef FF_HAVE_WAYLAND
|
||||
#include "common/library.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/thread.h"
|
||||
#include <wayland-client.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "displayserver_linux.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/properties.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/processing.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/font.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "font.h"
|
||||
|
||||
#import <AppKit/NSFont.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "host.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/processing.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "packages.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/properties.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/thread.h"
|
||||
#include "temps_linux.h"
|
||||
|
||||
|
@ -182,7 +182,7 @@ exit:
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "fastfetch.h"
|
||||
#include "terminalfont.h"
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#ifdef FF_HAVE_FREETYPE
|
||||
#include "common/library.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/properties.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
#include "terminalfont.h"
|
||||
#include "util/windows/unicode.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/properties.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/thread.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#ifdef FF_HAVE_VULKAN
|
||||
#include "common/library.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/parsing.h"
|
||||
#include <stdlib.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
@ -200,7 +200,7 @@ static const char* detectWifiWithLibnm(const FFinstance* instance, FFlist* resul
|
||||
|
||||
#endif
|
||||
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <net/if.h>
|
||||
#include <linux/wireless.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "util/FFvaluestore.h"
|
||||
#include "common/printing.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/time.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "image.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/printing.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "logo.h"
|
||||
#include "common/io.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/os/os.h"
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user