19 lines
407 B
Plaintext
19 lines
407 B
Plaintext
# Get prototypes from a .c file
|
|
# $Id: makeprotos-sed,v 1.1.1.1 2004/07/19 14:32:40 leitec Exp $
|
|
# /* PROTO */ must be above return type which are above function.
|
|
# Args are on one line
|
|
# eg.
|
|
# /* PROTO */
|
|
# void ------> void main(int argc, char **argv);
|
|
# main(int argc, char **argv)
|
|
# {
|
|
# }
|
|
#
|
|
/^[/][*] PROTO [*][/]$/{
|
|
n
|
|
N
|
|
s/\n\([_a-zA-Z][_a-zA-Z0-9]* *\)(/ \1 (/
|
|
s/$/;/
|
|
p
|
|
}
|