From 9660f20af1f041f59cf23dd805df7ab6c7d34792 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 27 Aug 2022 12:22:00 +0300 Subject: r-x11: replace errprint_*() with print_error() This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint --- src/r-x11.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/r-x11.c b/src/r-x11.c index e869d3b..3094b71 100644 --- a/src/r-x11.c +++ b/src/r-x11.c @@ -23,6 +23,7 @@ #include #include "constants.h" +#include "output.h" static Atom X_utf8; @@ -75,8 +76,10 @@ int run_clipboard(const char *data) XSelectionRequestEvent *sev; dpy = XOpenDisplay(NULL); // means use env $DISPLAY - if(!dpy) - errprint_r(1, "Open X display failed\n"); + if(!dpy) { + print_error("Error: Open X display failed\n"); + return 1; + } screen = DefaultScreen(dpy); root = RootWindow(dpy, screen); -- cgit v1.2.3-18-g5258