summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-01-21 12:16:21 +0000
committerDavid Mitchell <davem@iabyn.com>2015-01-21 12:42:34 +0000
commit7b52d6569c115e4522e1cbe14cfd730e60c84bf1 (patch)
treeadf749373ce41b8f5e7d28ffd31e161842f052a6
parentfa14274eb6699a6eabc280d644e7bdeaee02e336 (diff)
downloadperl-7b52d6569c115e4522e1cbe14cfd730e60c84bf1.tar.gz
avoid C labels in column 0
Generally the guideline is to outdent C labels (e.g. 'foo:') 2 columns from the surrounding code. If the label starts at column zero, then it means that diffs, such as those generated by git, display the label rather than the function name at the head of a diff block: which makes diffs harder to peruse.
-rw-r--r--doio.c4
-rw-r--r--doop.c2
-rw-r--r--mg.c2
-rw-r--r--op.c4
-rw-r--r--pp.c2
-rw-r--r--pp_hot.c4
-rw-r--r--pp_sort.c2
-rw-r--r--pp_sys.c32
-rw-r--r--regcomp.c4
-rw-r--r--regexec.c10
-rw-r--r--sv.c8
-rw-r--r--toke.c6
-rw-r--r--utf8.c8
13 files changed, 44 insertions, 44 deletions
diff --git a/doio.c b/doio.c
index b84a14a096..a63f2a229b 100644
--- a/doio.c
+++ b/doio.c
@@ -790,7 +790,7 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname,
}
return TRUE;
-say_false:
+ say_false:
IoIFP(io) = saveifp;
IoOFP(io) = saveofp;
IoTYPE(io) = savetype;
@@ -1246,7 +1246,7 @@ Perl_mode_from_discipline(pTHX_ const char *s, STRLEN len)
}
else {
const char *end;
-fail_discipline:
+ fail_discipline:
end = strchr(s+1, ':');
if (!end)
end = s+len;
diff --git a/doop.c b/doop.c
index 3ed63f6612..2bd4e13f14 100644
--- a/doop.c
+++ b/doop.c
@@ -1219,7 +1219,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
break;
}
}
-finish:
+ finish:
SvTAINT(sv);
}
diff --git a/mg.c b/mg.c
index a64801e5b7..c3de7f5519 100644
--- a/mg.c
+++ b/mg.c
@@ -3341,7 +3341,7 @@ Perl_sighandler(int sig)
}
}
-cleanup:
+ cleanup:
/* pop any of SAVEFREESV, SAVEDESTRUCTOR_X and "save in progress" */
PL_savestack_ix = old_ss_ix;
if (flags & 8)
diff --git a/op.c b/op.c
index 6ed08a35e8..d2ce7b95a7 100644
--- a/op.c
+++ b/op.c
@@ -953,7 +953,7 @@ Perl_op_clear(pTHX_ OP *o)
/* FALLTHROUGH */
case OP_MATCH:
case OP_QR:
-clear_pmop:
+ clear_pmop:
if (!(cPMOPo->op_pmflags & PMf_CODELIST_PRIVATE))
op_free(cPMOPo->op_code_list);
cPMOPo->op_code_list = NULL;
@@ -6826,7 +6826,7 @@ S_search_const(pTHX_ OP *o)
} while (kid);
if (!kid)
kid = cLISTOPo->op_last;
-last:
+ last:
return search_const(kid);
}
}
diff --git a/pp.c b/pp.c
index c4c4819d34..a1a161d45e 100644
--- a/pp.c
+++ b/pp.c
@@ -3211,7 +3211,7 @@ PP(pp_substr)
}
RETURN;
-bound_fail:
+ bound_fail:
if (repl)
Perl_croak(aTHX_ "substr outside of string");
Perl_ck_warner(aTHX_ packWARN(WARN_SUBSTR), "substr outside of string");
diff --git a/pp_hot.c b/pp_hot.c
index 4072ab11e1..5eedf2470a 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1554,7 +1554,7 @@ PP(pp_match)
}
NOT_REACHED; /* NOTREACHED */
-nope:
+ nope:
if (global && !(dynpm->op_pmflags & PMf_CONTINUE)) {
if (!mg)
mg = mg_find_mglob(TARG);
@@ -3096,7 +3096,7 @@ PP(pp_entersub)
}
/* should call AUTOLOAD now? */
else {
-try_autoload:
+ try_autoload:
if ((autogv = gv_autoload_pvn(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv),
GvNAMEUTF8(gv) ? SVf_UTF8 : 0)))
{
diff --git a/pp_sort.c b/pp_sort.c
index 7a1d75d602..7d0e40fb2a 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -555,7 +555,7 @@ S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags)
}
}
}
-done:
+ done:
if (aux != small) Safefree(aux); /* free iff allocated */
if (flags) {
PL_sort_RealCmp = savecmp; /* Restore current comparison routine, if any */
diff --git a/pp_sys.c b/pp_sys.c
index 5f00bbee53..e2f8edf9de 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -717,7 +717,7 @@ PP(pp_pipe_op)
#endif
RETPUSHYES;
-badexit:
+ badexit:
RETPUSHUNDEF;
#else
DIE(aTHX_ PL_no_func, "pipe");
@@ -2555,7 +2555,7 @@ PP(pp_bind)
else
RETPUSHUNDEF;
-nuts:
+ nuts:
report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
@@ -2576,7 +2576,7 @@ PP(pp_listen)
else
RETPUSHUNDEF;
-nuts:
+ nuts:
report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
@@ -2638,11 +2638,11 @@ PP(pp_accept)
PUSHp(namebuf, len);
RETURN;
-nuts:
+ nuts:
report_evil_fh(ggv);
SETERRNO(EBADF,SS_IVCHAN);
-badexit:
+ badexit:
RETPUSHUNDEF;
}
@@ -2660,7 +2660,7 @@ PP(pp_shutdown)
PUSHi( PerlSock_shutdown(PerlIO_fileno(IoIFP(io)), how) >= 0 );
RETURN;
-nuts:
+ nuts:
report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
@@ -2740,10 +2740,10 @@ PP(pp_ssockopt)
}
RETURN;
-nuts:
+ nuts:
report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
-nuts2:
+ nuts2:
RETPUSHUNDEF;
}
@@ -2804,10 +2804,10 @@ PP(pp_getpeername)
PUSHs(sv);
RETURN;
-nuts:
+ nuts:
report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
-nuts2:
+ nuts2:
RETPUSHUNDEF;
}
@@ -3945,7 +3945,7 @@ PP(pp_open_dir)
goto nope;
RETPUSHYES;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_DIR);
RETPUSHUNDEF;
@@ -3996,7 +3996,7 @@ PP(pp_readdir)
RETURN;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_ISI);
if (gimme == G_ARRAY)
@@ -4029,7 +4029,7 @@ PP(pp_telldir)
PUSHi( PerlDir_tell(IoDIRP(io)) );
RETURN;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_ISI);
RETPUSHUNDEF;
@@ -4055,7 +4055,7 @@ PP(pp_seekdir)
(void)PerlDir_seek(IoDIRP(io), along);
RETPUSHYES;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_ISI);
RETPUSHUNDEF;
@@ -4079,7 +4079,7 @@ PP(pp_rewinddir)
}
(void)PerlDir_rewind(IoDIRP(io));
RETPUSHYES;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_ISI);
RETPUSHUNDEF;
@@ -4112,7 +4112,7 @@ PP(pp_closedir)
IoDIRP(io) = 0;
RETPUSHYES;
-nope:
+ nope:
if (!errno)
SETERRNO(EBADF,RMS_IFI);
RETPUSHUNDEF;
diff --git a/regcomp.c b/regcomp.c
index 64a90b416f..a46ece1211 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6879,7 +6879,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
SAVEFREEPV(RExC_recurse);
}
-reStudy:
+ reStudy:
r->minlen = minlen = sawlookahead = sawplus = sawopen = sawminmod = 0;
DEBUG_r(
RExC_study_chunk_recursed_count= 0;
@@ -11621,7 +11621,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
PERL_ARGS_ASSERT_REGATOM;
-tryagain:
+ tryagain:
switch ((U8)*RExC_parse) {
case '^':
RExC_seen_zerolen++;
diff --git a/regexec.c b/regexec.c
index 585a2c0711..f51517f8a6 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3147,7 +3147,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
/* Failure. */
goto phooey;
-got_it:
+ got_it:
/* s/// doesn't like it if $& is earlier than where we asked it to
* start searching (which can happen on something like /.\G/) */
if ( (flags & REXEC_FAIL_ON_UNDERFLOW)
@@ -3187,7 +3187,7 @@ got_it:
return 1;
-phooey:
+ phooey:
DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sMatch failed%s\n",
PL_colors[4], PL_colors[5]));
@@ -7042,7 +7042,7 @@ NULL
sayNO;
NOT_REACHED;
-yes:
+ yes:
if (yes_state) {
/* we have successfully completed a subexpression, but we must now
* pop to the state marked by yes_state and continue from there */
@@ -7103,7 +7103,7 @@ yes:
result = 1;
goto final_exit;
-no:
+ no:
DEBUG_EXECUTE_r(
PerlIO_printf(Perl_debug_log,
"%*s %sfailed...%s\n",
@@ -7111,7 +7111,7 @@ no:
PL_colors[4], PL_colors[5])
);
-no_silent:
+ no_silent:
if (no_final) {
if (yes_state) {
goto yes;
diff --git a/sv.c b/sv.c
index db2938070c..d936dfcb4d 100644
--- a/sv.c
+++ b/sv.c
@@ -3528,7 +3528,7 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extr
if (extra) SvGROW(sv, SvCUR(sv) + extra);
return SvCUR(sv);
-must_be_utf8:
+ must_be_utf8:
/* Here, the string should be converted to utf8, either because of an
* input flag (two_byte_count = 0), or because a character that
@@ -8587,13 +8587,13 @@ Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
goto thats_all_folks;
}
-thats_all_folks:
+ thats_all_folks:
/* check if we have actually found the separator - only really applies
* when rslen > 1 */
if ((rslen > 1 && (STRLEN)(bp - (STDCHAR*)SvPVX_const(sv)) < rslen) ||
memNE((char*)bp - rslen, rsptr, rslen))
goto screamer; /* go back to the fray */
-thats_really_all_folks:
+ thats_really_all_folks:
if (shortbuffered)
cnt += shortbuffered;
DEBUG_P(PerlIO_printf(Perl_debug_log,
@@ -8621,7 +8621,7 @@ thats_really_all_folks:
STDCHAR buf[8192];
#endif
-screamer2:
+ screamer2:
if (rslen) {
const STDCHAR * const bpe = buf + sizeof(buf);
bp = buf;
diff --git a/toke.c b/toke.c
index f34bbee5a3..30a90612e1 100644
--- a/toke.c
+++ b/toke.c
@@ -8447,7 +8447,7 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen,
yyerror_pv(msg, UTF ? SVf_UTF8 : 0);
return SvREFCNT_inc_simple_NN(sv);
}
-now_ok:
+ now_ok:
cv = *cvp;
if (!pv && s)
pv = newSVpvn_flags(s, len, SVs_TEMP);
@@ -9526,7 +9526,7 @@ S_scan_inputsymbol(pTHX_ char *start)
else {
GV *gv;
++d;
-intro_sym:
+ intro_sym:
gv = gv_fetchpv(d,
GV_ADDMULTI | ( UTF ? SVf_UTF8 : 0 ),
SVt_PV);
@@ -10468,7 +10468,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
/* if it starts with a v, it could be a v-string */
case 'v':
-vstring:
+ vstring:
sv = newSV(5); /* preallocate storage space */
ENTER_with_name("scan_vstring");
SAVEFREESV(sv);
diff --git a/utf8.c b/utf8.c
index 8551e111de..8182e633ff 100644
--- a/utf8.c
+++ b/utf8.c
@@ -806,13 +806,13 @@ Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
* is the label <malformed>.
*/
-malformed:
+ malformed:
if (sv && ckWARN_d(WARN_UTF8)) {
pack_warn = packWARN(WARN_UTF8);
}
-disallowed:
+ disallowed:
if (flags & UTF8_CHECK_ONLY) {
if (retlen)
@@ -820,7 +820,7 @@ disallowed:
return 0;
}
-do_warn:
+ do_warn:
if (pack_warn) { /* <pack_warn> was initialized to 0, and changed only
if warnings are to be raised. */
@@ -1919,7 +1919,7 @@ S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* c
return result;
}
-bad_crossing:
+ bad_crossing:
/* Failed, have to return the original */
original = valid_utf8_to_uvchr(p, lenp);