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"; | |
18 | print "show_copying_command (ignore, from_tty)"; | |
19 | print " char *ignore;"; | |
20 | print " int from_tty;"; | |
21 | print "{"; | |
22 | print " immediate_quit++;"; | |
23 | } | |
24 | NR == 1,/^[ ]*NO WARRANTY[ ]*$/ { | |
25 | if ($0 ~ /\f/) | |
26 | { | |
27 | printf " printf_filtered (\"\\n\");\n"; | |
28 | } | |
29 | else if ($0 !~ /^[ ]*NO WARRANTY[ ]*$/) | |
30 | { | |
31 | printf " printf_filtered (\""; | |
32 | for (i = 1; i < NF; i++) | |
33 | printf "%s\\\"", $i; | |
34 | printf "%s\\n\");\n", $NF; | |
35 | } | |
36 | } | |
37 | /^[ ]*NO WARRANTY[ ]*$/ { | |
38 | print " immediate_quit--;"; | |
39 | print "}"; | |
40 | print ""; | |
41 | print "static void"; | |
42 | print "show_warranty_command (ignore, from_tty)"; | |
43 | print " char *ignore;"; | |
44 | print " int from_tty;"; | |
45 | print "{"; | |
46 | print " immediate_quit++;"; | |
47 | } | |
48 | /^[ ]*NO WARRANTY[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{ | |
49 | if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/)) | |
50 | { | |
51 | printf " printf_filtered (\""; | |
52 | for (i = 1; i < NF; i++) | |
53 | printf "%s\\\"", $i; | |
54 | printf "%s\\n\");\n", $NF; | |
55 | } | |
56 | } | |
57 | END { | |
58 | print " immediate_quit--;"; | |
59 | print "}"; | |
60 | print ""; | |
61 | print "void" | |
62 | print "_initialize_copying ()"; | |
63 | print "{"; | |
64 | print " add_cmd (\"copying\", no_class, show_copying_command,"; | |
65 | print " \"Conditions for redistributing copies of GDB.\","; | |
66 | print " &showlist);"; | |
67 | print " add_cmd (\"warranty\", no_class, show_warranty_command,"; | |
68 | print " \"Various kinds of warranty you do not have.\","; | |
69 | print " &showlist);"; | |
70 | print ""; | |
71 | print " /* For old-timers, allow \"info copying\", etc. */"; | |
72 | print " add_info (\"copying\", show_copying_command,"; | |
73 | print " \"Conditions for redistributing copies of GDB.\");"; | |
74 | print " add_info (\"warranty\", show_warranty_command,"; | |
75 | print " \"Various kinds of warranty you do not have.\");"; | |
76 | print "}"; | |
77 | } |