Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kai Tietz <ktietz@redhat.com>
Cc: mingw.android@gmail.com, gcc-patches@gcc.gnu.org,
	ktietz70@gmail.com, binutils@sourceware.org,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Windows libibery: Don't quote args unnecessarily
Date: Sun, 20 Apr 2014 06:07:00 -0000	[thread overview]
Message-ID: <83vbu4fs9w.fsf@gnu.org> (raw)
In-Reply-To: <1826621422.9537772.1397939013891.JavaMail.zimbra@redhat.com>

> Date: Sat, 19 Apr 2014 16:23:33 -0400 (EDT)
> From: Kai Tietz <ktietz@redhat.com>
> Cc: gcc-patches@gcc.gnu.org, ktietz70@gmail.com,        "binutils@sourceware.org Development" <binutils@sourceware.org>,        gdb-patches@sourceware.org
> 
> > +      /* We only quote arguments that contain spaces, \n \t \v or " characters
> > +	 to prevent wasting 2 chars per argument of the CreateProcess 32k char
> > +	 limit We need only escape embedded double-quotes and immediately
> >  	 preceeding backslash characters.  A sequence of backslach characters
> >  	 that is not follwed by a double quote character will not be
> >  	 escaped.  */
> > +      needs_quotes = 0;
> >        for (j = 0; argv[i][j]; j++)
> >  	{
> > +	  if (argv[i][j] == ' '  || argv[i][j] == '\n' ||
> > +	      argv[i][j] == '\t' || argv[i][j] == '"' )
> > +	    {
> Here seems to be an intend issue.
> > +	      needs_quotes = 1;
> > +	    }

I think you can omit the \n case, since command arguments on Windows
cannot possibly include newlines.  Also, the comment speaks about \v,
but I see no code to handle that (and am not sure you should bother in
that case as well).

> Patch itself makes sense.

Yes, I agree.


  reply	other threads:[~2014-04-20  6:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1397936424-2290-1-git-send-email-mingw.android@gmail.com>
     [not found] ` <1397936424-2290-2-git-send-email-mingw.android@gmail.com>
2014-04-19 20:23   ` Kai Tietz
2014-04-20  6:07     ` Eli Zaretskii [this message]
2014-04-21 14:53     ` Joel Brobecker

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=83vbu4fs9w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=binutils@sourceware.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=ktietz70@gmail.com \
    --cc=ktietz@redhat.com \
    --cc=mingw.android@gmail.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