Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b951afc0
Commit
b951afc0
authored
Aug 16, 2004
by
Sam Ravnborg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: adobriyan@mail.ru|ChangeSet|20040815084554|35832
parent
85fde190
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
50 deletions
+38
-50
scripts/kernel-doc
scripts/kernel-doc
+38
-50
No files found.
scripts/kernel-doc
View file @
b951afc0
...
@@ -26,8 +26,6 @@ use strict;
...
@@ -26,8 +26,6 @@ use strict;
# Still to do:
# Still to do:
# - add perldoc documentation
# - add perldoc documentation
# - Look more closely at some of the scarier bits :)
# - Look more closely at some of the scarier bits :)
# - Clean up mess that #ifdefs and comments inside structs
# definitions leave.
# 26/05/2001 - Support for separate source and object trees.
# 26/05/2001 - Support for separate source and object trees.
# Return error code.
# Return error code.
...
@@ -38,8 +36,6 @@ use strict;
...
@@ -38,8 +36,6 @@ use strict;
# Small fixes (like spaces vs. \s in regex)
# Small fixes (like spaces vs. \s in regex)
# -- Tim Jansen <tim@tjansen.de>
# -- Tim Jansen <tim@tjansen.de>
# 18/04/2004 - Comma separated members inside structs definitions are ok now.
# -- Alexey Dobriyan <adobriyan@mail.ru>
#
#
# This will read a 'c' file and scan for embedded comments in the
# This will read a 'c' file and scan for embedded comments in the
...
@@ -109,7 +105,10 @@ use strict;
...
@@ -109,7 +105,10 @@ use strict;
# enums and typedefs. Instead of the function name you must write the name
# enums and typedefs. Instead of the function name you must write the name
# of the declaration; the struct/union/enum/typedef must always precede
# of the declaration; the struct/union/enum/typedef must always precede
# the name. Nesting of declarations is not supported.
# the name. Nesting of declarations is not supported.
# Use the argument mechanism to document members or constants.
# Use the argument mechanism to document members or constants. In
# structs and unions you must declare one member per declaration
# (comma-separated members are not allowed - the parser does not support
# this).
# e.g.
# e.g.
# /**
# /**
# * struct my_struct - short description
# * struct my_struct - short description
...
@@ -1319,43 +1318,31 @@ sub create_parameterlist($$$) {
...
@@ -1319,43 +1318,31 @@ sub create_parameterlist($$$) {
$param
=
$1
;
$param
=
$1
;
$type
=
$arg
;
$type
=
$arg
;
$type
=~
s/([^\(]+\(\*)$param/$1/
;
$type
=~
s/([^\(]+\(\*)$param/$1/
;
push_parameter
(
$type
,
$param
,
$file
);
}
else
{
}
else
{
# evil magic to get fixed array parameters to work
# evil magic to get fixed array parameters to work
# 'char cb[48]' => 'char* cb'
$arg
=~
s/(.+\s+)(.+)\[.*/$1* $2/
;
$arg
=~
s/(.+\s+)(.+)\[.*/$1* $2/
;
my
@args
=
split
('
\
s
',
$arg
);
my
@args
=
split
('
,
\
s*
',
$arg
);
$param
=
pop
@args
;
my
@first_arg
=
split
('
\
s
',
shift
@args
);
unshift
(
@args
,
pop
@first_arg
);
$type
=
join
"
",
@first_arg
;
foreach
$param
(
@args
)
{
if
(
$param
=~
m/^(\*+)(.*)/
)
{
if
(
$param
=~
m/^(\*+)(.*)/
)
{
# pointer
$param
=
$2
;
push_parameter
("
$type
$1
",
$2
,
$file
);
push
@args
,
$1
;
}
elsif
(
$param
=~
m/(.*?)\s*:\s*(\d+)/
)
{
# bitfield
push_parameter
("
$type
:$2
",
$1
,
$file
);
}
else
{
push_parameter
(
$type
,
$param
,
$file
);
}
}
}
elsif
(
$param
=~
m/(.*?)\s*:\s*(\d+)/
)
{
$param
=
$1
;
push
@args
,
"
:$2
";
}
}
$type
=
join
"
",
@args
;
}
}
}
sub
push_parameter
($$$)
{
if
(
$type
eq
""
&&
$param
eq
"
...
")
my
$type
=
shift
;
{
my
$param
=
shift
;
my
$file
=
shift
;
if
(
$type
eq
""
&&
$param
eq
"
...
")
{
$type
=
"
...
";
$type
=
"
...
";
$param
=
"
...
";
$param
=
"
...
";
$parameterdescs
{"
...
"}
=
"
variable arguments
";
$parameterdescs
{"
...
"}
=
"
variable arguments
";
}
elsif
(
$type
eq
""
&&
(
$param
eq
""
or
$param
eq
"
void
"))
{
}
elsif
(
$type
eq
""
&&
(
$param
eq
""
or
$param
eq
"
void
"))
{
$type
=
"";
$type
=
"";
$param
=
"
void
";
$param
=
"
void
";
$parameterdescs
{
void
}
=
"
no arguments
";
$parameterdescs
{
void
}
=
"
no arguments
";
...
@@ -1375,6 +1362,7 @@ sub push_parameter($$$) {
...
@@ -1375,6 +1362,7 @@ sub push_parameter($$$) {
push
@parameterlist
,
$param
;
push
@parameterlist
,
$param
;
$parametertypes
{
$param
}
=
$type
;
$parametertypes
{
$param
}
=
$type
;
}
}
}
##
##
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment