Subversion Repositories HelenOS-historic

Compare Revisions

Regard whitespace Rev 1653 → Rev 1719

/uspace/trunk/libc/generic/io/stream.c
81,7 → 81,6
static ssize_t write_stdout(void *param, const void *buf, size_t count)
{
int i;
ipcarg_t r0,r1;
 
for (i = 0; i < count; i++)
async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
90,12 → 89,9
}
 
 
 
static stream_t open_stdin(void)
{
stream_t stream;
int phoneid;
int res;
if (console_phone < 0) {
while ((console_phone = ipc_connect_me_to(PHONE_NS, SERVICE_CONSOLE, 0)) < 0) {
104,6 → 100,7
}
stream.r = read_stdin;
stream.w = NULL;
stream.param = 0;
stream.phone = console_phone;
113,7 → 110,6
static stream_t open_stdout(void)
{
stream_t stream;
int res;
 
if (console_phone < 0) {
while ((console_phone = ipc_connect_me_to(PHONE_NS, SERVICE_CONSOLE, 0)) < 0) {
121,9 → 117,11
}
}
stream.r = NULL;
stream.w = write_stdout;
stream.phone = console_phone;
stream.param = 0;
return stream;
}
 
139,6 → 137,7
 
while (((streams[c].w) || (streams[c].r)) && (c < FDS))
c++;
if (c == FDS)
return EMFILE;
156,10 → 155,13
streams[c].w = write_stderr;
return c;
}
if (!strcmp(fname, "null")) {
streams[c].w = write_null;
return c;
}
return -1;
}
 
 
191,5 → 193,3
 
/** @}
*/