I think I would already be happy with a converter which would convert everything except the defines.

Anyway here an idea for the defines:

1. For each define convert it to a constant.

Then try to compile that with free pascal or try parsing it.

If it produces errors then it must be wrong.

2. Then try to convert the define to subroutine call.

Compile/parse it if it fails then it must be wrong.

3. Then try to feed it to pre-processor.

Compile/parse it if it fails then

4. Leave the define unmodified and let the user convert it ;)

Bye,
 Skybuck.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to