mirror of
https://github.com/ddnet/ddnet.git
synced 2024-10-19 23:38:19 +00:00
05af24a052
Move a couple of trivial type definitions to `<base/types.h>` instead.
21 lines
661 B
C++
21 lines
661 B
C++
/* (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. */
|
|
#ifndef ENGINE_SHARED_LINEREADER_H
|
|
#define ENGINE_SHARED_LINEREADER_H
|
|
#include <base/types.h>
|
|
|
|
// buffered stream for reading lines, should perhaps be something smaller
|
|
class CLineReader
|
|
{
|
|
char m_aBuffer[4 * 8192 + 1]; // 1 additional byte for null termination
|
|
unsigned m_BufferPos;
|
|
unsigned m_BufferSize;
|
|
unsigned m_BufferMaxSize;
|
|
IOHANDLE m_File;
|
|
|
|
public:
|
|
void Init(IOHANDLE File);
|
|
char *Get(); // Returned string is only valid until next Get() call
|
|
};
|
|
#endif
|