SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

This package contains the File Collector's Universal Listing Tool (F-CULT from now on) program source code, documentation and other necessary files.

What is it?

It's a flexible file list creator/modifier/viewer capable of many kinds of things with the lists it handles. It can use either a directory or a list earlier created from a directory as its input, and it can also read a list file from stdin. The list formats it understands are those of the M$ Windoze based file listers SuperLister 1.x, SuperLister 2.x (these two together are called SL from now on) and DeltaDir 2.x (DD from now on); SLD, SLX and DDD.

Who wants/needs it?

If you like to collect files of a specific type, like midis, mods, mp3s, txt's, jpeg's, whatever, you might want to share your files with your online friends and also have them share their files with you. If you and your friend don't have very many files, you could simply ask her to tell you what she has by e-mail and see which of her files you're missing, then ask her to send you the files as e-mail attachments. On the other hand, if you have hundreds or even thousands of files, this method becomes unpractical. You need to automate the process somehow. This is where F-CULT comes in.
With F-CULT, you ask her to send you her F-CULT-created list, XOR (compare) it with your own, browse the resulting list, tag the files you want and hit D twice on the F-CULT browser to download them from her FTP server.

Advantages over SL/DD

  • Works on Linux and is probably quite easy to port to other platforms.
  • Its flexible and error-resistant list handling and various options to customize its behavior and what goes onto the output list gives the user more freedom to do what he wants.
  • Support for GZIP, BZIP2 and (PK)ZIP on both input and output and Compress on input only.
  • And, of course, F-CULT is Open Source Software/FREE/GPL-licensed.

Incompatibilities between F-CULT and SL/DD

Common

  • Program name and version in list headers is changed.
  • Probably many other things due to the differences between Linux and Windoze, e.g. F-CULT is case-sensitive (FILE != file) when comparing file entries, unless you explicitly ask it not to (--ignore-case).

SL 1.x (.sld)

  • File suffix filter list format in the header is probably different.

SL 2.x (.slx)

  • The time format seems to be different. There're 9 digits in the .slx time field, just like in the internal Linux time representation but it can't be the same because the file time numbers in .slx's are much smaller than they'd be on the Linux time format.
  • Probably a lot more, the .slx file format is undocumented.

DD

  • For F-CULT lists the [Set] field contains every dir on the list, which I don't think is the same as with lists created by DD.
  • Probably a lot more, I don't have any docs for DD.

Restrictions

  • Maximum total number of directories is 16,384.
  • Maximum number of files in one category is 16,384. A small explanation of categories might be in place here; File entry structs are stored in a 3-dimensional array, one dimension of directories, one of categories inside a dir and one of files inside a category. The category in which a file goes is defined by the first character of its name. There's 1 category for each lower-case and one for each upper-case letter, one for numbers 0-9 and one for all the other characters. Thus, there are 54 (2*26+1+1) categories. So, while it's possible that F-CULT will error and quit if you have 16k files with the same first letter of name in one dir, you can also have 864k files in one dir if they're evenly distributed in the categories. However, even 16k files is enough to make a dir practically unusable (just ls'ing such a dir takes a couple minutes on my box :)

Portability issues

  • I've tested F-CULT on my own Debian/GNU box (kernel 2.x.x, gcc 2.9* etc.), a RedHat box at school, a SunOS 5.6 system, a HP-UX 11.00 system, M$-D0S 6.*/7.0 and DOSEMU. Works on the Linux boxen and D0S, but not yet on the other Unices.
  • Most non-compatible things have been #ifdef'd, e.g. getopt_long(), libncurses and system header file #include's.
  • If the alphabet in your charset aren't in a continuous sequence, the behavior of all category-related things is undefined (are there any systems like this around?)
  • All malloc()'s allocate 64k or less of memory at once (last time I checked, which was a while ago, so don't count on this 100%), so at least this should be fairly compatible. Also, a custom xmalloc() is used to wrap the standard malloc() and detect errors from it.
  • Probably a lot more, I really have don't have much experience of any other systems.

Requirements for configuration and compilation

Linux

  • The usual stuff (gcc, libc-dev...)
  • ncurses development package if you want the browser

M$-D0S

Requirements for running

Linux

  • ncurses runtime package if you want to use the browser

M$-D0S

  • A DPMI server (e.g. CWSDPMI or Windoze).

M$-D0S notes

  • Don't expect anything to work as it is documented, F-CULT is primarily meant for Linux and the MS-DOS port is more like a nice addition.
  • The browser doesn't work since ncurses isn't ported to M$-D0S (yet).
  • Long options don't work (there's no getopt_long() in DJGPP's libc).
  • The number of bytes F-CULT shows after reading a file is exactly as much less than the actual file size as there are lines in the file. This is because fread() translates CR/LF (carriage return/line feed) pairs (2 bytes) into LF's (1 byte). This only happens with D0S-format lists.
  • The second letter of my last name is supposed to look like an umlauted 'a' (i.e. two dots on top of it). Linux uses ISO-8859-1 charset (the so-called ISO-Latin-1 charset(?)) which is supposed to be the same as Windoze's but different from D0S' codepage/charset/whatever so you'll probably see it incorrectly in D0S.

To get more info, read the source. It's not well-commented but you'll get a general idea of what it does if you know a bit of C.

Acknowledgements and copyrights

  • Windoze, M$ Windoze and M$-D0S are not trademarks of anyone or anything, as far as I know.
  • All other names of products may or may not be trademarks and/or registered trademarks of their respective owners; however, I make no claim of ownership with these products or their names.
  • As of January 2001, this program or any of its preceding versions may be used under the terms of the GNU General Public License, which should be included as the file COPYING in this package.

Lauri Hästholm

laurijh@iname.com

http://www.evitech.fi/~laurijh


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.