public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: cygwin-xfree@cygwin.com
Subject: Re: Cygwin XFree86 startx Problem
Date: Tue, 02 Dec 2003 20:44:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.56.0312021537340.3718@slinky.cs.nyu.edu> (raw)
In-Reply-To: <Pine.GSO.4.56.0311291343460.18719@slinky.cs.nyu.edu>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2663 bytes --]

On Sat, 29 Nov 2003, Igor Pechtchanski wrote:

> On Sat, 22 Nov 2003, Harold L Hunt II wrote:
>
> > Igor,
> >
> > Igor Pechtchanski wrote:
> > > On Fri, 21 Nov 2003, Harold L Hunt II wrote:
> > >
> > >>Igor,
> > >>
> > >>Igor Pechtchanski wrote:
> > >>
> > >>
> > >>>On Fri, 21 Nov 2003, Chan Seng Loong wrote:
> > >>>
> > >>>>hi again...
> > >>>>
> > >>>>Thanks to Mr. Igor Pechtchanski, the "[: Seng: unknown
> > >>>>operand" problem is eleminated with the power of ""
> > >>>>qutoes :-D
> > >>>
> > >>>Good.  Harold, how do you want to go about incorporating the patch?
> > >>
> > >>As you suspected, I think this is actually a generated file.  Granted,
> > >>the input is similar to the output, but it is a different file that
> > >>needs to be patched.  Again, I cannot check this right now.
> > >>
> > >>As far as what to do with the patch, it is hard to say.  Are you just
> > >>asking about how it will get into my next release?  That should be easy.
> > >>  As far as finding it an upstream home, we still have to wait for the
> > >>tree on freedesktop.org to finish being setup.
> > >>
> > >>Harold
> > >
> > > Ok, I'll try to checkout the CVS tree at some point soon and produce this
> > > patch off the correct file.
> >
> > Base the patch off of the SourceForge tree that we have for now:
> >
> > http://sourceforge.net/projects/xoncygwin/
> >
> > That's what I essentially do my builds from, so it should work.
> > Hopefully the file in question is actually in that tree... if not, then
> > just wait until our freedesktop.org tree is ready.
> >
> > Harold
>
> Harold,
>
> The file (startx.cpp) is in xc/programs/xinit, and the xoncygwin tree only
> has xc/programs/Xserver.  Are you going to use the tree on freedesktop.org
> (which is already set up at "xorg") for further builds of the non-server
> parts?  If so, should I use the MAIN branch there, or the XORG-CURRENT
> branch?
>         Igor

Harold,

Here's a patch against the HEAD of the MAIN branch in the xorg tree at
freedesktop.org.  ChangeLog is below.  Let me know if there's a problem.
	Igor
==============================================================================
ChangeLog:
2003-12-02  Igor Pechtchanski  <pechtcha@cs.nyu.edu>
	* xc/programs/xinit/startx.cpp: Make space-friendly.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3085 bytes --]

--- xc/programs/xinit/startx.cpp-orig	2003-12-02 13:10:12.000000000 -0500
+++ xc/programs/xinit/startx.cpp	2003-12-02 13:45:06.566899200 -0500
@@ -48,8 +48,9 @@ fi
 scoclientrc=$HOME/.startxrc
 #endif
 
-userclientrc=$HOME/.xinitrc
-userserverrc=$HOME/.xserverrc
+userclientrc="$HOME/.xinitrc"
+userserverrc="$HOME/.xserverrc"
+/* Note: XINITDIR and BINDIR should be space-free */
 sysclientrc=XINITDIR/xinitrc
 sysserverrc=XINITDIR/xserverrc
 defaultclient=BINDIR/xterm
@@ -64,19 +65,19 @@ if [ -f $scoclientrc ]; then
     defaultclientargs=$scoclientrc
 else
 #endif
-if [ -f $userclientrc ]; then
-    defaultclientargs=$userclientrc
-elif [ -f $sysclientrc ]; then
-    defaultclientargs=$sysclientrc
+if [ -f "$userclientrc" ]; then
+    defaultclientargs="\"$userclientrc\""
+elif [ -f "$sysclientrc" ]; then
+    defaultclientargs="\"$sysclientrc\""
 fi
 #ifdef SCO
 fi
 #endif
 
-if [ -f $userserverrc ]; then
-    defaultserverargs=$userserverrc
-elif [ -f $sysserverrc ]; then
-    defaultserverargs=$sysserverrc
+if [ -f "$userserverrc" ]; then
+    defaultserverargs="\"$userserverrc\""
+elif [ -f "$sysserverrc" ]; then
+    defaultserverargs="\"$sysserverrc\""
 fi
 
 whoseargs="client"
@@ -86,15 +87,15 @@ while [ x"$1" != x ]; do
     /''*|\./''*)
 	if [ "$whoseargs" = "client" ]; then
 	    if [ x"$clientargs" = x ]; then
-		client="$1"
+		client="\"$1\""
 	    else
-		clientargs="$clientargs $1"
+		clientargs="$clientargs \"$1\""
 	    fi
 	else
 	    if [ x"$serverargs" = x ]; then
-		server="$1"
+		server="\"$1\""
 	    else
-		serverargs="$serverargs $1"
+		serverargs="$serverargs \"$1\""
 	    fi
 	fi
 	;;
@@ -103,14 +104,14 @@ while [ x"$1" != x ]; do
 	;;
     *)
 	if [ "$whoseargs" = "client" ]; then
-	    clientargs="$clientargs $1"
+	    clientargs="$clientargs \"$1\""
 	else
 	    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"
+		display="\"$1\""
 	    else
-		serverargs="$serverargs $1"
+		serverargs="$serverargs \"$1\""
 	    fi
 	fi
 	;;
@@ -124,7 +125,7 @@ if [ x"$client" = x ]; then
     if [ x"$clientargs" = x ]; then
 	client="$defaultclientargs"
     else
-	client=$defaultclient
+	client="$defaultclient"
     fi
 fi
 
@@ -134,12 +135,12 @@ if [ x"$server" = x ]; then
     if [ x"$serverargs" = x -a x"$display" = x ]; then
 	server="$defaultserverargs"
     else
-	server=$defaultserver
+	server="$defaultserver"
     fi
 fi
 
 if [ x"$XAUTHORITY" = x ]; then
-    XAUTHORITY=$HOME/.Xauthority
+    XAUTHORITY="$HOME/.Xauthority"
     export XAUTHORITY
 fi
 
@@ -172,9 +173,13 @@ EOF
 done
 #endif
 
-xinit $client $clientargs -- $server $display $serverargs
+XCOMM correctly process quotes, etc
+eval "set -- $client $clientargs -- $server $display $serverargs"
+
+xinit "$@"
 
 if [ x"$removelist" != x ]; then
+    XCOMM Note: this is still not space-friendly!
     xauth remove $removelist
 fi
 

  reply	other threads:[~2003-12-02 20:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-21 19:20 Chan Seng Loong
2003-11-21 19:52 ` Igor Pechtchanski
2003-11-21 20:04   ` Harold L Hunt II
2003-11-22 14:25     ` Igor Pechtchanski
2003-11-22 18:36       ` Harold L Hunt II
2003-11-29 18:57         ` Igor Pechtchanski
2003-12-02 20:44           ` Igor Pechtchanski [this message]
2003-12-03  1:38             ` Harold L Hunt II
  -- strict thread matches above, loose matches on Subject: below --
2003-11-22  2:02 Chan Seng Loong
2003-11-22  3:04 ` David Andersen
2003-11-22  4:40 ` Andrew Markebo
2003-11-22  4:53   ` Robert McNulty Junior
2003-11-22 23:25     ` Igor Pechtchanski
2003-11-24  8:10       ` Hans Dekker
2003-11-24 16:13         ` Igor Pechtchanski
2003-11-20 17:54 Chan Seng Loong
2003-11-20 17:57 ` Harold L Hunt II
2003-11-20 15:26 Henrik Schultz
2003-11-20 15:33 ` Harold L Hunt II
2003-11-20 15:07 Chan Seng Loong
2003-11-20 15:24 ` Harold L Hunt II
2003-11-20 17:30 ` Igor Pechtchanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.56.0312021537340.3718@slinky.cs.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).