Sorry for not responding to this earlier, I just missed it.
In m4 I simply created some sort of preprocessor that renamed variables to have some sort of prefix depending on namespace. I haven't used this for a good while because then I have the issue that MSVC doesn't support other modern C99 things that I consider basic unless you compile in C++ mode, thus negating this. At work I need MSVC compatibility...
Hope you get to read this.
If I were to do this again today, I'd use OMeta. Give it a look, it's dead simple if you have the time to read through it.
In m4 I simply created some sort of preprocessor that renamed variables to have some sort of prefix depending on namespace. I haven't used this for a good while because then I have the issue that MSVC doesn't support other modern C99 things that I consider basic unless you compile in C++ mode, thus negating this. At work I need MSVC compatibility...
Hope you get to read this.
If I were to do this again today, I'd use OMeta. Give it a look, it's dead simple if you have the time to read through it.