summaryrefslogtreecommitdiff
path: root/app/twm/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-05-10 09:57:51 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-05-10 09:57:51 +0000
commit89728b50d745f84d04c77dca8c869c189a269294 (patch)
tree828f961a65a751461cdedecc3382296597496dfc /app/twm/src
parent672451cb4379768761023b1060bdbb04c81cc7a1 (diff)
Update to twm 1.0.9
Diffstat (limited to 'app/twm/src')
-rw-r--r--app/twm/src/Makefile.in9
-rw-r--r--app/twm/src/menus.c22
-rw-r--r--app/twm/src/parse.c19
3 files changed, 12 insertions, 38 deletions
diff --git a/app/twm/src/Makefile.in b/app/twm/src/Makefile.in
index 4dc4eae16..5f3af7da0 100644
--- a/app/twm/src/Makefile.in
+++ b/app/twm/src/Makefile.in
@@ -125,14 +125,12 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
AM_V_LEX = $(am__v_LEX_@AM_V@)
am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
am__v_LEX_0 = @echo " LEX " $@;
am__v_LEX_1 =
YLWRAP = $(top_srcdir)/ylwrap
-@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-e s/c++$$/h++/ -e s/c$$/h/
YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
@@ -225,7 +223,6 @@ LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
@@ -355,7 +352,7 @@ all: $(BUILT_SOURCES)
.SUFFIXES:
.SUFFIXES: .c .l .o .obj .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -380,9 +377,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
diff --git a/app/twm/src/menus.c b/app/twm/src/menus.c
index 73d157867..a39044497 100644
--- a/app/twm/src/menus.c
+++ b/app/twm/src/menus.c
@@ -2337,28 +2337,6 @@ NeedToDefer(MenuRoot *root)
-#if defined(sun) && defined(SVR4)
-#include <sys/wait.h>
-
-/**
- * execute the string by /bin/sh
- * \param s the string containing the command
- */
-static int
-System (const char *s)
-{
- int pid, status;
- if ((pid = fork ()) == 0) {
- (void) setpgrp();
- execl ("/bin/sh", "sh", "-c", s, NULL);
- } else
- waitpid (pid, &status, 0);
- return status;
-}
-#define system(s) System(s)
-
-#endif
-
static void
Execute(const char *s)
{
diff --git a/app/twm/src/parse.c b/app/twm/src/parse.c
index 6ae968511..787e1b1ac 100644
--- a/app/twm/src/parse.c
+++ b/app/twm/src/parse.c
@@ -954,16 +954,15 @@ put_pixel_on_root(Pixel pixel)
unsigned char*retProp;
Pixel *pixelProp;
pixelAtom = XInternAtom(dpy, "_MIT_PRIORITY_COLORS", True);
- XGetWindowProperty(dpy, Scr->Root, pixelAtom, 0, 8192,
- False, XA_CARDINAL, &retAtom,
- &retFormat, &nPixels, &retAfter,
- &retProp);
-
- pixelProp = (Pixel *) retProp;
- for (i=0; i< nPixels; i++)
- if (pixel == pixelProp[i])
- addPixel = 0;
-
+ if (XGetWindowProperty(dpy, Scr->Root, pixelAtom, 0, 8192,
+ False, XA_CARDINAL, &retAtom,
+ &retFormat, &nPixels, &retAfter,
+ &retProp) == Success) {
+ pixelProp = (Pixel *) retProp;
+ for (i = 0; i < nPixels; i++)
+ if (pixel == pixelProp[i])
+ addPixel = 0;
+ }
if (addPixel)
XChangeProperty (dpy, Scr->Root, _XA_MIT_PRIORITY_COLORS,
XA_CARDINAL, 32, PropModeAppend,