Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We now figure out if diff accepts -u and we'll use it instead of -c,
[rsync/rsync.git]
/
wildtest.c
diff --git
a/wildtest.c
b/wildtest.c
index
b64d671
..
c90e405
100644
(file)
--- a/
wildtest.c
+++ b/
wildtest.c
@@
-4,7
+4,7
@@
/*#define COMPARE_WITH_FNMATCH*/
/*#define COMPARE_WITH_FNMATCH*/
-#define WILD_TEST_
DEPTH
+#define WILD_TEST_
ITERATIONS
#include "lib/wildmatch.c"
#include "popt.h"
#include "lib/wildmatch.c"
#include "popt.h"
@@
-18,11
+18,11
@@
typedef char bool;
#define false 0
#define true 1
#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 */
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}
};
{0,0,0,0, 0, 0, 0}
};
@@
-52,8
+52,8
@@
ok(int n, const char *text, const char *pattern, bool matches, bool same_as_fnma
n, text, pattern, matches ^ !same_as_fnmatch);
}
#endif
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
}
int
@@
-66,7
+66,9
@@
main(int argc, char **argv)
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
default:
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);
}
}
exit(1);
}
}