From: Jarkko Hietaniemi Date: Sun, 25 Jun 2000 16:36:45 +0000 (+0000) Subject: Tweak embed.pl, regen headers. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=732bce8ca9ade99f36ea3935c33c641ae9422f3e;p=p5sagit%2Fp5-mst-13.2.git Tweak embed.pl, regen headers. p4raw-id: //depot/cfgperl@6237 --- diff --git a/embed.pl b/embed.pl index c0716f7..419ae4e 100755 --- a/embed.pl +++ b/embed.pl @@ -1083,10 +1083,10 @@ my %docfuncs; sub autodoc ($$) { # parse a file and extract documentation info my($fh,$file) = @_; - my($in, $doc); - + my($in, $doc, $line); FUNC: while (defined($in = <$fh>)) { + $line++; if ($in =~ /^=for\s+apidoc\s+(.*)\n/) { my $proto = $1; $proto = "||$proto" unless $proto =~ /\|/; @@ -1094,7 +1094,12 @@ FUNC: my $docs = ""; DOC: while (defined($doc = <$fh>)) { + $line++; last DOC if $doc =~ /^=\w+/; + if ($doc =~ m:^\*/$:) { + warn "=cut missing? $file:$line:$doc";; + last DOC; + } $docs .= $doc; } $docs = "\n$docs" if $docs and $docs !~ /^\n/; @@ -1109,9 +1114,13 @@ DOC: else { $docfuncs{$name} = [$flags, $docs, $ret, $file, @args]; } - if ($doc =~ /^=for/) { - $in = $doc; - redo FUNC; + if (defined $doc) { + if ($doc =~ /^=for/) { + $in = $doc; + redo FUNC; + } + } else { + warn "$file:$line:$in"; } } } @@ -1172,6 +1181,8 @@ walk_table { # load documented functions into approriate hash } \*DOC; for (sort keys %docfuncs) { + # Have you used a full for apidoc or just a func name? + # Have you used Ap instead of Am in the for apidoc? warn "Unable to place $_!\n"; } diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 6e504c1..f274641 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -150,6 +150,16 @@ must then use C to assign values to these new elements. =for hackers Found in file av.c +=item bytes_to_utf8 + +Converts a string C of length C from ASCII into UTF8 encoding. +Returns a pointer to the newly-created string. + + U8 * bytes_to_utf8(U8 *s, STRLEN len) + +=for hackers +Found in file utf8.c + =item call_argv Performs a callback to the specified Perl sub. See L. @@ -2271,19 +2281,19 @@ false, defined or undefined. Does not handle 'get' magic. =for hackers Found in file sv.h -=item SvTYPE - -Returns the type of the SV. See C. +=item svtype - svtype SvTYPE(SV* sv) +An enum of flags for Perl types. These are found in the file B +in the C enum. Test these flags with the C macro. =for hackers Found in file sv.h -=item svtype +=item SvTYPE -An enum of flags for Perl types. These are found in the file B -in the C enum. Test these flags with the C macro. +Returns the type of the SV. See C. + + svtype SvTYPE(SV* sv) =for hackers Found in file sv.h @@ -2928,6 +2938,16 @@ Converts the specified character to uppercase. =for hackers Found in file handy.h +=item utf8_to_bytes + +Converts a string C of length C from UTF8 into ASCII encoding. +Unlike C, this over-writes the original string. + + U8 * utf8_to_bytes(U8 *s, STRLEN len) + +=for hackers +Found in file utf8.c + =item warn This is the XSUB-writer's interface to Perl's C function. Use this diff --git a/utf8.c b/utf8.c index b570b12..b77cfdc 100644 --- a/utf8.c +++ b/utf8.c @@ -223,7 +223,7 @@ Perl_utf8_hop(pTHX_ U8 *s, I32 off) } /* -=for apidoc utf8_to_bytes +=for apidoc Am|U8 *|utf8_to_bytes|U8 *s|STRLEN len Converts a string C of length C from UTF8 into ASCII encoding. Unlike C, this over-writes the original string. @@ -256,11 +256,12 @@ Perl_utf8_to_bytes(pTHX_ U8* s, STRLEN len) } /* -=for apidoc bytes_to_utf8 +=for apidoc Am|U8 *|bytes_to_utf8|U8 *s|STRLEN len Converts a string C of length C from ASCII into UTF8 encoding. Returns a pointer to the newly-created string. +=cut */ U8*