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