Unix Programming - Is there any way / editor to see code after preprocessing

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2005 > Is there any way / editor to see code after preprocessing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Is there any way / editor to see code after preprocessing
bharmaji@gmail.com

2005-11-30, 5:55 pm

Hi
I have to browse source code that has some #defines that are turned on
and others are turned off
i.e code is like this
#ifdef DEFINE1
......<code>
#endif
#ifdef DEFINE2
.....<code>
#endif

When compiling only DEFINE1 is actually defined and as a result code
segment within DEFINE2 is not included.
I want to see only code within DEFINE1 and not within DEFINE2. Is there
a way to see this. One way probably is to use a preprocessor and
generate the source code files after preprocessing. However,
preprocessor(gcc) adds a lot of whitespaces which make browsing the
source code very difficult.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com