| 1 |
/* { dg-additional-options "-std=gnu89" } */ |
| 2 |
|
| 3 |
typedef enum { FALSE, TRUE } boolean; |
| 4 |
enum _errorTypes { FATAL = 1, WARNING = 2, PERROR = 4 }; |
| 5 |
typedef struct _optionValues { |
| 6 |
struct _include { |
| 7 |
boolean classNames; |
| 8 |
boolean defines; |
| 9 |
boolean enumerators; |
| 10 |
} include; |
| 11 |
} optionValues; |
| 12 |
extern optionValues Option; |
| 13 |
static void applyTagInclusionList( list ) |
| 14 |
const char *const list; |
| 15 |
{ |
| 16 |
boolean mode = TRUE; |
| 17 |
const char *p; |
| 18 |
for (p = list ; *p != '\0' ; ++p) |
| 19 |
switch (*p) |
| 20 |
{ |
| 21 |
case '=': |
| 22 |
clearTagList(); |
| 23 |
mode = TRUE; |
| 24 |
break; |
| 25 |
case '+': mode = TRUE; break; |
| 26 |
case '-': mode = FALSE; break; |
| 27 |
case 'c': Option.include.classNames = mode; break; |
| 28 |
case 'd': Option.include.defines = mode; break; |
| 29 |
case 'e': Option.include.enumerators = mode; break; |
| 30 |
default: error(FATAL, "-i: Invalid tag option '%c'", *p); break; |
| 31 |
} |
| 32 |
} |