summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2020-06-20 05:28:14 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2020-06-20 05:28:14 -0400
commitfc19a82a10dc797605d6cb5d9028685644c6db3d (patch)
tree7687241719b12f752a8c34e1f849921434601e9e
parentd2690bc70d707b7a3a49839787d20eabc138e391 (diff)
make the "-V" version print less cluttered (and more like most programs)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/Makefile.am3
-rw-r--r--src/twm.c4
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 <X11/Xproto.h>
#include <X11/Xatom.h>
@@ -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"))