Re: vfs.c Could not parse

2001-10-07 Thread Pavel Roskin

Hi, Pavel!

  Some time ago we discussed this.  Then extended ftpfs URL with
  locale specifiacation was proposed.  But it does not cure if you
  have not required locale installed on your system.

 what about checking its three letters and if so, return ok but set date
 to 1970-01-01 to indicate date  is wrong?

Sound good to me.  Letters should mean any ASCII letter or any character
between 160 and 255.

-- 
Regards,
Pavel Roskin


___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: vfs.c Could not parse

2001-10-07 Thread Pavel Machek

Hi!

   what about checking its three letters and if so, return ok but set date
   to 1970-01-01 to indicate date  is wrong?
  
  Sound good to me.  Letters should mean any ASCII letter or any character
  between 160 and 255.
 
  
 And is it defined anywhere, that months names should be only 3 chars long?
 I'm afraid that standart is more flexible in this...

There's no standard. Sorry. Check for 3 chars, see what breaks.
Pavel
-- 
I'm [EMAIL PROTECTED] In my country we have almost anarchy and I don't care.
Panos Katsaloulis describing me w.r.t. patents at [EMAIL PROTECTED]

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: vfs.c Could not parse

2001-10-07 Thread Timur I. Bakeyev

On Sun, Oct 07, 2001 at 05:06:18AM -0400, Pavel Roskin wrote:
 
  what about checking its three letters and if so, return ok but set date
  to 1970-01-01 to indicate date  is wrong?
 
 Sound good to me.  Letters should mean any ASCII letter or any character
 between 160 and 255.

 
And is it defined anywhere, that months names should be only 3 chars long?
I'm afraid that standart is more flexible in this...

The second question is that ls on different platforms can produse much more
fields, than expected...

Unfortunately, I can't find any examples just now, but sure, they exist:)

With regards,
Timur.

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: vfs.c Could not parse

2001-10-06 Thread Pavel Machek

Hi!

  This FTP server outputs the file dates with Frech format:
 
  150 ASCII data connection for /bin/ls (139.54.66.187,1071) (0 bytes).
  total 15740
  drwxr-xr-x   6 root other512 sep  26 16:52 .
  drwxr-xr-x   3 root other512 sep  25 14:43 ..
  drwxr-xr-x  13 root other512 sep  26 15:23 apache
  drwxrwsr-x  28 root bin 1024 f.v   8  2001 ghost
  drwxr-xr-x   5 999  999  512 nov  27  2000 perl560
  drwxr-xr-x   9 999  999  512 nov   3  2000 tomcat
  -rw-r--r--   1 root other8042496 sep  26 16:51 TOMCAT.03.01.sol.tar
  226 ASCII Transfer complete.
 
  The table in
  static int
  is_month (char *str, struct tm *tim)
  {
  static char *month = JanFebMarAprMayJunJulAugSepOctNovDec;
 
  is obviously an English table, and is good for most servers.
  what can we do ?
 
 Some time ago we discussed this.  Then extended ftpfs URL with
 locale specifiacation was proposed.  But it does not cure if you
 have not required locale installed on your system.

what about checking its three letters and if so, return ok but set date
to 1970-01-01 to indicate date  is wrong?

-- 
Philips Velo 1: 1x4x8, 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: vfs.c Could not parse

2001-09-28 Thread Christian Gennerat

Andrew V. Samoilov a écrit :

  The table in
  static int
  is_month (char *str, struct tm *tim)
  {
  static char *month = JanFebMarAprMayJunJulAugSepOctNovDec;
 
  is obviously an English table, and is good for most servers.

 Some time ago we discussed this.  Then extended ftpfs URL with
 locale specifiacation was proposed.  But it does not cure if you
 have not required locale installed on your system.

 Another way is to add possibility learn ftpfs about such locales.
 But it seems noone in the team has wish and time (in such order)
 to implement this feature.

Is there something about this in the FTP spec ?
I have solved the problem by commenting the line
#LC_TIME=fr.ISO8859-15
in the solaris machine (general environment).

I looked in my linux box:
When I do ls -la in a console, I have the french date
When ProFTP does ls -la, it prints the international date.
So I think that Solaris FTP has to do:
setenv LC_ALL=C; ls -la $dir

It is easier to do than a code like this in vfs.c
/* Month name */
if(is_month(p, tim)
#IFDEF ACCEPT_TIME_FR
 ||is_month_fr(p, tim)
#ENDIF
#IFDEF ACCEPT_TIME_RU
 ||is_month_ru(p, tim)
#ENDIF
){

and it can be very long...
and is_month_fr will accept jan fév mars avr mai juin juil
on some locales (Solaris), or jan fév mar avr mai jun jul
on others.





___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: vfs.c Could not parse

2001-09-28 Thread Andrew V. Samoilov

Christian Gennerat wrote:

 Andrew V. Samoilov a .crit :

   The table in
   static int
   is_month (char *str, struct tm *tim)
   {
   static char *month = JanFebMarAprMayJunJulAugSepOctNovDec;
  
   is obviously an English table, and is good for most servers.
 
  Some time ago we discussed this.  Then extended ftpfs URL with
  locale specifiacation was proposed.  But it does not cure if you
  have not required locale installed on your system.
 
  Another way is to add possibility learn ftpfs about such locales.
  But it seems noone in the team has wish and time (in such order)
  to implement this feature.

 Is there something about this in the FTP spec ?


No. And it is a root of many problems.

 I have solved the problem by commenting the line
 #LC_TIME=fr.ISO8859-15
 in the solaris machine (general environment).

Not all of us is system administrators.  And as a rule I had such
problems with ftp servers in other countries.



 I looked in my linux box:
 When I do ls -la in a console, I have the french date
 When ProFTP does ls -la, it prints the international date.
 So I think that Solaris FTP has to do:
 setenv LC_ALL=C; ls -la $dir

No, ftpd/inetd must be invoked with English/C/POSIX locale.


 It is easier to do than a code like this in vfs.c
 /* Month name */
 if(is_month(p, tim)
 #IFDEF ACCEPT_TIME_FR
  ||is_month_fr(p, tim)
 #ENDIF
 #IFDEF ACCEPT_TIME_RU
  ||is_month_ru(p, tim)
 #ENDIF
 ){

 and it can be very long...


No, I suggest to initialize month/day string/array with
appropriative localized months/days on each non-english ftpfs
connection. And is_month can accept this string/array as
second parameter.


 and is_month_fr will accept jan f.v mars avr mai juin juil
 on some locales (Solaris), or jan f.v mar avr mai jun jul
 on others.

I think month names must be 3 character long.

Regards,
Andrew.



___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



vfs.c Could not parse

2001-09-27 Thread Christian Gennerat

220 xxx FTP server (SunOS 5.7) ready.

This FTP server outputs the file dates with Frech format:

150 ASCII data connection for /bin/ls (139.54.66.187,1071) (0 bytes).
total 15740
drwxr-xr-x   6 root other512 sep  26 16:52 .
drwxr-xr-x   3 root other512 sep  25 14:43 ..
drwxr-xr-x  13 root other512 sep  26 15:23 apache
drwxrwsr-x  28 root bin 1024 fév   8  2001 ghost
drwxr-xr-x   5 999  999  512 nov  27  2000 perl560
drwxr-xr-x   9 999  999  512 nov   3  2000 tomcat
-rw-r--r--   1 root other8042496 sep  26 16:51 TOMCAT.03.01.sol.tar
226 ASCII Transfer complete.

The table in
static int
is_month (char *str, struct tm *tim)
{
static char *month = JanFebMarAprMayJunJulAugSepOctNovDec;

is obviously an English table, and is good for most servers.
what can we do ?


___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel