do_print.c: fix CR/LF handling

git-svn-id: svn://kolibrios.org@1409 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2010-02-13 11:26:42 +00:00
parent 1402c59305
commit acfa104846

View File

@ -128,13 +128,11 @@ _doprnt(register const char *fmt, va_list ap, FILE *stream)
while (c = *fmt++) {
if (c != '%') {
#ifdef CPM
if (c == '\n') {
if (putc('\r', stream) == EOF)
return nrchars ? -nrchars : -1;
nrchars++;
}
#endif
if (putc(c, stream) == EOF)
return nrchars ? -nrchars : -1;
nrchars++;
@ -184,13 +182,11 @@ _doprnt(register const char *fmt, va_list ap, FILE *stream)
switch (c = *fmt++) {
default:
#ifdef CPM
if (c == '\n') {
if (putc('\r', stream) == EOF)
return nrchars ? -nrchars : -1;
nrchars++;
}
#endif
if (putc(c, stream) == EOF)
return nrchars ? -nrchars : -1;
nrchars++;