cleanups for specify "dictionary order by"

This commit is contained in:
Evgeniy A. Dushistov
2017-04-22 21:23:00 +03:00
parent 97b13e6702
commit 1667de0650
3 changed files with 67 additions and 62 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 string& banner, string& line) override {