From 24c023192fd5757bd1e1308f3aa00a41d0e21728 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 3 Jul 2007 19:04:46 +0000 Subject: minor cosmetics to fluxbox-remote, display of usage --- util/fluxbox-remote.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/util/fluxbox-remote.cc b/util/fluxbox-remote.cc index eb7a413..67c2193 100644 --- a/util/fluxbox-remote.cc +++ b/util/fluxbox-remote.cc @@ -24,15 +24,21 @@ #include #include #include +#include +#include int main(int argc, char **argv) { - if (argc <= 1) - return 1; + if (argc <= 1) { + printf("fluxbox-remote \n"); + return EXIT_SUCCESS; + } Display *disp = XOpenDisplay(NULL); - if (!disp) - return 1; + if (!disp) { + perror("error, can't open display."); + return EXIT_FAILURE; + } Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False); Window root = DefaultRootWindow(disp); @@ -44,6 +50,8 @@ int main(int argc, char **argv) { XCloseDisplay(disp); if (ret == Success) - return 0; - return 1; + return EXIT_SUCCESS; + + return EXIT_FAILURE; } + -- cgit v0.11.2