Re: new VFS directory listing parser
- From: Pavel Tsekov <ptsekov gmx net>
- To: Roland Illig <roland illig gmx de>
- Cc: MC development <mc-devel gnome org>, Leonard den Ottolander <leonard den ottolander nl>
- Subject: Re: new VFS directory listing parser
- Date: Wed, 28 Sep 2005 15:28:21 +0300
On Wed, 28 Sep 2005, Roland Illig wrote:
> After I had rewritten vfs_parse_filetype and vfs_parse_fileperms (see
> utilvfs.c), I found the interface of these functions general enough so
> that it could be extended to the whole parsing of directory listings. I
> think one benefit of my code is that you can use all the parsing
> functions the same way. If you have used any of them, you know how to
> use all others. This has not been the case with the old code.
>
> My code makes it easy to add support for other file listing types, as
> every component of a listing line (filemode, size_or_rdev, filedate,
> uid, gid) has its own parsing function. If you look at the code of
> vfs_parse_unix_line(), this should become very clear.
>
> I also didn't like the function names. I expect that a function called
> is_year(...) does not modify its parameters (see the Java Coding
> Conventions). Most functions also used sscanf() for parsing, which is
> inappropriate, as sscanf("%d", "123XXXXXXXXXXXXXXX", &n) will return
> 123, although "123XXXXXXXXXXXXX" does not represent a number.
I am wondering - since your code is so good why do you post it to the
list ? Go ahead and check it in . After all you have shown so many times
that you completly ignore other peoples opinion when it comes to code that
you LIKE.
> And yes, I have dropped that assumption. I have started to collect
> example listing from some FTP servers, but they are still too few. I
> will also examine the Indy FTP code (see http://www.indyproject.org/),
> which has some more examples.
Of course you always use the most popular software as a starting point.
What was that other file manager - Servant Salamander.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]