[AD] Utility to convert old Allegro names to new... |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi, I have (finally) written a small utility which parses C and C++ source files, replacing old Allegro names with new. It is smart enough to not rename structure members (such as `key'), and it doesn't mess with comments or string literals. Its only real problem is that it doesn't include a C preprocessor, so source files which do complex stuff with the preprocessor will need manual editing. Just for an idea of how reliable it is, in a test run just now I replaced BITMAP with AL_BITMAP in all of the Allegro source, and it compiled with only a minor edit (just *how* convoluted is the preprocessing in al_inline.h???) For instance, to replace all Allegro symbol names in the Allegro source, you would do: ./al_ify */*.c */*/*.c */*.h */*/*.h for file in */*.c */*/*.c */*.h */*/*.h do mv $file.new $file done This shows how simple it would be for people to convert their projects to the new names (of course, they wouldn't need to unless they wanted to, due to those static functions). However, do we still want to go ahead with this renaming? Bye for now, -- Laurence Withers, lwithers@xxxxxxxxxx http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |