Changed some names since "depth" wasn't really the right term.
authorWayne Davison <wayned@samba.org>
Sat, 5 Jul 2003 19:03:42 +0000 (19:03 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 5 Jul 2003 19:03:42 +0000 (19:03 +0000)
lib/wildmatch.c
wildtest.c

index 1d3f92f..bda50b8 100644 (file)
@@ -19,8 +19,8 @@
 #define ABORT_ALL -1
 #define ABORT_TO_STARSTAR -2
 
 #define ABORT_ALL -1
 #define ABORT_TO_STARSTAR -2
 
-#ifdef WILD_TEST_DEPTH
-int wildmatch_depth;
+#ifdef WILD_TEST_ITERATIONS
+int wildmatch_iteration_count;
 #endif
 
 static int domatch(const char *p, const char *text)
 #endif
 
 static int domatch(const char *p, const char *text)
@@ -28,8 +28,8 @@ static int domatch(const char *p, const char *text)
     int matched, special;
     char ch, prev;
 
     int matched, special;
     char ch, prev;
 
-#ifdef WILD_TEST_DEPTH
-    wildmatch_depth++;
+#ifdef WILD_TEST_ITERATIONS
+    wildmatch_iteration_count++;
 #endif
 
     for ( ; (ch = *p) != '\0'; text++, p++) {
 #endif
 
     for ( ; (ch = *p) != '\0'; text++, p++) {
@@ -108,8 +108,8 @@ static int domatch(const char *p, const char *text)
 
 int wildmatch(const char *p, const char *text)
 {
 
 int wildmatch(const char *p, const char *text)
 {
-#ifdef WILD_TEST_DEPTH
-    wildmatch_depth = 0;
+#ifdef WILD_TEST_ITERATIONS
+    wildmatch_iteration_count = 0;
 #endif
     return domatch(p, text) == TRUE;
 }
 #endif
     return domatch(p, text) == TRUE;
 }
index b64d671..c7aa58d 100644 (file)
@@ -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},
+  {"count",          'c', 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