From e7a46d5cdf680122e29b96dc03dc41198cb1c0c5 Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Thu, 1 Apr 2010 19:05:25 +0200 Subject: [PATCH] Attach utils versions to WM version --- util/convertfonts.c | 4 +--- util/geticonset.c | 4 +--- util/getstyle.c | 4 +--- util/seticons.c | 4 +--- util/setstyle.c | 4 +--- util/wdread.c | 4 +--- util/wdwrite.c | 4 +--- util/wmsetbg.c | 4 +--- util/wxcopy.c | 6 +++--- util/wxpaste.c | 4 +--- 10 files changed, 12 insertions(+), 30 deletions(-) diff --git a/util/convertfonts.c b/util/convertfonts.c index 7f93a93c..2a023c6a 100644 --- a/util/convertfonts.c +++ b/util/convertfonts.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "convertfonts (Window Maker) 1.0" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -91,7 +89,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/geticonset.c b/util/geticonset.c index 2b793d5d..e8286cfc 100644 --- a/util/geticonset.c +++ b/util/geticonset.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "geticonset (Window Maker) 0.1" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -65,7 +63,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/getstyle.c b/util/getstyle.c index 40659409..1023c10b 100644 --- a/util/getstyle.c +++ b/util/getstyle.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "getstyle (Window Maker) 0.6" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -366,7 +364,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "ptvh", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/seticons.c b/util/seticons.c index 84ea7317..b15e940a 100644 --- a/util/seticons.c +++ b/util/seticons.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "seticons (Window Maker) 0.1" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -65,7 +63,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/setstyle.c b/util/setstyle.c index 5eb9b14e..fa62ae95 100644 --- a/util/setstyle.c +++ b/util/setstyle.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "setstyle (Window Maker) 0.6" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -389,7 +387,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/wdread.c b/util/wdread.c index b60fe076..ce44fc5a 100644 --- a/util/wdread.c +++ b/util/wdread.c @@ -21,8 +21,6 @@ * USA. */ -#define PROG_VERSION "wdread (Window Maker) 0.2" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -71,7 +69,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/wdwrite.c b/util/wdwrite.c index 017e711a..9317b19e 100644 --- a/util/wdwrite.c +++ b/util/wdwrite.c @@ -20,8 +20,6 @@ * USA. */ -#define PROG_VERSION "wdwrite (Window Maker) 0.2" - #ifdef __GLIBC__ #define _GNU_SOURCE /* getopt_long */ #endif @@ -71,7 +69,7 @@ int main(int argc, char **argv) while ((ch = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) switch(ch) { case 'v': - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); return 0; /* NOTREACHED */ case 'h': diff --git a/util/wmsetbg.c b/util/wmsetbg.c index 312e6195..cf4516fe 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -61,8 +61,6 @@ typedef struct { int count; /* screen count, 0 = inactive */ } WXineramaInfo; -#define PROG_VERSION "wmsetbg (Window Maker) 2.8" - #define WORKSPACE_COUNT (MAX_WORKSPACES+1) Display *dpy; @@ -1287,7 +1285,7 @@ int main(int argc, char **argv) exit(1); } } else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0) { - printf(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); exit(0); } else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) { print_help(); diff --git a/util/wxcopy.c b/util/wxcopy.c index a593e7b2..d716e812 100644 --- a/util/wxcopy.c +++ b/util/wxcopy.c @@ -17,8 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define PROG_VERSION "wxcopy 0.3" - #include #include #include @@ -27,6 +25,8 @@ #include #include +#include "../src/wconfig.h" + #define LINESIZE (4*1024) #define MAXDATA (64*1024) @@ -71,7 +71,7 @@ int main(int argc, char **argv) print_help(); exit(0); } else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0) { - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); exit(0); } else if (strcmp(argv[i], "-cutbuffer") == 0 || strcmp(argv[i], "--cutbuffer") == 0) { if (i < argc - 1) { diff --git a/util/wxpaste.c b/util/wxpaste.c index 7dcbf46c..72c3d272 100644 --- a/util/wxpaste.c +++ b/util/wxpaste.c @@ -17,8 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define PROG_VERSION "wxpaste (Window Maker) 0.3" - #include "../src/config.h" #include @@ -164,7 +162,7 @@ int main(int argc, char **argv) print_help(); exit(0); } else if (argv[i][1] == 'v' || strcmp(argv[i], "--version") == 0) { - puts(PROG_VERSION); + printf("%s (Window Maker %s)\n", __progname, VERSION); exit(0); } else if (strcmp(argv[i], "-selection") == 0 || strcmp(argv[i], "--selection") == 0) { if (i < argc - 1) {