]> Git Repo - binutils.git/blobdiff - gdb/command.c
* ser-mac.c (mac_close): Change a typo SetSetBuf to SerSetBuf.
[binutils.git] / gdb / command.c
index 0735baed27022696b800098ba73fcd8f8b82e3ba..a5477ddd32739b9be9d42e859ad820b2f83b1235 100644 (file)
@@ -13,14 +13,15 @@ GNU General Public License for more details.
 
 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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "gdbcmd.h"
 #include "symtab.h"
 #include "value.h"
+#include "wait.h"
 #include <ctype.h>
-#include <string.h>
+#include "gdb_string.h"
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -79,18 +80,19 @@ add_cmd (name, class, fun, doc, list)
   c->class = class;
   c->function.cfunc = fun;
   c->doc = doc;
-  c->prefixlist = 0;
-  c->prefixname = (char *)NULL;
+  c->hook = NULL;
+  c->prefixlist = NULL;
+  c->prefixname = NULL;
   c->allow_unknown = 0;
-  c->hook = 0;
-  c->hookee = 0;
-  c->cmd_pointer = 0;
   c->abbrev_flag = 0;
-  c->type = not_set_cmd;
   c->completer = make_symbol_completion_list;
-  c->var = 0;
+  c->type = not_set_cmd;
+  c->var = NULL;
   c->var_type = var_boolean;
-  c->user_commands = 0;
+  c->enums = NULL;
+  c->user_commands = NULL;
+  c->hookee = NULL;
+  c->cmd_pointer = NULL;
   *list = c;
   return c;
 }
@@ -1047,7 +1049,7 @@ complete_on_enum (enumlist, text, word)
   matchlist = (char **) xmalloc (sizeof_matchlist * sizeof (char *));
   matches = 0;
 
-  for (i = 0; name = enumlist[i]; i++)
+  for (i = 0; (name = enumlist[i]) != NULL; i++)
     if (strncmp (name, text, textlen) == 0)
       {
        if (matches == sizeof_matchlist)
This page took 0.026342 seconds and 4 git commands to generate.