diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 20:03:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 20:03:54 +0300 |
commit | f74c10c4ec6435471bac84473fe865f90843c2df (patch) | |
tree | b2853d87789dbb84d6c26c259eab6639d3a7e482 /indra/llmessage/llmessagetemplateparser.cpp | |
parent | 5fccb539937a52d286274a002266e022e2102e5e (diff) | |
parent | 32fcefc058ae38eff0572326ef3efd1c7b343144 (diff) |
Merge branch 'DRTVWR-600-maint-A' into signal/trim-trailing
Diffstat (limited to 'indra/llmessage/llmessagetemplateparser.cpp')
-rw-r--r-- | indra/llmessage/llmessagetemplateparser.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 4fb9257e90..cf1f49116e 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -42,7 +42,7 @@ // * - repeat last check // checks 'a' -BOOL b_return_alphanumeric_ok(char c) +bool b_return_alphanumeric_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -51,26 +51,26 @@ BOOL b_return_alphanumeric_ok(char c) &&( (c < '0') ||(c > '9'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'c' -BOOL b_return_character_ok(char c) +bool b_return_character_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) &&( (c < 'a') ||(c > 'z'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'f' -BOOL b_return_first_variable_ok(char c) +bool b_return_first_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -78,13 +78,13 @@ BOOL b_return_first_variable_ok(char c) ||(c > 'z')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'v' -BOOL b_return_variable_ok(char c) +bool b_return_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -94,35 +94,35 @@ BOOL b_return_variable_ok(char c) ||(c > '9')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 's' -BOOL b_return_signed_integer_ok(char c) +bool b_return_signed_integer_ok(char c) { if ( ( (c < '0') ||(c > '9')) &&(c != '-')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'd' -BOOL b_return_integer_ok(char c) +bool b_return_integer_ok(char c) { if ( (c < '0') ||(c > '9')) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL (*gParseCheckCharacters[])(char c) = +bool (*gParseCheckCharacters[])(char c) = { b_return_alphanumeric_ok, b_return_character_ok, @@ -156,7 +156,7 @@ S32 get_checker_number(char checker) } // check token based on passed simplified regular expression -BOOL b_check_token(const char *token, const char *regexp) +bool b_check_token(const char *token, const char *regexp) { S32 tptr, rptr = 0; S32 current_checker, next_checker = 0; @@ -166,13 +166,13 @@ BOOL b_check_token(const char *token, const char *regexp) if (current_checker == -1) { LL_ERRS() << "Invalid regular expression value!" << LL_ENDL; - return FALSE; + return false; } if (current_checker == 9999) { LL_ERRS() << "Regular expression can't start with *!" << LL_ENDL; - return FALSE; + return false; } for (tptr = 0; token[tptr]; tptr++) @@ -180,12 +180,12 @@ BOOL b_check_token(const char *token, const char *regexp) if (current_checker == -1) { LL_ERRS() << "Input exceeds regular expression!\nDid you forget a *?" << LL_ENDL; - return FALSE; + return false; } if (!gParseCheckCharacters[current_checker](token[tptr])) { - return FALSE; + return false; } if (next_checker != 9999) { @@ -196,40 +196,40 @@ BOOL b_check_token(const char *token, const char *regexp) } } } - return TRUE; + return true; } // C variable can be made up of upper or lower case letters, underscores, or numbers, but can't start with a number -BOOL b_variable_ok(const char *token) +bool b_variable_ok(const char *token) { if (!b_check_token(token, "fv*")) { LL_WARNS() << "Token '" << token << "' isn't a variable!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 and may be preceded by a '-' -BOOL b_integer_ok(const char *token) +bool b_integer_ok(const char *token) { if (!b_check_token(token, "sd*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 -BOOL b_positive_integer_ok(const char *token) +bool b_positive_integer_ok(const char *token) { if (!b_check_token(token, "d*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } |