<div dir="ltr">Applied.<div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 17, 2017 at 5:54 PM, Xose Vazquez Perez <span dir="ltr"><<a href="mailto:xose.vazquez@gmail.com" target="_blank">xose.vazquez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Cc: Gris Ge <<a href="mailto:fge@redhat.com">fge@redhat.com</a>><br>
Cc: Christophe Varoqui <<a href="mailto:christophe.varoqui@opensvc.com">christophe.varoqui@opensvc.<wbr>com</a>><br>
Cc: device-mapper development <<a href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a>><br>
Signed-off-by: Xose Vazquez Perez <<a href="mailto:xose.vazquez@gmail.com">xose.vazquez@gmail.com</a>><br>
---<br>
 libdmmp/docs/kernel-doc | 164 ++++++++++++++++++++++++++++++<wbr>++++--------------<br>
 1 file changed, 118 insertions(+), 46 deletions(-)<br>
<br>
diff --git a/libdmmp/docs/kernel-doc b/libdmmp/docs/kernel-doc<br>
index 8f5b546..7bd52b8 100644<br>
--- a/libdmmp/docs/kernel-doc<br>
+++ b/libdmmp/docs/kernel-doc<br>
@@ -1,5 +1,6 @@<br>
-#!/usr/bin/perl -w<br>
+#!/usr/bin/env perl<br>
<br>
+use warnings;<br>
 use strict;<br>
<br>
 ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved        ##<br>
@@ -199,29 +200,36 @@ EOF<br>
 # 'funcname()' - function<br>
 # '$ENVVAR' - environmental variable<br>
 # '&struct_name' - name of a structure (up to two words including 'struct')<br>
+# '&struct_name.member' - name of a structure member<br>
 # '@parameter' - name of a parameter<br>
 # '%CONST' - name of a constant.<br>
+# '``LITERAL``' - literal string without any spaces on it.<br>
<br>
 ## init lots of data<br>
<br>
-<br>
 my $errors = 0;<br>
 my $warnings = 0;<br>
 my $anon_struct_union = 0;<br>
<br>
 # match expressions used to find embedded type information<br>
-my $type_constant = '\%([-_\w]+)';<br>
+my $type_constant = '\b``([^\`]+)``\b';<br>
+my $type_constant2 = '\%([-_\w]+)';<br>
 my $type_func = '(\w+)\(\)';<br>
 my $type_param = '\@(\w+(\.\.\.)?)';<br>
 my $type_fp_param = '\@(\w+)\(\)';  # Special RST handling for func ptr params<br>
-my $type_struct = '\&((struct\s*)*[_\w]+)';<br>
-my $type_struct_xml = '\\&amp;((struct\s*)*[_\w]+)';<br>
 my $type_env = '(\$\w+)';<br>
-my $type_enum_full = '\&(enum)\s*([_\w]+)';<br>
-my $type_struct_full = '\&(struct)\s*([_\w]+)';<br>
-my $type_typedef_full = '\&(typedef)\s*([_\w]+)';<br>
-my $type_union_full = '\&(union)\s*([_\w]+)';<br>
-my $type_member = '\&([_\w]+)((\.|->)[_\w]+)';<br>
+my $type_enum = '\&(enum\s*([_\w]+))';<br>
+my $type_struct = '\&(struct\s*([_\w]+))';<br>
+my $type_typedef = '\&(typedef\s*([_\w]+))';<br>
+my $type_union = '\&(union\s*([_\w]+))';<br>
+my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';<br>
+my $type_fallback = '\&([_\w]+)';<br>
+my $type_enum_xml = '\&amp;(enum\s*([_\w]+))';<br>
+my $type_struct_xml = '\&amp;(struct\s*([_\w]+))';<br>
+my $type_typedef_xml = '\&amp;(typedef\s*([_\w]+))';<br>
+my $type_union_xml = '\&amp;(union\s*([_\w]+))';<br>
+my $type_member_xml = '\&amp;([_\w]+)(\.|-\&gt;)([_\<wbr>w]+)';<br>
+my $type_fallback_xml = '\&amp([_\w]+)';<br>
 my $type_member_func = $type_member . '\(\)';<br>
<br>
 # Output conversion substitutions.<br>
@@ -230,10 +238,16 @@ my $type_member_func = $type_member . '\(\)';<br>
 # these work fairly well<br>
 my @highlights_html = (<br>
                        [$type_constant, "<i>\$1</i>"],<br>
+                       [$type_constant2, "<i>\$1</i>"],<br>
                        [$type_func, "<b>\$1</b>"],<br>
+                       [$type_enum_xml, "<i>\$1</i>"],<br>
                        [$type_struct_xml, "<i>\$1</i>"],<br>
+                       [$type_typedef_xml, "<i>\$1</i>"],<br>
+                       [$type_union_xml, "<i>\$1</i>"],<br>
                        [$type_env, "<b><i>\$1</i></b>"],<br>
-                       [$type_param, "<tt><b>\$1</b></tt>"]<br>
+                       [$type_param, "<tt><b>\$1</b></tt>"],<br>
+                       [$type_member_xml, "<tt><i>\$1</i>\$2\$3</tt>"],<br>
+                       [$type_fallback_xml, "<i>\$1</i>"]<br>
                       );<br>
 my $local_lt = "\\\\\\\\lt:";<br>
 my $local_gt = "\\\\\\\\gt:";<br>
@@ -242,10 +256,16 @@ my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>"<br>
 # html version 5<br>
 my @highlights_html5 = (<br>
                         [$type_constant, "<span class=\"const\">\$1</span>"],<br>
+                        [$type_constant2, "<span class=\"const\">\$1</span>"],<br>
                         [$type_func, "<span class=\"func\">\$1</span>"],<br>
+                        [$type_enum_xml, "<span class=\"enum\">\$1</span>"],<br>
                         [$type_struct_xml, "<span class=\"struct\">\$1</span>"],<br>
+                        [$type_typedef_xml, "<span class=\"typedef\">\$1</span>"]<wbr>,<br>
+                        [$type_union_xml, "<span class=\"union\">\$1</span>"],<br>
                         [$type_env, "<span class=\"env\">\$1</span>"],<br>
-                        [$type_param, "<span class=\"param\">\$1</span>]"]<br>
+                        [$type_param, "<span class=\"param\">\$1</span>]"],<br>
+                        [$type_member_xml, "<span class=\"literal\"><span class=\"struct\">\$1</span>\$<wbr>2<span class=\"member\">\$3</span></<wbr>span>"],<br>
+                        [$type_fallback_xml, "<span class=\"struct\">\$1</span>"]<br>
                       );<br>
 my $blankline_html5 = $local_lt . "br /" . $local_gt;<br>
<br>
@@ -253,55 +273,80 @@ my $blankline_html5 = $local_lt . "br /" . $local_gt;<br>
 my @highlights_xml = (<br>
                       ["([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>"],<br>
                       [$type_constant, "<constant>\$1</constant>"],<br>
+                      [$type_constant2, "<constant>\$1</constant>"],<br>
+                      [$type_enum_xml, "<type>\$1</type>"],<br>
                       [$type_struct_xml, "<structname>\$1</structname>"<wbr>],<br>
+                      [$type_typedef_xml, "<type>\$1</type>"],<br>
+                      [$type_union_xml, "<structname>\$1</structname>"<wbr>],<br>
                       [$type_param, "<parameter>\$1</parameter>"],<br>
                       [$type_func, "<function>\$1</function>"],<br>
-                      [$type_env, "<envar>\$1</envar>"]<br>
+                      [$type_env, "<envar>\$1</envar>"],<br>
+                      [$type_member_xml, "<literal><structname>\$1</<wbr>structname>\$2<structfield>\$<wbr>3</structfield></literal>"],<br>
+                      [$type_fallback_xml, "<structname>\$1</structname>"<wbr>]<br>
                     );<br>
 my $blankline_xml = $local_lt . "/para" . $local_gt . $local_lt . "para" . $local_gt . "\n";<br>
<br>
 # gnome, docbook format<br>
 my @highlights_gnome = (<br>
                         [$type_constant, "<replaceable class=\"option\">\$1</<wbr>replaceable>"],<br>
+                        [$type_constant2, "<replaceable class=\"option\">\$1</<wbr>replaceable>"],<br>
                         [$type_func, "<function>\$1</function>"],<br>
+                        [$type_enum, "<type>\$1</type>"],<br>
                         [$type_struct, "<structname>\$1</structname>"<wbr>],<br>
+                        [$type_typedef, "<type>\$1</type>"],<br>
+                        [$type_union, "<structname>\$1</structname>"<wbr>],<br>
                         [$type_env, "<envar>\$1</envar>"],<br>
-                        [$type_param, "<parameter>\$1</parameter>" ]<br>
+                        [$type_param, "<parameter>\$1</parameter>" ],<br>
+                        [$type_member, "<literal><structname>\$1</<wbr>structname>\$2<structfield>\$<wbr>3</structfield></literal>"],<br>
+                        [$type_fallback, "<structname>\$1</structname>"<wbr>]<br>
                       );<br>
 my $blankline_gnome = "</para><para>\n";<br>
<br>
 # these are pretty rough<br>
 my @highlights_man = (<br>
                       [$type_constant, "\$1"],<br>
+                      [$type_constant2, "\$1"],<br>
                       [$type_func, "\\\\fB\$1\\\\fP"],<br>
+                      [$type_enum, "\\\\fI\$1\\\\fP"],<br>
                       [$type_struct, "\\\\fI\$1\\\\fP"],<br>
-                      [$type_param, "\\\\fI\$1\\\\fP"]<br>
+                      [$type_typedef, "\\\\fI\$1\\\\fP"],<br>
+                      [$type_union, "\\\\fI\$1\\\\fP"],<br>
+                      [$type_param, "\\\\fI\$1\\\\fP"],<br>
+                      [$type_member, "\\\\fI\$1\$2\$3\\\\fP"],<br>
+                      [$type_fallback, "\\\\fI\$1\\\\fP"]<br>
                     );<br>
 my $blankline_man = "";<br>
<br>
 # text-mode<br>
 my @highlights_text = (<br>
                        [$type_constant, "\$1"],<br>
+                       [$type_constant2, "\$1"],<br>
                        [$type_func, "\$1"],<br>
+                       [$type_enum, "\$1"],<br>
                        [$type_struct, "\$1"],<br>
-                       [$type_param, "\$1"]<br>
+                       [$type_typedef, "\$1"],<br>
+                       [$type_union, "\$1"],<br>
+                       [$type_param, "\$1"],<br>
+                       [$type_member, "\$1\$2\$3"],<br>
+                       [$type_fallback, "\$1"]<br>
                      );<br>
 my $blankline_text = "";<br>
<br>
 # rst-mode<br>
 my @highlights_rst = (<br>
                        [$type_constant, "``\$1``"],<br>
+                       [$type_constant2, "``\$1``"],<br>
                        # Note: need to escape () to avoid func matching later<br>
-                       [$type_member_func, "\\:c\\:type\\:`\$1\$2\\\\(\\\<wbr>\) <\$1>`"],<br>
-                       [$type_member, "\\:c\\:type\\:`\$1\$2 <\$1>`"],<br>
+                       [$type_member_func, "\\:c\\:type\\:`\$1\$2\$3\\\\(<wbr>\\\\) <\$1>`"],<br>
+                       [$type_member, "\\:c\\:type\\:`\$1\$2\$3 <\$1>`"],<br>
                       [$type_fp_param, "**\$1\\\\(\\\\)**"],<br>
                        [$type_func, "\\:c\\:func\\:`\$1()`"],<br>
-                       [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],<br>
-                       [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],<br>
-                       [$type_typedef_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],<br>
-                       [$type_union_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],<br>
+                       [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"],<br>
+                       [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"],<br>
+                       [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"],<br>
+                       [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"],<br>
                        # in rst this can refer to any type<br>
-                       [$type_struct, "\\:c\\:type\\:`\$1`"],<br>
+                       [$type_fallback, "\\:c\\:type\\:`\$1`"],<br>
                        [$type_param, "**\$1**"]<br>
                      );<br>
 my $blankline_rst = "\n";<br>
@@ -309,9 +354,15 @@ my $blankline_rst = "\n";<br>
 # list mode<br>
 my @highlights_list = (<br>
                        [$type_constant, "\$1"],<br>
+                       [$type_constant2, "\$1"],<br>
                        [$type_func, "\$1"],<br>
+                       [$type_enum, "\$1"],<br>
                        [$type_struct, "\$1"],<br>
-                       [$type_param, "\$1"]<br>
+                       [$type_typedef, "\$1"],<br>
+                       [$type_union, "\$1"],<br>
+                       [$type_param, "\$1"],<br>
+                       [$type_member, "\$1"],<br>
+                       [$type_fallback, "\$1"]<br>
                      );<br>
 my $blankline_list = "";<br>
<br>
@@ -414,7 +465,7 @@ my $doc_com = '\s*\*\s*';<br>
 my $doc_com_body = '\s*\* ?';<br>
 my $doc_decl = $doc_com . '(\w+)';<br>
 # @params and a strictly limited set of supported section names<br>
-my $doc_sect = $doc_com .<br>
+my $doc_sect = $doc_com .<br>
     '\s*(\@[.\w]+|\@\.\.\.|<wbr>description|context|returns?|<wbr>notes?|examples?)\s*:(.*)';<br>
 my $doc_content = $doc_com_body . '(.*)';<br>
 my $doc_block = $doc_com . 'DOC:\s*(.*)?';<br>
@@ -1131,8 +1182,9 @@ sub output_function_xml(%) {<br>
        foreach $parameter (@{$args{'parameterlist'}}) {<br>
            my $parameter_name = $parameter;<br>
            $parameter_name =~ s/\[.*//;<br>
+           $type = $args{'parametertypes'}{$<wbr>parameter};<br>
<br>
-           print "  <varlistentry>\n   <term><parameter>$parameter</<wbr>parameter></term>\n";<br>
+           print "  <varlistentry>\n   <term><parameter>$type $parameter</parameter></term>\<wbr>n";<br>
            print "   <listitem>\n    <para>\n";<br>
            $lineprefix="     ";<br>
            output_highlight($args{'<wbr>parameterdescs'}{$parameter_<wbr>name});<br>
@@ -1223,8 +1275,9 @@ sub output_struct_xml(%) {<br>
<br>
       defined($args{'parameterdescs'<wbr>}{$parameter_name}) || next;<br>
       ($args{'parameterdescs'}{$<wbr>parameter_name} ne $undescribed) || next;<br>
+      $type = $args{'parametertypes'}{$<wbr>parameter};<br>
       print "    <varlistentry>";<br>
-      print "      <term>$parameter</term>\n";<br>
+      print "      <term><literal>$type $parameter</literal></term>\n"<wbr>;<br>
       print "      <listitem><para>\n";<br>
       output_highlight($args{'<wbr>parameterdescs'}{$parameter_<wbr>name});<br>
       print "      </para></listitem>\n";<br>
@@ -1883,7 +1936,7 @@ sub output_function_rst(%) {<br>
     $lineprefix = "  ";<br>
     foreach $parameter (@{$args{'parameterlist'}}) {<br>
        my $parameter_name = $parameter;<br>
-       #$parameter_name =~ s/\[.*//;<br>
+       $parameter_name =~ s/\[.*//;<br>
        $type = $args{'parametertypes'}{$<wbr>parameter};<br>
<br>
        if ($type ne "") {<br>
@@ -2115,7 +2168,7 @@ sub dump_struct($$) {<br>
     my $nested;<br>
<br>
     if ($x =~ /(struct|union)\s+(\w+)\s*{(.*<wbr>)}/) {<br>
-       #my $decl_type = $1;<br>
+       my $decl_type = $1;<br>
        $declaration_name = $2;<br>
        my $members = $3;<br>
<br>
@@ -2129,17 +2182,17 @@ sub dump_struct($$) {<br>
        # strip comments:<br>
        $members =~ s/\/\*.*?\*\///gos;<br>
        $nested =~ s/\/\*.*?\*\///gos;<br>
-       # strip kmemcheck_bitfield_{begin,end}<wbr>.*;<br>
-       $members =~ s/kmemcheck_bitfield_.*?;//<wbr>gos;<br>
        # strip attributes<br>
        $members =~ s/__attribute__\s*\(\([a-z,_\*<wbr>\s\(\)]*\)\)//i;<br>
        $members =~ s/__aligned\s*\([^;]*\)//gos;<br>
        $members =~ s/\s*CRYPTO_MINALIGN_ATTR//<wbr>gos;<br>
        # replace DECLARE_BITMAP<br>
        $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;<br>
+       # replace DECLARE_HASHTABLE<br>
+       $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]<wbr>+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;<br>
<br>
        create_parameterlist($members, ';', $file);<br>
-       check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);<br>
+       check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual, $nested);<br>
<br>
        output_declaration($<wbr>declaration_name,<br>
                           'struct',<br>
@@ -2171,6 +2224,9 @@ sub dump_enum($$) {<br>
     if ($x =~ /enum\s+(\w+)\s*{(.*)}/) {<br>
        $declaration_name = $1;<br>
        my $members = $2;<br>
+       my %_members;<br>
+<br>
+       $members =~ s/\s+$//;<br>
<br>
        foreach my $arg (split ',', $members) {<br>
            $arg =~ s/^\s*(\w+).*/$1/;<br>
@@ -2180,9 +2236,16 @@ sub dump_enum($$) {<br>
                print STDERR "${file}:$.: warning: Enum value '$arg' ".<br>
                    "not described in enum '$declaration_name'\n";<br>
            }<br>
-<br>
+           $_members{$arg} = 1;<br>
        }<br>
<br>
+       while (my ($k, $v) = each %parameterdescs) {<br>
+           if (!exists($_members{$k})) {<br>
+            print STDERR "${file}:$.: warning: Excess enum value " .<br>
+                         "'$k' description in '$declaration_name'\n";<br>
+           }<br>
+        }<br>
+<br>
        output_declaration($<wbr>declaration_name,<br>
                           'enum',<br>
                           {'enum' => $declaration_name,<br>
@@ -2350,8 +2413,7 @@ sub push_parameter($$$) {<br>
        }<br>
<br>
        $anon_struct_union = 0;<br>
-       my $param_name = $param;<br>
-       $param_name =~ s/\[.*//;<br>
+       $param =~ s/[\[\)].*//;<br>
<br>
        if ($type eq "" && $param =~ /\.\.\.$/)<br>
        {<br>
@@ -2382,9 +2444,9 @@ sub push_parameter($$$) {<br>
        # but inline preprocessor statements);<br>
        # also ignore unnamed structs/unions;<br>
        if (!$anon_struct_union) {<br>
-       if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {<br>
+       if (!defined $parameterdescs{$param} && $param !~ /^#/) {<br>
<br>
-           $parameterdescs{$param_name} = $undescribed;<br>
+           $parameterdescs{$param} = $undescribed;<br>
<br>
            if (($type eq 'function') || ($type eq 'enum')) {<br>
                print STDERR "${file}:$.: warning: Function parameter ".<br>
@@ -2409,6 +2471,7 @@ sub push_parameter($$$) {<br>
        # "[blah" in a parameter string;<br>
        ###$param =~ s/\s*//g;<br>
        push @parameterlist, $param;<br>
+       $type =~ s/\s\s+/ /g;<br>
        $parametertypes{$param} = $type;<br>
 }<br>
<br>
@@ -2450,7 +2513,7 @@ sub check_sections($$$$$$) {<br>
                        } else {<br>
                                if ($nested !~ m/\Q$sects[$sx]\E/) {<br>
                                    print STDERR "${file}:$.: warning: " .<br>
-                                       "Excess struct/union/enum/typedef member " .<br>
+                                       "Excess $decl_type member " .<br>
                                        "'$sects[$sx]' " .<br>
                                        "description in '$decl_name'\n";<br>
                                    ++$warnings;<br>
@@ -2505,7 +2568,13 @@ sub dump_function($$) {<br>
     $prototype =~ s/__must_check +//;<br>
     $prototype =~ s/__weak +//;<br>
     my $define = $prototype =~ s/^#\s*define\s+//; #ak added<br>
-    $prototype =~ s/__attribute__\s*\(\([a-z,]*\<wbr>)\)//;<br>
+    $prototype =~ s/__attribute__\s*\(\(<br>
+            (?:<br>
+                 [\w\s]++          # attribute name<br>
+                 (?:\([^)]*+\))?   # attribute arguments<br>
+                 \s*+,?            # optional comma at the end<br>
+            )+<br>
+          \)\)\s+//x;<br>
<br>
     # Yes, this truly is vile.  We are looking for:<br>
     # 1. Return type (may be nothing if we're looking at a macro)<br>
@@ -2533,21 +2602,21 @@ sub dump_function($$) {<br>
         $noret = 1;<br>
     } elsif ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^<wbr>\(]*)\)/ ||<br>
        $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\<wbr>s*\(([^\(]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:<wbr>]+)\s*\(([^\(]*)\)/ ||<br>
+       $prototype =~ m/^(\w+\s*\*+)\s*([a-zA-Z0-9_~<wbr>:]+)\s*\(([^\(]*)\)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~<wbr>:]+)\s*\(([^\(]*)\)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+\s*\*+)\s*([a-zA-<wbr>Z0-9_~:]+)\s*\(([^\(]*)\)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+\s+\w+)\s+([a-zA-<wbr>Z0-9_~:]+)\s*\(([^\(]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*)\s*([<wbr>a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)<wbr>/ ||<br>
+       $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*+)\s*(<wbr>[a-zA-Z0-9_~:]+)\s*\(([^\(]*)\<wbr>)/ ||<br>
        $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^<wbr>\{]*)\)/ ||<br>
        $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\<wbr>s*\(([^\{]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:<wbr>]+)\s*\(([^\{]*)\)/ ||<br>
+       $prototype =~ m/^(\w+\s*\*+)\s*([a-zA-Z0-9_~<wbr>:]+)\s*\(([^\{]*)\)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~<wbr>:]+)\s*\(([^\{]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s+\w+\s*\*)\s*([a-zA-<wbr>Z0-9_~:]+)\s*\(([^\{]*)\)/ ||<br>
+       $prototype =~ m/^(\w+\s+\w+\s*\*+)\s*([a-zA-<wbr>Z0-9_~:]+)\s*\(([^\{]*)\)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+\s+\w+)\s+([a-zA-<wbr>Z0-9_~:]+)\s*\(([^\{]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*)\s*([<wbr>a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)<wbr>/ ||<br>
+       $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*+)\s*(<wbr>[a-zA-Z0-9_~:]+)\s*\(([^\{]*)\<wbr>)/ ||<br>
        $prototype =~ m/^(\w+\s+\w+\s+\w+\s+\w+)\s+(<wbr>[a-zA-Z0-9_~:]+)\s*\(([^\{]*)\<wbr>)/ ||<br>
-       $prototype =~ m/^(\w+\s+\w+\s+\w+\s+\w+\s*\*<wbr>)\s*([a-zA-Z0-9_~:]+)\s*\(([^\<wbr>{]*)\)/ ||<br>
-       $prototype =~ m/^(\w+\s+\w+\s*\*\s*\w+\s*\*\<wbr>s*)\s*([a-zA-Z0-9_~:]+)\s*\(([<wbr>^\{]*)\)/)  {<br>
+       $prototype =~ m/^(\w+\s+\w+\s+\w+\s+\w+\s*\*<wbr>+)\s*([a-zA-Z0-9_~:]+)\s*\(([^<wbr>\{]*)\)/ ||<br>
+       $prototype =~ m/^(\w+\s+\w+\s*\*+\s*\w+\s*\*<wbr>+\s*)\s*([a-zA-Z0-9_~:]+)\s*\(<wbr>([^\{]*)\)/)  {<br>
        $return_type = $1;<br>
        $declaration_name = $2;<br>
        my $args = $3;<br>
@@ -2705,6 +2774,9 @@ sub process_proto_type($$) {<br>
<br>
     while (1) {<br>
        if ( $x =~ /([^{};]*)([{};])(.*)/ ) {<br>
+            if( length $prototype ) {<br>
+                $prototype .= " "<br>
+            }<br>
            $prototype .= $1 . $2;<br>
            ($2 eq '{') && $brcount++;<br>
            ($2 eq '}') && $brcount--;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<br>
</font></span></blockquote></div><br></div>