- if (stream->textMode)
- {
- if (c == '\n')
- {
- if (stream->bufTech == _IOFBF)
- {
- *stream->upto++ = '\r';
- *stream->upto++ = '\n';
- }
- else
- {
- buf[0] = (char)c;
- if (fwrite(buf, 1, 1, stream) != 1)
- {
- return (EOF);
- }
- }
- }
- else
- {
- *stream->upto++ = (char)c;
- }
- }
- else
- {
- *stream->upto++ = (char)c;
- }