From 50140ab2a774b72c6262e2bebc97bc33f14909e3 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Fri, 27 Sep 1996 17:53:06 +0000 Subject: * top.c (print_gdb_version): Rewrote to comply with new GNU coding standards for the --version option. (print_gnu_advertisement): Remove, now part of print_gdb_version. (show_version): Remove call to print_gnu_advertisement. * top.h (print_gnu_advertisement): Remove prototype. * main.c (print_gdb_help): Move help to static function and add prototype. (main): Call print_gdb_help rather than inlining it. (main): Remove call to print_gnu_advertisement. * gdbtk.tcl (create_copyright_window): Increase timeout from 15 seconds to 30 seconds. --- gdb/top.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'gdb/top.c') diff --git a/gdb/top.c b/gdb/top.c index a5a90f4..a55a9eb 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -2748,28 +2748,42 @@ document_command (comname, from_tty) } void -print_gnu_advertisement () -{ - printf_unfiltered ("\ -GDB is free software and you are welcome to distribute copies of it\n\ - under certain conditions; type \"show copying\" to see the conditions.\n\ -There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\ -"); -} - -void print_gdb_version (stream) GDB_FILE *stream; { + /* From GNU coding standards, first line is meant to be easy for a + program to parse, and is just canonical program name and version + number, which starts after last space. */ + + fprintf_filtered (stream, "GNU gdb %s\n", version); + + /* Second line is a copyright notice. */ + + fprintf_filtered (stream, "Copyright 1996 Free Software Foundation, Inc.\n"); + + /* Following the copyright is a brief statement that the program is + free software, that users are free to copy and change it on + certain conditions, that it is covered by the GNU GPL, and that + there is no warranty. */ + fprintf_filtered (stream, "\ -GDB %s (%s", version, host_name); +GDB is free software, covered by the GNU General Public License, and you are\n\ +welcome to change it and/or distribute copies of it under certain conditions.\n\ +Type \"show copying\" to see the conditions.\n\ +There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"); - if (!STREQ (host_name, target_name)) - fprintf_filtered (stream, " --target %s", target_name); + /* After the required info we print the configuration information. */ - fprintf_filtered (stream, "), "); - wrap_here(""); - fprintf_filtered (stream, "Copyright 1996 Free Software Foundation, Inc."); + fprintf_filtered (stream, "This GDB was configured as \""); + if (!STREQ (host_name, target_name)) + { + fprintf_filtered (stream, "--host=%s --target=%s", host_name, target_name); + } + else + { + fprintf_filtered (stream, "%s", host_name); + } + fprintf_filtered (stream, "\"."); } /* ARGSUSED */ @@ -2779,7 +2793,6 @@ show_version (args, from_tty) int from_tty; { immediate_quit++; - print_gnu_advertisement (); print_gdb_version (gdb_stdout); printf_filtered ("\n"); immediate_quit--; -- cgit v1.1