1
#ifndef CLIENT_MY_READLINE_INCLUDED
2
#define CLIENT_MY_READLINE_INCLUDED
5
Copyright (c) 2000, 2011, Oracle and/or its affiliates
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; version 2 of the License.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
/* readline for batch mode */
23
typedef struct st_line_buffer
26
char *buffer; /* The buffer itself, grown as needed. */
27
char *end; /* Pointer at buffer end */
28
char *start_of_line,*end_of_line;
29
uint bufread; /* Number of bytes to get with each read(). */
32
ulong read_length; /* Length of last read string */
37
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
38
extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
39
extern char *batch_readline(LINE_BUFFER *buffer, bool binary_mode);
40
extern void batch_readline_end(LINE_BUFFER *buffer);
42
#endif /* CLIENT_MY_READLINE_INCLUDED */