campo-sirio/at/atnext.cpp

27 lines
579 B
C++
Raw Normal View History

int TFile_text::next()
{
CHECK(_current, "NULL current record");
if (_current->length() > 0)
fstream::read((char*)_current, _current->length());
else
TString record = "";
bool trovato = FALSE;
while (!trovato && good() && !eof()) do
{
char readchar = get();
const char* separator = separator();
if (readchar = separator[0])
{
int actchar = 1
while (actchar < separator.len() && readchar = separator[actchar-1]) do
{
actchar++;
}
}
else
record << readchar;
}
// manca la lettura per file con separatore
return 0;
}