src/buffer_edit.c File Reference
Buffer edit operations.
More...
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include "buffer.h"
#include "buffer_internal.h"
#include "buffer_util.h"
#include "data_object.h"
#include "data_object_memory.h"
#include "type_limits.h"
#include "buffer_action.h"
#include "buffer_action_edit.h"
#include "buffer_event.h"
#include "util.h"
#include "debug.h"
Functions |
int | bless_buffer_append (bless_buffer_t *buf, bless_buffer_source_t *src, off_t src_offset, off_t length) |
| Appends data to a bless_buffer_t.
|
int | bless_buffer_insert (bless_buffer_t *buf, off_t offset, bless_buffer_source_t *src, off_t src_offset, off_t length) |
| Inserts data into a bless_buffer_t.
|
int | bless_buffer_delete (bless_buffer_t *buf, off_t offset, off_t length) |
| Delete data from a bless_buffer_t.
|
int | bless_buffer_read (bless_buffer_t *buf, off_t src_offset, void *dst, size_t dst_offset, size_t length) |
| Reads data from a bless_buffer_t.
|
int | bless_buffer_copy (bless_buffer_t *src, off_t src_offset, bless_buffer_t *dst, off_t dst_offset, off_t length) |
| Copies data from a bless_buffer_t to another.
|
int | bless_buffer_find (bless_buffer_t *buf, off_t *match, off_t start_offset, void *data, size_t length, bless_progress_func *progress_func) |
| Searches for data in a bless_buffer_t.
|
Detailed Description
Buffer edit operations.
Function Documentation
Copies data from a bless_buffer_t to another.
- Parameters:
-
| src | the bless_buffer_t to read data from |
| src_offset | the offset in the source bless_buffer_t to start reading from |
| dst | the bless_buffer_t to copy data to |
| dst_offset | the offset in the destination bless_buffer_t to start copying data to |
| length | the length of the data to read |
- Returns:
- the operation error code
Searches for data in a bless_buffer_t.
- Parameters:
-
| buf | the bless_buffer_t to search |
[out] | match | the offset the data was found at or -1 if no match was found |
| start_offset | the offset in the bless_buffer_t to start searching from |
| data | a pointer to the data to search for |
| length | the length of the data to search for |
| progress_func | the bless_progress_cb to call to report the progress of the operation or NULL to disable reporting |
- Returns:
- the offset in the bless_buffer_t where a match was found or an operation error code