Merge branch 'order_dist_list'

This commit is contained in:
Evgeniy A. Dushistov
2017-04-22 21:25:58 +03:00
5 changed files with 77 additions and 73 deletions

View File

@@ -34,18 +34,19 @@
#include "readline.hpp"
bool stdio_getline(FILE *in, std::string & str)
{
assert(in != nullptr);
str.clear();
int ch;
while ((ch=fgetc(in)) != EOF && ch != '\n')
str += ch;
return EOF != ch;
}
#ifndef WITH_READLINE
namespace {
static bool stdio_getline(FILE *in, std::string & str)
{
str.clear();
int ch;
while ((ch=fgetc(in)) != EOF && ch != '\n')
str += ch;
return EOF != ch;
}
class dummy_readline : public IReadLine {
public:
bool read(const std::string &banner, std::string &line) override {