kernel-doc (3af4182cc5be7d5505f9801ee3297373f1872446) kernel-doc (ced69090c573f1db253fb6b84ec537f4f3d7e2f4)
1#!/usr/bin/perl -w
2
3use strict;
4
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
7## Copyright (C) 2001 Simon Huggins ##
8## Copyright (C) 2005-2008 Randy Dunlap ##

--- 364 unchanged lines hidden (view full) ---

373 if ($name =~ m/$type_constant/) {
374 $name = $1;
375# print STDERR "constant section '$1' = '$contents'\n";
376 $constants{$name} = $contents;
377 } elsif ($name =~ m/$type_param/) {
378# print STDERR "parameter def '$1' = '$contents'\n";
379 $name = $1;
380 $parameterdescs{$name} = $contents;
1#!/usr/bin/perl -w
2
3use strict;
4
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
7## Copyright (C) 2001 Simon Huggins ##
8## Copyright (C) 2005-2008 Randy Dunlap ##

--- 364 unchanged lines hidden (view full) ---

373 if ($name =~ m/$type_constant/) {
374 $name = $1;
375# print STDERR "constant section '$1' = '$contents'\n";
376 $constants{$name} = $contents;
377 } elsif ($name =~ m/$type_param/) {
378# print STDERR "parameter def '$1' = '$contents'\n";
379 $name = $1;
380 $parameterdescs{$name} = $contents;
381 } elsif ($name eq "@\.\.\.") {
382# print STDERR "parameter def '...' = '$contents'\n";
383 $name = "...";
384 $parameterdescs{$name} = $contents;
381 } else {
382# print STDERR "other section '$name' = '$contents'\n";
383 if (defined($sections{$name}) && ($sections{$name} ne "")) {
384 print STDERR "Error(${file}:$.): duplicate section name '$name'\n";
385 ++$errors;
386 }
387 $sections{$name} = $contents;
388 push @sectionlist, $name;

--- 1194 unchanged lines hidden (view full) ---

1583 }
1584
1585 $anon_struct_union = 0;
1586 my $param_name = $param;
1587 $param_name =~ s/\[.*//;
1588
1589 if ($type eq "" && $param =~ /\.\.\.$/)
1590 {
385 } else {
386# print STDERR "other section '$name' = '$contents'\n";
387 if (defined($sections{$name}) && ($sections{$name} ne "")) {
388 print STDERR "Error(${file}:$.): duplicate section name '$name'\n";
389 ++$errors;
390 }
391 $sections{$name} = $contents;
392 push @sectionlist, $name;

--- 1194 unchanged lines hidden (view full) ---

1587 }
1588
1589 $anon_struct_union = 0;
1590 my $param_name = $param;
1591 $param_name =~ s/\[.*//;
1592
1593 if ($type eq "" && $param =~ /\.\.\.$/)
1594 {
1591 $type="";
1592 $parameterdescs{$param} = "variable arguments";
1595 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
1596 $parameterdescs{$param} = "variable arguments";
1597 }
1593 }
1594 elsif ($type eq "" && ($param eq "" or $param eq "void"))
1595 {
1598 }
1599 elsif ($type eq "" && ($param eq "" or $param eq "void"))
1600 {
1596 $type="";
1597 $param="void";
1598 $parameterdescs{void} = "no arguments";
1599 }
1600 elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
1601 # handle unnamed (anonymous) union or struct:
1602 {
1603 $type = $param;
1604 $param = "{unnamed_" . $param . "}";

--- 465 unchanged lines hidden ---
1601 $param="void";
1602 $parameterdescs{void} = "no arguments";
1603 }
1604 elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
1605 # handle unnamed (anonymous) union or struct:
1606 {
1607 $type = $param;
1608 $param = "{unnamed_" . $param . "}";

--- 465 unchanged lines hidden ---