summaryrefslogtreecommitdiff
path: root/utils/RegExp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/RegExp.cc')
-rw-r--r--utils/RegExp.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/utils/RegExp.cc b/utils/RegExp.cc
index 99f7db3..7803f06 100644
--- a/utils/RegExp.cc
+++ b/utils/RegExp.cc
@@ -39,8 +39,8 @@ CcuRegExp :: CcuRegExp (const char* expr)
#include <malloc.h>
/*?
-Compile a regular expression before using it. This function returns FALSE upon failure,
-TRUE upon success.
+Compile a regular expression before using it. This function returns false upon failure,
+true upon success.
?*/
bool
CcuRegExp :: Compile ()
@@ -49,22 +49,22 @@ CcuRegExp :: Compile ()
if (regcomp (&tmp, String, REG_NOSUB) == 0) {
Compiled = malloc (sizeof (struct regex_t));
memcpy (&Compiled, &tmp, sizeof (struct regex_t));
- return TRUE;
+ return true;
} else
- return FALSE;
+ return false;
}
/*?
-Match a string against a regular expression. This function returns FALSE upon failure,
-TRUE upon success.
+Match a string against a regular expression. This function returns false upon failure,
+true upon success.
?*/
bool
CcuRegExp :: Match (const char* s)
{
if (Compiled)
- return regexec ((struct regex_t*) Compiled, s, 0, 0, 0) ? TRUE : FALSE;
+ return regexec ((struct regex_t*) Compiled, s, 0, 0, 0) ? true : false;
else
- return FALSE;
+ return false;
}
/*?nodoc?*/
@@ -96,10 +96,10 @@ CcuRegExp :: Compile ()
{
if (re_comp (String) != 0) {
Compiled = 0;
- return FALSE;
+ return false;
} else {
Compiled = this;
- return TRUE;
+ return true;
}
}
@@ -109,11 +109,11 @@ CcuRegExp :: Match (const char* s)
{
if (Compiled != this)
if (!Compile ())
- return FALSE;
+ return false;
if (re_exec (s) == 1)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
#endif /* RE_COMP */
@@ -130,27 +130,27 @@ extern "C" {
#endif
/*?
-Compile a regular expression before using it. This function returns FALSE upon failure,
-TRUE upon success.
+Compile a regular expression before using it. This function returns false upon failure,
+true upon success.
?*/
bool
CcuRegExp :: Compile ()
{
Compiled = regcmp (String, 0);
- return Compiled ? TRUE : FALSE;
+ return Compiled ? true : false;
}
/*?
-Match a string against a regular expression. This function returns FALSE upon failure,
-TRUE upon success.
+Match a string against a regular expression. This function returns false upon failure,
+true upon success.
?*/
bool
CcuRegExp :: Match (const char* s)
{
if (Compiled)
- return regex (Compiled, s) ? TRUE : FALSE;
+ return regex (Compiled, s) ? true : false;
else
- return FALSE;
+ return false;
}
/*?nodoc?*/