/[qemacs]/qemacs/buffer.c
ViewVC logotype

Diff of /qemacs/buffer.c

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

revision 1.8 by chqrlie, Wed May 11 14:35:54 2005 UTC revision 1.9 by chqrlie, Fri Jul 8 09:30:44 2005 UTC
# Line 113  static int eb_rw(EditBuffer *b, int offs Line 113  static int eb_rw(EditBuffer *b, int offs
113  }  }
114    
115  /* We must have: 0 <= offset < b->total_size */  /* We must have: 0 <= offset < b->total_size */
116  int eb_read(EditBuffer *b, int offset, u8 *buf, int size)  int eb_read(EditBuffer *b, int offset, void *buf, int size)
117  {  {
118      return eb_rw(b, offset, buf, size, 0);      return eb_rw(b, offset, buf, size, 0);
119  }  }
120    
121  /* Note: eb_write can be used to insert after the end of the buffer */  /* Note: eb_write can be used to insert after the end of the buffer */
122  void eb_write(EditBuffer *b, int offset, u8 *buf, int size)  void eb_write(EditBuffer *b, int offset, void *buf_arg, int size)
123  {  {
124      int len, left;      int len, left;
125        u8 *buf = buf_arg;
126            
127      len = eb_rw(b, offset, buf, size, 1);      len = eb_rw(b, offset, buf, size, 1);
128      left = size - len;      left = size - len;
# Line 330  void eb_insert_buffer(EditBuffer *dest, Line 331  void eb_insert_buffer(EditBuffer *dest,
331    
332  /* Insert 'size' bytes from 'buf' into 'b' at offset 'offset'. We must  /* Insert 'size' bytes from 'buf' into 'b' at offset 'offset'. We must
333     have : 0 <= offset <= b->total_size */     have : 0 <= offset <= b->total_size */
334  void eb_insert(EditBuffer *b, int offset, const u8 *buf, int size)  void eb_insert(EditBuffer *b, int offset, const void *buf, int size)
335  {  {
336      eb_addlog(b, LOGOP_INSERT, offset, size);      eb_addlog(b, LOGOP_INSERT, offset, size);
337    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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