2002-07-03 Martin M. Hunt <hunt@redhat.com>
[deliverable/binutils-gdb.git] / gdb / top.c
index 7acbb938a35b4fdee513dcdab57c8050b9a8984e..4203f08b61600af001788c8ba4a5894fc7c955b8 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -703,12 +703,12 @@ execute_command (char *p, int from_tty)
        execute_user_command (c, arg);
       else if (c->type == set_cmd || c->type == show_cmd)
        do_setshow_command (arg, from_tty & caution, c);
-      else if (c->func == NULL)
+      else if (!cmd_func_p (c))
        error ("That is not a command, just a help topic.");
       else if (call_command_hook)
        call_command_hook (c, arg, from_tty & caution);
       else
-       (*c->func) (c, arg, from_tty & caution);
+       cmd_func (c, arg, from_tty & caution);
        
       /* If this command has been post-hooked, run the hook last. */
       execute_cmd_post_hook (c);
@@ -1435,7 +1435,7 @@ get_prompt_1 (void *data)
 
                  if (*promptp != gdb_prompt_escape)
                    error ("Syntax error at prompt position %d",
-                          promptp - local_prompt);
+                          (int) (promptp - local_prompt));
                  else
                    {
                      promptp++;        /* skip second escape char */
@@ -1581,7 +1581,7 @@ get_prompt_1 (void *data)
                  break;        /* void type -- no output */
                default:
                  error ("bad data type at prompt position %d",
-                        promptp - local_prompt);
+                        (int) (promptp - local_prompt));
                  break;
                }
              outp += strlen (outp);
@@ -1990,7 +1990,7 @@ Without an argument, saving is enabled.", &sethistlist),
      &showhistlist);
 
   c = add_set_cmd ("size", no_class, var_integer, (char *) &history_size,
-                  "Set the size of the command history, \n\
+                  "Set the size of the command history,\n\
 ie. the number of previous commands to keep a record of.", &sethistlist);
   add_show_from_set (c, &showhistlist);
   set_cmd_sfunc (c, set_history_size_command);
@@ -1998,7 +1998,7 @@ ie. the number of previous commands to keep a record of.", &sethistlist);
   c = add_set_cmd ("filename", no_class, var_filename,
                   (char *) &history_filename,
                   "Set the filename in which to record the command history\n\
- (the list of previous commands of which a record is kept).", &sethistlist);
+(the list of previous commands of which a record is kept).", &sethistlist);
   set_cmd_completer (c, filename_completer);
   add_show_from_set (c, &showhistlist);
 
This page took 0.025469 seconds and 4 git commands to generate.