Mercurial > hg > xemacs-beta
diff src/console-stream.c @ 267:966663fcf606 r20-5b32
Import from CVS: tag r20-5b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:26:29 +0200 |
parents | 677f6a0ee643 |
children | c5d627a313b1 |
line wrap: on
line diff
--- a/src/console-stream.c Mon Aug 13 10:25:39 2007 +0200 +++ b/src/console-stream.c Mon Aug 13 10:26:29 2007 +0200 @@ -47,7 +47,14 @@ static void allocate_stream_console_struct (struct console *con) { - con->console_data = xnew_and_zero (struct stream_console); + if (!con->console_data) + { + con->console_data = xnew_and_zero (struct stream_console); + } + else + { + memset(con->console_data, 0, sizeof (struct stream_console)); + } } static void @@ -101,7 +108,10 @@ { struct stream_console *tcon = (struct stream_console *) con->console_data; if (tcon) - xfree (tcon); + { + xfree (tcon); + con->console_data = NULL; + } } extern int stdout_needs_newline; @@ -167,9 +177,10 @@ stream_init_frame_1 (struct frame *f, Lisp_Object props) { struct device *d = XDEVICE (FRAME_DEVICE (f)); +#if 0 if (!NILP (DEVICE_FRAME_LIST (d))) error ("Only one frame allowed on stream devices"); - +#endif f->name = build_string ("stream"); f->height = 80; f->width = 24;