pike.git / src / modules / _WhiteFish / buffer.h

version» Context lines:

pike.git/src/modules/_WhiteFish/buffer.h:5:       unsigned int rpos;    /* Read pos */       int read_only;    /* If 1, the buffer cannot be written to (data points to str->str) */       unsigned int allocated_size;    /* The actual allocated size */    -  char *data; +  unsigned char *data;       struct pike_string *str;    /* Used when read_only==1, to save memory. Data points to str->str,    * and str has an extra reference. When the buffer is freed, the    * reference is freed.    */   };         /* Note: All w* and r* functions write and read to the buffer in NBO    * (most significant byte first )    *    * They also handle unaligned data    */    - struct buffer *wf_buffer_new( ); + struct buffer *wf_buffer_new( void );   /* Create a new (uninitalized) buffer. Use wf_buffer_set_empty or    * wf_buffer_set_pike_string to initialize it.    */      void wf_buffer_free( struct buffer *b );   /* Free the contents of the buffer and then the buffer */      void wf_buffer_clear( struct buffer *b );   /* Free the contents of the buffer, Use wf_buffer_set_empty or    * wf_buffer_set_pike_string to initialize it again.
pike.git/src/modules/_WhiteFish/buffer.h:92:   /* Move the read position to pos. if pos is greater than or equal the    * size of the buffer, read_pos is moved to the end of the buffer    * instead.    */      void wf_buffer_seek_w( struct buffer *b, unsigned int pos );   /* Set the write position to pos. If pos is greater than the current    * size of the buffer, the data segment created is zeroed.    */    - void wf_buffer_append( struct buffer *b, char *data, int size ); + void wf_buffer_append( struct buffer *b, unsigned char *data, int size );   /* Append the specified data to the buffer.    * read_only must be 0.    */      int wf_buffer_memcpy( struct buffer *d, struct buffer *s, int nelems );   /* Write nelems elements of data from s to d.    * read_only must be 0.    */      void wf_buffer_rewind_r( struct buffer *b, int n );   /* Subtract n from read_pos.    * If n == -1, the position is set to 0.    */      void wf_buffer_rewind_w( struct buffer *b, int n );   /* Subtract n from size.    * If n == -1, the size is set to 0.    */ -  -  +