Delphi converter in Lazarus trunk now supports also replacement of function calls. It is all configurable and user changes to the configuration are persistent. The converter settings window has a button "Function Replacements" for it. The syntax is:
ShellExecute --> OpenURL($3) which means a call to ShellExecute is replaced with OpenURL and the third parameter from the original call is used for the new call. In this case the other params are ignored but there can be any number of comma separated params defined. I have only a few (6) default replacements defined now. There are some file funcs like: CreateFile --> FileCreate($1) where the params may not match. There will be a ToDo: comment inserted after the replacement about the parameter types. Then there is FileExists --> FileExistsUTF8($1) The idea is to add all file name related functions that have a ...UTF8 counterpart, and make their replacement optional somehow. Now I would need more function names and parameters to replace. Other comments are welcome, too. Juha -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
