$directives_scn => {},
$concurrency_scn => {},
$COP_scn => {},
- $CV_scn => {},
+ $CV_scn => {
+ header => <<~'EOT',
+ This section documents functions to manipulate CVs which are
+ code-values, meaning subroutines. For more information, see
+ L<perlguts>.
+ EOT
+ },
+
$custom_scn => {},
$dump_scn => {},
$embedding_scn => {},
$filters_scn => {},
$stack_scn => {},
$string_scn => {
- header => <<~'EOT',
- See also C<L</Unicode Support>>.
+ header => <<~EOT,
+ See also C<L</$unicode_scn>>.
EOT
},
$SV_flags_scn => {},
$SV_scn => {},
$time_scn => {},
$typedefs_scn => {},
- $unicode_scn => {},
+ $unicode_scn => {
+ header => <<~EOT,
+ L<perlguts/Unicode Support> has an introduction to this API.
+
+ See also C<L</$classification_scn>>,
+ C<L</$casing_scn>>,
+ and C<L</$string_scn>>.
+ Various functions outside this section also work specially with
+ Unicode. Search for the string "utf8" in this document.
+ EOT
+ },
$utility_scn => {},
$versioning_scn => {},
$warning_scn => {},
return ($flags, $embed_docref->{'ret_type'}, $embed_docref->{args}->@*);
}
+# The section that is in effect at the beginning of the given file. If not
+# listed here, an apidoc_section line must precede any apidoc lines.
+# This allows the files listed here that generally are single-purpose, to not
+# have to worry about the autodoc section
+my %initial_file_section = (
+ 'av.c' => $AV_scn,
+ 'av.h' => $AV_scn,
+ 'cv.h' => $CV_scn,
+ 'doio.c' => $io_scn,
+ 'gv.c' => $GV_scn,
+ 'gv.h' => $GV_scn,
+ 'hv.h' => $HV_scn,
+ 'locale.c' => $locale_scn,
+ 'malloc.c' => $memory_scn,
+ 'numeric.c' => $numeric_scn,
+ 'opnames.h' => $optree_construction_scn,
+ 'pad.h'=> $pad_scn,
+ 'patchlevel.h' => $versioning_scn,
+ 'perlio.h' => $io_scn,
+ 'pod/perlapio.pod' => $io_scn,
+ 'pod/perlcall.pod' => $callback_scn,
+ 'pod/perlembed.pod' => $embedding_scn,
+ 'pod/perlfilter.pod' => $filters_scn,
+ 'pod/perliol.pod' => $io_scn,
+ 'pod/perlmroapi.pod' => $MRO_scn,
+ 'pod/perlreguts.pod' => $regexp_scn,
+ 'pp_pack.c' => $pack_scn,
+ 'pp_sort.c' => $SV_scn,
+ 'regcomp.c' => $regexp_scn,
+ 'regexp.h' => $regexp_scn,
+ 'unicode_constants.h' => $unicode_scn,
+ 'utf8.c' => $unicode_scn,
+ 'utf8.h' => $unicode_scn,
+ 'vutil.c' => $versioning_scn,
+ );
+
sub autodoc ($$) { # parse a file and extract documentation info
my($fh,$file) = @_;
my($in, $line_num, $header, $section);
+ $section = $initial_file_section{$file}
+ if defined $initial_file_section{$file};
+
my $file_is_C = $file =~ / \. [ch] $ /x;
# Count lines easier
* [p.476 of _The Lord of the Rings_, III/iv: "Treebeard"]
*/
-/*
-=for apidoc_section AV Handling
-*/
-
#include "EXTERN.h"
#define PERL_IN_AV_C
#include "perl.h"
*/
/*
-=for apidoc_section AV Handling
-
=for apidoc ADmnU||Nullav
Null AV pointer.
};
/*
-=head1 CV Handling
-
-This section documents functions to manipulate CVs which are code-values,
-meaning subroutines. For more information, see L<perlguts>.
-
=for apidoc Ayh||CV
=for apidoc ADmnU||Nullcv
#endif /* SYSV IPC */
/*
-=for apidoc_section Input/Output
-
=for apidoc start_glob
Function called by C<do_readline> to spawn a glob (or do the glob inside
#define GvNAMELEN(gv) GvNAMELEN_get(gv)
/*
-=for apidoc_section GV Handling
-
=for apidoc Am|SV*|GvSV|GV* gv
Return the SV from the GV.
};
/*
-=for apidoc_section HV Handling
-
=for apidoc AmnU||HEf_SVKEY
This flag, used in the length slot of hash entries and magic structures,
specifies the structure contains an C<SV*> pointer where a C<char*> pointer
#endif
/*
-
-=for apidoc_section Locales
-
=for apidoc Perl_setlocale
This is an (almost) drop-in replacement for the system L<C<setlocale(3)>>,
/*
These have the same interfaces as the C lib ones, so are considered documented
-=for apidoc_section Memory Management
=for apidoc malloc
=for apidoc calloc
=for apidoc realloc
*/
/*
-=for apidoc_section Numeric Functions
-
-=cut
This file contains all the stuff needed by perl for manipulating numeric
values, including such things as replacements for the OS's atof() function
#define newATTRSUB(f, o, p, a, b) Perl_newATTRSUB_x(aTHX_ f, o, p, a, b, FALSE)
#define newSUB(f, o, p, b) newATTRSUB((f), (o), (p), NULL, (b))
-/*
-=for apidoc_section Hook manipulation
-*/
-
#ifdef USE_ITHREADS
# define OP_CHECK_MUTEX_INIT MUTEX_INIT(&PL_check_mutex)
# define OP_CHECK_MUTEX_LOCK MUTEX_LOCK(&PL_check_mutex)
* variables, op targets and constants.
*/
-/*
-=for apidoc_section Pad Data Structures
-*/
-
-
/* offsets within a pad */
typedef SSize_t PADOFFSET; /* signed so that -1 is a valid value */
*/
/*
-=for apidoc_section Versioning
-
=for apidoc AmDnU|U8|PERL_REVISION
The major number component of the perl interpreter currently being compiled or
executing. This has been C<5> from 1993 into 2020.
#define PerlIO PerlIO
#define PERLIO_LAYERS 1
-/*
-=for apidoc_section Input/Output
-=cut
-*/
/* PERLIO_FUNCS_CONST is now on by default for efficiency, PERLIO_FUNCS_CONST
can be removed 1 day once stable & then PerlIO vtables are permanently RO */
#ifdef PERLIO_FUNCS_CONST
const char *layers);
void PerlIO_debug(const char *fmt,...);
-=for apidoc_section Input/Output
+=for apidoc_section $io
=for apidoc Amh|int |PerlIO_apply_layers|PerlIO *f|const char *mode|const char *layers
=for apidoc Amh|int |PerlIO_binmode|PerlIO *f|int ptype|int imode|const char *layers
=head1 FLAG VALUES
-=for apidoc_section Callback Functions
-
The C<flags> parameter in all the I<call_*> functions is one of C<G_VOID>,
C<G_SCALAR>, or C<G_ARRAY>, which indicate the call context, OR'ed together
with a bit mask of any combination of the other G_* symbols defined below.
C<ERRSV> is a macro that calls a function, and C<SvTRUE(ERRSV)> would
end up calling that function multiple times.
-=for apidoc_section Callback Functions
=for apidoc AmnUh|GV *|PL_errgv
=item 3.
1;
-=for apidoc_section Source Filters
=for apidoc filter_add
=for apidoc filter_read
(Perl's C<sv_gets()> does not expect the streams fast C<gets> behaviour
to change during one "get".)
-=for apidoc_section Input/Output
=for apidoc Amnh||PERLIO_F_APPEND
=for apidoc_item || PERLIO_F_CANREAD
=for apidoc_item ||PERLIO_F_CANWRITE
meta = HvMROMETA(stash);
private_sv = MRO_GET_PRIVATE_DATA(meta, &my_mro_alg);
-=for apidoc_section MRO
=for apidoc mro_get_private_data
=for apidoc Amh|SV*|MRO_GET_PRIVATE_DATA|struct mro_meta *const smeta|const struct mro_alg *const which
code can actually be running in totally different contexts due to the
simulated recursion.
-=for apidoc_section REGEXP Functions
=for apidoc pregcomp
=for apidoc pregexec
/*
-=for apidoc_section Pack and Unpack
-
=for apidoc unpackstring
The engine implementing the C<unpack()> Perl function.
}
/*
-=for apidoc_section SV Handling
-
=for apidoc sortsv_flags
In-place sort an array of SV pointers with the given comparison routine,
#define SAVEPVN(p, n) ((p) ? savepvn(p, n) : NULL)
/*
-=for apidoc_section REGEXP Functions
=for apidoc re_dup_guts
Duplicate a regexp.
# define RXapif_REGNAMES_COUNT 0x1000
/*
-=for apidoc_section REGEXP Functions
-
=for apidoc Am|REGEXP *|SvRX|SV *sv
Convenience macro to get the REGEXP from a SV. This is approximately
Config::Perl::V cpan/Config-Perl-V/V.pm 0a0f7207e6505b78ee345a933acb0246a13579f5
ExtUtils::Constant cpan/ExtUtils-Constant/t/Constant.t d5c75c41d6736a0c5897130f534af0896a7d6f4d
ExtUtils::PL2Bat cpan/ExtUtils-PL2Bat/t/make_executable.t 2f58339b567d943712488812f06d99f907af46ab
-Filter::Util::Call pod/perlfilter.pod 9b4aec0d8518274ddb0dd37e3b770fe13a44dd1f
+Filter::Util::Call pod/perlfilter.pod 2d98239c4f4a930ad165444c3879629bb91f4cef
Locale::Maketext::Simple cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm 57ed38905791a17c150210cd6f42ead22a7707b6
Math::Complex cpan/Math-Complex/lib/Math/Complex.pm 66f28a17647e2de166909ca66e4ced26f8a0a62e
Math::Complex cpan/Math-Complex/t/Complex.t 17039e03ee798539e770ea9a0d19a99364278306
"Malformed UTF-8 character (unexpected end of string)";
/*
-=head1 Unicode Support
These are various utility functions for manipulating UTF8-encoded
strings. For the uninitiated, this is a method of representing arbitrary
Unicode characters as a variable number of bytes, in such a way that
characters in the ASCII range are unmodified, and a zero byte never appears
within non-zero characters.
-
-=cut
*/
/* helper for Perl__force_out_malformed_utf8_message(). Like
#define FOLD_FLAGS_NOMIX_ASCII 0x4
/*
-=head1 Unicode Support
-L<perlguts/Unicode Support> has an introduction to this API.
-
-See also L</Character classification>,
-and L</Character case changing>.
-Various functions outside this section also work specially with Unicode.
-Search for the string "utf8" in this document.
-
=for apidoc is_ascii_string
This is a misleadingly-named synonym for L</is_utf8_invariant_string>.