not much point having separate versions, they are not separate 
entities by any means.

>From 7aca21703499445f32399d96bb3893e191276d29 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
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 7f93a93..2a023c6 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 2b793d5..e8286cf 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 9dd89a1..4ed486c 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 84ea731..b15e940 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 5eb9b14..fa62ae9 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 b60fe07..ce44fc5 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 017e711..9317b19 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 312e619..cf4516f 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 a593e7b..d716e81 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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -27,6 +25,8 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 
+#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 7dcbf46..72c3d27 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 <stdio.h>
@@ -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) {
-- 
1.7.0


-- 
[-]

mkdir /nonexistent
From 7aca21703499445f32399d96bb3893e191276d29 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
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 7f93a93..2a023c6 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 2b793d5..e8286cf 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 9dd89a1..4ed486c 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 84ea731..b15e940 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 5eb9b14..fa62ae9 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 b60fe07..ce44fc5 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 017e711..9317b19 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 312e619..cf4516f 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 a593e7b..d716e81 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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -27,6 +25,8 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 
+#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 7dcbf46..72c3d27 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 <stdio.h>
@@ -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) {
-- 
1.7.0

Reply via email to