aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-30 17:55:47 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-30 17:55:47 +0000
commitbe7d7357efe8cad63c8920b7fa69f6d2324d6fa5 (patch)
treede2b38ec156348dd3c5cf05856c4585c5c67a8eb
parent185d09adc379a495103643c594a28d5f80110978 (diff)
downloadgdb-be7d7357efe8cad63c8920b7fa69f6d2324d6fa5.zip
gdb-be7d7357efe8cad63c8920b7fa69f6d2324d6fa5.tar.gz
gdb-be7d7357efe8cad63c8920b7fa69f6d2324d6fa5.tar.bz2
2004-07-30 Andrew Cagney <cagney@gnu.org>
* complaints.c (_initialize_complaints): Pass NULL to add_setshow_zinteger_cmd for help_doc. * cli/cli-decode.c (add_setshow_cmd_full): Handle a NULL help_doc.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/cli/cli-decode.c15
-rw-r--r--gdb/complaints.c3
3 files changed, 20 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4322af5..f42911d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2004-07-30 Andrew Cagney <cagney@gnu.org>
+ * complaints.c (_initialize_complaints): Pass NULL to
+ add_setshow_zinteger_cmd for help_doc.
+ * cli/cli-decode.c (add_setshow_cmd_full): Handle a NULL help_doc.
+
+2004-07-30 Andrew Cagney <cagney@gnu.org>
+
Fix PR i18n/761.
* Makefile.in (.SUFFIXES): Add po .gmo, and .pox.
(.PHONY): Add all-po install-po, uninstall-po, clean-po,
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index d908cf5..cf008eb 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -340,8 +340,19 @@ add_setshow_cmd_full (char *name,
{
struct cmd_list_element *set;
struct cmd_list_element *show;
- char *full_set_doc = xstrprintf ("%s\n%s", set_doc, help_doc);
- char *full_show_doc = xstrprintf ("%s\n%s", show_doc, help_doc);
+ char *full_set_doc;
+ char *full_show_doc;
+
+ if (help_doc != NULL)
+ {
+ full_set_doc = xstrprintf ("%s\n%s", set_doc, help_doc);
+ full_show_doc = xstrprintf ("%s\n%s", show_doc, help_doc);
+ }
+ else
+ {
+ full_set_doc = xstrdup (set_doc);
+ full_show_doc = xstrdup (show_doc);
+ }
set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
full_set_doc, set_list);
if (set_func != NULL)
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 378ad70..8630fde 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -313,8 +313,7 @@ _initialize_complaints (void)
{
add_setshow_zinteger_cmd ("complaints", class_support, &stop_whining, "\
Set max number of complaints about incorrect symbols.", "\
-Show max number of complaints about incorrect symbols.", "\
-Set to zero to disable incorrect symbol complaints.", "\
+Show max number of complaints about incorrect symbols.", NULL, "\
Max number of complaints about incorrect symbols is %s.",
NULL, NULL,
&setlist, &showlist);