I\'d like to start a project that involves transforming C code, but I\'d like to include the preprocessor directives. I don\'t want to reinvent th
Take the GNU gcc compiler, the flags required to pre-process the source is gcc -E mysource.c
, see here for further information. As for pretty printing it, there's indent and this explains the usage here, this is a bit old, but nonetheless worthy of mention. There is also cflow that can produce a map of the source.
Sorry if I misunderstood what you're looking for...