along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdio.h>
+#include "defs.h"
+
#include <sys/ioctl.h>
#include <sys/param.h>
#include <pwd.h>
#include <ctype.h>
#include <string.h>
-#include "defs.h"
#include "signals.h"
#include "gdbcmd.h"
#include "terminal.h"
char *ptr;
long size;
{
- register char *val = (char *) realloc (ptr, size);
+ register char *val =
+ ptr ? (char *) realloc (ptr, size) : (char*) malloc (size);
if (!val)
fatal ("virtual memory exhausted.", 0);
return val;
{
if (spaces)
free (spaces);
- spaces = malloc (n+1);
+ spaces = (char *) malloc (n+1);
for (t = spaces+n; t != spaces;)
*--t = ' ';
spaces[n] = '\0';
"Set number of characters gdb thinks are in a line.",
&setlist);
add_show_from_set (c, &showlist);
- c->function = set_width_command;
+ c->function.sfunc = set_width_command;
add_show_from_set
(add_set_cmd ("height", class_support,