From fc19a82a10dc797605d6cb5d9028685644c6db3d Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 20 Jun 2020 05:28:14 -0400 Subject: make the "-V" version print less cluttered (and more like most programs) Signed-off-by: Thomas E. Dickey --- src/Makefile.am | 3 +++ src/twm.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 75e3d4a..805eaf9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,6 +28,9 @@ rcdir = ${datadir}/X11/twm dist_rc_DATA = system.twmrc AM_CPPFLAGS = \ + -DAPP_NAME=\"twm\" \ + -DAPP_CLASS=\"twm\" \ + -DAPP_VERSION=\"$(VERSION)\" \ -DXVENDORNAME=\"The\ X.Org\ Foundation\" \ -DXORG_RELEASE=\"Release\ $(VERSION)\" \ -DSYSTEM_INIT_FILE=\"${rcdir}/system.twmrc\" diff --git a/src/twm.c b/src/twm.c index e6b78c1..12cac5f 100644 --- a/src/twm.c +++ b/src/twm.c @@ -69,7 +69,6 @@ in this Software without prior written authorization from The Open Group. #include "add_window.h" #include "gc.h" #include "parse.h" -#include "version.h" #include "menus.h" #include "events.h" #include "util.h" @@ -77,7 +76,6 @@ in this Software without prior written authorization from The Open Group. #include "screen.h" #include "parse.h" #include "session.h" -#include "version.h" #include #include @@ -277,7 +275,7 @@ main(int argc, char *argv[]) if (argv[i][0] == '-') { switch (argv[i][1]) { case 'V': - printf("%s %s\n", ProgramName, Version); + printf("%s %s\n", APP_NAME, APP_VERSION); exit(EXIT_SUCCESS); case 'd': /* -display dpy */ if (!brief_opt(argv[i], "display")) -- cgit v1.2.3