mirror of
https://github.com/curl/curl.git
synced 2025-01-06 13:44:52 +08:00
b935fd4a07
The mandatory header now has a mandatory list of protocols for which the manpage is relevant. Most man pages already has a "PROTOCOLS" section, but this introduces a stricter way to specify the relevant protocols. cd2nroff verifies that at least one protocol is mentioned (which can be `*`). This information is not used just yet, but A) the PROTOCOLS section can now instead get generated and get a unified wording across all manpages and B) this allows us to more reliably filter/search for protocol specific manpages/options. Closes #13166
930 B
930 B
c: Copyright (C) Daniel Stenberg, daniel@haxx.se, et al.
SPDX-License-Identifier: curl
Title: curl_slist_free_all
Section: 3
Source: libcurl
See-also:
- curl_slist_append (3)
Protocol:
- *
NAME
curl_slist_free_all - free an entire curl_slist list
SYNOPSIS
#include <curl/curl.h>
void curl_slist_free_all(struct curl_slist *list);
DESCRIPTION
curl_slist_free_all() removes all traces of a previously built curl_slist linked list.
Passing in a NULL pointer in list makes this function return immediately with no action.
EXAMPLE
int main(void)
{
CURL *handle;
struct curl_slist *slist = NULL;
slist = curl_slist_append(slist, "X-libcurl: coolness");
if(!slist)
return -1;
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
curl_easy_perform(handle);
curl_slist_free_all(slist); /* free the list again */
}
AVAILABILITY
Always
RETURN VALUE
Nothing.