do_print.c: fix CR/LF handling
git-svn-id: svn://kolibrios.org@1409 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1402c59305
commit
acfa104846
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue