string, /* One string per switch. */
positive_int, /* A positive integer. */
floating, /* A floating-point number (double). */
- ignore /* Ignored. */
+ ignore, /* Ignored. */
+ usage_and_exit /* Ignored; exit after processing switches. */
} type;
char *value_ptr; /* Pointer to the value-holding variable. */
{ 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0,
"file", "FILE",
"Read FILE as a makefile" },
+ { 'h', usage_and_exit,
+ 0, 0, 0, 0, 0, 0,
+ "help", 0,
+ "Print this message and exit." },
{ 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0,
"ignore-errors", 0,
"Ignore errors from commands" },
case ignore:
break;
+ case usage_and_exit:
+ bad = 1;
+ break;
+
case flag:
case flag_off:
*(int *) cs->value_ptr = cs->type == flag;