*/
int option_mandatory;
+ /**
+ * Is the option exclusive?
+ */
+ int option_exclusive;
+
/**
* Handler for the option.
*/
* Marker for the end of the list of options.
*/
#define GNUNET_GETOPT_OPTION_END \
- { '\0', NULL, NULL, NULL, 0, 0, NULL, NULL, NULL }
+ { '\0', NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL }
/**
if (GNUNET_YES == cont)
{
- for (count = 0; NULL != allOptions[count].name; count++)
+ for (count = 0; NULL != allOptions[count].name; count++)
+ {
+ if (allOptions[count].option_exclusive)
+ {
+ FPRINTF (stderr,
+ _("Option `%s' can't be used with other options.\n"),
+ allOptions[count].name);
+ cont = GNUNET_SYSERR;
+ }
+
if ( (0 == seen[count]) &&
(allOptions[count].option_mandatory) )
{
allOptions[count].name);
cont = GNUNET_SYSERR;
}
+ }
}
GNUNET_free (seen);