]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/copying.awk
Fix latent bug in custom word point completion handling
[thirdparty/binutils-gdb.git] / gdb / copying.awk
CommitLineData
c906108c
SS
1BEGIN {
2 FS="\"";
c4bfde41
JK
3 print "/* ==> Do not modify this file!! " \
4 "-*- buffer-read-only: t -*- vi" \
5 ":set ro:";
6 print " It is created automatically by copying.awk.";
7 print " Modify copying.awk instead. <== */";
c906108c
SS
8 print ""
9 print "#include \"defs.h\""
10 print "#include \"command.h\""
11 print "#include \"gdbcmd.h\""
12 print ""
1d12d88f 13 print "static void show_copying_command (const char *, int);"
c906108c 14 print ""
1d12d88f 15 print "static void show_warranty_command (const char *, int);"
c906108c 16 print ""
c906108c 17 print "static void";
1d12d88f 18 print "show_copying_command (const char *ignore, int from_tty)";
c906108c 19 print "{";
c906108c 20 }
4de6a07e 21NR == 1,/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ {
c906108c
SS
22 if ($0 ~ /\f/)
23 {
24 printf " printf_filtered (\"\\n\");\n";
25 }
4de6a07e 26 else if ($0 !~ /^[ ]*15\. Disclaimer of Warranty\.[ ]*$/)
c906108c
SS
27 {
28 printf " printf_filtered (\"";
29 for (i = 1; i < NF; i++)
30 printf "%s\\\"", $i;
31 printf "%s\\n\");\n", $NF;
32 }
33 }
4de6a07e 34/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/ {
c906108c
SS
35 print "}";
36 print "";
37 print "static void";
1d12d88f 38 print "show_warranty_command (const char *ignore, int from_tty)";
c906108c 39 print "{";
c906108c 40 }
4de6a07e 41/^[ ]*15\. Disclaimer of Warranty\.[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{
c906108c
SS
42 if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/))
43 {
44 printf " printf_filtered (\"";
45 for (i = 1; i < NF; i++)
46 printf "%s\\\"", $i;
47 printf "%s\\n\");\n", $NF;
48 }
49 }
50END {
c906108c
SS
51 print "}";
52 print "";
53 print "void"
07aed0eb 54 print "_initialize_copying (void)";
c906108c 55 print "{";
5ba19b4c 56 print " add_cmd (\"copying\", no_set_class, show_copying_command,";
07aed0eb 57 print " _(\"Conditions for redistributing copies of GDB.\"),";
c906108c 58 print " &showlist);";
5ba19b4c 59 print " add_cmd (\"warranty\", no_set_class, show_warranty_command,";
07aed0eb 60 print " _(\"Various kinds of warranty you do not have.\"),";
c906108c
SS
61 print " &showlist);";
62 print "";
63 print " /* For old-timers, allow \"info copying\", etc. */";
64 print " add_info (\"copying\", show_copying_command,";
07aed0eb 65 print " _(\"Conditions for redistributing copies of GDB.\"));";
c906108c 66 print " add_info (\"warranty\", show_warranty_command,";
07aed0eb 67 print " _(\"Various kinds of warranty you do not have.\"));";
c906108c
SS
68 print "}";
69 }