ne_buffer_finish man page on aLinux

Man page or keyword search:  
man Server   7435 pages
apropos Keyword Search (all sections)
Output format
aLinux logo
[printable version]

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_buf‐
       fer_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 buf‐
       fer.

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.25.5			20 January 2006		  NE_BUFFER_DESTROY(3)
[top]

List of man pages available for aLinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net