[fpc-devel] Interface to compressed files and archives
Michael.VanCanneyt at Wisa.be
Michael.VanCanneyt at Wisa.be
Thu Dec 30 11:54:39 CET 2004
On Thu, 30 Dec 2004, DrDiettrich wrote:
I split up my answers to your mail, because the topics are a bit different.
> Now you should have gotten the big picture of my intended activities.
> Many more questions will arise when I proceed with my work. I already
> decided to replace my own "stdc" unit by the FPC "libc" unit, with
> hopefully no changes to that unit.
None other than bugfixes will be accepted: libc is the interface to
the real C library (glibc) on Linux. The interface is therefore fixed
and not subject to change, unless libc changes.
You must explain what you want:
+ An interface to libc
- then the libc is OK for you.
+ An imitation of libc (on unix)
- then you should do as marco implied: use Unix/BaseUnix
+ An imitation of libc (general)
- then you must implement a new unit, the above ones are for Unices only.
+ A cross-platform uniform pascal API
- Then you should stick to sysutils/strutils/dateutils etc.
> For further compatibility it will be
> necessary to find compromises between my coding style, and the style
> used by the FPC community. E.g. I prefer to prefix all my units with an
> "u", so that the base names remain available for procedures or
> variables. I also use upper case characters in the unit names, what may
> not be appreciated by users from the Unix world. As a compromise it may
> be possible to use a "lib" prefix, but this may conflict with existing
> library names (libz...). Any ideas?
You can name the unit identifier with uppercase characters, but not
the filename. Filenames lowercase only, please.
As for prefixes: for a compression/decompression set of units, I would
use dc or cd as prefix. If it is 'archiving' in general, 'ar' seems best
suited. And if you want a 'virtual file system', use vfs.
Just don't use anything conflicting with other prefixes: lib, z, db, im, sys.
If we can agree on an implementation for archive handling that can be
considered a standard implementation for FPC (i.e. distributed with the
FCL), 'fp' can (and should) be used.
Naming a unit with 'u' standard does not seem useful to me, but this is
a matter of taste. In general, in Delphi, I use only 4 fixed prefixes:
fra for Frames
frm for Forms
dm for DataModules
mgr for Manager classes.
All other files are assumed to be units.
(projects/packages have distinct extensions anyway)
Michael.
More information about the fpc-devel
mailing list