[Lazarus] CreateRelativePath document error.

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Feb 10 12:32:19 CET 2010


On Tue, 9 Feb 2010 23:05:31 +0200
Juha Manninen <juha.manninen at phnet.fi> wrote:

>[...]
> > The ideprocs version is a simple alias. I will delete it.
> > The codetools and lcl are separate and independent things (by license  
> > and by directory).
> 
> The ideprocs version is an alias to function in codetools/fileprocs which is 
> ALMOST  identical with the LCL fileutils version.

Yes, maybe eventually such functions will go to the a package shared by
the codetools and the LCL.


> I would myself get rid of duplicate code.
> Code reuse is GOOD and duplicated code is BAD.

True.

 
> License difference?
> Other is "modified LGPL" and other is "GNU General Public License".
> They are both free and open source. No big deal...
> :-)

LCL can be used in closed source, codetools not. For some people this
is a big deal.

 
> > ExtractRelativePath works case insensitive, even under Linux.
> > CreateRelativePath expects trimmed filenames. That means no double  
> > slashes '//'. I will change it, so that it also works with untrimmed  
> > filenames.
> 
> Ok.
> There are so many file and file name manipulations functions in different 
> places (RTL, LCL, codetools). I hope they will be unified in future.

Some functions were moved to the RTL. The fpc team can cherry pick
whatever they want.
But there are some big differences: RTL uses system encoding and are
programmed with simple porting in mind, LCL and codetools use UTF8.
codetools are optimized for file searches. IDE has some
file name functions that work in a special way. 
The LCL+codetools functions do not support empty file names and
many treat double pathdelims as one.


Mattias




More information about the Lazarus mailing list