+ verifyShortOption(argv[*pi]);
+
+ (*(int *)optionsTable[i].pparameter)++;
+
+ return TRUE;
+ }
+ }
+ else
+ {
+ size_t len = optionsTable[i].longOpt ? strlen (optionsTable[i].longOpt) : 0;
+
+ if (longOpt &&
+ (optionsTable[i].arg_type != CLAT_BOOLEAN ||
+ (optionsTable[i].arg_type == CLAT_BOOLEAN && len == strlen (longOpt) && optionsTable[i].longOpt)) &&
+ strncmp (optionsTable[i].longOpt, longOpt, len) == 0)
+ {
+ /* If it is a flag then we can handle it here */
+ if (optionsTable[i].pparameter != NULL)
+ {
+ switch (optionsTable[i].arg_type)
+ {
+ case CLAT_BOOLEAN:
+ (*(int *)optionsTable[i].pparameter)++;
+ break;
+
+ case CLAT_INTEGER:
+ *(int *)optionsTable[i].pparameter = getIntArg (optionsTable[i].longOpt, argv, pi, argc);
+ break;
+
+ case CLAT_STRING:
+ if (*(char **)optionsTable[i].pparameter)
+ Safe_free(*(char **)optionsTable[i].pparameter);
+ *(char **)optionsTable[i].pparameter = Safe_strdup (getStringArg (optionsTable[i].longOpt, argv, pi, argc));
+ break;
+
+ case CLAT_SET:
+ if (*(set **)optionsTable[i].pparameter)
+ {
+ deleteSet ((set **)optionsTable[i].pparameter);
+ }
+ setParseWithComma ((set **)optionsTable[i].pparameter, getStringArg (optionsTable[i].longOpt, argv, pi, argc));
+ break;
+
+ case CLAT_ADD_SET:
+ addSet((set **)optionsTable[i].pparameter, Safe_strdup (getStringArg (optionsTable[i].longOpt, argv, pi, argc)));
+ break;
+ }
+ return TRUE;
+ }
+ else