Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
266:18d185df8c54 | 267:966663fcf606 |
---|---|
45 Lisp_Object Vstdio_str; | 45 Lisp_Object Vstdio_str; |
46 | 46 |
47 static void | 47 static void |
48 allocate_stream_console_struct (struct console *con) | 48 allocate_stream_console_struct (struct console *con) |
49 { | 49 { |
50 con->console_data = xnew_and_zero (struct stream_console); | 50 if (!con->console_data) |
51 { | |
52 con->console_data = xnew_and_zero (struct stream_console); | |
53 } | |
54 else | |
55 { | |
56 memset(con->console_data, 0, sizeof (struct stream_console)); | |
57 } | |
51 } | 58 } |
52 | 59 |
53 static void | 60 static void |
54 stream_init_console (struct console *con, Lisp_Object params) | 61 stream_init_console (struct console *con, Lisp_Object params) |
55 { | 62 { |
99 static void | 106 static void |
100 free_stream_console_struct (struct console *con) | 107 free_stream_console_struct (struct console *con) |
101 { | 108 { |
102 struct stream_console *tcon = (struct stream_console *) con->console_data; | 109 struct stream_console *tcon = (struct stream_console *) con->console_data; |
103 if (tcon) | 110 if (tcon) |
104 xfree (tcon); | 111 { |
112 xfree (tcon); | |
113 con->console_data = NULL; | |
114 } | |
105 } | 115 } |
106 | 116 |
107 extern int stdout_needs_newline; | 117 extern int stdout_needs_newline; |
108 | 118 |
109 static void | 119 static void |
165 | 175 |
166 static void | 176 static void |
167 stream_init_frame_1 (struct frame *f, Lisp_Object props) | 177 stream_init_frame_1 (struct frame *f, Lisp_Object props) |
168 { | 178 { |
169 struct device *d = XDEVICE (FRAME_DEVICE (f)); | 179 struct device *d = XDEVICE (FRAME_DEVICE (f)); |
180 #if 0 | |
170 if (!NILP (DEVICE_FRAME_LIST (d))) | 181 if (!NILP (DEVICE_FRAME_LIST (d))) |
171 error ("Only one frame allowed on stream devices"); | 182 error ("Only one frame allowed on stream devices"); |
172 | 183 #endif |
173 f->name = build_string ("stream"); | 184 f->name = build_string ("stream"); |
174 f->height = 80; | 185 f->height = 80; |
175 f->width = 24; | 186 f->width = 24; |
176 f->visible = 0; /* so redisplay doesn't try to do anything */ | 187 f->visible = 0; /* so redisplay doesn't try to do anything */ |
177 } | 188 } |