/[cvs]/ccvs/src/buffer.c
ViewVC logotype

Diff of /ccvs/src/buffer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by dprice, Thu Sep 29 04:42:48 2005 UTC revision 1.64.4.1 by dprice, Thu Oct 20 21:33:09 2005 UTC
# Line 14  Line 14 
14    
15  /* Code for the buffer data structure.  */  /* Code for the buffer data structure.  */
16    
17  #include "cvs.h"  #ifdef HAVE_CONFIG_H
18    # include <config.h>
19    #endif
20    
21  #include "buffer.h"  #include "buffer.h"
22    
23    #include "cvs.h"
24  #include "pagealign_alloc.h"  #include "pagealign_alloc.h"
25    
26  #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)  #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
# Line 951  buf_read_short_line (struct buffer *buf, Line 956  buf_read_short_line (struct buffer *buf,
956  int  int
957  buf_read_data (struct buffer *buf, size_t want, char **retdata, size_t *got)  buf_read_data (struct buffer *buf, size_t want, char **retdata, size_t *got)
958  {  {
     assert (buf->input != NULL);  
   
959      while (buf->data != NULL && buf->data->size == 0)      while (buf->data != NULL && buf->data->size == 0)
960      {      {
961          struct buffer_data *next;          struct buffer_data *next;
# Line 970  buf_read_data (struct buffer *buf, size_ Line 973  buf_read_data (struct buffer *buf, size_
973          int status;          int status;
974          size_t get, nbytes;          size_t get, nbytes;
975    
976            if (!buf->input)
977                /* nonio (memory) buffers have no underlying input methods.  If
978                 * there are no buffer datas, just return EOF.
979                 */
980                return -1;
981    
982          data = get_buffer_data ();          data = get_buffer_data ();
983          if (data == NULL)          if (data == NULL)
984          {          {

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.64.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26