Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix an fd leak
[spectrwm.git]
/
scrotwm.c
diff --git
a/scrotwm.c
b/scrotwm.c
index
47e7319
..
e095215
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-51,11
+51,6
@@
* DEALINGS IN THE SOFTWARE.
*/
* DEALINGS IN THE SOFTWARE.
*/
-static const char *cvstag =
- "$scrotwm$";
-
-#define SWM_VERSION "0.9.34"
-
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
@@
-92,6
+87,14
@@
static const char *cvstag =
#include <osx.h>
#endif
#include <osx.h>
#endif
+#include "version.h"
+
+#ifdef SCROTWM_BUILDSTR
+static const char *buildstr = SCROTWM_BUILDSTR;
+#else
+static const char *buildstr = SCROTWM_VERSION;
+#endif
+
#if RANDR_MAJOR < 1
# error XRandR versions less than 1.0 are not supported
#endif
#if RANDR_MAJOR < 1
# error XRandR versions less than 1.0 are not supported
#endif
@@
-1540,8
+1543,8
@@
version(struct swm_region *r, union arg *args)
{
bar_version = !bar_version;
if (bar_version)
{
bar_version = !bar_version;
if (bar_version)
- snprintf(bar_vertext, sizeof bar_vertext, "Version: %s CVS: %s",
- SWM_VERSION, cvstag);
+ snprintf(bar_vertext, sizeof bar_vertext, "Version: %s Build: %s",
+ SCROTWM_VERSION, buildstr);
else
strlcpy(bar_vertext, "", sizeof bar_vertext);
bar_update();
else
strlcpy(bar_vertext, "", sizeof bar_vertext);
bar_update();
@@
-3214,7
+3217,7
@@
search_do_resp(void)
if ((resp = calloc(1, MAX_RESP_LEN + 1)) == NULL) {
fprintf(stderr, "search: calloc\n");
if ((resp = calloc(1, MAX_RESP_LEN + 1)) == NULL) {
fprintf(stderr, "search: calloc\n");
- return;
+ goto done;
}
rbytes = read(select_resp_pipe[0], resp, MAX_RESP_LEN);
}
rbytes = read(select_resp_pipe[0], resp, MAX_RESP_LEN);
@@
-3246,6
+3249,7
@@
search_do_resp(void)
free(s);
}
done:
free(s);
}
done:
+ close(select_resp_pipe[0]);
free(resp);
}
free(resp);
}
@@
-6321,8
+6325,8
@@
main(int argc, char *argv[])
struct sigaction sact;
start_argv = argv;
struct sigaction sact;
start_argv = argv;
- fprintf(stderr, "Welcome to scrotwm V%s cvs tag: %s\n",
- SWM_VERSION, cvstag);
+ fprintf(stderr, "Welcome to scrotwm V%s Build: %s\n",
+ SCROTWM_VERSION, buildstr);
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
warnx("no locale support");
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
warnx("no locale support");