ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/makeextprotos-awk
Revision: 1.2
Committed: Sun Aug 15 00:37:04 2004 UTC (19 years, 9 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
*** empty log message ***

File Contents

# Content
1 /^\/\* EXTPROTO \*\/$/ {
2 getline # function return
3 printf "%-16s ", $0
4 cline=""
5 while (index(cline, "{") == 0 && index(cline, "#") == 0) {
6 getline # function name and args
7 cline=cline $0
8 }
9 gsub(/[\t\n]/, " ", cline)
10 gsub(/[ ]+/, " ", cline)
11 l = index(cline, "(")
12 m = index(cline, "{")
13 n = index(cline, "#")
14 if (n > 0) { m = n }
15 outstring = sprintf("%%-32.%ds __PROTO(", l - 1)
16 printf outstring, cline
17 reststring = substr(cline, l, m - l)
18 printf reststring
19 print ");"
20 }