[fpc-pascal] the libc unit (again)
ik
idokan at gmail.com
Sat Feb 23 14:25:05 CET 2008
On Sat, Feb 23, 2008 at 2:26 PM, Giuliano Colla
<giuliano.colla at fastwebnet.it> wrote:
> Marco van de Voort ha scritto:
>
> >>> Hello,
> >>>
> >>> I find more and more units and components (for Lazarus) that are using
> >>> the libc unit. I find it really problematic, because it doesn't exists
> >>> for all platforms and architectures, so why not markring the unit as
> >>> obsolete for the next FPC release so other developers will have to
> >>> work with more flexible units ?
> >> Other users will start to submit bug reports that there is no Libc unit.
> >> We clearly state that libc is only for compatibility and not for portability. The same is with the
> >> old TP7 units.
> >
> > We could mark all functions in libc with deprecated. The questions keep
> > coming back. Harsh, but IMHO the only sane way.
>
> What would be of great help is concise guide on how migrate of the libc
> functionalities (a wiki page?). I'm porting to fpc Kylix projects which
> used libc. Reading this mailing list I realized that libc wasn't the way
> to go, but I had a hell of a time to discover the equivalents, scattered
> in SysUtils, Unix, UnixUtils,BaseUnix, sometimes with different names,
> different parameters, etc.
>
> Sort of:
> libc.getenv -> SysUtils.GetEnvironmentVariable
>
> Someone with a good knowledge of fpc should be able to do it in a short
> time.
I usually use grep when I require to find things. I personally do not
understand why the unix units contain function names with the prefix
of Fp, but it does not matter, because the name remains, so I do
something like
grep -in functionname ./location/* -R | grep -v "something I do not
wish to be included"
And I find what/where what I wish to have is located... It's good btw
for anything you do not remember/know where/how it is located ...
>
> Giuliano
>
> --
> Giuliano Colla
>
> Whenever people agree with me, I always feel I must be wrong (O. Wilde)
>
>
Ido
--
http://ik.homelinux.org/
More information about the fpc-pascal
mailing list