/* Kernel Object Display generic routines and callbacks
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Fernando Nasser <fnasser@cygnus.com> for Cygnus Solutions.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "command.h"
/* See if buffer can hold the query (usually it can, as the query is
short). */
if (strlen (arg) >= bufsiz)
- error ("kod: query argument too long");
+ error (_("kod: query argument too long"));
/* Send actual request. */
if (target_read_partial (¤t_target, TARGET_OBJECT_KOD,
{
char *p;
- /* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
- function clones the set command passed as a parameter. The clone
- operation will include (BUG?) any ``set'' command callback, if
- present. Commands like ``info set'' call all the ``show''
- command callbacks. Unfortunately, for ``show'' commands cloned
- from ``set'', this includes callbacks belonging to ``set''
- commands. Making this worse, this only occures if
- deprecated_add_show_from_set() is called after add_cmd_sfunc()
- (BUG?). */
-
- if (cmd_type (command) != set_cmd)
- return;
-
/* If we had already had an open OS, close it. */
if (gdb_kod_close)
(*gdb_kod_close) ();
/* Add kod related info commands to gdb. */
add_info (operating_system, info_kod_command,
- "Displays information about Kernel Objects.");
+ _("Displays information about Kernel Objects."));
p = strrchr (kodlib, '-');
if (p != NULL)
gdb_kod_close = cisco_kod_close;
}
else
- error ("Unknown operating system: %s\n", operating_system);
+ error (_("Unknown operating system: %s."), operating_system);
}
void
{
struct cmd_list_element *c;
- c = add_set_cmd ("os", no_class, var_string,
- (char *) &operating_system,
- "Set operating system",
- &setlist);
- set_cmd_sfunc (c, kod_set_os);
- deprecated_add_show_from_set (c, &showlist);
+ add_setshow_string_cmd ("os", no_class, &operating_system, _("\
+Set operating system"), _("\
+Show operating system"), NULL,
+ kod_set_os,
+ NULL, /* FIXME: i18n: */
+ &setlist, &showlist);
}