From b1dacbed577312f5fa86d9d81aa946276c646167 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Tue, 25 Nov 2003 19:29:13 +0000 Subject: XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks --- startx.cmd | 8 ++-- startx.cpp | 14 +++---- xinit.c | 16 +++++++- xinitrc.cmd | 124 ++++++++++++++++++++++++++++++------------------------------ 4 files changed, 88 insertions(+), 74 deletions(-) diff --git a/startx.cmd b/startx.cmd index 8e40750..4b4e712 100644 --- a/startx.cmd +++ b/startx.cmd @@ -1,5 +1,5 @@ /* OS/2 REXX */ -/* $XFree86: xc/programs/xinit/startx.cmd,v 3.3 1996/10/17 15:23:47 dawes Exp $ +/* $XFree86: xc/programs/xinit/startx.cmd,v 3.4 2003/11/12 00:10:31 dawes Exp $ * * This is just a sample implementation of a slightly less primitive * interface than xinit. It looks for user xinitrc.cmd and xservrc.cmd @@ -31,8 +31,8 @@ END userclientrc = home'\xinitrc.cmd' userserverrc = home'\xservrc.cmd' -sysclientrc = x11root'\XFree86\lib\X11\xinit\xinitrc.cmd' -sysserverrc = x11root'\XFree86\lib\X11\xinit\xservrc.cmd' +sysclientrc = x11root'\usr\X11R6\lib\X11\xinit\xinitrc.cmd' +sysserverrc = x11root'\usr\X11R6\lib\X11\xinit\xservrc.cmd' clientargs = '' serverargs = '' @@ -69,7 +69,7 @@ DO i=1 TO WORDS(all) serverargs = serverargs' 'cur END -xinit = x11root'\XFree86\bin\xinit' +xinit = x11root'\usr\X11R6\bin\xinit' xinit os_shell' /c 'clientargs' -- 'serverargs RETURN diff --git a/startx.cpp b/startx.cpp index 08c0d70..6d9ef3a 100644 --- a/startx.cpp +++ b/startx.cpp @@ -11,7 +11,7 @@ XCOMM and pop a clock and serveral xterms. XCOMM XCOMM Site administrators are STRONGLY urged to write nicer versions. XCOMM -XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.16 2003/01/24 21:30:02 herrb Exp $ +XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.18 2003/08/22 19:27:33 eich Exp $ #ifdef SCO @@ -82,7 +82,7 @@ fi whoseargs="client" while [ x"$1" != x ]; do case "$1" in - # '' required to prevent cpp from treating "/*" as a C comment. + XCOMM '' required to prevent cpp from treating "/*" as a C comment. /''*|\./''*) if [ "$whoseargs" = "client" ]; then if [ x"$clientargs" = x ]; then @@ -105,8 +105,8 @@ while [ x"$1" != x ]; do if [ "$whoseargs" = "client" ]; then clientargs="$clientargs $1" else - # display must be the FIRST server argument - if [ x"$serverargs" = x ] && \ + XCOMM display must be the FIRST server argument + if [ x"$serverargs" = x ] && @@ expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then display="$1" else @@ -120,7 +120,7 @@ done XCOMM process client arguments if [ x"$client" = x ]; then - # if no client arguments either, use rc file instead + XCOMM if no client arguments either, use rc file instead if [ x"$clientargs" = x ]; then client="$defaultclientargs" else @@ -130,7 +130,7 @@ fi XCOMM process server arguments if [ x"$server" = x ]; then - # if no server arguments or display either, use rc file instead + XCOMM if no server arguments or display either, use rc file instead if [ x"$serverargs" = x -a x"$display" = x ]; then server="$defaultserverargs" else @@ -164,7 +164,7 @@ authdisplay=${display:-:0} mcookie=`MK_COOKIE` for displayname in $authdisplay $hostname$authdisplay; do if ! xauth list "$displayname" | grep "$displayname " >/dev/null 2>&1; then - xauth << EOF + xauth -q << EOF add $displayname . $mcookie EOF removelist="$displayname $removelist" diff --git a/xinit.c b/xinit.c index ad6cdc1..62cf248 100644 --- a/xinit.c +++ b/xinit.c @@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xinit/xinit.c,v 3.32 2002/05/31 18:46:13 dawes Exp $ */ +/* $XFree86: xc/programs/xinit/xinit.c,v 3.33 2003/06/10 17:03:56 dawes Exp $ */ #include #include @@ -549,6 +549,9 @@ startServer(char *server[]) #else int old; #endif +#ifdef __UNIXOS2__ + sigset_t pendings; +#endif #if !defined(X_NOT_POSIX) sigemptyset(&mask); @@ -637,6 +640,17 @@ startServer(char *server[]) alarm (15); #ifndef X_NOT_POSIX +#ifdef __UNIXOS2__ + /* + * fg2003/05/06: work around a problem in EMX: sigsuspend() + * does not deliver pending signals when called but when + * returning; so if SIGUSR1 has already been sent by the + * server, we would still have to await SIGALRM + */ + sigemptyset(&pendings); + sigpending(&pendings); + if (!sigismember(&pendings, SIGUSR1)) +#endif /* __UNIXOS2__ */ sigsuspend(&old); alarm (0); sigprocmask(SIG_SETMASK, &old, NULL); diff --git a/xinitrc.cmd b/xinitrc.cmd index 0e746a0..5a3a991 100644 --- a/xinitrc.cmd +++ b/xinitrc.cmd @@ -1,62 +1,62 @@ -/* OS/2 REXX */ -/* $XFree86: xc/programs/xinit/xinitrc.cmd,v 3.5 1997/01/27 08:26:14 dawes Exp $ */ -'@echo off' -env = 'OS2ENVIRONMENT' -x11root = VALUE('X11ROOT',,env) -IF x11root = '' THEN DO - SAY "The environment variable X11ROOT is not set. XFree86/OS2 won't run without it." - EXIT -END -home = VALUE('HOME',,env) -IF home = '' THEN home = x11root - -userresources = home'\.Xresources' -usermodmap = home'\.Xmodmap' -sysresources = x11root'\XFree86\lib\X11\xinit\.Xresources' -sysmodmap = x11root'\XFree86\lib\X11\xinit\.Xmodmap' -xbitmapdir = x11root'\XFree86\include\X11\bitmaps' -manpath = VALUE('MANPATH',,env) - -/* merge in defaults */ -IF exists(sysresources) THEN - 'xrdb -merge 'sysresources - -IF exists(sysmodmap) THEN - 'xmodmap 'sysmodmap - -IF exists(userresources) THEN - 'xrdb -merge 'userresources - -IF exists(usermodmap) THEN - 'xmodmap 'usermodmap - -/* start some nice :-) test programs */ -'xsetroot -bitmap 'xbitmapdir'\xos2' -/* also try out the following ones: - * 'xsetroot -bitmap 'xbitmapdir'\xfree1' - * 'xsetroot -bitmap 'xbitmapdir'\xfree2' - */ - -/****** WARNING! ********* - * Below some programs are started minimized, some are started detached. - * In general, those that spawn other shells are minimized, others may be - * detached. You might be tempted to run the xterm's as well as detached. - * This works, but leaves you with an independent xterm/cmd pair, when the - * server shuts down, which you can only see in watchcat, not the process list. - * If you start and stop x11 multiple times, this will let you run out of - * PTYs, and will lead to a large number of background sessions. - */ -'detach xclock -update 1 -geometry 100x100-1+1' -'start/min/n "Login Xterm" xterm -sb -geometry 80x25+0+0 -name login' -IF manpath \= '' THEN - 'detach xman -geometry 100x100-105+1' -/* 'startx/min/n "Xterm 1" xterm -sb -geometry 80x50+494+51' */ -/* 'startx/min/n "Xterm 2" xterm -sb -geometry 80x20+494-0' */ -'twm' - -EXIT - -exists: -'DIR "'arg(1)'" >nul 2>&1' -if rc = 0 THEN RETURN 1 -RETURN 0 +/* OS/2 REXX */ +/* $XFree86: xc/programs/xinit/xinitrc.cmd,v 3.6 2003/11/12 00:10:31 dawes Exp $ */ +'@echo off' +env = 'OS2ENVIRONMENT' +x11root = VALUE('X11ROOT',,env) +IF x11root = '' THEN DO + SAY "The environment variable X11ROOT is not set. XFree86/OS2 won't run without it." + EXIT +END +home = VALUE('HOME',,env) +IF home = '' THEN home = x11root + +userresources = home'\.Xresources' +usermodmap = home'\.Xmodmap' +sysresources = x11root'\usr\X11R6\lib\X11\xinit\.Xresources' +sysmodmap = x11root'\usr\X11R6\lib\X11\xinit\.Xmodmap' +xbitmapdir = x11root'\usr\X11R6\include\X11\bitmaps' +manpath = VALUE('MANPATH',,env) + +/* merge in defaults */ +IF exists(sysresources) THEN + 'xrdb -merge 'sysresources + +IF exists(sysmodmap) THEN + 'xmodmap 'sysmodmap + +IF exists(userresources) THEN + 'xrdb -merge 'userresources + +IF exists(usermodmap) THEN + 'xmodmap 'usermodmap + +/* start some nice :-) test programs */ +'xsetroot -bitmap 'xbitmapdir'\xos2' +/* also try out the following ones: + * 'xsetroot -bitmap 'xbitmapdir'\xfree1' + * 'xsetroot -bitmap 'xbitmapdir'\xfree2' + */ + +/****** WARNING! ********* + * Below some programs are started minimized, some are started detached. + * In general, those that spawn other shells are minimized, others may be + * detached. You might be tempted to run the xterm's as well as detached. + * This works, but leaves you with an independent xterm/cmd pair, when the + * server shuts down, which you can only see in watchcat, not the process list. + * If you start and stop x11 multiple times, this will let you run out of + * PTYs, and will lead to a large number of background sessions. + */ +'detach xclock -update 1 -geometry 100x100-1+1' +'start/min/n "Login Xterm" xterm -sb -geometry 80x25+0+0 -name login' +IF manpath \= '' THEN + 'detach xman -geometry 100x100-105+1' +/* 'startx/min/n "Xterm 1" xterm -sb -geometry 80x50+494+51' */ +/* 'startx/min/n "Xterm 2" xterm -sb -geometry 80x20+494-0' */ +'twm' + +EXIT + +exists: +'DIR "'arg(1)'" >nul 2>&1' +if rc = 0 THEN RETURN 1 +RETURN 0 -- cgit v1.2.3