I have a lot of "stupid" #define in a project and i want to remove them. Unfortunately, i can't do a simple search&replace, since the #define is parametrized. For example:
#define FHEADGRP( x ) bool _process_grp##x( grp_id_t , unsigned char )
This is used to generate headers of a couple of functions. I would like to somehow do the same thing as the preprocessor does - replace each call of the macro by it's result (with correct parameters inserted. I hope you guys understand what i want to do.
EDIT: I found out that with Visual Studio, one can get the preprocessed intermediate files with the /P option. Unfortunately, this does not help me, since the file is "polluted" with thousands of other lines and with all #defines expanded. I do not want to do this, i just want to expand some of the macros and preferably do it in my IDE (which is Visual Studio). Is there any way how to achieve this?