From: Azat Khuzhin <a3at.mail@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: set filename-display shortpath support
Date: Mon, 09 Dec 2013 21:25:00 -0000 [thread overview]
Message-ID: <CAG5DWog6o9GA+SronMmeTT6d95d6q_caijqQEC57VGPCwMKpqg@mail.gmail.com> (raw)
In-Reply-To: <83a9gayoez.fsf@gnu.org>
On Mon, Dec 9, 2013 at 8:33 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Azat Khuzhin <a3at.mail@gmail.com>
>> Cc: Azat Khuzhin <a3at.mail@gmail.com>
>> Date: Mon, 9 Dec 2013 13:01:36 +0400
>>
>> Display only non-common part of filename and compilation directory
>
> Thanks.
>
>> + for (;;)
>> + {
>> + size_t min_part_len;
>> +
>> + slash_name = strstr (slash_name, SLASH_STRING);
>> + slash_dir = strstr (slash_dir, SLASH_STRING);
>> + if (slash_name == NULL || slash_dir == NULL)
>> + break;
>
> It is wrong to use SLASH_STRING to search for directory separators;
> that is non-portable. SLASH_STRING is for constructing file names
> from directories and the basename.
>
> To look for directory separators, please use lbasename, ldirname, or
> similar functions, which already know about possible separators on
> each supported platform.
Now i see that SLASH_STRING can have only '/' value.
So I replaced it by IS_DIR_SEPARATOR in v5 patch.
Thanks.
>
>> @@ -2093,9 +2137,11 @@ is not specified, print all substitution rules."),
>> Set how to display filenames."), _("\
>> Show how to display filenames."), _("\
>> filename-display can be:\n\
>> - basename - display only basename of a filename\n\
>> - relative - display a filename relative to the compilation directory\n\
>> - absolute - display an absolute filename\n\
>> + basename - display only basename of a filename\n\
>> + relative - display a filename relative to the compilation directory\n\
>> + absolute - display an absolute filename\n\
>> + shortpath - display only non-common part of filename and compilation \
>> +directory\n\
>
> This should use "filenames", not "a filename", since the option
> affects any displayed file name, not just one of them.
Agree.
>
>> By default, relative filenames are displayed."),
>
> This is ambiguous. I suggest to say "The default is \"relative\"."
I think that this is not part of "shortpath" patch, I can another one to fix it.
>
> Sorry for not paying attention when you first posted the patch.
No problems. Thanks.
--
Respectfully
Azat Khuzhin
next prev parent reply other threads:[~2013-12-09 21:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 9:01 Azat Khuzhin
2013-12-09 16:34 ` Eli Zaretskii
2013-12-09 21:25 ` Azat Khuzhin [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-12-09 9:21 Azat Khuzhin
2013-12-09 8:55 Azat Khuzhin
2013-12-08 21:29 Azat Khuzhin
2013-12-09 8:32 ` Joel Brobecker
2013-12-09 9:02 ` Azat Khuzhin
2013-12-09 13:04 ` Pedro Alves
2013-12-09 13:24 ` Azat Khuzhin
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=CAG5DWog6o9GA+SronMmeTT6d95d6q_caijqQEC57VGPCwMKpqg@mail.gmail.com \
--to=a3at.mail@gmail.com \
--cc=eliz@gnu.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