mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Refactor: move title detection to own header
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "detection/title.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef FF_INCLUDED_detection_title
|
||||
#define FF_INCLUDED_detection_title
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
|
||||
typedef struct FFTitleResult
|
||||
{
|
||||
FFstrbuf userName;
|
||||
FFstrbuf hostname;
|
||||
FFstrbuf fqdn; //Fully qualified domain name
|
||||
} FFTitleResult;
|
||||
|
||||
const FFTitleResult* ffDetectTitle(const FFinstance* instance);
|
||||
|
||||
#endif
|
||||
@@ -173,13 +173,6 @@ typedef struct FFinstance
|
||||
FFstate state;
|
||||
} FFinstance;
|
||||
|
||||
typedef struct FFTitleResult
|
||||
{
|
||||
FFstrbuf userName;
|
||||
FFstrbuf hostname;
|
||||
FFstrbuf fqdn; //Fully qualified domain name
|
||||
} FFTitleResult;
|
||||
|
||||
typedef struct FFOSResult
|
||||
{
|
||||
FFstrbuf systemName;
|
||||
@@ -336,10 +329,6 @@ void ffLogoBuiltinListAutocompletion();
|
||||
/////////////////////////
|
||||
// Detection functions //
|
||||
/////////////////////////
|
||||
|
||||
//detection/title.c
|
||||
const FFTitleResult* ffDetectTitle(const FFinstance* instance);
|
||||
|
||||
//detection/os.c
|
||||
const FFOSResult* ffDetectOS(const FFinstance* instance);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/title.h"
|
||||
|
||||
void ffPrintSeparator(FFinstance* instance)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/title.h"
|
||||
|
||||
static inline void printTitlePart(FFinstance* instance, const FFstrbuf* content)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user