1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
/* 
|| This file is part of Pike. For copyright information see COPYRIGHT. 
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING 
|| for more information. 
*/ 
 
#include "stralloc.h" 
 
struct buffer 
{ 
  unsigned int allocated_size; 
  unsigned int size, rpos; 
  p_wchar2 *data; 
}; 
 
void uc_buffer_write( struct buffer *d, p_wchar2 data ); 
INT32 uc_buffer_read( struct buffer *d ); 
struct buffer *uc_buffer_new( void ); 
struct buffer *uc_buffer_write_pikestring( struct buffer *d, 
                                           struct pike_string *s ); 
void uc_buffer_free( struct buffer *d); 
struct pike_string *uc_buffer_to_pikestring( struct buffer *d ); 
void uc_buffer_insert( struct buffer *b, unsigned int pos, p_wchar2 c ); 
struct buffer *uc_buffer_from_pikestring( struct pike_string *s ); 
struct buffer *uc_buffer_new_size( int s );