/*#define COMPARE_WITH_FNMATCH*/
-#define WILD_TEST_DEPTH
+#define WILD_TEST_ITERATIONS
#include "lib/wildmatch.c"
#include "popt.h"
#define false 0
#define true 1
-int output_depth = 0;
+int output_iterations = 0;
static struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
- {"depth", 'd', POPT_ARG_NONE, &output_depth, 0, 0, 0},
+ {"iterations", 'i', POPT_ARG_NONE, &output_iterations, 0, 0, 0},
{0,0,0,0, 0, 0, 0}
};
n, text, pattern, matches ^ !same_as_fnmatch);
}
#endif
- if (output_depth)
- printf("[%s] depth = %d\n", pattern, wildmatch_depth);
+ if (output_iterations)
+ printf("[%s] iterations = %d\n", pattern, wildmatch_iteration_count);
}
int
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
default:
- fprintf(stderr, "Unknown option: `%c'\n", opt);
+ fprintf(stderr, "%s: %s\n",
+ poptBadOption(pc, POPT_BADOPTION_NOALIAS),
+ poptStrerror(opt));
exit(1);
}
}