projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sgen] Remove skip_size in sgen-scan-object.h.
[mono.git]
/
eglib
/
src
/
gpattern.c
diff --git
a/eglib/src/gpattern.c
b/eglib/src/gpattern.c
index d8e0b791b5458939a9e3a1bfcd277fb8cf6845a5..84861412e8ae05ac67fd6e84b39bd4ee68ab26a6 100644
(file)
--- a/
eglib/src/gpattern.c
+++ b/
eglib/src/gpattern.c
@@
-28,14
+28,17
@@
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
#include <errno.h>
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
typedef enum {
MATCH_LITERAL,
MATCH_ANYCHAR,
MATCH_ANYTHING,
typedef enum {
MATCH_LITERAL,
MATCH_ANYCHAR,
MATCH_ANYTHING,
- MATCH_ANYTHING_END
+ MATCH_ANYTHING_END,
+ MATCH_INVALID = -1
} MatchType;
typedef struct {
} MatchType;
typedef struct {
@@
-51,10
+54,10
@@
static GSList *
compile_pattern (const gchar *pattern)
{
GSList *list;
compile_pattern (const gchar *pattern)
{
GSList *list;
-
gin
t i, len;
+
size_
t i, len;
PData *data;
gchar c;
PData *data;
gchar c;
- MatchType last =
-1
;
+ MatchType last =
MATCH_INVALID
;
GString *str;
gboolean free_str;
GString *str;
gboolean free_str;
@@
-155,9
+158,9
@@
g_pattern_spec_free (GPatternSpec *pspec)
}
static gboolean
}
static gboolean
-match_string (GSList *list, const gchar *str,
gint idx, gin
t max)
+match_string (GSList *list, const gchar *str,
size_t idx, size_
t max)
{
{
-
gin
t len;
+
size_
t len;
while (list && idx < max) {
PData *data = (PData *) list->data;
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));
}
return match_string (pspec->pattern, string, 0, strlen (string));
}
+