#defines and #ifdefs

Ricardo Montania ricardo at linuxafundo.com.br
Thu Jan 3 11:18:50 PST 2013


Hello people.

I'm writing a python script that helps to find macros and methods which are
defined/implemented but are not in use anywhere.

The script is simple. Your most important purpose is to find these unused
code, and otherwise, help to find where these macros or methods are defined.

For that, I need some help with some definitions..

When we are looking for macros, it's not so simple, a #define code can
exist for an #ifdef, or #ifndef. And in that cases, the script can't say
that the macro is not used, because the system may use it. Or for a common
cause, like #define NAME; "My Name";

If someone can, I like to ask for help with the rules for a #define to be
valid.

By now, the latest version (incomplete but running):
http://pastebin.com/Ta4JJeuF

And of course, you can implement/make it better.

Thank you in advance.

Best Regards, Ricardo.



-- 
Ricardo Montania Prado de Campos
http://www.linuxafundo.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130103/31ec89f0/attachment.html>


More information about the LibreOffice mailing list