Define RCSW_XTABLE_STR

Define Documentation

RCSW_XTABLE_STR(...)

If you have a define like this:

#define myents A,B,C,D,E,F,G,H

Then you can use this macro to generate an array/table of strings like so:

char * foo [] = { RCSW_XTABLE_STR(myents) };

which will result in:

char* foo[] = {"A", "B", "C", "D", "E", "F", "G", "H"}

If you need more than 50 entries in a table, then you can do:

char * foo [] = {
                  RCSW_XTABLE_STR(myents1)
                  RCSW_XTABLE_STR(myents2)
                  RCSW_XTABLE_STR(myents3)
                  ...
                };

in order to get the # of entries you need.