comparison src/console-stream.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents fe104dbd9147
children a2f645c6b9f8
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
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 = 50 con->console_data = xnew_and_zero (struct stream_console);
51 (struct stream_console *) xmalloc (sizeof (struct stream_console));
52
53 /* zero out all slots. */
54 memset (con->console_data, 0, sizeof (struct stream_console));
55 } 51 }
56 52
57 static void 53 static void
58 stream_init_console (struct console *con, Lisp_Object params) 54 stream_init_console (struct console *con, Lisp_Object params)
59 { 55 {
112 108
113 static void 109 static void
114 stream_delete_console (struct console *con) 110 stream_delete_console (struct console *con)
115 { 111 {
116 if (/* CONSOLE_STREAM_DATA (con)->needs_newline */ 112 if (/* CONSOLE_STREAM_DATA (con)->needs_newline */
117 stdout_needs_newline) /* #### clean this up */ 113 stdout_needs_newline) /* #### clean this up */
118 { 114 {
119 fputc ('\n', CONSOLE_STREAM_DATA (con)->outfd); 115 fputc ('\n', CONSOLE_STREAM_DATA (con)->outfd);
120 fflush (CONSOLE_STREAM_DATA (con)->outfd); 116 fflush (CONSOLE_STREAM_DATA (con)->outfd);
121 } 117 }
122 if (CONSOLE_STREAM_DATA (con)->infd != stdin) 118 if (CONSOLE_STREAM_DATA (con)->infd != stdin)