Skip to content

Commit 6545c77

Browse files
committed
WS Cleanup Stage #10 - reformat comments using Text::Autoformat
1 parent f0ccb32 commit 6545c77

32 files changed

+1434
-1708
lines changed

XSUB.h

+38-38
Original file line numberDiff line numberDiff line change
@@ -16,97 +16,97 @@
1616
/*
1717
=for apidoc_section $XS
1818
19-
F<xsubpp> compiles XS code into C. See L<perlutil/xsubpp>.
19+
F<xsubpp> compiles XS code into C. See L<perlutil/xsubpp>.
2020
2121
=for comment
2222
Some variables below are flagged with 'u' because Devel::PPPort can't currently
2323
readily test them as they spring into existence by compiling with xsubpp.
2424
2525
=for apidoc Amnu|char*|CLASS
26-
Variable which is setup by C<xsubpp> to indicate the
27-
class name for a C++ XS constructor. This is always a C<char*>. See
28-
C<L</THIS>>.
26+
Variable which is setup by C<xsubpp> to indicate the class name for a C++ XS
27+
constructor. This is always a C<char*>. See C<L</THIS>>.
2928
3029
=for apidoc Amnu|type|RETVAL
31-
Variable which is setup by C<xsubpp> to hold the return value for an
32-
XSUB. This is always the proper type for the XSUB. See
33-
L<perlxs/"The RETVAL Variable">.
30+
Variable which is setup by C<xsubpp> to hold the return value for an XSUB. This
31+
is always the proper type for the XSUB. See L<perlxs/"The RETVAL Variable">.
3432
3533
=for apidoc Amnu|type|THIS
36-
Variable which is setup by C<xsubpp> to designate the object in a C++
37-
XSUB. This is always the proper type for the C++ object. See C<L</CLASS>> and
34+
Variable which is setup by C<xsubpp> to designate the object in a C++ XSUB.
35+
This is always the proper type for the C++ object. See C<L</CLASS>> and
3836
L<perlxs/"Using XS With C++">.
3937
4038
=for apidoc Amn|I32|ax
41-
Variable which is setup by C<xsubpp> to indicate the stack base offset,
42-
used by the C<ST>, C<XSprePUSH> and C<XSRETURN> macros. The C<dMARK> macro
43-
must be called prior to setup the C<MARK> variable.
39+
Variable which is setup by C<xsubpp> to indicate the stack base offset, used by
40+
the C<ST>, C<XSprePUSH> and C<XSRETURN> macros. The C<dMARK> macro must be
41+
called prior to setup the C<MARK> variable.
4442
4543
=for apidoc Amn|I32|items
46-
Variable which is setup by C<xsubpp> to indicate the number of
47-
items on the stack. See L<perlxs/"Variable-length Parameter Lists">.
44+
Variable which is setup by C<xsubpp> to indicate the number of items on the
45+
stack. See L<perlxs/"Variable-length Parameter Lists">.
4846
4947
=for apidoc Amn|I32|ix
50-
Variable which is setup by C<xsubpp> to indicate which of an
51-
XSUB's aliases was used to invoke it. See L<perlxs/"The ALIAS: Keyword">.
48+
Variable which is setup by C<xsubpp> to indicate which of an XSUB's aliases was
49+
used to invoke it. See L<perlxs/"The ALIAS: Keyword">.
5250
5351
=for apidoc Am|SV*|ST|int ix
5452
Used to access elements on the XSUB's stack.
5553
5654
=for apidoc Ay||XS|name
57-
Macro to declare an XSUB and its C parameter list. This is handled by
58-
C<xsubpp>. It is the same as using the more explicit C<XS_EXTERNAL> macro; the
55+
Macro to declare an XSUB and its C parameter list. This is handled by
56+
C<xsubpp>. It is the same as using the more explicit C<XS_EXTERNAL> macro; the
5957
latter is preferred.
6058
6159
=for apidoc Ayu||XS_INTERNAL|name
62-
Macro to declare an XSUB and its C parameter list without exporting the symbols.
63-
This is handled by C<xsubpp> and generally preferable over exporting the XSUB
64-
symbols unnecessarily.
60+
Macro to declare an XSUB and its C parameter list without exporting the
61+
symbols. This is handled by C<xsubpp> and generally preferable over exporting
62+
the XSUB symbols unnecessarily.
6563
6664
=for comment
6765
XS_INTERNAL marked 'u' because declaring a function static within our test
6866
function doesn't work
6967
7068
=for apidoc Ay||XS_EXTERNAL|name
71-
Macro to declare an XSUB and its C parameter list explicitly exporting the symbols.
69+
Macro to declare an XSUB and its C parameter list explicitly exporting
70+
the symbols.
7271
7372
=for apidoc Ay||XSPROTO|name
7473
Macro used by C<L</XS_INTERNAL>> and C<L</XS_EXTERNAL>> to declare a function
75-
prototype. You probably shouldn't be using this directly yourself.
74+
prototype. You probably shouldn't be using this directly yourself.
7675
7776
=for apidoc Amn;||dAX
78-
Sets up the C<ax> variable.
79-
This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
77+
Sets up the C<ax> variable. This is usually handled automatically by C<xsubpp>
78+
by calling C<dXSARGS>.
8079
8180
=for apidoc Amn;||dAXMARK
82-
Sets up the C<ax> variable and stack marker variable C<mark>.
83-
This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
81+
Sets up the C<ax> variable and stack marker variable C<mark>. This is usually
82+
handled automatically by C<xsubpp> by calling C<dXSARGS>.
8483
8584
=for apidoc Amn;||dITEMS
86-
Sets up the C<items> variable.
87-
This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
85+
Sets up the C<items> variable. This is usually handled automatically by
86+
C<xsubpp> by calling C<dXSARGS>.
8887
8988
=for apidoc Amn;||dXSARGS
90-
Sets up stack and mark pointers for an XSUB, calling C<dSP> and C<dMARK>.
91-
Sets up the C<ax> and C<items> variables by calling C<dAX> and C<dITEMS>.
92-
This is usually handled automatically by C<xsubpp>.
89+
Sets up stack and mark pointers for an XSUB, calling C<dSP> and C<dMARK>. Sets
90+
up the C<ax> and C<items> variables by calling C<dAX> and C<dITEMS>. This is
91+
usually handled automatically by C<xsubpp>.
9392
9493
=for apidoc Amn;||dXSI32
95-
Sets up the C<ix> variable for an XSUB which has aliases. This is usually
94+
Sets up the C<ix> variable for an XSUB which has aliases. This is usually
9695
handled automatically by C<xsubpp>.
9796
9897
=for apidoc Amn;||dUNDERBAR
99-
Sets up any variable needed by the C<UNDERBAR> macro. It used to define
100-
C<padoff_du>, but it is currently a noop. However, it is strongly advised
101-
to still use it for ensuring past and future compatibility.
98+
Sets up any variable needed by the C<UNDERBAR> macro. It used to define
99+
C<padoff_du>, but it is currently a noop. However, it is strongly advised to
100+
still use it for ensuring past and future compatibility.
102101
103102
=for apidoc AmnU||UNDERBAR
104-
The SV* corresponding to the C<$_> variable. Works even if there
105-
is a lexical C<$_> in scope.
103+
The SV* corresponding to the C<$_> variable. Works even if there is a lexical
104+
C<$_> in scope.
106105
107106
=cut
108107
*/
109108

109+
110110
#ifndef PERL_UNUSED_ARG
111111
# define PERL_UNUSED_ARG(x) ((void)sizeof(x))
112112
#endif

cop.h

+38-36
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
/* cop.h
22
*
33
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
4-
* 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and others
4+
* 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and
5+
* others
56
*
67
* You may distribute under the terms of either the GNU General Public
78
* License or the Artistic License, as specified in the README file.
89
*
9-
* Control ops (cops) are one of the two ops OP_NEXTSTATE and OP_DBSTATE,
10-
* that (loosely speaking) are statement separators.
11-
* They hold information important for lexical state and error reporting.
12-
* At run time, PL_curcop is set to point to the most recently executed cop,
13-
* and thus can be used to determine our current state.
10+
* Control ops (cops) are one of the two ops OP_NEXTSTATE and OP_DBSTATE, that
11+
* (loosely speaking) are statement separators. They hold information important
12+
* for lexical state and error reporting. At run time, PL_curcop is set to
13+
* point to the most recently executed cop, and thus can be used to determine
14+
* our current state.
1415
*/
1516

1617
/* A jmpenv packages the state required to perform a proper non-local jump.
@@ -433,12 +434,12 @@ the octets.
433434
struct cop {
434435
BASEOP
435436
/* On LP64 putting this here takes advantage of the fact that BASEOP isn't
436-
an exact multiple of 8 bytes to save structure padding. */
437+
an exact multiple of 8 bytes to save structure padding. */
437438
line_t cop_line; /* line # of this command */
438439
/* label for this construct is now stored in cop_hints_hash */
439440
#ifdef USE_ITHREADS
440-
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the
441-
package the line was compiled in */
441+
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the package
442+
the line was compiled in */
442443
char *cop_file; /* name of file this command is from */
443444
#else
444445
HV *cop_stash; /* package line was compiled in */
@@ -448,13 +449,13 @@ struct cop {
448449
U32 cop_seq; /* parse sequence number */
449450
/* Beware. mg.c and warnings.pl assume the type of this is STRLEN *: */
450451
STRLEN *cop_warnings; /* lexical warnings bitmask */
451-
/* compile time state of %^H. See the comment in op.c for how this is
452-
used to recreate a hash to return from caller. */
452+
/* compile time state of %^H. See the comment in op.c for how this is used
453+
to recreate a hash to return from caller. */
453454
COPHH *cop_hints_hash;
454455
/* for now just a bitmask stored here.
455-
If we get sufficient features this may become a pointer.
456-
How these flags are stored is subject to change without
457-
notice. Use the macros to test for features.
456+
If we get sufficient features this may become a pointer. How these flags
457+
are stored is subject to change without notice. Use the macros to test
458+
for features.
458459
*/
459460
U32 cop_features;
460461
};
@@ -1026,7 +1027,7 @@ struct context {
10261027

10271028
/* private flags for CXt_SUB and CXt_FORMAT */
10281029
#define CXp_MULTICALL 0x10 /* part of a multicall (so don't tear down
1029-
context on exit). (not CXt_FORMAT) */
1030+
context on exit). (not CXt_FORMAT) */
10301031
#define CXp_HASARGS 0x20
10311032
#define CXp_SUB_RE 0x40 /* code called within regex, i.e. (?{}) */
10321033
#define CXp_SUB_RE_FAKE 0x80 /* fake sub CX for (?{}) in current scope */
@@ -1064,8 +1065,8 @@ struct context {
10641065
( CxTYPE(cx) >= CXt_LOOP_ARY && CxTYPE(cx) <= CXt_LOOP_LIST)
10651066

10661067
/* private flags for CXt_DEFER */
1067-
#define CXp_FINALLY 0x20 /* `finally` block; semantically identical
1068-
* but matters for diagnostic messages */
1068+
#define CXp_FINALLY 0x20 /* `finally` block; semantically identical but
1069+
* matters for diagnostic messages */
10691070

10701071
/* deprecated old name before real try/catch was added */
10711072
#define CXp_TRYBLOCK CXp_EVALBLOCK
@@ -1084,33 +1085,33 @@ struct context {
10841085
#endif
10851086

10861087
/* extra flags for Perl_call_* routines */
1087-
#define G_DISCARD 0x4 /* Call FREETMPS.
1088-
Don't change this without consulting the
1089-
hash actions codes defined in hv.h */
1090-
#define G_EVAL 0x8 /* Assume eval {} around
1091-
subroutine call. */
1088+
#define G_DISCARD 0x4 /* Call FREETMPS. Don't change this
1089+
without consulting the hash actions
1090+
codes defined in hv.h */
1091+
#define G_EVAL 0x8 /* Assume eval {} around subroutine
1092+
call. */
10921093
#define G_NOARGS 0x10 /* Don't construct a @_ array. */
10931094
#define G_KEEPERR 0x20 /* Warn for errors, don't
10941095
overwrite $@ */
10951096
#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */
10961097
#define G_METHOD 0x80 /* Calling method. */
1097-
#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv or
1098-
fold_constants. */
1099-
#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef
1100-
A special case for UNSHIFT in
1101-
Perl_magic_methcall(). */
1098+
#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv
1099+
or fold_constants. */
1100+
#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef A
1101+
special case for UNSHIFT in
1102+
Perl_magic_methcall(). */
11021103
#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling
1103-
Perl_magic_methcall(). */
1104+
Perl_magic_methcall(). */
11041105
#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */
1105-
#define G_METHOD_NAMED 0x1000 /* calling named method, eg
1106-
without :: or ' */
1106+
#define G_METHOD_NAMED 0x1000 /* calling named method, eg without ::
1107+
or ' */
11071108
#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */
11081109

11091110
/* flag bits for PL_in_eval */
11101111
#define EVAL_NULL 0 /* not in an eval */
11111112
#define EVAL_INEVAL 1 /* some enclosing scope is an eval */
1112-
#define EVAL_WARNONLY 2 /* used by yywarn() when
1113-
calling yyerror() */
1113+
#define EVAL_WARNONLY 2 /* used by yywarn() when calling
1114+
yyerror() */
11141115
#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */
11151116
#define EVAL_INREQUIRE 8 /* The code is being required. */
11161117
#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with
@@ -1146,12 +1147,13 @@ struct stackinfo {
11461147
I32 si_cxmax; /* maximum allocated index */
11471148
I32 si_cxsubix; /* topmost sub/eval/format */
11481149
I32 si_type; /* type of runlevel */
1149-
I32 si_markoff; /* offset where markstack begins for us.
1150-
* currently used only with DEBUGGING,
1151-
* but not #ifdef-ed for bincompat */
1150+
I32 si_markoff; /* offset where markstack begins for
1151+
* us. currently used only with
1152+
* DEBUGGING, but not #ifdef-ed for
1153+
* bincompat */
11521154
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
11531155
/* high water mark: for checking if the stack was correctly extended /
1154-
* tested for extension by each pp function */
1156+
* tested for extension by each pp function */
11551157
SSize_t si_stack_hwm;
11561158
#endif
11571159

cv.h

+7-8
Original file line numberDiff line numberDiff line change
@@ -117,27 +117,26 @@ See L<perlguts/Autoloading with XSUBs>.
117117
* renamed to avoid collision with an upcoming feature */
118118
#define CVf_NOWARN_AMBIGUOUS 0x0001
119119

120-
#define CVf_LVALUE 0x0002 /* CV return value can be
121-
used as lvalue */
120+
#define CVf_LVALUE 0x0002 /* CV return value can be used as
121+
lvalue */
122122
#define CVf_CONST 0x0004 /* inlinable sub */
123123
#define CVf_ISXSUB 0x0008 /* CV is an XSUB, not pure perl. */
124124

125125
#define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */
126126
#define CVf_CLONE 0x0020 /* anon CV uses external lexicals */
127127
#define CVf_CLONED 0x0040 /* a clone of one of those */
128128
#define CVf_ANON 0x0080 /* CV is not pointed to by a GV */
129-
#define CVf_UNIQUE 0x0100 /* sub is only called once
130-
(eg PL_main_cv,
131-
require, eval). */
129+
#define CVf_UNIQUE 0x0100 /* sub is only called once (eg
130+
PL_main_cv, require, eval). */
132131
#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV
133-
(esp. useful for special XSUBs) */
132+
(esp. useful for special XSUBs) */
134133
#define CVf_CVGV_RC 0x0400 /* CvGV is reference counted */
135134
#if defined(PERL_CORE) || defined(PERL_EXT)
136135
# define CVf_SLABBED 0x0800 /* Holds refcount on op slab */
137136
#endif
138137
#define CVf_DYNFILE 0x1000 /* The filename is malloced */
139-
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed
140-
sub name */
138+
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub
139+
name */
141140
#define CVf_HASEVAL 0x4000 /* contains string eval */
142141
#define CVf_NAMED 0x8000 /* Has a name HEK */
143142
#define CVf_LEXICAL 0x10000 /* Omit package from name */

dosish.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#else
2222
# define PERL_SYS_INIT_BODY(c,v) \
2323
MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT
24-
# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined,
25-
or somethin?" */
24+
# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or
25+
somethin?" */
2626
#endif
2727

2828
/* Generally add things last-in first-terminated. IO and memory terminations
@@ -66,21 +66,21 @@
6666
#define USE_STAT_RDEV /**/
6767

6868
/* ACME_MESS:
69-
* This symbol, if defined, indicates that error messages should be
70-
* should be generated in a format that allows the use of the Acme
71-
* GUI/editor's autofind feature.
69+
* This symbol, if defined, indicates that error messages should be should
70+
* be generated in a format that allows the use of the Acme GUI/editor's
71+
* autofind feature.
7272
*/
7373
#undef ACME_MESS /**/
7474

7575
/* ALTERNATE_SHEBANG:
76-
* This symbol, if defined, contains a "magic" string which may be used
77-
* as the first line of a Perl program designed to be executed directly
78-
* by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG
79-
* begins with a character other then #, then Perl will only treat
80-
* it as a command line if it finds the string "perl" in the first
81-
* word; otherwise it's treated as the first line of code in the script.
82-
* (IOW, Perl won't hand off to another interpreter via an alternate
83-
* shebang sequence that might be legal Perl code.)
76+
* This symbol, if defined, contains a "magic" string which may be used as
77+
* the first line of a Perl program designed to be executed directly by
78+
* name, instead of the standard Unix #!. If ALTERNATE_SHEBANG begins with
79+
* a character other then #, then Perl will only treat it as a command
80+
* line if it finds the string "perl" in the first word; otherwise it's
81+
* treated as the first line of code in the script. (IOW, Perl won't hand
82+
* off to another interpreter via an alternate shebang sequence that might
83+
* be legal Perl code.)
8484
*/
8585
/* #define ALTERNATE_SHEBANG "#!" / **/
8686

0 commit comments

Comments
 (0)