119370SpstBEGIN { 219370Spst FS="\""; 319370Spst print "/* ==> Do not modify this file!! It is created automatically"; 419370Spst print " by copying.awk. Modify copying.awk instead. <== */"; 519370Spst print "" 619370Spst print "#include \"defs.h\"" 719370Spst print "#include \"command.h\"" 819370Spst print "#include \"gdbcmd.h\"" 919370Spst print "" 1098944Sobrien print "static void show_copying_command (char *, int);" 1119370Spst print "" 1298944Sobrien print "static void show_warranty_command (char *, int);" 1319370Spst print "" 1498944Sobrien print "void _initialize_copying (void);" 1546283Sdfr print "" 1619370Spst print "extern int immediate_quit;"; 1719370Spst print "static void"; 1819370Spst print "show_copying_command (ignore, from_tty)"; 1919370Spst print " char *ignore;"; 2019370Spst print " int from_tty;"; 2119370Spst print "{"; 2219370Spst print " immediate_quit++;"; 2319370Spst } 2419370SpstNR == 1,/^[ ]*NO WARRANTY[ ]*$/ { 2519370Spst if ($0 ~ //) 2619370Spst { 2719370Spst printf " printf_filtered (\"\\n\");\n"; 2819370Spst } 2919370Spst else if ($0 !~ /^[ ]*NO WARRANTY[ ]*$/) 3019370Spst { 3119370Spst printf " printf_filtered (\""; 3219370Spst for (i = 1; i < NF; i++) 3319370Spst printf "%s\\\"", $i; 3419370Spst printf "%s\\n\");\n", $NF; 3519370Spst } 3619370Spst } 3719370Spst/^[ ]*NO WARRANTY[ ]*$/ { 3819370Spst print " immediate_quit--;"; 3919370Spst print "}"; 4019370Spst print ""; 4119370Spst print "static void"; 4219370Spst print "show_warranty_command (ignore, from_tty)"; 4319370Spst print " char *ignore;"; 4419370Spst print " int from_tty;"; 4519370Spst print "{"; 4619370Spst print " immediate_quit++;"; 4719370Spst } 4819370Spst/^[ ]*NO WARRANTY[ ]*$/, /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/{ 4919370Spst if (! ($0 ~ /^[ ]*END OF TERMS AND CONDITIONS[ ]*$/)) 5019370Spst { 5119370Spst printf " printf_filtered (\""; 5219370Spst for (i = 1; i < NF; i++) 5319370Spst printf "%s\\\"", $i; 5419370Spst printf "%s\\n\");\n", $NF; 5519370Spst } 5619370Spst } 5719370SpstEND { 5819370Spst print " immediate_quit--;"; 5919370Spst print "}"; 6019370Spst print ""; 6119370Spst print "void" 6219370Spst print "_initialize_copying ()"; 6319370Spst print "{"; 6419370Spst print " add_cmd (\"copying\", no_class, show_copying_command,"; 6519370Spst print " \"Conditions for redistributing copies of GDB.\","; 6619370Spst print " &showlist);"; 6719370Spst print " add_cmd (\"warranty\", no_class, show_warranty_command,"; 6819370Spst print " \"Various kinds of warranty you do not have.\","; 6919370Spst print " &showlist);"; 7019370Spst print ""; 7119370Spst print " /* For old-timers, allow \"info copying\", etc. */"; 7219370Spst print " add_info (\"copying\", show_copying_command,"; 7319370Spst print " \"Conditions for redistributing copies of GDB.\");"; 7419370Spst print " add_info (\"warranty\", show_warranty_command,"; 7519370Spst print " \"Various kinds of warranty you do not have.\");"; 7619370Spst print "}"; 7719370Spst } 78