Skip to content

Commit

Permalink
cleanup: removed CONIO_FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed May 29, 2018
1 parent 48f6c9a commit cac45c8
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions core/src/console/console.cc
Expand Up @@ -35,7 +35,6 @@

#ifdef HAVE_CONIO
#include "conio.h"
//#define CONIO_FIX 1
#else
#define ConInit(x)
#define ConTerm()
Expand Down Expand Up @@ -1636,38 +1635,10 @@ void senditf(const char *fmt,...)

void sendit(const char *buf)
{
#ifdef CONIO_FIX
char obuf[3000];
if (output == stdout || teeout) {
const char *p, *q;
/*
* Here, we convert every \n into \r\n because the
* terminal is in raw mode when we are using
* conio.
*/
for (p=q=buf; (p=strchr(q, '\n')); ) {
int len = p - q;
if (len > 0) {
memcpy(obuf, q, len);
}
memcpy(obuf+len, "\r\n", 3);
q = ++p; /* point after \n */
fputs(obuf, output);
}
if (*q) {
fputs(q, output);
}
fflush(output);
}
if (output != stdout) {
fputs(buf, output);
}
#else
fputs(buf, output);
fflush(output);
if (teeout) {
fputs(buf, stdout);
fflush(stdout);
}
#endif
}

0 comments on commit cac45c8

Please sign in to comment.