X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=eglib%2Fsrc%2Fgpattern.c;h=84861412e8ae05ac67fd6e84b39bd4ee68ab26a6;hb=65cddd77277c10822805b108e833603992f4e03d;hp=d8e0b791b5458939a9e3a1bfcd277fb8cf6845a5;hpb=b5cfba1835f2ba823796f825410e0062b7e4c9a3;p=mono.git diff --git a/eglib/src/gpattern.c b/eglib/src/gpattern.c index d8e0b791b54..84861412e8a 100644 --- a/eglib/src/gpattern.c +++ b/eglib/src/gpattern.c @@ -28,14 +28,17 @@ #include #include #include -#include #include +#ifndef _MSC_VER +#include +#endif typedef enum { MATCH_LITERAL, MATCH_ANYCHAR, MATCH_ANYTHING, - MATCH_ANYTHING_END + MATCH_ANYTHING_END, + MATCH_INVALID = -1 } MatchType; typedef struct { @@ -51,10 +54,10 @@ static GSList * compile_pattern (const gchar *pattern) { GSList *list; - gint i, len; + size_t i, len; PData *data; gchar c; - MatchType last = -1; + MatchType last = MATCH_INVALID; GString *str; gboolean free_str; @@ -155,9 +158,9 @@ g_pattern_spec_free (GPatternSpec *pspec) } static gboolean -match_string (GSList *list, const gchar *str, gint idx, gint max) +match_string (GSList *list, const gchar *str, size_t idx, size_t max) { - gint len; + size_t len; while (list && idx < max) { PData *data = (PData *) list->data; @@ -207,3 +210,4 @@ g_pattern_match_string (GPatternSpec *pspec, const gchar *string) return match_string (pspec->pattern, string, 0, strlen (string)); } +