summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-02-21 13:18:06 +0100
committerKarl Williamson <khw@cpan.org>2022-02-23 10:40:52 -0700
commit5070f532622b3fabf067638f9a15ca2e515ed50d (patch)
tree3ebbcbc1e77b8bef6846f38eb8250bbe72c77a8a
parent271c3af797311222713e1573330fe45bb5609e6a (diff)
downloadperl-5070f532622b3fabf067638f9a15ca2e515ed50d.tar.gz
regcomp.c: fix long lines or unnecessary line breakage
Vertical space is more expensive than horizontal, don't waste it when we are under the recommended line length. At the same time, rewording a comment so its shorter than the line length keeps us compliant. (I'd prefer we didnt have to do this, but ze rulez are ze rulez!) Also fixes indents and make the error message coding style consistent.
-rw-r--r--regcomp.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/regcomp.c b/regcomp.c
index 49e65549eb..74c2c52184 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11175,7 +11175,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
char *start_arg = NULL;
unsigned char op = 0;
int arg_required = 0;
- int internal_argval = -1; /* if >-1 we are not allowed an argument*/
+ int internal_argval = -1; /* if > -1 no argument allowed */
bool has_upper = FALSE;
if (has_intervening_patws) {
@@ -11418,32 +11418,27 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
goto parse_rest;
no_colon:
- vFAIL2utf8f(
- "'(*%" UTF8f "' requires a terminating ':'",
- UTF8fARG(UTF, verb_len, start_verb));
+ vFAIL2utf8f( "'(*%" UTF8f "' requires a terminating ':'",
+ UTF8fARG(UTF, verb_len, start_verb));
NOT_REACHED; /*NOTREACHED*/
} /* End of switch */
if ( ! op ) {
- RExC_parse += UTF
- ? UTF8_SAFE_SKIP(RExC_parse, RExC_end)
- : 1;
+ RExC_parse += UTF ? UTF8_SAFE_SKIP(RExC_parse, RExC_end) : 1;
if (has_upper || verb_len == 0) {
- vFAIL2utf8f(
- "Unknown verb pattern '%" UTF8f "'",
- UTF8fARG(UTF, verb_len, start_verb));
+ vFAIL2utf8f( "Unknown verb pattern '%" UTF8f "'",
+ UTF8fARG(UTF, verb_len, start_verb));
}
else {
- vFAIL2utf8f(
- "Unknown '(*...)' construct '%" UTF8f "'",
- UTF8fARG(UTF, verb_len, start_verb));
+ vFAIL2utf8f( "Unknown '(*...)' construct '%" UTF8f "'",
+ UTF8fARG(UTF, verb_len, start_verb));
}
}
if ( RExC_parse == start_arg ) {
start_arg = NULL;
}
if ( arg_required && !start_arg ) {
- vFAIL3("Verb pattern '%.*s' has a mandatory argument",
+ vFAIL3( "Verb pattern '%.*s' has a mandatory argument",
(int) verb_len, start_verb);
}
if (internal_argval == -1) {
@@ -11453,8 +11448,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
}
RExC_seen |= REG_VERBARG_SEEN;
if (start_arg) {
- SV *sv = newSVpvn( start_arg,
- RExC_parse - start_arg);
+ SV *sv = newSVpvn( start_arg, RExC_parse - start_arg);
ARG(REGNODE_p(ret)) = add_data( pRExC_state,
STR_WITH_LEN("S"));
RExC_rxi->data->data[ARG(REGNODE_p(ret))]=(void*)sv;