Networking: move files to a sub folder

This commit is contained in:
李通洲
2025-03-15 23:40:40 +08:00
parent 244625d26a
commit 99415a3841
8 changed files with 20 additions and 21 deletions
+10 -10
View File
@@ -364,7 +364,7 @@ set(LIBFASTFETCH_SRC
src/common/library.c
src/common/modules.c
src/common/netif/netif.c
src/common/networking_common.c
src/common/networking/networking_common.c
src/common/option.c
src/common/parsing.c
src/common/printing.c
@@ -493,7 +493,7 @@ if(LINUX)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_linux.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/detection/battery/battery_linux.c
src/detection/bios/bios_linux.c
@@ -574,7 +574,7 @@ elseif(ANDROID)
list(APPEND LIBFASTFETCH_SRC
src/common/io/io_unix.c
src/common/netif/netif_linux.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/detection/battery/battery_android.c
src/detection/bios/bios_android.c
@@ -640,7 +640,7 @@ elseif(FreeBSD)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_bsd.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/common/sysctl.c
src/detection/battery/battery_bsd.c
@@ -731,7 +731,7 @@ elseif(NetBSD)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_bsd.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/common/sysctl.c
src/detection/battery/battery_nbsd.c
@@ -813,7 +813,7 @@ elseif(OpenBSD)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_bsd.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/common/sysctl.c
src/detection/battery/battery_obsd.c
@@ -894,7 +894,7 @@ elseif(APPLE)
list(APPEND LIBFASTFETCH_SRC
src/common/io/io_unix.c
src/common/netif/netif_bsd.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/common/sysctl.c
src/detection/battery/battery_apple.c
@@ -965,7 +965,7 @@ elseif(WIN32)
list(APPEND LIBFASTFETCH_SRC
src/common/io/io_windows.c
src/common/netif/netif_windows.c
src/common/networking_windows.c
src/common/networking/networking_windows.c
src/common/processing_windows.c
src/detection/battery/battery_windows.c
src/detection/bios/bios_windows.c
@@ -1040,7 +1040,7 @@ elseif(SunOS)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_bsd.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/detection/battery/battery_nosupport.c
src/detection/bios/bios_windows.c
@@ -1121,7 +1121,7 @@ elseif(Haiku)
src/common/dbus.c
src/common/io/io_unix.c
src/common/netif/netif_haiku.c
src/common/networking_linux.c
src/common/networking/networking_linux.c
src/common/processing_linux.c
src/detection/battery/battery_haiku.c
src/detection/bios/bios_windows.c
@@ -1,6 +1,6 @@
#include "fastfetch.h"
#include "common/library.h"
#include "common/networking.h"
#include "common/networking/networking.h"
#include "util/stringUtils.h"
#include "util/debug.h"
@@ -1,5 +1,5 @@
#include "fastfetch.h"
#include "common/networking.h"
#include "common/networking/networking.h"
#include "common/time.h"
#include "common/library.h"
#include "util/stringUtils.h"
@@ -331,9 +331,8 @@ const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buf
char* headerEnd = NULL;
do {
size_t availSpace = ffStrbufGetFree(buffer);
FF_DEBUG("Data reception loop #%d, current buffer size: %u, available space: %zu",
++recvCount, buffer->length, availSpace);
FF_DEBUG("Data reception loop #%d, current buffer size: %u, available space: %u",
++recvCount, buffer->length, ffStrbufGetFree(buffer));
ssize_t received = recv(state->sockfd, buffer->chars + buffer->length, ffStrbufGetFree(buffer), 0);
@@ -3,7 +3,7 @@
//Must be included after <mswsock.h>
#include "fastfetch.h"
#include "common/networking.h"
#include "common/networking/networking.h"
#include "util/stringUtils.h"
#include "util/debug.h"
@@ -225,9 +225,8 @@ const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buf
char* headerEnd = NULL;
do {
size_t availSpace = ffStrbufGetFree(buffer);
FF_DEBUG("Data reception loop #%d, current buffer size: %u, available space: %zu",
++recvCount, buffer->length, availSpace);
FF_DEBUG("Data reception loop #%d, current buffer size: %u, available space: %u",
++recvCount, buffer->length, ffStrbufGetFree(buffer));
ssize_t received = recv(state->sockfd, buffer->chars + buffer->length, (int)ffStrbufGetFree(buffer), 0);
+1 -1
View File
@@ -1,5 +1,5 @@
#include "publicip.h"
#include "common/networking.h"
#include "common/networking/networking.h"
#define FF_UNITIALIZED ((const char*)(uintptr_t) -1)
static FFNetworkingState states[2];
+1
View File
@@ -1,4 +1,5 @@
#include "weather.h"
#include "common/networking/networking.h"
#define FF_UNITIALIZED ((const char*)(uintptr_t) -1)
static FFNetworkingState state;
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include "common/networking.h"
#include "fastfetch.h"
void ffPrepareWeather(FFWeatherOptions* options);
const char* ffDetectWeather(FFWeatherOptions* options, FFstrbuf* result);