12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
/* readline for batch mode */
18
typedef struct st_line_buffer
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
#ifndef CLIENT_LINEBUFFER_H
17
#define CLIENT_LINEBUFFER_H
21
char *buffer; /* The buffer itself, grown as needed. */
22
char *end; /* Pointer at buffer end */
23
char *start_of_line,*end_of_line;
24
uint bufread; /* Number of bytes to get with each read(). */
27
ulong read_length; /* Length of last read string */
30
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
31
extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
32
extern char *batch_readline(LINE_BUFFER *buffer);
33
extern void batch_readline_end(LINE_BUFFER *buffer);
25
LineBuffer(uint32_t max_size,FILE *file);
27
void addString(const std::string &argument);
31
std::stringstream buffer;
32
std::vector<char> line;
37
#endif /* CLIENT_LINEBUFFER_H */