[Lazarus] Translating a small C program to pascal (on lazarus)
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Sun Feb 25 21:26:45 CET 2018
On 25/02/18 20:00, Carlos E. R. via Lazarus wrote:
> -----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1
>
> Hi,
> I want to translate a little Linux C program (600 lines) to pascal (so
> that I can then add my parts in comfort). I failed to find a good
> automated tool in Linux. I had a look here:
> <http://wiki.freepascal.org/C_to_Pascal>
> I used "OpenC2Pas" but there remains quite a lot to translate.
etc. Presumably the original looks something like
https://github.com/unterwulf/egctl/blob/master/egctl.c
I've just been through a comparable exercise writing a utility to
program a Logitech G600 gamer's mouse, and my suggestion would be to use
Wireshark etc. to get an understanding of the messages going over the
network then to transcribe the bits of the program you need into Pascal
manually.
Assuming that since you're asking on the Lazarus ML you're putting
together a GUI to control the device you probably won't want roughly
half of the original code which is using C-style string operations to
read a configuration file.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list