Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: brobecker@ACT-Europe.FR
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] xfullpath and new regression test xfullpath.exp
Date: Thu, 04 Apr 2002 23:44:00 -0000	[thread overview]
Message-ID: <5567-Fri05Apr2002104019+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <20020403151909.I26661@act-europe.fr> (message from Joel Brobecker on Wed, 3 Apr 2002 15:19:09 +0200)

> Date: Wed, 3 Apr 2002 15:19:09 +0200
> From: Joel Brobecker <brobecker@ACT-Europe.FR>
> 
> > >    if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1]))
> > >      result = concat (real_path, base_name, NULL);
> > >    else
> > >      result = concat (real_path, SLASH_STRING, base_name, NULL);
> > 
> > Yes, I think this is better, thanks.
> > 
> > > (can I consider that SLASH_STRING will always be one character long?):
> > 
> > Where does the code assume it's a single character?  `concat' conses
> > up a new string, right?  If so, the length of SLASH_STRING shouldn't
> > matter, I think.  Or am I missing something?
> 
> I implicitely make this assumption when I use the IS_DIR_SEPARATOR
> macro to check the value of the last character in the real_path string,
> and then use SLASH_STRING during the concat.

You don't need to worry about that: it's IS_DIR_SEPARATOR's job to
DTRT for each platform, even if the directory separator is not a
single character.

> If all is fine, I'll resubmit a new patch shortly.

Please do.  Thanks.


  reply	other threads:[~2002-04-05  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-01  0:50 Joel Brobecker
2002-04-01  1:43 ` Eli Zaretskii
2002-04-02  7:22   ` Joel Brobecker
2002-04-03  5:12     ` Eli Zaretskii
2002-04-03  5:19       ` Joel Brobecker
2002-04-04 23:44         ` Eli Zaretskii [this message]
2002-04-03 20:43 ` Andrew Cagney

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=5567-Fri05Apr2002104019+0300-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=brobecker@ACT-Europe.FR \
    --cc=gdb-patches@sources.redhat.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