5.6.0 Patch for EPOC
[p5sagit/p5-mst-13.2.git] / embed.pl
index c0716f7..bf41a0a 100755 (executable)
--- 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";
 }
 
@@ -1609,6 +1620,7 @@ Ap        |U32    |to_uni_upper_lc|U32 c
 Ap     |U32    |to_uni_title_lc|U32 c
 Ap     |U32    |to_uni_lower_lc|U32 c
 Ap     |int    |is_utf8_char   |U8 *p
+Ap     |bool   |is_utf8_string |U8 *s|STRLEN len
 Ap     |bool   |is_utf8_alnum  |U8 *p
 Ap     |bool   |is_utf8_alnumc |U8 *p
 Ap     |bool   |is_utf8_idfirst|U8 *p
@@ -2052,7 +2064,7 @@ Ap        |U8*    |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen
 Ap     |I32    |utf8_distance  |U8 *a|U8 *b
 Ap     |U8*    |utf8_hop       |U8 *s|I32 off
 Ap     |U8*    |utf8_to_bytes  |U8 *s|STRLEN len
-Ap     |U8*    |bytes_to_utf8  |U8 *s|STRLEN len
+Ap     |U8*    |bytes_to_utf8  |U8 *s|STRLEN *len
 Ap     |UV     |utf8_to_uv     |U8 *s|I32* retlen
 Ap     |U8*    |uv_to_utf8     |U8 *d|UV uv
 p      |void   |vivify_defelem |SV* sv
@@ -2187,14 +2199,12 @@ s       |I32    |avhv_index     |AV* av|SV* sv|U32 hash
 #endif
 
 #if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
-s      |I32    |do_trans_CC_simple     |SV *sv
-s      |I32    |do_trans_CC_count      |SV *sv
-s      |I32    |do_trans_CC_complex    |SV *sv
-s      |I32    |do_trans_UU_simple     |SV *sv
-s      |I32    |do_trans_UU_count      |SV *sv
-s      |I32    |do_trans_UU_complex    |SV *sv
-s      |I32    |do_trans_UC_trivial    |SV *sv
-s      |I32    |do_trans_CU_trivial    |SV *sv
+s      |I32    |do_trans_simple        |SV *sv
+s      |I32    |do_trans_count         |SV *sv
+s      |I32    |do_trans_complex       |SV *sv
+s      |I32    |do_trans_simple_utf8   |SV *sv
+s      |I32    |do_trans_count_utf8    |SV *sv
+s      |I32    |do_trans_complex_utf8  |SV *sv
 #endif
 
 #if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT)
@@ -2472,6 +2482,7 @@ s |I32    |sublex_done
 s      |I32    |sublex_push
 s      |I32    |sublex_start
 s      |char * |filter_gets    |SV *sv|PerlIO *fp|STRLEN append
+s      |HV *   |find_in_my_stash|char *pkgname|I32 len
 s      |SV*    |new_constant   |char *s|STRLEN len|const char *key|SV *sv \
                                |SV *pv|const char *type
 s      |int    |ao             |int toketype