MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


neon API reference                           NEBUFERDESTROY(3)



NAME
     nebufferdestroy,  nebufferfinish  -  destroy  a   buffer
     object

SYNOPSIS
     #include 


     void nebufferdestroy (nebuffer *buf);

     char *nebufferfinish (nebuffer *buf);


DESCRIPTION
     nebufferdestroy  frees  all  memory  associated  with  the
     buffer. nebufferfinish 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
     nebufferfinish returns the malloc-allocated string  stored
     in the buffer.


EXAMPLES
     An example use of nebufferfinish; the  duplicate  function
     returns a string made up of n copies of str:

     static char *duplicate(int n, const char *str)
     {
       nebuffer *buf = nebuffercreate();
       while (n--) {
         nebufferzappend(buf, str);
       }
       return nebufferfinish(buf);
     }


SEE ALSO
     nebuffer(3), nebuffercreate(3), nebufferzappend(3)


AUTHOR
     Joe Orton .

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-



neon 0.25.5       Last change: 20 January 2006                  1






neon API reference                           NEBUFERDESTROY(3)



     butes:

     box; cbp-1  cbp-1 l  l .  ATRIBUTE TYPE ATRIBUTE VALUE =
     Availability   SUNWneon = Interface Stability Volatile

NOTES
     Source for Neon is available on http:/opensolaris.org.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWneon       
    
     Interface Stability  Volatile       
    

NOTES
     Source for Neon is available on http:/opensolaris.org.

































neon 0.25.5       Last change: 20 January 2006                  2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™