In our previous episode, Michael Van Canneyt said:
> > I am looking to convert the GNU MPFR library header files, or hire 
> > someone on a bounty to do it if header translation is not so easy with 
> > h2pas and requires lots of hand work, and close checking.
> 
> I do all header translations with h2pas. Most of the time, I run the code
> first through gcc -E, which will take care of all macro magic. Usually h2pas
> has little trouble with the result.

Before everything I do a couple of substs with an editor, then instead of
gcc -E I use small pascal filterprograms to sort the symbols based on
heuristics.  Usually "clean" defines, structs, function calls and "rest".

The clear files I translate by h2pas, the rest manually or with pascal
programs, and then I stitch them together again. I try to preserve comments
as much as possible.

In the past, with very large headers, I did this restitching
semiautomatically, by inserting marker comments while splitting.

I tried all other headerconvertors, and didn't have a better result.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to