/
dieoska
/
ddnet
Обзор
Документация
Войти
/
dieoska
/
ddnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/engine/shared/linereader.h
23 строки
689 B
Robert Müller
Rewrite and fix line reader, read entire file into memory
28 июн 2024, 23:18
28 июн 2024, 23:18
a17f7b5
Код
Авторство
О чём код?
/* (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 class CLineReader { char *m_pBuffer; unsigned m_BufferPos; bool m_ReadLastLine; public: CLineReader(); ~CLineReader(); bool OpenFile(IOHANDLE File); void OpenBuffer(char *pBuffer); // Buffer must have been allocated with malloc, will be freed by the line reader const char *Get(); // Returned string is valid until the line reader is destroyed }; #endif