diff options
author | Karl Williamson <khw@cpan.org> | 2014-12-18 14:03:09 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-12-29 13:52:56 -0700 |
commit | e7fd4aa18abbfe0099d4947060c99ca85f42f764 (patch) | |
tree | 53b894d4f27d75c5d4e7cc812f6c9a4619557ba0 | |
parent | 2f306ab9fcefa58507af5830f60ce18c43bbad18 (diff) | |
download | perl-e7fd4aa18abbfe0099d4947060c99ca85f42f764.tar.gz |
regcomp.c, regexec.c: Vertically align ternary operators
For clarity
-rw-r--r-- | regcomp.c | 14 | ||||
-rw-r--r-- | regexec.c | 18 |
2 files changed, 20 insertions, 12 deletions
@@ -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 ) ) { @@ -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 { \ |