[gnumeric] Compilation: catch up with goffice.



commit e3d2d0ddc01a2ad803d600ea04b0de100573ff10
Author: Morten Welinder <terra gnome org>
Date:   Tue Aug 25 15:09:02 2009 -0400

    Compilation: catch up with goffice.

 plugins/fn-lookup/functions.c |    4 ++--
 plugins/fn-string/functions.c |   12 ++++++------
 src/number-match.c            |    2 +-
 src/sheet-filter.c            |    6 +++---
 src/value.c                   |    4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/fn-lookup/functions.c b/plugins/fn-lookup/functions.c
index c8543fa..fc6ea7f 100644
--- a/plugins/fn-lookup/functions.c
+++ b/plugins/fn-lookup/functions.c
@@ -476,13 +476,13 @@ wildcard_string_match (const char *key, LookupBisectionCacheItem *bc)
 	GORegmatch rm;
 	int i, res = LOOKUP_NOT_THERE;
 
-	if (gnm_regcomp_XL (&rx, key, REG_ICASE, TRUE) != REG_OK) {
+	if (gnm_regcomp_XL (&rx, key, GO_REG_ICASE, TRUE) != GO_REG_OK) {
 		g_warning ("Unexpected regcomp result");
 		return LOOKUP_DATA_ERROR;
 	}
 
 	for (i = 0; i < bc->n; i++) {
-		if (go_regexec (&rx, bc->data[i].u.str, 1, &rm, 0) == REG_OK) {
+		if (go_regexec (&rx, bc->data[i].u.str, 1, &rm, 0) == GO_REG_OK) {
 			res = i;
 			break;
 		}
diff --git a/plugins/fn-string/functions.c b/plugins/fn-string/functions.c
index f3f1a38..239770c 100644
--- a/plugins/fn-string/functions.c
+++ b/plugins/fn-string/functions.c
@@ -1234,13 +1234,13 @@ gnumeric_search (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 		hay2 = g_utf8_next_char (hay2);
 	}
 
-	if (gnm_regcomp_XL (&r, needle, REG_ICASE, FALSE) == REG_OK) {
+	if (gnm_regcomp_XL (&r, needle, GO_REG_ICASE, FALSE) == GO_REG_OK) {
 		GORegmatch rm;
 
 		switch (go_regexec (&r, hay2, 1, &rm, 0)) {
-		case REG_NOMATCH:
+		case GO_REG_NOMATCH:
 			break;
-		case REG_OK:
+		case GO_REG_OK:
 			go_regfree (&r);
 			return value_new_int
 				(1 + istart +
@@ -1303,13 +1303,13 @@ gnumeric_searchb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 	if (istart > 0)
 		istart = g_utf8_next_char(haystack + istart - 1) - haystack;
 
-	if (gnm_regcomp_XL (&r, needle, REG_ICASE, FALSE) == REG_OK) {
+	if (gnm_regcomp_XL (&r, needle, GO_REG_ICASE, FALSE) == GO_REG_OK) {
 		GORegmatch rm;
 
 		switch (go_regexec (&r, haystack + istart, 1, &rm, 0)) {
-		case REG_NOMATCH:
+		case GO_REG_NOMATCH:
 			break;
-		case REG_OK:
+		case GO_REG_OK:
 			go_regfree (&r);
 			return value_new_int
 				(1 + istart + rm.rm_so);
diff --git a/src/number-match.c b/src/number-match.c
index dd26f3a..ffa442d 100644
--- a/src/number-match.c
+++ b/src/number-match.c
@@ -146,7 +146,7 @@ my_regerror (int err, GORegexp const *preg)
 static void
 datetime_locale_setup1 (GORegexp *rx, char const *pat)
 {
-	int ret = go_regcomp (rx, pat, REG_ICASE);
+	int ret = go_regcomp (rx, pat, GO_REG_ICASE);
 	if (ret) {
 		g_warning ("Failed to compile rx \"%s\": %s\n",
 			   pat,
diff --git a/src/sheet-filter.c b/src/sheet-filter.c
index f506cec..fa1baa8 100644
--- a/src/sheet-filter.c
+++ b/src/sheet-filter.c
@@ -148,7 +148,7 @@ filter_expr_init (FilterExpr *fexpr, unsigned i,
 			workbook_date_conv (filter->sheet->workbook);
 
 		if ((op == GNM_FILTER_OP_EQUAL || op == GNM_FILTER_OP_NOT_EQUAL) &&
-		    gnm_regcomp_XL (fexpr->regexp + i, str, REG_ICASE, TRUE) == REG_OK) {
+		    gnm_regcomp_XL (fexpr->regexp + i, str, GO_REG_ICASE, TRUE) == GO_REG_OK) {
 			fexpr->val[i] = NULL;
 			return;
 		}
@@ -185,14 +185,14 @@ filter_expr_eval (GnmFilterOp op, GnmValue const *src, GORegexp const *regexp,
 		int res = go_regexec (regexp, str, 1, &rm, 0);
 
 		switch (res) {
-		case REG_OK:
+		case GO_REG_OK:
 			if (rm.rm_so == 0 && strlen (str) == (size_t)rm.rm_eo) {
 				g_free (str);
 				return op == GNM_FILTER_OP_EQUAL;
 			}
 			/* fall through */
 
-		case REG_NOMATCH:
+		case GO_REG_NOMATCH:
 			g_free (str);
 			return op == GNM_FILTER_OP_NOT_EQUAL;
 
diff --git a/src/value.c b/src/value.c
index fda9e94..de2a08a 100644
--- a/src/value.c
+++ b/src/value.c
@@ -1480,7 +1480,7 @@ criteria_test_match (GnmValue const *x, GnmCriteria *crit)
 	if (!crit->has_rx)
 		return FALSE;
 
-	return go_regexec (&crit->rx, value_peek_string (x), 0, NULL, 0) == REG_OK;
+	return go_regexec (&crit->rx, value_peek_string (x), 0, NULL, 0) == GO_REG_OK;
 }
 
 /*
@@ -1616,7 +1616,7 @@ parse_criteria (GnmValue const *crit_val, GODateConventions const *date_conv)
 		len = 1;
 	} else {
 		res->fun = criteria_test_match;
-		res->has_rx = (gnm_regcomp_XL (&res->rx, criteria, 0, TRUE) == REG_OK);
+		res->has_rx = (gnm_regcomp_XL (&res->rx, criteria, 0, TRUE) == GO_REG_OK);
 		len = 0;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]