1234567891011121314151617181920212223242526272829 |
- #ifndef FILE_READER_H
- #define FILE_READER_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "Error.h"
- typedef struct FileReader {
- unsigned char* data;
- const char* path;
- int length;
- int readIndex;
- int line;
- } FileReader;
- void frInit(const char* path, FileReader* fr, Error* e);
- void frDelete(FileReader* fr);
- int frRead(FileReader* fr);
- int frPeek(FileReader* fr);
- bool frReadIf(FileReader* fr, int c);
- #ifdef __cplusplus
- }
- #endif
- #endif
|