summaryrefslogtreecommitdiff
path: root/utils/RegExp.cc
diff options
context:
space:
mode:
authorchatty1993-12-22 12:26:39 +0000
committerchatty1993-12-22 12:26:39 +0000
commit7ebcfbbbfb1f844261b3c810684ffa244e41080b (patch)
tree71c90ea1a6d2a73c33935500cd033baf3b508163 /utils/RegExp.cc
parentfa5d3f424a09155e714394eb9b501c81373e0973 (diff)
downloadivy-league-7ebcfbbbfb1f844261b3c810684ffa244e41080b.zip
ivy-league-7ebcfbbbfb1f844261b3c810684ffa244e41080b.tar.gz
ivy-league-7ebcfbbbfb1f844261b3c810684ffa244e41080b.tar.bz2
ivy-league-7ebcfbbbfb1f844261b3c810684ffa244e41080b.tar.xz
replaced TRUE/FALSE by true/false
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?*/