Update
[gdb.git] / gdb / copying.awk
blob936f435c98e1edea3ede0123ac86d01e4d854ce2
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 ""
10 print "static void show_copying_command (char *, int);"
11 print ""
12 print "static void show_warranty_command (char *, int);"
13 print ""
14 print "void _initialize_copying (void);"
15 print ""
16 print "extern int immediate_quit;";
17 print "static void";
18 print "show_copying_command (char *ignore, int from_tty)";
19 print "{";
20 print " immediate_quit++;";
22 NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ {
23 if ($0 ~ /\f/)
25 printf " printf_filtered (\"\\n\");\n";
27 else if ($0 !~ /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/)
29 printf " printf_filtered (\"";
30 for (i = 1; i < NF; i++)
31 printf "%s\\\"", $i;
32 printf "%s\\n\");\n", $NF;
35 /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ {
36 print " immediate_quit--;";
37 print "}";
38 print "";
39 print "static void";
40 print "show_warranty_command (char *ignore, int from_tty)";
41 print "{";
42 print " immediate_quit++;";
44 /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{
45 if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/))
47 printf " printf_filtered (\"";
48 for (i = 1; i < NF; i++)
49 printf "%s\\\"", $i;
50 printf "%s\\n\");\n", $NF;
53 END {
54 print " immediate_quit--;";
55 print "}";
56 print "";
57 print "void"
58 print "_initialize_copying (void)";
59 print "{";
60 print " add_cmd (\"copying\", no_class, show_copying_command,";
61 print " _(\"Conditions for redistributing copies of GDB.\"),";
62 print " &showlist);";
63 print " add_cmd (\"warranty\", no_class, show_warranty_command,";
64 print " _(\"Various kinds of warranty you do not have.\"),";
65 print " &showlist);";
66 print "";
67 print " /* For old-timers, allow \"info copying\", etc. */";
68 print " add_info (\"copying\", show_copying_command,";
69 print " _(\"Conditions for redistributing copies of GDB.\"));";
70 print " add_info (\"warranty\", show_warranty_command,";
71 print " _(\"Various kinds of warranty you do not have.\"));";
72 print "}";