OK this is going so sound weird but bear with me, there is a very good reason for wanting to do this...
How is it possible to get the precompiler to generate this...Code:#define PREFIX myfolder/proto_ //this one is defined elsewhere... and will be redefined several times during the app #define MIDDLE http #define SUFFIX .h
If it makes any difference, I'm using gcc (version 4.0.0 20050519 running on Red Hat Linux 4.0.0-8).Code://desired result... #include "myfolder/proto_http.h"
I have fairly strong suspicions that this is not possible without using an external process during the makefile but I wanted to do it all within the C files.
The main problem I'm having is getting around the strictness of the #include directive which won't let you "cat" "strings" "together" "like" "this".
It would save me a huge load of maintenance time if I could get this working because it lets me reduce 99% of a very large switch{} block into about 5 lines in a header file.




Reply With Quote