2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef ENGINE_SHARED_LINEREADER_H
|
|
|
|
#define ENGINE_SHARED_LINEREADER_H
|
|
|
|
#include <base/system.h>
|
|
|
|
|
|
|
|
// buffered stream for reading lines, should perhaps be something smaller
|
|
|
|
class CLineReader
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
char m_aBuffer[4 * 8192];
|
2010-05-29 07:25:38 +00:00
|
|
|
unsigned m_BufferPos;
|
|
|
|
unsigned m_BufferSize;
|
|
|
|
unsigned m_BufferMaxSize;
|
2020-10-27 17:57:14 +00:00
|
|
|
IOHANDLE m_File;
|
2020-09-26 19:41:58 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
2020-10-27 17:57:14 +00:00
|
|
|
void Init(IOHANDLE File);
|
2010-05-29 07:25:38 +00:00
|
|
|
char *Get();
|
|
|
|
};
|
|
|
|
#endif
|