Re: * utilvfs.c (is_localized_month): segfault fix
- From: Pavel Tsekov <ptsekov gmx net>
- To: "Andrew V. Samoilov" <andrew email zp ua>
- Cc: mc-devel gnome org
- Subject: Re: * utilvfs.c (is_localized_month): segfault fix
- Date: Fri, 8 Apr 2005 14:37:28 +0300
Hello,
On Fri, 8 Apr 2005, Andrew V. Samoilov wrote:
> Hello,
>
> > + while ((i < 3) && *month && !isdigit (*month) && !iscntrl (*month)
> > + && !ispunct (*month)) {
> >
> >
> > What about changing the above to:
> >
> > while ((i < 3) && *month && isalpha (*month))
>
> There is comment some lines above:
>
> * isalpha() is locale specific, so it cannot be used if current
> * locale is "C" and ftp server use Cyrillic.
Well, iscntrl() and ispunct() are locale specific too. This comment
doesn't really say much - it only indicates that many MC developers use
Cyrillic. Anyway I see your point and the patch is good as is. On the
other hand this code (is_localized_month) is not good enough to match all
- what if the server uses chinese ? Maybe we should alter this code (its
not urgent of course) to correctly handle international characters as per
ftp://ftp.rfc-editor.org/in-notes/rfc2640.txt.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]