Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6fb1d752
Commit
6fb1d752
authored
Apr 10, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c2man: Fix the array reference syntax and the return value regexps.
parent
f43762f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
c2man.pl
tools/c2man.pl
+11
-11
No files found.
tools/c2man.pl
View file @
6fb1d752
...
...
@@ -629,7 +629,7 @@ sub process_comment($)
# When the function is exported twice we have the second name below the first
# (you see this a lot in ntdll, but also in some other places).
my
$first_line
=
$
{
@
{
$comment
->
{
TEXT
}
}}[
1
];
my
$first_line
=
$
{
$comment
->
{
TEXT
}}[
1
];
if
(
$first_line
=~
/^(@|[A-Za-z0-9_]+) +(\(|\[)([A-Za-z0-9_]+)\.(([0-9]+)|@)(\)|\])$/
)
{
...
...
@@ -644,14 +644,14 @@ sub process_comment($)
my
$alt_export
=
@
{
$spec_details
->
{
EXPORTS
}}[
$alt_index
];
@$alt_export
[
4
]
|=
$FLAG_DOCUMENTED
;
$spec_details
->
{
NUM_DOCS
}
++
;
$
{
@
{
$comment
->
{
TEXT
}
}}[
1
]
=
""
;
$
{
$comment
->
{
TEXT
}}[
1
]
=
""
;
}
}
if
(
@
{
$spec_details
->
{
CURRENT_EXTRA
}})
{
# We have an extra comment that might be related to this one
my
$current_comment
=
$
{
@
{
$spec_details
->
{
CURRENT_EXTRA
}
}}[
0
];
my
$current_comment
=
$
{
$spec_details
->
{
CURRENT_EXTRA
}}[
0
];
my
$current_name
=
$current_comment
->
{
COMMENT_NAME
};
if
(
$comment
->
{
COMMENT_NAME
}
=~
/^$current_name/
&&
$comment
->
{
COMMENT_NAME
}
ne
$current_name
)
{
...
...
@@ -822,12 +822,12 @@ sub process_comment($)
if
(
$prototype
=~
/(WINAPIV|WINAPI|__cdecl|PASCAL|CALLBACK|FARPROC16)/
)
{
$prototype
=~
s/^(.*?)
(WINAPIV|WINAPI|__cdecl|PASCAL|CALLBACK|FARPROC16) (.*?)\(
*(.*)/$4/
;
$prototype
=~
s/^(.*?)
\s+(WINAPIV|WINAPI|__cdecl|PASCAL|CALLBACK|FARPROC16)\s+(.*?)\(\s
*(.*)/$4/
;
$comment
->
{
RETURNS
}
=
$1
;
}
else
{
$prototype
=~
s/^(.*?)([A-Za-z0-9_]+)\
(
*(.*)/$3/
;
$prototype
=~
s/^(.*?)([A-Za-z0-9_]+)\
s*\(\s
*(.*)/$3/
;
$comment
->
{
RETURNS
}
=
$1
;
}
...
...
@@ -988,7 +988,7 @@ sub process_extra_comment($)
if
(
@
{
$spec_details
->
{
CURRENT_EXTRA
}})
{
my
$current_comment
=
$
{
@
{
$spec_details
->
{
CURRENT_EXTRA
}
}}[
0
];
my
$current_comment
=
$
{
$spec_details
->
{
CURRENT_EXTRA
}}[
0
];
if
(
$opt_verbose
>
0
)
{
...
...
@@ -1074,7 +1074,7 @@ sub process_index_files()
if
(
@
{
$spec_details
->
{
CURRENT_EXTRA
}})
{
# We have an unwritten extra comment, write it
my
$current_comment
=
$
{
@
{
$spec_details
->
{
CURRENT_EXTRA
}
}}[
0
];
my
$current_comment
=
$
{
$spec_details
->
{
CURRENT_EXTRA
}}[
0
];
process_extra_comment
(
$current_comment
);
@
{
$spec_details
->
{
CURRENT_EXTRA
}}
=
();
}
...
...
@@ -1470,7 +1470,7 @@ sub output_api_synopsis($)
my
$biggest_length
=
0
;
for
(
my
$i
=
0
;
$i
<
@
{
$comment
->
{
PROTOTYPE
}};
$i
++
)
{
my
$line
=
$
{
@
{
$comment
->
{
PROTOTYPE
}
}}[
$i
];
my
$line
=
$
{
$comment
->
{
PROTOTYPE
}}[
$i
];
if
(
$line
=~
/(.+?)([A-Za-z_][A-Za-z_0-9]*)$/
)
{
my
$length
=
length
$1
;
...
...
@@ -1484,19 +1484,19 @@ sub output_api_synopsis($)
# Now pad the string with blanks
for
(
my
$i
=
0
;
$i
<
@
{
$comment
->
{
PROTOTYPE
}};
$i
++
)
{
my
$line
=
$
{
@
{
$comment
->
{
PROTOTYPE
}
}}[
$i
];
my
$line
=
$
{
$comment
->
{
PROTOTYPE
}}[
$i
];
if
(
$line
=~
/(.+?)([A-Za-z_][A-Za-z_0-9]*)$/
)
{
my
$pad_len
=
$biggest_length
-
length
$1
;
my
$padding
=
" "
x
(
$pad_len
);
$
{
@
{
$comment
->
{
PROTOTYPE
}
}}[
$i
]
=
$1
.
$padding
.
$2
;
$
{
$comment
->
{
PROTOTYPE
}}[
$i
]
=
$1
.
$padding
.
$2
;
}
}
for
(
my
$i
=
0
;
$i
<
@
{
$comment
->
{
PROTOTYPE
}};
$i
++
)
{
# Format the parameter name
my
$line
=
$
{
@
{
$comment
->
{
PROTOTYPE
}
}}[
$i
];
my
$line
=
$
{
$comment
->
{
PROTOTYPE
}}[
$i
];
my
$comma
=
(
$i
==
@
{
$comment
->
{
PROTOTYPE
}}
-
1
)
?
""
:
","
;
$line
=~
s/(.+?)([A-Za-z_][A-Za-z_0-9]*)$/ $fmt[0]$1$fmt[2]$2$fmt[3]$comma$fmt[1]/
;
print
OUTPUT
$line
;
...
...
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