I have a C header file with a number of enumerations defined (i.e. typdef enum {a=1, b, c}). I would like to reuse the same enumerations in my Perl script. I don't want to copy and paste the enums and define them as constants one at a time. Is there a better way? Perhaps a more automated way?
Thanks as always!
P.S. In addition to the enumerations, the header file has a number of other C-style header file things (i.e. preprocessor directives, function prototypes, etc). Hopefully, which ever way is recommended for pulling out the enums would safely ignore these.
In reply to Using C-style .h as constants by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |