Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ne_buffer_altered(3) [redhat man page]

NE_BUFFER_CLEAR(3)						neon API reference						NE_BUFFER_CLEAR(3)

NAME
ne_buffer_clear, ne_buffer_grow, ne_buffer_altered - general purpose of group of functions SYNOPSIS
#include <ne_string.h> void ne_buffer_clear (ne_buffer *buf); void ne_buffer_altered (ne_buffer *buf); void ne_buffer_grow (ne_buffer *buf, size_t size); DESCRIPTION
The ne_buffer_clear function sets the string stored in buf to be the empty string (""). The ne_buffer_altered function must be used after the string stored in the buffer buf is modified by directly rather than using ne_buf- fer_append(3), ne_buffer_zappend(3) or ne_buffer_concat(3). The ne_buffer_grow function ensures that at least size bytes are allocated for the string; this can be used if a large amount of data is going to be appended to the buffer and may result in more efficient memory allocation. AUTHOR
Joe Orton <neon@webdav.org>. neon 0.23.5 8 October 2002 NE_BUFFER_CLEAR(3)

Check Out this Related Man Page

NE_BUFFER_DESTROY(3)						neon API reference					      NE_BUFFER_DESTROY(3)

NAME
ne_buffer_destroy, ne_buffer_finish - destroy a buffer object SYNOPSIS
#include <ne_string.h> void ne_buffer_destroy (ne_buffer *buf); char *ne_buffer_finish (ne_buffer *buf); DESCRIPTION
ne_buffer_destroy frees all memory associated with the buffer. ne_buffer_finish frees the buffer structure, but not the actual string stored in the buffer, which is returned and must be free()d by the caller. Any use of the buffer object after calling either of these functions gives undefined behaviour. RETURN VALUE
ne_buffer_finish returns the malloc-allocated string stored in the buffer. EXAMPLES
An example use of ne_buffer_finish; the duplicate function returns a string made up of n copies of str: static char *duplicate(int n, const char *str) { ne_buffer *buf = ne_buffer_create(); while (n--) { ne_buffer_zappend(buf, str); } return ne_buffer_finish(buf); } SEE ALSO
ne_buffer(3), ne_buffer_create(3), ne_buffer_zappend(3) AUTHOR
Joe Orton <neon@webdav.org>. neon 0.23.5 8 October 2002 NE_BUFFER_DESTROY(3)
Man Page