NAME
curlslistappend - add a string to an slist
SYNOPSIS
##iinncclluuddee <
ssttrruucctt ccuurrllsslliisstt **ccuurrllsslliissttaappppeenndd((ssttrruucctt ccuurrllsslliisstt **list, ccoonnsstt cchhaarr ** string));;> DESCRIPTION
curlslistappend() appends a specified string to a linked list of strings. The existing list should be passed as the first argument while the new list is returned from this function. The specified string has been appended when this function returns. curlslistappend() copies the string. The list should be freed again (after usage) with ccuurrllsslliissttffrreeeeaallll((33)). RREETTUURRNN VVAALLUUEE A null pointer is returned if anything went wrong, otherwise the new list pointer is returned. EEXXAAMMPPLLEE CURL handle; curlslist *slist=NULL; slist = curlslistappend(slist, "pragma:"); curleasysetopt(handle, CURLOPTHTTPHEADER, slist); curleasyperform(handle); curlslistfreeall(slist); /* free the list again */SEE ALSO
ccuurrllsslliissttffrreeeeaallll(3), libcurl 7.10.4 19 Jun 2003 curlslistappend(3)