2018-02-21 18:50:23 +00:00
|
|
|
#include "io.h"
|
2018-02-21 20:25:03 +00:00
|
|
|
#ifdef __linux__
|
|
|
|
#include "linux.h"
|
|
|
|
#endif // __linux__
|
2018-02-21 18:50:23 +00:00
|
|
|
|
2018-02-21 20:25:03 +00:00
|
|
|
static void
|
|
|
|
repl(IO &interface)
|
|
|
|
{
|
|
|
|
static char lbuf[81];
|
|
|
|
|
|
|
|
while (true) {
|
|
|
|
interface.rdln(lbuf, 80);
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2018-02-21 18:50:23 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
2018-02-21 20:25:03 +00:00
|
|
|
#ifdef __linux__
|
|
|
|
Console interface;
|
|
|
|
#endif
|
|
|
|
repl(interface);
|
2018-02-21 18:50:23 +00:00
|
|
|
return 0;
|
|
|
|
}
|