[fpc-devel] CompactSysutils part of RTL

Daniël Mantione daniel.mantione at freepascal.org
Mon Oct 15 08:48:20 CEST 2007



Op Mon, 15 Oct 2007, schreef L:

> Hi!
> 
> As some know.. CompactSysutils contains many functions for embedded or CGI
> programmers to use when they don't wish to use full sysutils unit. i.e. anyone
> looking for smaller footprint executable.

 
> I've partly described it here:
> http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=CompactUtils-and-CompactSysutils
> http://z505.com/cgi-bin/powtils/docs/1.6/idx.cgi?file=compactsysutilsnotes
> 
> (Those are long URL's.. sorry, hope they work in mail client)
> 
> I'm sure we can work together to get this unit shipped with FPC..
> RTL or FCL? or wherever FPC team thinks it would be nice.

I'm not in favour of this. Suppose I don't want to use sysutils.

* For inttostr, floattostr I can use val, and str for strtoint, 
  strtofloat.
* strpas, strpcopy and friends I can find in the strings unit
* ansi* in your unit use plain ASCII, so I can just as well use < and > 
  operators
* uppercase/lowercase I can find in the system unit as well. I can use 
  your ones for extended ASCII, but only if I manually initialize the 
  table and single byte character sets only.
* Comparemem, Comparestr has equivalents in the system unit as well.

Basically, 2/3 of this unit is duplicated functionality. Interresting 
functions I cannot get somewhere else are string and path manipulation 
routines like extractfile*, trim*, wraptext.

It would make much more sense to put this functionality in a new unit, then 
make the sysutils ones wrappers over it.
 
Daniël Mantione


More information about the fpc-devel mailing list