1
0
Fork 0

Convert \r to \n while reading the file

This commit is contained in:
ehofman 2003-08-28 09:40:50 +00:00
parent 6aaec038f8
commit da7d172d37

View file

@ -68,6 +68,10 @@ int reads(int fd, char *buf, unsigned int len) {
&& ((c != '\n') && (c != '\r')); && ((c != '\n') && (c != '\r'));
i++) i++)
buf[i] = c; buf[i] = c;
if (buf[i] == '\r')
buf[i] = '\n';
return res; return res;
} }