Skip to content

Commit 6554691

Browse files
committed
WS Cleanup Stage #10 - reflow C comments (2)
1 parent 1a628d7 commit 6554691

File tree

17 files changed

+473
-289
lines changed

17 files changed

+473
-289
lines changed

cop.h

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,8 @@ struct block_eval {
793793

794794
/* loop context */
795795
struct block_loop {
796-
LOOP *my_op; /* My op, that contains redo, next and last ops. */
796+
LOOP *my_op; /* My op, that contains redo,
797+
next and last ops. */
797798
union { /* different ways of locating the iteration variable */
798799
SV **svp; /* for lexicals: address of pad slot */
799800
GV *gv; /* for package vars */
@@ -818,7 +819,8 @@ struct block_loop {
818819
} lazysv;
819820
} state_u;
820821
#ifdef USE_ITHREADS
821-
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
822+
PAD *oldcomppad; /* needed to map itervar_u.svp
823+
during thread clone */
822824
#endif
823825
};
824826

@@ -1073,28 +1075,31 @@ struct context {
10731075

10741076
/* extra flags for Perl_call_* routines */
10751077
#define G_DISCARD 0x4 /* Call FREETMPS. Don't change this
1076-
without consulting the hash
1077-
actions codes defined in hv.h */
1078-
#define G_EVAL 0x8 /* Assume eval {} around subroutine call. */
1078+
without consulting the hash
1079+
actions codes defined in hv.h */
1080+
#define G_EVAL 0x8 /* Assume eval {} around
1081+
subroutine call. */
10791082
#define G_NOARGS 0x10 /* Don't construct a @_ array. */
10801083
#define G_KEEPERR 0x20 /* Warn for errors, don't overwrite $@ */
10811084
#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */
10821085
#define G_METHOD 0x80 /* Calling method. */
10831086
#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv
1084-
or fold_constants. */
1087+
or fold_constants. */
10851088
#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef
1086-
A special case for UNSHIFT in
1087-
Perl_magic_methcall(). */
1089+
A special case for UNSHIFT in
1090+
Perl_magic_methcall(). */
10881091
#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling
1089-
Perl_magic_methcall(). */
1092+
Perl_magic_methcall(). */
10901093
#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */
1091-
#define G_METHOD_NAMED 0x1000 /* calling named method, eg without :: or ' */
1094+
#define G_METHOD_NAMED 0x1000 /* calling named method, eg
1095+
without :: or ' */
10921096
#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */
10931097

10941098
/* flag bits for PL_in_eval */
10951099
#define EVAL_NULL 0 /* not in an eval */
10961100
#define EVAL_INEVAL 1 /* some enclosing scope is an eval */
1097-
#define EVAL_WARNONLY 2 /* used by yywarn() when calling yyerror() */
1101+
#define EVAL_WARNONLY 2 /* used by yywarn() when
1102+
calling yyerror() */
10981103
#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */
10991104
#define EVAL_INREQUIRE 8 /* The code is being required. */
11001105
#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with G_RE_REPARSING */
@@ -1135,7 +1140,7 @@ struct stackinfo {
11351140
* #ifdef-ed for bincompat */
11361141
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
11371142
/* high water mark: for checking if the stack was correctly
1138-
* extended / tested for extension by each pp function */
1143+
* extended / tested for extension by each pp function */
11391144
SSize_t si_stack_hwm;
11401145
#endif
11411146

cv.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,33 @@ L<perlguts/Autoloading with XSUBs>.
118118
* but is renamed to avoid collision with an upcoming feature */
119119
#define CVf_NOWARN_AMBIGUOUS 0x0001
120120

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

125126
#define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */
126127
#define CVf_CLONE 0x0020 /* anon CV uses external lexicals */
127128
#define CVf_CLONED 0x0040 /* a clone of one of those */
128129
#define CVf_ANON 0x0080 /* CV is not pointed to by a GV */
129-
#define CVf_UNIQUE 0x0100 /* sub is only called once (eg PL_main_cv,
130-
require, eval). */
131-
#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV (esp.
132-
useful for special XSUBs) */
130+
#define CVf_UNIQUE 0x0100 /* sub is only called once (eg
131+
PL_main_cv, require, eval). */
132+
#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV
133+
(esp. useful for special XSUBs) */
133134
#define CVf_CVGV_RC 0x0400 /* CvGV is reference counted */
134135
#if defined(PERL_CORE) || defined(PERL_EXT)
135136
# define CVf_SLABBED 0x0800 /* Holds refcount on op slab */
136137
#endif
137138
#define CVf_DYNFILE 0x1000 /* The filename is malloced */
138-
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub name */
139+
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed
140+
sub name */
139141
#define CVf_HASEVAL 0x4000 /* contains string eval */
140142
#define CVf_NAMED 0x8000 /* Has a name HEK */
141143
#define CVf_LEXICAL 0x10000 /* Omit package from name */
142144
#define CVf_ANONCONST 0x20000 /* :const - create anonconst op */
143145
#define CVf_SIGNATURE 0x40000 /* CV uses a signature */
144-
#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv is refcounted */
146+
#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv
147+
is refcounted */
145148

146149
/* This symbol for optimised communication between toke.c and op.c: */
147150
#define CVf_BUILTIN_ATTRS (CVf_NOWARN_AMBIGUOUS|CVf_LVALUE|CVf_ANONCONST)

dosish.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# define PERL_SYS_INIT_BODY(c,v) \
2323
MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT
2424
# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined,
25-
or somethin?" */
25+
or somethin?" */
2626
#endif
2727

2828
/* Generally add things last-in first-terminated. IO and memory

form.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#define FF_SKIP 3 /* skip <arg> chars in format */
1414
#define FF_FETCH 4 /* get next item and set field size to <arg> */
1515
#define FF_CHECKNL 5 /* find max len of item (up to
16-
\n) that fits field */
16+
\n) that fits field */
1717
#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */
1818
#define FF_SPACE 7 /* append padding space (diff
19-
of field, item size) */
19+
of field, item size) */
2020
#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */
2121
#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */
2222
#define FF_CHOP 10 /* (for ^*) chop the current item */

gv.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,11 @@ Return the CV from the GV.
232232
time, so don't try to free what's there. */
233233
#define GV_ADDMULTI 0x02 /* add, pretending it has been added already;
234234
used also by gv_init_* */
235-
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */
236-
/* 0x08 UNUSED */
237-
#define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */
235+
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't
236+
already there */
237+
/* 0x08 UNUSED */
238+
#define GV_NOINIT 0x10 /* add, but don't init symbol,
239+
if type != PVGV */
238240
/* This is used by toke.c to avoid turing placeholder constants in the symbol
239241
table into full PVGVs with attached constant subroutines. */
240242
#define GV_NOADD_NOINIT 0x20 /* Don't add the symbol if it's not there.
@@ -258,8 +260,8 @@ Return the CV from the GV.
258260
/* Flags for gv_autoload_ */
259261
#define GV_AUTOLOAD_ISMETHOD 1 /* autoloading a method? */
260262

261-
/* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as
262-
a flag to various gv_* functions, so ensure it lies outside this range.
263+
/* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as
264+
a flag to various gv_* functions, so ensure it lies outside this range.
263265
*/
264266

265267
#define GV_NOADD_MASK \

handy.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ END_EXTERN_C
16101610
# define isSPACE_A(c) generic_isCC_A_(c, CC_SPACE_)
16111611
# define isWORDCHAR_A(c) generic_isCC_A_(c, CC_WORDCHAR_)
16121612
# define isXDIGIT_A(c) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII
1613-
xdigits */
1613+
xdigits */
16141614
# define isIDFIRST_A(c) generic_isCC_A_(c, CC_IDFIRST_)
16151615
# define isALPHA_L1(c) generic_isCC_(c, CC_ALPHA_)
16161616
# define isALPHANUMERIC_L1(c) generic_isCC_(c, CC_ALPHANUMERIC_)
@@ -1857,7 +1857,8 @@ END_EXTERN_C
18571857
((! FITS_IN_8_BITS(c)) \
18581858
? (c) \
18591859
: PL_latin1_lc[ (U8) (c) ])
1860-
#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */
1860+
#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for
1861+
consistency */
18611862

18621863
/* Modified uc. Is correct uc except for three non-ascii chars
18631864
* which are all mapped to one of them, and these need special
@@ -2137,7 +2138,8 @@ END_EXTERN_C
21372138
#define isALPHANUMERIC_uvchr(c) generic_invlist_uvchr_(CC_ALPHANUMERIC_, c)
21382139
#define isASCII_uvchr(c) isASCII(c)
21392140
#define isBLANK_uvchr(c) generic_uvchr_(CC_BLANK_, is_HORIZWS_cp_high, c)
2140-
#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are in Latin1 */
2141+
#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are
2142+
in Latin1 */
21412143
#define isDIGIT_uvchr(c) generic_invlist_uvchr_(CC_DIGIT_, c)
21422144
#define isGRAPH_uvchr(c) generic_invlist_uvchr_(CC_GRAPH_, c)
21432145
#define isIDCONT_uvchr(c) \
@@ -2485,7 +2487,7 @@ END_EXTERN_C
24852487
#define isALNUM_LC_utf8(p,e) isWORDCHAR_LC_utf8(p,e)
24862488
#define isALNUM_LC_utf8_safe(p,e) isWORDCHAR_LC_utf8_safe(p,e)
24872489
#define isALNUMC_A(c) isALPHANUMERIC_A(c) /* Mnemonic: "C's
2488-
alnum" */
2490+
alnum" */
24892491
#define isALNUMC_L1(c) isALPHANUMERIC_L1(c)
24902492
#define isALNUMC(c) isALPHANUMERIC(c)
24912493
#define isALNUMC_LC(c) isALPHANUMERIC_LC(c)

hv.h

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ struct mro_alg {
7777
AV *(*resolve)(pTHX_ HV* stash, U32 level);
7878
const char *name;
7979
U16 length;
80-
U16 kflags; /* For the hash API - set HVhek_UTF8 if name is UTF-8 */
80+
U16 kflags; /* For the hash API - set
81+
HVhek_UTF8 if name is UTF-8 */
8182
U32 hash; /* or 0 */
8283
};
8384

@@ -89,13 +90,19 @@ struct mro_meta {
8990
value stored in and owned by mro_linear_all. */
9091
SV *mro_linear_current;
9192
HV *mro_nextmethod; /* next::method caching */
92-
U32 cache_gen; /* Bumping this invalidates our method cache */
93-
U32 pkg_gen; /* Bumps when local methods/@ISA change */
94-
const struct mro_alg *mro_which; /* which mro alg is in use? */
95-
HV *isa; /* Everything this class @ISA */
93+
U32 cache_gen; /* Bumping this invalidates
94+
our method cache */
95+
U32 pkg_gen; /* Bumps when local
96+
methods/@ISA change */
97+
const struct mro_alg *mro_which; /* which mro alg is
98+
in use? */
99+
HV *isa; /* Everything this
100+
class @ISA */
96101
HV *super; /* SUPER method cache */
97-
CV *destroy; /* DESTROY method if destroy_gen non-zero */
98-
U32 destroy_gen; /* Generation number of DESTROY cache */
102+
CV *destroy; /* DESTROY method if
103+
destroy_gen non-zero */
104+
U32 destroy_gen; /* Generation number of
105+
DESTROY cache */
99106
};
100107

101108
#define MRO_GET_PRIVATE_DATA(smeta, which) \
@@ -113,29 +120,34 @@ union _xhvnameu {
113120

114121
struct xpvhv_aux {
115122
union _xhvnameu xhv_name_u; /* name, if a symbol table */
116-
AV *xhv_backreferences; /* back references for weak references */
123+
AV *xhv_backreferences; /* back references for
124+
weak references */
117125
HE *xhv_eiter; /* current entry of iterator */
118126
I32 xhv_riter; /* current root of iterator */
119127

120-
/* Concerning xhv_name_count: When non-zero, xhv_name_u contains a pointer
121-
* to an array of HEK pointers, this being the length. The first element is
122-
* the name of the stash, which may be NULL. If xhv_name_count is positive,
123-
* then *xhv_name is one of the effective names. If xhv_name_count is nega-
124-
* tive, then xhv_name_u.xhvnameu_names[1] is the first effective name.
125-
*/
128+
/* Concerning xhv_name_count: When non-zero, xhv_name_u contains
129+
* a pointer to an array of HEK pointers, this being the length.
130+
* The first element is the name of the stash, which may be
131+
* NULL. If xhv_name_count is positive, then *xhv_name is one of
132+
* the effective names. If xhv_name_count is nega- tive, then
133+
* xhv_name_u.xhvnameu_names[1] is the first effective name.
134+
*/
126135
I32 xhv_name_count;
127136
struct mro_meta *xhv_mro_meta;
128137
#ifdef PERL_HASH_RANDOMIZE_KEYS
129-
U32 xhv_rand; /* random value for hash traversal */
130-
U32 xhv_last_rand; /* last random value for hash traversal,
131-
used to detect each() after insert
132-
for warnings */
138+
U32 xhv_rand; /* random value for hash
139+
traversal */
140+
U32 xhv_last_rand; /* last random value for hash
141+
traversal, used to detect each()
142+
after insert for warnings */
133143
#endif
134144
U32 xhv_aux_flags; /* assorted extra flags */
135145
};
136146

137-
#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */
138-
#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */
147+
#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned
148+
by gv_check */
149+
#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod)
150+
not present */
139151

140152
/* hash structure: */
141153
/* This structure must match the beginning of struct xpvmg in sv.h. */
@@ -150,7 +162,8 @@ struct xpvhv_with_aux {
150162
HV *xmg_stash; /* class package */
151163
union _xmgu xmg_u;
152164
STRLEN xhv_keys; /* total keys, including placeholders */
153-
STRLEN xhv_max; /* subscript of last element of xhv_array */
165+
STRLEN xhv_max; /* subscript of last element
166+
of xhv_array */
154167
struct xpvhv_aux xhv_aux;
155168
};
156169

@@ -438,16 +451,18 @@ Use this to check whether it is valid to call C<HvAUX()>.
438451

439452
#define HVhek_UTF8 0x01 /* Key is utf8 encoded. */
440453
#define HVhek_WASUTF8 0x02 /* Key is bytes here, but was
441-
supplied as utf8. */
454+
supplied as utf8. */
442455
#define HVhek_NOTSHARED 0x04 /* This key isn't a shared hash key. */
443456
/* the following flags are options for functions,
444457
they are not stored in heks */
445-
#define HVhek_FREEKEY 0x100 /* Internal flag to say key is Newx()ed. */
446-
#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder. (may
447-
* change, but Storable is a core module) */
458+
#define HVhek_FREEKEY 0x100 /* Internal flag to say key
459+
is Newx()ed. */
460+
#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder.
461+
* (may change, but Storable is a core
462+
* module) */
448463
#define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical
449-
form. If the string is UTF-8, it
450-
cannot be converted to bytes. */
464+
form. If the string is UTF-8, it
465+
cannot be converted to bytes. */
451466
#define HVhek_ENABLEHVKFLAGS (HVhek_UTF8|HVhek_WASUTF8)
452467

453468
#define HEK_UTF8(hek) (HEK_FLAGS(hek) & HVhek_UTF8)
@@ -624,7 +639,8 @@ instead of a string/length pair, and no precomputed hash.
624639

625640
/* Flag bits are HVhek_UTF8, HVhek_WASUTF8, then */
626641
#define HVrhek_undef 0x00 /* Value is undef. */
627-
#define HVrhek_delete 0x10 /* Value is placeholder - signifies delete. */
642+
#define HVrhek_delete 0x10 /* Value is placeholder -
643+
signifies delete. */
628644
#define HVrhek_IV 0x20 /* Value is IV. */
629645
#define HVrhek_UV 0x30 /* Value is UV. */
630646
#define HVrhek_PV 0x40 /* Value is a (byte) string. */

0 commit comments

Comments
 (0)