version 1.49, 2004/06/14 01:44:39 |
version 1.50, 2004/08/11 21:44:32 |
|
|
|
|
bufsiz = sizeof(buf); |
bufsiz = sizeof(buf); |
cp = buf; |
cp = buf; |
while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n') { |
while (bufsiz-- && (n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') { |
if (*cp == '\r') |
if (*cp == '\r') |
*cp = '\n'; |
*cp = '\n'; |
cp++; |
cp++; |
|
|
congreet(s); |
congreet(s); |
return; |
return; |
} |
} |
n = read(s, c->c_data + c->c_off, c->c_len - c->c_off); |
n = atomicio(read, s, c->c_data + c->c_off, c->c_len - c->c_off); |
if (n < 0) { |
if (n < 0) { |
error("read (%s): %s", c->c_name, strerror(errno)); |
error("read (%s): %s", c->c_name, strerror(errno)); |
confree(s); |
confree(s); |