summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-07-11 11:02:28 +0200
committerLennart Poettering <lennart@poettering.net>2024-07-19 11:44:04 +0200
commitb7120388f8dd638aec33dc640f273d1a9016d676 (patch)
tree121d10495834fd4dcdf9d03d88f61e7080e9b56e /src/shared
parentterminal-util: remove terminal_vhangup() because apparently unused (diff)
downloadsystemd-b7120388f8dd638aec33dc640f273d1a9016d676.tar.xz
systemd-b7120388f8dd638aec33dc640f273d1a9016d676.zip
terminal-util: split out color macros/helpers into its own header
This is a lot of stuff, and sometimes quite wild, let's turn this into its own header. All stuff color-related that just generates sequences is now in ansi-color.h (no .c file!), and everything more complex that probes/ineracts with terminals remains in termina-util.[ch]
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ask-password-api.c1
-rw-r--r--src/shared/blockdev-list.c1
-rw-r--r--src/shared/bus-unit-procs.c1
-rw-r--r--src/shared/cgroup-show.c1
-rw-r--r--src/shared/pretty-print.h1
-rw-r--r--src/shared/ptyfwd.c1
-rw-r--r--src/shared/qrcode-util.c1
7 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index bf79dc2633..778b31274d 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include "alloc-util.h"
+#include "ansi-color.h"
#include "ask-password-api.h"
#include "creds-util.h"
#include "fd-util.h"
diff --git a/src/shared/blockdev-list.c b/src/shared/blockdev-list.c
index 2e6ed362f2..120f7201df 100644
--- a/src/shared/blockdev-list.c
+++ b/src/shared/blockdev-list.c
@@ -2,6 +2,7 @@
#include "sd-device.h"
+#include "ansi-color.h"
#include "blockdev-list.h"
#include "blockdev-util.h"
#include "device-util.h"
diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
index 8b462b5627..4d6f2be3c4 100644
--- a/src/shared/bus-unit-procs.c
+++ b/src/shared/bus-unit-procs.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "ansi-color.h"
#include "bus-locator.h"
#include "bus-unit-procs.h"
#include "glyph-util.h"
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index 87177316da..33fe222730 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -7,6 +7,7 @@
#include <stdlib.h>
#include "alloc-util.h"
+#include "ansi-color.h"
#include "bus-error.h"
#include "bus-util.h"
#include "cgroup-show.h"
diff --git a/src/shared/pretty-print.h b/src/shared/pretty-print.h
index 9eb1611905..2c97c354ef 100644
--- a/src/shared/pretty-print.h
+++ b/src/shared/pretty-print.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
+#include "ansi-color.h"
#include "glyph-util.h"
#include "terminal-util.h"
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c
index 83eef7f7d8..3e11ba456f 100644
--- a/src/shared/ptyfwd.c
+++ b/src/shared/ptyfwd.c
@@ -17,6 +17,7 @@
#include "sd-event.h"
#include "alloc-util.h"
+#include "ansi-color.h"
#include "env-util.h"
#include "errno-util.h"
#include "extract-word.h"
diff --git a/src/shared/qrcode-util.c b/src/shared/qrcode-util.c
index 10ed542df2..36cd5dcd7c 100644
--- a/src/shared/qrcode-util.c
+++ b/src/shared/qrcode-util.c
@@ -5,6 +5,7 @@
#if HAVE_QRENCODE
#include <qrencode.h>
+#include "ansi-color.h"
#include "dlfcn-util.h"
#include "locale-util.h"
#include "log.h"