src/lib/wildcmp.c 1.7

1.7 2009/11/20 19:11:16 angie
Adding more const qualifiers because cart.c needs startsWith and wildMatch to have the same signature (thanks Galt!).
Index: src/lib/wildcmp.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/wildcmp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 4 -r1.6 -r1.7
--- src/lib/wildcmp.c	20 Nov 2009 08:08:26 -0000	1.6
+++ src/lib/wildcmp.c	20 Nov 2009 19:11:16 -0000	1.7
@@ -6,9 +6,9 @@
 #include "common.h"
 
 static char const rcsid[] = "$Id$";
 
-static int subMatch(char *str, char *wild, char single, char multi)
+static int subMatch(const char *str, const char *wild, char single, char multi)
 /* Returns number of characters that match between str and wild up
  * to the next wildcard in wild (or up to end of string.). */
 {
 int len = 0;
@@ -23,9 +23,9 @@
        return len;
     }
 }
 
-boolean anyWild(char *string)
+boolean anyWild(const char *string)
 /* Return TRUE if any wild card characters in string. */
 {
 char c;
 while ((c = *string++) != 0)
@@ -35,9 +35,9 @@
     }
 return FALSE;
 }
 
-static boolean globMatch(char *wildCard, char *string, char single, char multi)
+static boolean globMatch(const char *wildCard, const char *string, char single, char multi)
 /* does a case sensitive wild card match with a string.
  * * matches any string or no character.
  * ? matches any single character.
  * anything else etc must match the character exactly. */
@@ -103,9 +103,9 @@
     ++wildCard;
     }
 }
 
-boolean wildMatch(char *wildCard, char *string)
+boolean wildMatch(const char *wildCard, const char *string)
 /* Match using * and ? wildcards. */
 {
 return globMatch(wildCard, string, '?', '*');
 }