Revision 9084,
1.1 KB
checked in by ghudson, 28 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r9083,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | BEGIN { |
---|
2 | nsig = 0; |
---|
3 | j = 0; |
---|
4 | print "/* This file was automatically generated */" |
---|
5 | print "/* by the awk script \"sigconv.awk\". */\n" |
---|
6 | print "struct sigdesc {" |
---|
7 | print " char *name;" |
---|
8 | print " int number;" |
---|
9 | print "};\n" |
---|
10 | print "struct sigdesc sigdesc[] = {" |
---|
11 | } |
---|
12 | |
---|
13 | /^#define[ \t][ \t]*SIG[A-Z]/ { |
---|
14 | |
---|
15 | j = sprintf("%d", $3); |
---|
16 | str = $2; |
---|
17 | |
---|
18 | if (nsig < j) |
---|
19 | nsig = j; |
---|
20 | |
---|
21 | siglist[j] = sprintf("\"%s\",\t%2d,", \ |
---|
22 | substr(str, 4), j); |
---|
23 | } |
---|
24 | /^#[ \t]*define[ \t][ \t]*SIG[A-Z]/ { |
---|
25 | |
---|
26 | j = sprintf("%d", $4); |
---|
27 | str = $3; |
---|
28 | |
---|
29 | if (nsig < j) |
---|
30 | nsig = j; |
---|
31 | |
---|
32 | siglist[j] = sprintf("\"%s\",\t%2d,", \ |
---|
33 | substr(str, 4), j); |
---|
34 | } |
---|
35 | /^#[ \t]*define[ \t][ \t]*_SIG[A-Z]/ { |
---|
36 | |
---|
37 | j = sprintf("%d", $4); |
---|
38 | str = $3; |
---|
39 | |
---|
40 | if (nsig < j) |
---|
41 | nsig = j; |
---|
42 | |
---|
43 | siglist[j] = sprintf("\"%s\",\t%2d,", \ |
---|
44 | substr(str, 5), j); |
---|
45 | } |
---|
46 | |
---|
47 | END { |
---|
48 | for (n = 1; n <= nsig; n++) |
---|
49 | if (siglist[n] != "") |
---|
50 | printf(" %s\n", siglist[n]); |
---|
51 | |
---|
52 | printf(" NULL,\t 0\n};\n"); |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.