head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.54 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.52 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.50 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.48 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.46 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.44 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.42 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.40 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.38 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 buildlink2-base:1.3 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2000.12.12.02.11.42; author wiz; state dead; branches; next 1.2; 1.2 date 2000.01.19.07.24.07; author itohy; state Exp; branches; next 1.1; 1.1 date 99.12.23.03.10.59; author itohy; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.12.23.03.10.59; author itohy; state Exp; branches; next ; desc @@ 1.3 log @Added wm category to main Makefile; remove packages that have been moved from x11 to wm; fix paths in packages that depend on the moved ones. @ text @$NetBSD: patch-ab,v 1.2 2000/01/19 07:24:07 itohy Exp $ --- uwm.c.orig Sun Oct 23 22:21:55 1988 +++ uwm.c Wed Jan 19 08:20:54 2000 @@@@ -41,9 +41,18 @@@@ #include "uwm.h" #include +#include + +#ifdef CSRG_BASED +#undef MIN +#undef MAX +#include +#if defined(BSD) && BSD >= 199306 +#define HAVE_MKSTEMP +#endif +#endif #ifdef PROFIL -#include /* * Dummy handler for profiling. */ @@@@ -53,6 +62,27 @@@@ } #endif +#ifdef SIGCHLD +#include +/* + * clear (probably inherited) children which are dead or will die. + */ +clear_children() +{ + int status, pid; + + do { +#ifdef CSRG_BASED + pid = wait3(&status, WNOHANG, (struct rusage *) 0); +#else /* SVR4 */ + pid = waitpid(-1, &status, WNOHANG); +#endif + } while (pid != 0 && pid != -1); + + signal(SIGCHLD, clear_children); +} +#endif + #define gray_width 16 #define gray_height 16 static char gray_bits[] = { @@@@ -115,6 +145,10 @@@@ #ifdef PROFIL signal(SIGTERM, ptrap); #endif +#ifdef SIGCHLD + /* no zombies */ + clear_children(); +#endif /* * Set up internal defaults. @@@@ -369,7 +403,7 @@@@ if (IFontInfo == NULL) { fprintf(stderr, "uwm: Unable to open icon font '%s', using server default.\n", IFontName); - IFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); + IFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); fallbackIFont = True; } PFontInfo = XLoadQueryFont(dpy, PFontName); @@@@ -379,7 +413,7 @@@@ if (fallbackIFont) PFontInfo = IFontInfo; else - PFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); + PFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); fallbackPFont = True; } MFontInfo = XLoadQueryFont(dpy, MFontName); @@@@ -389,7 +423,7 @@@@ if (fallbackIFont || fallbackPFont) MFontInfo = fallbackPFont ? PFontInfo : IFontInfo; else - MFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); + MFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); fallbackMFont = True; } @@@@ -685,7 +719,11 @@@@ */ InitBindings() { +#ifdef HAVE_MKSTEMP + int fd; +#else char *mktemp(); +#endif char *tempfile; /* Temporary filename. */ register FILE *fp; /* Temporary file pointer. */ register char **ptr; /* Default bindings string array pointer. */ @@@@ -699,15 +737,26 @@@@ exit (1); } strcpy (tempfile, TEMPFILE); +#ifdef HAVE_MKSTEMP + if ((fd = mkstemp(tempfile)) < 0 || (fp = fdopen(fd, "r+")) == NULL) { + perror("uwm: cannot create temp file"); + exit(1); + } +#else sfilename = mktemp(tempfile); if ((fp = fopen(tempfile, "w")) == NULL) { perror("uwm: cannot create temp file"); exit(1); } +#endif for (ptr = DefaultBindings; *ptr; ptr++) { fputs(*ptr, fp); fputc('\n', fp); } +#ifdef HAVE_MKSTEMP + rewind(fp); + yyin = fp; +#else fclose(fp); /* @@@@ -717,6 +766,7 @@@@ perror("uwm: cannot open temp file"); exit(1); } +#endif Lineno = 1; yyparse(); fclose(yyin); @ 1.2 log @Recognize children even if feel innocent of. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d4 3 a6 2 +++ uwm.c Thu Dec 23 00:21:02 1999 @@@@ -42,6 +42,15 @@@@ d9 2 a10 1 d19 18 d38 16 d55 10 a64 3 #include /* @@@@ -369,7 +378,7 @@@@ d73 1 a73 1 @@@@ -379,7 +388,7 @@@@ d82 1 a82 1 @@@@ -389,7 +398,7 @@@@ d91 1 a91 1 @@@@ -685,7 +694,11 @@@@ d103 1 a103 1 @@@@ -699,15 +712,26 @@@@ d130 1 a130 1 @@@@ -717,6 +741,7 @@@@ @ 1.1.1.1 log @X11R3 window manager. Simple and small, but the distfile is large.... @ text @@