From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Mingye Wang <arthur2e5@aosc.io>
Cc: cygwin-patches@cygwin.com
Subject: Re: [PATCH v2] Cygwin: rewrite cmdline parser
Date: Tue, 30 Jun 2020 12:30:40 +0200 [thread overview]
Message-ID: <20200630103040.GC3499@calimero.vinschen.de> (raw)
In-Reply-To: <20200625144315.12388-1-arthur2e5@aosc.io>
Hi Mingye,
On Jun 25 22:43, Mingye Wang wrote:
> This commit rewrites the cmdline parser to achieve the following:
> * MSVCRT compatibility. Except for the single-quote handling (an
> extension for compatibility with old Cygwin), the parser now
> interprets option boundaries exactly like MSVCR since 2008. This fixes
> the issue where our escaping does not work with our own parsing.
> * Clarity. Since globify() is no longer responsible for handling the
> opening and closing of quotes, the code is much simpler.
> * Sanity. The GLOB_NOCHECK flag is removed, so a failed glob correctly
> returns the literal value. Without the change, anything path-like
> would be garbled by globify's escaping.
>
> Some clarifications are made in the documentation for when globs are not
> expanded. A minor change was made to insert_file to remove the memory
> leak with multiple files.
>
> The change fixes two complaints of mine:
> * That cygwin is incompatible with its own escape.[1]
> * That there is no way to echo `C:\"` from win32.[2]
> [1]: https://cygwin.com/pipermail/cygwin/2020-June/245162.html
> [2]: https://cygwin.com/pipermail/cygwin/2019-October/242790.html
>
> (It's never the point to spawn cygwin32 from cygwin64. Consistency
> matters: with yourself always, and with the outside world when you are
> supposed to.)
Apart from the small free() problem, you mention in your reply to self,
this patch looks great at first glance.
Three questions/requests if you don't mind:
- Would you mind to send the corrected version yet?
- A contribution like this still(*) requires the 2-clause BSD waiver per
the winsup/CONTRIBUTORS file, see the chapter "Before you get started"
on https://cygwin.com/contrib.html
- Can you please take a bit of time and try to outline in how far this
change introduces backward compatibility problems with the old code?
I don't mean the obvious bug like the backslash problem, but rather
the question is, what input did something useful before which doesn't
work the same way now? I'd like to get a feeling how much this may
affect existing scripts.
Thanks,
Corinna
(*) IIRC, 2020 is the last year requiring this...
--
Corinna Vinschen
Cygwin Maintainer
prev parent reply other threads:[~2020-06-30 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 22:35 [PATCH] " Mingye Wang
2020-06-25 14:43 ` [PATCH v2] " Mingye Wang
2020-06-25 14:49 ` Mingye Wang
2020-06-30 10:30 ` Corinna Vinschen [this message]
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=20200630103040.GC3499@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=arthur2e5@aosc.io \
--cc=cygwin-patches@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).