summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-12-18 14:03:09 -0700
committerKarl Williamson <khw@cpan.org>2014-12-29 13:52:56 -0700
commite7fd4aa18abbfe0099d4947060c99ca85f42f764 (patch)
tree53b894d4f27d75c5d4e7cc812f6c9a4619557ba0
parent2f306ab9fcefa58507af5830f60ce18c43bbad18 (diff)
downloadperl-e7fd4aa18abbfe0099d4947060c99ca85f42f764.tar.gz
regcomp.c, regexec.c: Vertically align ternary operators
For clarity
-rw-r--r--regcomp.c14
-rw-r--r--regexec.c18
2 files changed, 20 insertions, 12 deletions
diff --git a/regcomp.c b/regcomp.c
index 11b424e0aa..25d382cd87 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4151,11 +4151,15 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
*/
-#define TRIE_TYPE(X) ( ( NOTHING == (X) ) ? NOTHING : \
- ( EXACT == (X) ) ? EXACT : \
- ( EXACTFU == (X) || EXACTFU_SS == (X) ) ? EXACTFU : \
- ( EXACTFA == (X) ) ? EXACTFA : \
- 0 )
+#define TRIE_TYPE(X) ( ( NOTHING == (X) ) \
+ ? NOTHING \
+ : ( EXACT == (X) ) \
+ ? EXACT \
+ : ( EXACTFU == (X) || EXACTFU_SS == (X) ) \
+ ? EXACTFU \
+ : ( EXACTFA == (X) ) \
+ ? EXACTFA \
+ : 0 )
/* dont use tail as the end marker for this traverse */
for ( cur = startbranch ; cur != scan ; cur = regnext( cur ) ) {
diff --git a/regexec.c b/regexec.c
index ebb80c3aac..10343a0f88 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1433,13 +1433,17 @@ Perl_re_intuit_start(pTHX_
#define DECL_TRIE_TYPE(scan) \
- const enum { trie_plain, trie_utf8, trie_utf8_fold, trie_latin_utf8_fold, \
- trie_utf8_exactfa_fold, trie_latin_utf8_exactfa_fold } \
- trie_type = ((scan->flags == EXACT) \
- ? (utf8_target ? trie_utf8 : trie_plain) \
- : (scan->flags == EXACTFA) \
- ? (utf8_target ? trie_utf8_exactfa_fold : trie_latin_utf8_exactfa_fold) \
- : (utf8_target ? trie_utf8_fold : trie_latin_utf8_fold))
+ const enum { trie_plain, trie_utf8, trie_utf8_fold, trie_latin_utf8_fold, \
+ trie_utf8_exactfa_fold, trie_latin_utf8_exactfa_fold } \
+ trie_type = ((scan->flags == EXACT) \
+ ? (utf8_target ? trie_utf8 : trie_plain) \
+ : (scan->flags == EXACTFA) \
+ ? (utf8_target \
+ ? trie_utf8_exactfa_fold \
+ : trie_latin_utf8_exactfa_fold) \
+ : (utf8_target \
+ ? trie_utf8_fold \
+ : trie_latin_utf8_fold))
#define REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, uscan, len, uvc, charid, foldlen, foldbuf, uniflags) \
STMT_START { \