]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | BEGIN { |
2 | FS="\""; | |
3 | print "/* ==> Do not modify this file!! It is created automatically"; | |
4 | print " by copying.awk. Modify copying.awk instead. <== */"; | |
5 | print "" | |
6 | print "#include \"defs.h\"" | |
7 | print "#include \"command.h\"" | |
8 | print "#include \"gdbcmd.h\"" | |
9 | print "" | |
1b2a2f90 | 10 | print "static void show_copying_command (char *, int);" |
c906108c | 11 | print "" |
1b2a2f90 | 12 | print "static void show_warranty_command (char *, int);" |
c906108c | 13 | print "" |
1b2a2f90 | 14 | print "void _initialize_copying (void);" |
c906108c SS |
15 | print "" |
16 | print "extern int immediate_quit;"; | |
17 | print "static void"; | |
07aed0eb | 18 | print "show_copying_command (char *ignore, int from_tty)"; |
c906108c SS |
19 | print "{"; |
20 | print " immediate_quit++;"; | |
21 | } | |
4de6a07e | 22 | NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ { |
c906108c SS |
23 | if ($0 ~ /\f/) |
24 | { | |
25 | printf " printf_filtered (\"\\n\");\n"; | |
26 | } | |
4de6a07e | 27 | else if ($0 !~ /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/) |
c906108c SS |
28 | { |
29 | printf " printf_filtered (\""; | |
30 | for (i = 1; i < NF; i++) | |
31 | printf "%s\\\"", $i; | |
32 | printf "%s\\n\");\n", $NF; | |
33 | } | |
34 | } | |
4de6a07e | 35 | /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ { |
c906108c SS |
36 | print " immediate_quit--;"; |
37 | print "}"; | |
38 | print ""; | |
39 | print "static void"; | |
07aed0eb | 40 | print "show_warranty_command (char *ignore, int from_tty)"; |
c906108c SS |
41 | print "{"; |
42 | print " immediate_quit++;"; | |
43 | } | |
4de6a07e | 44 | /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{ |
c906108c SS |
45 | if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/)) |
46 | { | |
47 | printf " printf_filtered (\""; | |
48 | for (i = 1; i < NF; i++) | |
49 | printf "%s\\\"", $i; | |
50 | printf "%s\\n\");\n", $NF; | |
51 | } | |
52 | } | |
53 | END { | |
54 | print " immediate_quit--;"; | |
55 | print "}"; | |
56 | print ""; | |
57 | print "void" | |
07aed0eb | 58 | print "_initialize_copying (void)"; |
c906108c SS |
59 | print "{"; |
60 | print " add_cmd (\"copying\", no_class, show_copying_command,"; | |
07aed0eb | 61 | print " _(\"Conditions for redistributing copies of GDB.\"),"; |
c906108c SS |
62 | print " &showlist);"; |
63 | print " add_cmd (\"warranty\", no_class, show_warranty_command,"; | |
07aed0eb | 64 | print " _(\"Various kinds of warranty you do not have.\"),"; |
c906108c SS |
65 | print " &showlist);"; |
66 | print ""; | |
67 | print " /* For old-timers, allow \"info copying\", etc. */"; | |
68 | print " add_info (\"copying\", show_copying_command,"; | |
07aed0eb | 69 | print " _(\"Conditions for redistributing copies of GDB.\"));"; |
c906108c | 70 | print " add_info (\"warranty\", show_warranty_command,"; |
07aed0eb | 71 | print " _(\"Various kinds of warranty you do not have.\"));"; |
c906108c SS |
72 | print "}"; |
73 | } |