27 lines
		
	
	
		
			579 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			579 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
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;
 | 
						|
}
 |