4187119d |
1 | BEGIN { |
2 | FS="\""; |
3 | print "/* Do not modify this file; it is created automatically"; |
4 | print " by copying.awk. */"; |
5 | print "extern int immediate_quit;"; |
6 | print "static void"; |
7 | print "copying_info ()"; |
8 | print "{"; |
9 | print " immediate_quit++;"; |
10 | } |
11 | NR == 1,/^[ ]*NO WARRANTY[ ]*$/ { |
12 | if (! ($0 ~ /^[ ]*NO WARRANTY[ ]*$/)) |
13 | { |
14 | printf " printf_filtered (\""; |
15 | for (i = 1; i < NF; i++) |
16 | printf "%s\\\"", $i; |
17 | printf "%s\\n\");\n", $NF; |
18 | } |
19 | } |
20 | /^[ ]*NO WARRANTY[ ]*$/ { |
21 | print " immediate_quit--;"; |
22 | print "}"; |
23 | print ""; |
24 | print "static void"; |
25 | print "warranty_info ()"; |
26 | print "{"; |
27 | print " immediate_quit++;"; |
28 | } |
29 | /^[ ]*NO WARRANTY[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{ |
30 | if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/)) |
31 | { |
32 | printf " printf_filtered (\""; |
33 | for (i = 1; i < NF; i++) |
34 | printf "%s\\\"", $i; |
35 | printf "%s\\n\");\n", $NF; |
36 | } |
37 | } |
38 | END { |
39 | print " immediate_quit--;"; |
40 | print "}"; |
41 | print ""; |
42 | print "void" |
43 | print "_initialize_copying ()"; |
44 | print "{"; |
45 | print " add_info (\"copying\", copying_info,"; |
46 | print " \"Conditions for redistributing copies of GDB.\");"; |
47 | print " add_info (\"warranty\", warranty_info,"; |
48 | print " \"Various kinds of warranty you do not have.\");"; |
49 | print "}"; |
50 | } |
51 | |
52 | |
53 | |