From: Eli Zaretskii <eliz@gnu.org>
To: Aleksandar Ristovski <ARistovski@qnx.com>
Cc: gdb-patches@sourceware.org, drow@false.org,
brobecker@adacore.com, RMansfield@qnx.com
Subject: Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path styles
Date: Sat, 05 Jan 2008 14:19:00 -0000 [thread overview]
Message-ID: <uk5mouzhn.fsf@gnu.org> (raw)
In-Reply-To: <2F6320727174C448A52CEB63D85D11F40A4B@nova.ott.qnx.com> (message from Aleksandar Ristovski on Fri, 4 Jan 2008 14:02:30 -0500)
> From: Aleksandar Ristovski <ARistovski@qnx.com>
> Cc: Daniel Jacobowitz <drow@false.org>, Joel Brobecker <brobecker@adacore.com>, Ryan Mansfield <RMansfield@qnx.com>
> Date: Fri, 4 Jan 2008 14:02:30 -0500
>
> +#define IS_DIR_SEPARATOR_X(c) ((c) == '/')
> +#define IS_ABSOLUTE_PATH_X(c) (IS_DIR_SEPARATOR_X((f)[0]))
I think _X is not appropriate here. How about _POSIX?
> +
> +/* Universal macros, to be used on paths that could be either
> + POSIX or DOS. */
What would be the use of these _ANY predicates? We always run on a
platform that is either DOS or Posix, but never both, right?
A minor nit: your ChangeLog entry
2008-01-04 Aleksandar Ristovski <aristovski@qnx.com>
* filenames.h (IS_DIR_SEPARATOR_DOS): New macro.
(IS_ABSOLUTE_PATH_DOS): New macro.
(IS_DIR_SEPARATOR_X): New macro.
(IS_ABSOLUTE_PATH_X): New macro.
(IS_DIR_SEPARATOR_ANY): New macro.
(IS_ABSOLUTE_PATH_ANY): New macro.
has two problems:
. It uses leading spaces instead of a single TAB (maybe due to your
mailer's munging of whitespace).
. You could rewrite it as a much more compact single entry:
2008-01-04 Aleksandar Ristovski <aristovski@qnx.com>
* filenames.h (IS_DIR_SEPARATOR_DOS, IS_ABSOLUTE_PATH_DOS)
(IS_DIR_SEPARATOR_X, IS_ABSOLUTE_PATH_X, IS_DIR_SEPARATOR_ANY)
(IS_ABSOLUTE_PATH_ANY): New macros.
prev parent reply other threads:[~2008-01-05 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 19:03 Aleksandar Ristovski
2008-01-05 14:19 ` Eli Zaretskii [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=uk5mouzhn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=ARistovski@qnx.com \
--cc=RMansfield@qnx.com \
--cc=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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