mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-31 01:56:28 +01:00
22 lines
596 B
C
22 lines
596 B
C
#pragma once
|
|
|
|
#include "util/FFstrbuf.h"
|
|
|
|
const char* ffProcessAppendOutput(FFstrbuf* buffer, char* const argv[], bool useStdErr);
|
|
|
|
static inline const char* ffProcessAppendStdOut(FFstrbuf* buffer, char* const argv[])
|
|
{
|
|
const char* error = ffProcessAppendOutput(buffer, argv, false);
|
|
if (!error)
|
|
ffStrbufTrimRightSpace(buffer);
|
|
return error;
|
|
}
|
|
|
|
static inline const char* ffProcessAppendStdErr(FFstrbuf* buffer, char* const argv[])
|
|
{
|
|
const char* error = ffProcessAppendOutput(buffer, argv, true);
|
|
if (!error)
|
|
ffStrbufTrimRightSpace(buffer);
|
|
return error;
|
|
}
|