summaryrefslogtreecommitdiff
path: root/src/include/cctk_Misc.h
diff options
context:
space:
mode:
authorrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-06-05 01:21:05 +0000
committerrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-06-05 01:21:05 +0000
commitebd9d3057b889f2fe224c7cd7a0c539aa33a4d5c (patch)
tree90810093d4c416d77aff036ad0a4c321580284a4 /src/include/cctk_Misc.h
parentfe89bb0b6590b24f4c8c6cee06b26a985661ef5a (diff)
have CCTK_RegexMatch return a distinct error code if patterns is invalid
This patch changes the return value in the "does not compile" case to -1 and updates all source files that I could find that use it. Note that this patch changes behaviour of a routine. It used to return 0 for non-compiling patterns so thorns that test for C-like true would interpret invalid patterns as does-not-match, but will interpret the -1 return value as does-match. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4831 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk_Misc.h')
-rw-r--r--src/include/cctk_Misc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/cctk_Misc.h b/src/include/cctk_Misc.h
index 6ac16e56..c1147c47 100644
--- a/src/include/cctk_Misc.h
+++ b/src/include/cctk_Misc.h
@@ -13,6 +13,8 @@
#ifndef _CCTK_MISC_H_
#define _CCTK_MISC_H_
+#include "cctk_GNU.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -33,6 +35,11 @@ int Util_DoubleInRange(double inval, const char *range);
int Util_IntInRangeList(int inval, int n_elements, ...);
int Util_DoubleInRangeList(double inval, int n_elements, ...);
+int CCTK_RegexMatch (const char *string,
+ const char *pattern,
+ const int nmatch,
+ regmatch_t *pmatch);
+
int CCTK_SetDoubleInRangeList(CCTK_REAL *data, const char *value,
int n_elements, ...);
int CCTK_SetIntInRangeList(CCTK_INT *data, const char *value,