Query: ne_buffer_finish
OS: opensolaris
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
NE_BUFFER_DESTROY(3) neon API reference NE_BUFFER_DESTROY(3)NAMEne_buffer_destroy, ne_buffer_finish - destroy a buffer objectSYNOPSIS#include <ne_string.h> void ne_buffer_destroy (ne_buffer *buf); char *ne_buffer_finish (ne_buffer *buf);DESCRIPTIONne_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 VALUEne_buffer_finish returns the malloc-allocated string stored in the buffer.EXAMPLESAn 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 ALSOne_buffer(3), ne_buffer_create(3), ne_buffer_zappend(3)AUTHORJoe Orton <neon@webdav.org>.ATTRIBUTESSee attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWneon | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+NOTESSource for Neon is available on http://opensolaris.org.ATTRIBUTESSee attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWneon | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+NOTESSource for Neon is available on http://opensolaris.org. neon 0.25.5 20 January 2006 NE_BUFFER_DESTROY(3)
Related Man Pages |
---|
ne_buffer_append(3) - opensolaris |
ne_buffer_grow(3) - opensolaris |
ne_buffer_zappend(3) - opensolaris |
ne_calloc(3) - opensolaris |
ne_oom_callback(3) - opensolaris |
Similar Topics in the Unix Linux Community |
---|
PHP Man Pages and Forum Integration |