~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/readline.cc

  • Committer: Monty Taylor
  • Date: 2008-10-05 01:41:06 UTC
  • Revision ID: monty@inaugust.com-20081005014106-bulqe4kp7i6ipts1
Moved qsort declarations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    return 0;
36
36
  if (init_line_buffer(line_buff,fileno(file),IO_SIZE,max_size))
37
37
  {
38
 
    free(line_buff);
 
38
    my_free(line_buff,MYF(0));
39
39
    return 0;
40
40
  }
41
41
  return line_buff;
62
62
{
63
63
  if (line_buff)
64
64
  {
65
 
    free(line_buff->buffer);
66
 
    free(line_buff);
 
65
    my_free(line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR));
 
66
    my_free(line_buff,MYF(0));
67
67
  }
68
68
}
69
69
 
76
76
      return 0;
77
77
  if (init_line_buffer_from_string(line_buff,str))
78
78
  {
79
 
    free(line_buff);
 
79
    my_free(line_buff,MYF(0));
80
80
    return 0;
81
81
  }
82
82
  return line_buff;
111
111
  uint old_length=(uint)(buffer->end - buffer->buffer);
112
112
  uint length= (uint) strlen(str);
113
113
  if (!(buffer->buffer= buffer->start_of_line= buffer->end_of_line=
114
 
        (char*) my_realloc((unsigned char*) buffer->buffer, old_length+length+2,
 
114
        (char*) my_realloc((uchar*) buffer->buffer, old_length+length+2,
115
115
                           MYF(MY_FAE|MY_ALLOW_ZERO_PTR))))
116
116
    return 1;
117
117
  buffer->end= buffer->buffer + old_length;
166
166
  }
167
167
 
168
168
  /* Read in new stuff. */
169
 
  if ((read_count= my_read(buffer->file, (unsigned char*) buffer->end, read_count,
 
169
  if ((read_count= my_read(buffer->file, (uchar*) buffer->end, read_count,
170
170
                           MYF(MY_WME))) == MY_FILE_ERROR)
171
171
    return (size_t) -1;
172
172