~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/readline.c

  • Committer: Brian Aker
  • Date: 2008-08-10 01:37:46 UTC
  • Revision ID: brian@tangent.org-20080810013746-9hp3l1f59j9xdmm0
ulong cleanp in client apps

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <mystrings/m_string.h>
21
21
#include "my_readline.h"
22
22
 
23
 
static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
24
 
                            ulong max_size);
 
23
static bool init_line_buffer(LINE_BUFFER *buffer,File file,uint32_t size,
 
24
                            uint32_t max_size);
25
25
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
26
26
static size_t fill_buffer(LINE_BUFFER *buffer);
27
 
static char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length);
28
 
 
29
 
 
30
 
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
 
27
static char *intern_read_line(LINE_BUFFER *buffer,uint32_t *out_length);
 
28
 
 
29
 
 
30
LINE_BUFFER *batch_readline_init(uint32_t max_size,FILE *file)
31
31
{
32
32
  LINE_BUFFER *line_buff;
33
33
  if (!(line_buff=(LINE_BUFFER*)
45
45
char *batch_readline(LINE_BUFFER *line_buff)
46
46
{
47
47
  char *pos;
48
 
  ulong out_length;
 
48
  uint32_t out_length;
49
49
 
50
50
  if (!(pos=intern_read_line(line_buff,&out_length)))
51
51
    return 0;
88
88
******************************************************************************/
89
89
 
90
90
static bool
91
 
init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,ulong max_buffer)
 
91
init_line_buffer(LINE_BUFFER *buffer,File file,uint32_t size,uint32_t max_buffer)
92
92
{
93
93
  buffer->file=file;
94
94
  buffer->bufread=size;
184
184
 
185
185
 
186
186
 
187
 
char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length)
 
187
char *intern_read_line(LINE_BUFFER *buffer,uint32_t *out_length)
188
188
{
189
189
  char *pos;
190
190
  size_t length;
207
207
      pos--;                                    /* break line here */
208
208
    }
209
209
    buffer->end_of_line=pos+1;
210
 
    *out_length=(ulong) (pos + 1 - buffer->eof - buffer->start_of_line);
 
210
    *out_length=(uint32_t) (pos + 1 - buffer->eof - buffer->start_of_line);
211
211
    return(buffer->start_of_line);
212
212
  }
213
213
}