Crossfire Server, Trunk
bufferreader.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2021 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
37 #ifndef BUFFERREADER_H
38 #define BUFFERREADER_H
39 
40 #include "microtar.h"
41 #include "logger.h"
42 
46 struct BufferReader;
47 
53 
59 
71 BufferReader *bufferreader_init_from_file(BufferReader *br, const char *filepath, const char *failureMessage, LogLevel failureLevel);
72 
80 
88 BufferReader *bufferreader_init_from_memory(BufferReader *br, const char *data, size_t length);
89 
96 
104 char *bufferreader_get_line(BufferReader *br, char *buffer, size_t length);
105 
112 
119 
126 
127 #endif /* BUFFERREADER_H */
bufferreader_data_length
size_t bufferreader_data_length(BufferReader *br)
Definition: bufferreader.cpp:144
logger.h
bufferreader_destroy
void bufferreader_destroy(BufferReader *br)
Definition: bufferreader.cpp:40
mtar_t
Definition: microtar.h:51
bufferreader_create
BufferReader * bufferreader_create()
Definition: bufferreader.cpp:31
bufferreader_get_line
char * bufferreader_get_line(BufferReader *br, char *buffer, size_t length)
Definition: bufferreader.cpp:119
microtar.h
bufferreader_next_line
char * bufferreader_next_line(BufferReader *br)
Definition: bufferreader.cpp:102
navar-midane_time.data
data
Definition: navar-midane_time.py:11
mtar_header_t
Definition: microtar.h:38
bufferreader_data
char * bufferreader_data(BufferReader *br)
Definition: bufferreader.cpp:148
bufferreader_init_from_memory
BufferReader * bufferreader_init_from_memory(BufferReader *br, const char *data, size_t length)
Definition: bufferreader.cpp:93
bufferreader_init_from_tar_file
void bufferreader_init_from_tar_file(BufferReader *br, mtar_t *tar, mtar_header_t *h)
Definition: bufferreader.cpp:88
bufferreader_current_line
size_t bufferreader_current_line(BufferReader *br)
Definition: bufferreader.cpp:140
LogLevel
LogLevel
Definition: logger.h:10
bufferreader_init_from_file
BufferReader * bufferreader_init_from_file(BufferReader *br, const char *filepath, const char *failureMessage, LogLevel failureLevel)
Definition: bufferreader.cpp:65
BufferReader
Definition: bufferreader.cpp:21